text stringlengths 2 1.04M | meta dict |
|---|---|
<bill session="110" type="hc" number="259" updated="2009-01-08T15:59:47-05:00">
<status><vote2 date="1195102800" datetime="2007-11-15" where="s" result="pass" how="by Unanimous Consent" roll=""/></status>
<introduced date="1195102800" datetime="2007-11-15"/>
<titles>
<title type="official" as="introduced">Providing for an adjournment or recess of the two Houses.</title>
</titles>
<sponsor id="400140"/>
<cosponsors>
</cosponsors>
<actions>
<action date="1195153140" datetime="2007-11-15T14:59:00-05:00"><text>Considered as privileged matter.</text><reference label="consideration" ref="CR H14018"/></action>
<vote date="1195154280" how="roll" roll="1113" datetime="2007-11-15T15:18:00-05:00" where="h" type="vote" result="pass" ><text>On agreeing to the resolution Agreed to by the Yeas and Nays: 214 - 196 (Roll no. 1113).</text><reference label="text" ref="CR H14018"/></vote>
<vote date="1195102800" how="by Unanimous Consent" datetime="2007-11-15" where="s" type="vote2" result="pass" ><text>Received in the Senate, considered, and agreed to without amendment by Unanimous Consent.</text><reference label="consideration" ref="CR S14464-14465"/><reference label="text as passed Senate" ref="CR S14464-14465"/></vote>
<action date="1195102800" datetime="2007-11-15"><text>Message on Senate action sent to the House.</text></action>
</actions>
<committees>
</committees>
<relatedbills>
</relatedbills>
<subjects>
</subjects>
<amendments>
</amendments>
<summary>
11/15/2007--Passed House without amendment. (This measure has not been amended since it was introduced. The summary of that version is repeated here.) Provides for an adjournment of the House of Representatives from November 15 or 16, 2007, until December 4, 2007 (or until another time of reassembly under this concurrent resolution), and a recess or adjournment of the Senate on any day between November 15, 2007-November 29, 2007, until December 3, 2007 (or until another time of reassembly). Authorizes the Speaker of the House and the Majority Leader of the Senate, or their respective designees, acting jointly after consultation with the House and Senate Minority Leaders, to notify the Members of the House and the Senate, respectively, to reassemble at such place and time as they may designate whenever, in their opinion, the public interest shall warrant it.
</summary>
</bill>
| {
"content_hash": "c3501cc69577b8b6d08d40eac0b891de",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 871,
"avg_line_length": 72.48484848484848,
"alnum_prop": 0.7454013377926422,
"repo_name": "hashrocket/localpolitics.in",
"id": "857e68a40d0e9580e62289e4190f4ec22a8c900f",
"size": "2392",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/govtrack/110_bills/hc259.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "155887"
},
{
"name": "Ruby",
"bytes": "147059"
}
],
"symlink_target": ""
} |
/**
* @fileOverview Horizontal Rule plugin.
*/
( function() {
var horizontalruleCmd = {
canUndo: false, // The undo snapshot will be handled by 'insertElement'.
exec: function( editor ) {
var hr = editor.document.createElement( 'hr' );
editor.insertElement( hr );
},
allowedContent: 'hr',
requiredContent: 'hr'
};
var pluginName = 'horizontalrule';
// Register a plugin named "horizontalrule".
CKEDITOR.plugins.add( pluginName, {
// jscs:disable maximumLineLength
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
// jscs:enable maximumLineLength
icons: 'horizontalrule', // %REMOVE_LINE_CORE%
hidpi: true, // %REMOVE_LINE_CORE%
init: function( editor ) {
if ( editor.blockless )
return;
editor.addCommand( pluginName, horizontalruleCmd );
editor.ui.addButton && editor.ui.addButton( 'HorizontalRule', {
label: editor.lang.horizontalrule.toolbar,
command: pluginName,
toolbar: 'insert,40'
} );
}
} );
} )();
| {
"content_hash": "3f79510311aec4730e936c41e3b696f4",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 253,
"avg_line_length": 29.6,
"alnum_prop": 0.6646959459459459,
"repo_name": "lcnbala/aura",
"id": "f4deb57510b99e7a400bffd7f0f74498befa4507",
"size": "1345",
"binary": false,
"copies": "20",
"ref": "refs/heads/master",
"path": "aura-resources/src/main/resources/aura/resources/ckeditor/ckeditor-4.x/src/plugins/horizontalrule/plugin.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "884345"
},
{
"name": "GAP",
"bytes": "10087"
},
{
"name": "HTML",
"bytes": "2899877"
},
{
"name": "Java",
"bytes": "7844855"
},
{
"name": "JavaScript",
"bytes": "16276400"
},
{
"name": "PHP",
"bytes": "3345441"
},
{
"name": "Python",
"bytes": "9744"
},
{
"name": "Shell",
"bytes": "19650"
},
{
"name": "XSLT",
"bytes": "2725"
}
],
"symlink_target": ""
} |
/* Acknowledging the contribution of code and ideas used here that
* came from Paul Chapman's vmac demo project. */
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
#include "bacdcode.h"
#include "bacint.h"
#include "bacenum.h"
#include "bits.h"
#include "npdu.h"
#include "apdu.h"
#include "handlers.h"
#include "device.h"
#include "client.h"
#include "bactext.h"
#include "debug.h"
#if PRINT_ENABLED
#include <stdio.h>
#endif
#if defined(BACDL_BIP)
#include "bvlc.h"
#endif
/** @file h_routed_npdu.c Handles messages at the NPDU level of the BACnet stack,
* including routing and network control messages. */
/** Handler to manage the Network Layer Control Messages received in a packet.
* This handler is called if the NCPI bit 7 indicates that this packet is a
* network layer message and there is no further DNET to pass it to.
* The NCPI has already been decoded into the npdu_data structure.
* @ingroup MISCHNDLR
*
* @param src [in] The routing source information, if any.
* If src->net and src->len are 0, there is no
* routing source information.
* @param DNET_list [in] List of our reachable downstream BACnet Network numbers.
* Normally just one valid entry; terminated with a -1 value.
* @param npdu_data [in] Contains a filled-out structure with information
* decoded from the NCPI and other NPDU bytes.
* @param npdu [in] Buffer containing the rest of the NPDU, following the
* bytes that have already been decoded.
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
*/
static void network_control_handler(
BACNET_ADDRESS * src,
int *DNET_list,
BACNET_NPDU_DATA * npdu_data,
uint8_t * npdu,
uint16_t npdu_len)
{
uint16_t npdu_offset = 0;
uint16_t dnet = 0;
uint16_t len = 0;
switch (npdu_data->network_message_type) {
case NETWORK_MESSAGE_WHO_IS_ROUTER_TO_NETWORK:
/* Send I-am-router-to-network with our one-network list if
* our specific network is requested, or no specific
* network is requested. Silently drop other DNET requests.
*/
if (npdu_len >= 2) {
uint16_t network;
len += decode_unsigned16(&npdu[len], &network);
if (network == DNET_list[0]) {
Send_I_Am_Router_To_Network(DNET_list);
}
} else {
Send_I_Am_Router_To_Network(DNET_list);
}
break;
case NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK:
/* Per the standard, we are supposed to process this message and
* add its DNETs to our routing table.
* However, since we only have one upstream port that these
* messages can come from and replies go to, it doesn't seem
* to provide us any value to do this; when we need to send to
* some remote device, we will start by pushing it out the
* upstream port and let the attached router(s) take it from there.
* Consequently, we'll do nothing interesting here.
* -- Unless we act upon NETWORK_MESSAGE_ROUTER_BUSY_TO_NETWORK
* later for congestion control - then it could matter.
*/
debug_printf("%s for Networks: ",
bactext_network_layer_msg_name
(NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK));
while (npdu_len) {
len = decode_unsigned16(&npdu[npdu_offset], &dnet);
debug_printf("%hu", dnet);
npdu_len -= len;
npdu_offset += len;
if (npdu_len) {
debug_printf(", ");
}
}
debug_printf("\n");
break;
case NETWORK_MESSAGE_I_COULD_BE_ROUTER_TO_NETWORK:
/* Do nothing, same as previous case. */
break;
case NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK:
if (npdu_len >= 3) {
decode_unsigned16(&npdu[1], &dnet);
debug_printf("Received %s for Network: ",
bactext_network_layer_msg_name
(NETWORK_MESSAGE_I_COULD_BE_ROUTER_TO_NETWORK));
debug_printf("%hu, Reason code: %d \n", dnet, npdu[0]);
}
break;
case NETWORK_MESSAGE_ROUTER_BUSY_TO_NETWORK:
case NETWORK_MESSAGE_ROUTER_AVAILABLE_TO_NETWORK:
/* Do nothing - don't support upstream traffic congestion control */
break;
case NETWORK_MESSAGE_INIT_RT_TABLE:
/* If sent with Number of Ports == 0, we respond with
* NETWORK_MESSAGE_INIT_RT_TABLE_ACK and a list of all our
* reachable networks.
*/
if (npdu_len > 0) {
/* If Number of Ports is 0, broadcast our "full" table */
if (npdu[0] == 0)
Send_Initialize_Routing_Table_Ack(NULL, DNET_list);
else {
/* If they sent us a list, just politely ACK it
* with no routing list of our own. But we don't DO
* anything with the info, either.
*/
int listTerminator = -1;
Send_Initialize_Routing_Table_Ack(src, &listTerminator);
}
break;
}
/* Else, fall through to do nothing. */
case NETWORK_MESSAGE_INIT_RT_TABLE_ACK:
/* Do nothing with the routing table info, since don't support
* upstream traffic congestion control */
break;
case NETWORK_MESSAGE_ESTABLISH_CONNECTION_TO_NETWORK:
case NETWORK_MESSAGE_DISCONNECT_CONNECTION_TO_NETWORK:
/* Do nothing - don't support PTP half-router control */
break;
default:
/* An unrecognized message is bad; send an error response. */
Send_Reject_Message_To_Network(src,
NETWORK_REJECT_UNKNOWN_MESSAGE_TYPE, DNET_list[0]);
/* Sending our DNET doesn't make a lot of sense, does it? */
break;
}
}
/** An APDU pre-handler that makes sure that the subsequent APDU handler call
* operates on the right Device Object(s), as addressed by the destination
* (routing) information.
*
* @note Even when the destination is "routed" to our virtual BACnet network,
* the src information does not need to change to reflect that (as it normally
* would for a routed message) because the reply will be sent from the level
* of the gateway Device.
*
* @param src [in] The BACNET_ADDRESS of the message's source.
* @param dest [in] The BACNET_ADDRESS of the message's destination.
* @param DNET_list [in] List of our reachable downstream BACnet Network numbers.
* Normally just one valid entry; terminated with a -1 value.
* @param apdu [in] The apdu portion of the request, to be processed.
* @param apdu_len [in] The total (remaining) length of the apdu.
*/
static void routed_apdu_handler(
BACNET_ADDRESS * src,
BACNET_ADDRESS * dest,
int *DNET_list,
uint8_t * apdu,
uint16_t apdu_len)
{
int cursor = 0; /* Starting hint */
bool bGotOne = false;
if (!Routed_Device_Is_Valid_Network(dest->net, DNET_list)) {
/* We don't know how to reach this one.
* The protocol doesn't specifically state this, but if this message
* was broadcast to us, we should assume "someone else" is handling
* it and not get involved (ie, send a Reject-Message).
* Since we can't reach other routers that src couldn't already reach,
* we don't try the standard path of asking Who-Is-Router-to-Network. */
#if defined(BACDL_BIP)
/* If wasn't unicast to us, must have been one of the bcast types.
* Drop it. */
if (bvlc_get_function_code() != BVLC_ORIGINAL_UNICAST_NPDU)
return;
#endif
/* Upper level handlers knew that this was sent as a bcast,
* but our only other way to guess at that here is if the dest->adr
* is absent, then we know this is some sort of bcast.
*/
if (dest->len > 0) {
Send_Reject_Message_To_Network(src, NETWORK_REJECT_NO_ROUTE,
dest->net);
} /* else, silently drop it */
return;
}
while (Routed_Device_GetNext(dest, DNET_list, &cursor)) {
apdu_handler(src, apdu, apdu_len);
bGotOne = true;
if (cursor < 0) /* If no more matches, */
break; /* We don't need to keep looking */
}
if (!bGotOne) {
/* Just silently drop this packet. */
}
}
/** Handler for the NPDU portion of a received packet, which may have routing.
* This is a fuller handler than the regular npdu_handler, as it manages
* - Decoding of the NCPI byte
* - Further processing by network_control_handler() if this is a network
* layer message.
* - Further processing by routed_apdu_handler() if it contains an APDU
* - Normally (no routing) by apdu_handler()
* - With Routing (a further destination was indicated) by the decoded
* destination.
* - Errors in decoding.
* @note The npdu_data->data_expecting_reply status is discarded.
* @see npdu_handler
* @ingroup NMRC
*
* @param src [out] Returned with routing source information if the NPDU
* has any and if this points to non-null storage for it.
* If src->net and src->len are 0 on return, there is no
* routing source information.
* This src describes the original source of the message when
* it had to be routed to reach this BACnet Device, and this
* is passed down into the apdu_handler; however, I don't
* think this project's code has any use for the src info
* on return from this handler, since the response has
* already been sent via the apdu_handler.
* @param DNET_list [in] List of our reachable downstream BACnet Network numbers.
* Normally just one valid entry; terminated with a -1 value.
* @param pdu [in] Buffer containing the NPDU and APDU of the received packet.
* @param pdu_len [in] The size of the received message in the pdu[] buffer.
*/
void routing_npdu_handler(
BACNET_ADDRESS * src,
int *DNET_list,
uint8_t * pdu,
uint16_t pdu_len)
{
int apdu_offset = 0;
BACNET_ADDRESS dest = { 0 };
BACNET_NPDU_DATA npdu_data = { 0 };
/* only handle the version that we know how to handle */
if (pdu[0] == BACNET_PROTOCOL_VERSION) {
apdu_offset = npdu_decode(&pdu[0], &dest, src, &npdu_data);
if (apdu_offset <= 0) {
debug_printf("NPDU: Decoding failed; Discarded!\n");
} else if (npdu_data.network_layer_message) {
if ((dest.net == 0) || (dest.net == BACNET_BROADCAST_NETWORK)) {
network_control_handler(src, DNET_list, &npdu_data,
&pdu[apdu_offset], (uint16_t) (pdu_len - apdu_offset));
} else {
/* The DNET is set, but we don't support downstream routers,
* so we just silently drop this network layer message,
* since only routers can handle it (even if for our DNET) */
}
} else if (apdu_offset <= pdu_len) {
if ((dest.net == 0) || (npdu_data.hop_count > 1))
routed_apdu_handler(src, &dest, DNET_list, &pdu[apdu_offset],
(uint16_t) (pdu_len - apdu_offset));
/* Else, hop_count bottomed out and we discard this one. */
}
} else {
/* Should we send NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK? */
debug_printf
("NPDU: Unsupported BACnet Protocol Version=%u. Discarded!\n",
(unsigned) pdu[0]);
}
return;
}
| {
"content_hash": "26a7cb683a2166151226ac96e08d7b0c",
"timestamp": "",
"source": "github",
"line_count": 283,
"max_line_length": 83,
"avg_line_length": 42.522968197879855,
"alnum_prop": 0.5898288183480139,
"repo_name": "temcocontrols/T3000_Building_Automation_System",
"id": "cf99e849ec7ca6ab28a7f395453fcc875ff8af31",
"size": "13305",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "BacNetDllforVc/Handler/h_routed_npdu.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "555"
},
{
"name": "C",
"bytes": "4704332"
},
{
"name": "C#",
"bytes": "9337521"
},
{
"name": "C++",
"bytes": "15665753"
},
{
"name": "CMake",
"bytes": "169395"
},
{
"name": "CSS",
"bytes": "111688"
},
{
"name": "Dockerfile",
"bytes": "210"
},
{
"name": "HTML",
"bytes": "125316"
},
{
"name": "Inno Setup",
"bytes": "5879"
},
{
"name": "JavaScript",
"bytes": "1789138"
},
{
"name": "Makefile",
"bytes": "6851"
},
{
"name": "Meson",
"bytes": "7623"
},
{
"name": "NASL",
"bytes": "14427"
},
{
"name": "Objective-C",
"bytes": "7094"
},
{
"name": "Perl",
"bytes": "40922"
},
{
"name": "PowerShell",
"bytes": "4726"
},
{
"name": "Python",
"bytes": "1992"
},
{
"name": "Shell",
"bytes": "143"
}
],
"symlink_target": ""
} |
package eu.funceptionapps.convertitall;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import eu.funceptionapps.convertitall.ObjectSerializer;
import eu.funceptionapps.convertitall.ui.ConverterInterface;
import eu.funceptionapps.convertitall.ui.SettingsInterface;
import eu.funceptionapps.convertitall.R;
public class Unit {
public static boolean[] selectedCurrencies;
public static boolean[] selectedLengths;
public static boolean[] selectedTemperatures;
public static boolean[] selectedBytes;
public static boolean[] selectedNumSys;
public static boolean[] selectedForces;
private static void saveFavoriteString(boolean[] favoritesSet, SharedPreferences sharedPrefs, String pref) {
List<String> favoritesStringList = new ArrayList<String>();
for (int i = 0; i < favoritesSet.length; i++) {
if (favoritesSet[i]) {
favoritesStringList.add(String.valueOf(i));
}
}
setFavoritesList(sharedPrefs, pref, favoritesStringList);
}
public static void loadSelectedCurrencies(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.currencies_id).length;
selectedCurrencies = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.default_currencies)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_CURRENCIES_PREF, defValuesList);
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.default_currencies));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedCurrencies[Integer.valueOf(prefString)] = true;
}
}
public static List<String> getFavoritesList(SharedPreferences prefs, String pref, ArrayList<String> defValuesList) {
List<String> favoritesList;
try {
final String defValue = ObjectSerializer.serialize(defValuesList);
final String string = prefs.getString(pref, defValue);
final Object deserialize = ObjectSerializer.deserialize(string);
favoritesList = (ArrayList<String>) deserialize;
} catch (IOException e) {
favoritesList = defValuesList;
e.printStackTrace();
}
return favoritesList;
}
public static void setFavoritesList(SharedPreferences prefs, String pref, List<String> favoritesList) {
SharedPreferences.Editor editor = prefs.edit();
try {
editor.putString(pref, ObjectSerializer.serialize(new ArrayList<String>(favoritesList)));
} catch (IOException e) {
e.printStackTrace();
}
editor.commit();
}
public static int getSelectedCurrencies(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedCurrencies.length; i++) {
if (selectedCurrencies[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedCurrency(int which, boolean isFavorite) {
selectedCurrencies[which] = isFavorite;
saveFavoriteString(selectedCurrencies, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_CURRENCIES_PREF);
}
public static void loadSelectedLengths(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.lengths_id).length;
selectedLengths = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.default_lengths)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_LENGTHS_PREF, defValuesList);
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.default_lengths));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedLengths[Integer.valueOf(prefString)] = true;
}
}
public static int getSelectedLengths(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedLengths.length; i++) {
if (selectedLengths[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedLength(int which, boolean isFavorite) {
selectedLengths[which] = isFavorite;
saveFavoriteString(selectedLengths, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_LENGTHS_PREF);
}
public static void loadSelectedTemperatures(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.temperatures_id).length;
selectedTemperatures = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.default_temperatures)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_TEMPERATURES_PREF, defValuesList);
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.default_temperatures));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedTemperatures[Integer.valueOf(prefString)] = true;
}
}
public static int getSelectedTemperatures(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedTemperatures.length; i++) {
if (selectedTemperatures[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedTemperature(int which, boolean isFavorite) {
selectedTemperatures[which] = isFavorite;
saveFavoriteString(selectedTemperatures, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_TEMPERATURES_PREF);
}
public static void loadSelectedBytes(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.bytes_id).length;
selectedBytes = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.default_bytes)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_BYTES_PREF, defValuesList);
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.default_bytes));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedBytes[Integer.valueOf(prefString)] = true;
}
}
public static int getSelectedBytes(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedBytes.length; i++) {
if (selectedBytes[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedBytes(int which, boolean isFavorite) {
selectedBytes[which] = isFavorite;
saveFavoriteString(selectedBytes, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_BYTES_PREF);
}
public static void loadSelectedNumSys(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.numerical_systems_id).length;
selectedNumSys = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.numerical_systems_id)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_NUMSYS_PREF, defValuesList);
// use numerical_systems_id as default cause all numsys are default
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.numerical_systems_id));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedNumSys[Integer.valueOf(prefString)] = true;
}
}
public static int getSelectedNumSys(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedNumSys.length; i++) {
if (selectedNumSys[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedNumSys(int which, boolean isFavorite) {
selectedNumSys[which] = isFavorite;
saveFavoriteString(selectedNumSys, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_NUMSYS_PREF);
}
public static void loadSelectedForces(SharedPreferences prefs) {
int length = ConverterInterface.thisContext.getResources().getIntArray(R.array.forces_id).length;
selectedForces = new boolean[length];
final ArrayList<String> defValuesList = new ArrayList<String>(Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(
R.array.forces_id)));
List<String> favoritesList = getFavoritesList(prefs, SettingsInterface.SELECTED_FORCES_PREF, defValuesList);
// use numerical_systems_id as default cause all numsys are default
if (favoritesList == null) {
favoritesList = Arrays.asList(ConverterInterface.thisContext.getResources().getStringArray(R.array.forces_id));
}
String[] prefStrings = favoritesList.toArray(new String[favoritesList.size()]);
for (String prefString : prefStrings) {
selectedForces[Integer.valueOf(prefString)] = true;
}
}
public static int getSelectedForce(int selectedSpinnerId) {
int selectedUnitId = 0;
int k = -1;
for (int i = 0; i < selectedForces.length; i++) {
if (selectedForces[i]) {
k++;
if (k == selectedSpinnerId) {
selectedUnitId = i;
break;
}
}
}
return selectedUnitId;
}
public static void changeSelectedForce(int which, boolean isFavorite) {
selectedForces[which] = isFavorite;
saveFavoriteString(selectedForces, PreferenceManager.getDefaultSharedPreferences(ConverterInterface.thisContext), SettingsInterface.SELECTED_FORCES_PREF);
}
}
| {
"content_hash": "e7ed32a4ef4f507bc63607ba4ea93ce6",
"timestamp": "",
"source": "github",
"line_count": 321,
"max_line_length": 174,
"avg_line_length": 38.4797507788162,
"alnum_prop": 0.6595693005181347,
"repo_name": "djnilse/ConvertItAll",
"id": "c234d378d9d1d750b16cec61601c50bcf73f6ed2",
"size": "12952",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ConvertItAll/src/eu/funceptionapps/convertitall/Unit.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "2544"
},
{
"name": "Java",
"bytes": "176919"
},
{
"name": "Shell",
"bytes": "2314"
}
],
"symlink_target": ""
} |
namespace TMResourceData.Model
{
public class ResCurrent
{
public ResProject Project { get; set; }
public ResModule Module { get; set; }
public ResWord Word { get; set; }
public ResCulture Language { get; set; }
public Author Author { get; set; }
}
}
| {
"content_hash": "ad97c2982e79862bcf9596f5f84554df",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 48,
"avg_line_length": 24.46153846153846,
"alnum_prop": 0.5723270440251572,
"repo_name": "ONLYOFFICE/CommunityServer",
"id": "8a23c05cb6b8f3d997bd0d70cfd42ccb4c25c339",
"size": "943",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "common/TMResourceManager/ASC.Resource.Data/Model/ResCurrent.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "1C Enterprise",
"bytes": "9505"
},
{
"name": "ASP.NET",
"bytes": "1543455"
},
{
"name": "Batchfile",
"bytes": "11616"
},
{
"name": "C",
"bytes": "261"
},
{
"name": "C#",
"bytes": "37439795"
},
{
"name": "C++",
"bytes": "10200"
},
{
"name": "CSS",
"bytes": "632783"
},
{
"name": "Classic ASP",
"bytes": "43003"
},
{
"name": "F#",
"bytes": "9164"
},
{
"name": "HTML",
"bytes": "1350144"
},
{
"name": "Handlebars",
"bytes": "942"
},
{
"name": "JavaScript",
"bytes": "10480939"
},
{
"name": "Less",
"bytes": "1348959"
},
{
"name": "Makefile",
"bytes": "3611"
},
{
"name": "Perl",
"bytes": "6729"
},
{
"name": "PowerShell",
"bytes": "21562"
},
{
"name": "Procfile",
"bytes": "15"
},
{
"name": "Ruby",
"bytes": "30941"
},
{
"name": "Shell",
"bytes": "36554"
},
{
"name": "VBScript",
"bytes": "1225"
},
{
"name": "Visual Basic .NET",
"bytes": "13062"
},
{
"name": "XSLT",
"bytes": "105207"
}
],
"symlink_target": ""
} |
/*
* A wrapper for resampling a numerous amount of sampling combinations.
*/
#ifndef WEBRTC_COMMON_AUDIO_RESAMPLER_INCLUDE_RESAMPLER_H_
#define WEBRTC_COMMON_AUDIO_RESAMPLER_INCLUDE_RESAMPLER_H_
#include <stddef.h>
#include "webrtc/typedefs.h"
namespace webrtc {
// All methods return 0 on success and -1 on failure.
class Resampler {
public:
Resampler();
Resampler(int inFreq, int outFreq, size_t num_channels);
~Resampler();
// Reset all states
int Reset(int inFreq, int outFreq, size_t num_channels);
// Reset all states if any parameter has changed
int ResetIfNeeded(int inFreq, int outFreq, size_t num_channels);
// Resample samplesIn to samplesOut.
int Push(const int16_t* samplesIn, size_t lengthIn, int16_t* samplesOut,
size_t maxLen, size_t& outLen); // NOLINT: to avoid changing APIs
private:
enum ResamplerMode {
kResamplerMode1To1,
kResamplerMode1To2,
kResamplerMode1To3,
kResamplerMode1To4,
kResamplerMode1To6,
kResamplerMode1To12,
kResamplerMode2To3,
kResamplerMode2To11,
kResamplerMode4To11,
kResamplerMode8To11,
kResamplerMode11To16,
kResamplerMode11To32,
kResamplerMode2To1,
kResamplerMode3To1,
kResamplerMode4To1,
kResamplerMode6To1,
kResamplerMode12To1,
kResamplerMode3To2,
kResamplerMode11To2,
kResamplerMode11To4,
kResamplerMode11To8
};
// Generic pointers since we don't know what states we'll need
void* state1_;
void* state2_;
void* state3_;
// Storage if needed
int16_t* in_buffer_;
int16_t* out_buffer_;
size_t in_buffer_size_;
size_t out_buffer_size_;
size_t in_buffer_size_max_;
size_t out_buffer_size_max_;
int my_in_frequency_khz_;
int my_out_frequency_khz_;
ResamplerMode my_mode_;
size_t num_channels_;
// Extra instance for stereo
Resampler* slave_left_;
Resampler* slave_right_;
};
} // namespace webrtc
#endif // WEBRTC_COMMON_AUDIO_RESAMPLER_INCLUDE_RESAMPLER_H_
| {
"content_hash": "ef69ef149cedafb0ec26d72bbda531ca",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 77,
"avg_line_length": 23.535714285714285,
"alnum_prop": 0.7152250885179565,
"repo_name": "evature/android",
"id": "259349b670b2d7b01125e8bbabe9a65f5d9bf7d0",
"size": "2389",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "EvaSDK/evasdk/src/main/jni/webrtc/common_audio/resampler/include/resampler.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "128724"
},
{
"name": "Batchfile",
"bytes": "1842"
},
{
"name": "C",
"bytes": "5862367"
},
{
"name": "C++",
"bytes": "25831916"
},
{
"name": "CSS",
"bytes": "12225"
},
{
"name": "HTML",
"bytes": "4036554"
},
{
"name": "Java",
"bytes": "1567310"
},
{
"name": "JavaScript",
"bytes": "66695"
},
{
"name": "M4",
"bytes": "21821"
},
{
"name": "Makefile",
"bytes": "1372520"
},
{
"name": "Matlab",
"bytes": "26947"
},
{
"name": "Objective-C",
"bytes": "504424"
},
{
"name": "Objective-C++",
"bytes": "554098"
},
{
"name": "Protocol Buffer",
"bytes": "22934"
},
{
"name": "Python",
"bytes": "274314"
},
{
"name": "Roff",
"bytes": "29724"
},
{
"name": "Ruby",
"bytes": "615"
},
{
"name": "Shell",
"bytes": "743758"
}
],
"symlink_target": ""
} |
/*global setTimeout, Config, Phaser*/
State.Story = function (game) {
"use strict";
this.game = game;
this.animationmusic = null;
this.skipKey = null;
this.timer1, this.timer2, this.timer3, this.timer4;
this.currentFrame;
};
State.Story.prototype = {
preload: function () {
"use strict";
this.game.load.image('storyboard-1','assets/images/storyboard1_960-600.png');
this.game.load.image('storyboard-2','assets/images/storyboard2_960-600.png');
this.game.load.image('storyboard-3','assets/images/storyboard3_960-600.png');
this.game.load.image('storyboard-4','assets/images/storyboard4_960-600.png');
this.game.load.image('game-splash', Config.gameSplash.dir.background);
//Menu buttons
this.game.load.spritesheet('button-play', Config.Menu.buttonPlay.dir,
Config.Menu.buttonPlay.width, Config.Menu.buttonPlay.height);
this.game.load.spritesheet('button-credits',
Config.Menu.buttonCredits.dir,
Config.Menu.buttonCredits.width,
Config.Menu.buttonCredits.height);
this.game.load.spritesheet('button-how-to-play',
Config.Menu.buttonHowToPlay.dir,
Config.Menu.buttonHowToPlay.width,
Config.Menu.buttonHowToPlay.height);
//Credits image
this.game.load.image('credits', Config.credits.dir);
//How to play image
this.game.load.image('how-to-play', Config.howToPlay.dir);
this.game.load.image('progress-bar', Config.gameSplash.dir.bar);
this.game.load.audio('som-inicio', 'assets/gotaextra.ogg');
},
create: function () {
"use strict";
this.currentFrame = 1;
this.skipKey = this.game.input.keyboard.addKey(Phaser.Keyboard.ENTER);
this.skipKey.onDown.add(this.skipStoryState, this);
this.animationmusic = this.game.add.audio('storymusic');
this.animationmusic.play();
this.sprite = this.game.add.sprite(0, 0, 'storyboard-1');
var self = this;
this.timer1 = setTimeout(function() {
var tween = this.game.add.tween(self.sprite).to({alpha : 0},
2000, Phaser.Easing.Linear.None).start();
tween.onComplete.add(self.startNextSplash, self);
}, 2500);
this.timer2 = setTimeout(function() {
var tween1 = this.game.add.tween(self.sprite).to({alpha : 0},
2000, Phaser.Easing.Linear.None).start();
tween1.onComplete.add(self.startNextSplash, self);
}, 7000);
this.timer3 = setTimeout(function() {
var tween1 = this.game.add.tween(self.sprite).to({alpha : 0},
2000, Phaser.Easing.Linear.None).start();
tween1.onComplete.add(self.startNextSplash, self);
}, 11500);
this.timer4 = setTimeout(function() {
var tween1 = this.game.add.tween(self.sprite).to({alpha : 0},
2000, Phaser.Easing.Linear.None).start();
tween1.onComplete.add(self.startMenu, self);
}, 16000);
},
startNextSplash: function() {
this.currentFrame++;
this.sprite = this.game.add.sprite(0, 0, 'storyboard-' +
this.currentFrame);
},
startMenu: function() {
this.animationmusic.stop();
this.game.state.start('menu-state');
},
skipStoryState: function() {
clearTimeout(this.timer1);
clearTimeout(this.timer2);
clearTimeout(this.timer3);
clearTimeout(this.timer4);
this.game.input.keyboard.removeKey(this.skipKey);
this.animationmusic.stop();
this.game.state.start('menu-state');
}
};
| {
"content_hash": "60026704931f4972abefd18761b77496",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 85,
"avg_line_length": 38.63917525773196,
"alnum_prop": 0.6064567769477054,
"repo_name": "jucimarjr/posueagames",
"id": "2969c49e62e29c3ef8e4661af475eb7ccc83043a",
"size": "3748",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "renanbrg/dropstory/js/states/Story.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ActionScript",
"bytes": "3677"
},
{
"name": "CSS",
"bytes": "20672"
},
{
"name": "JavaScript",
"bytes": "1454051"
},
{
"name": "PHP",
"bytes": "45"
}
],
"symlink_target": ""
} |
<?php
include_once('../functions/DBconf.php');
spl_autoload_register(function($class) {
include "../functions/".$class .".class.php";
});
if(!isset($_SESSION['user_id']) && !isset($_COOKIE['user_id']))
{
header("Location: ../login.php");
}
if(isset($_SESSION['user_id']) || isset($_COOKIE['user_id']))
{
if(isset($_SESSION['user_id']))
{
$user_id = $_SESSION['user_id'];
}
else if (isset($_COOKIE['user_id']))
{
$user_id = $_COOKIE['user_id'];
}
$userData = new User($bdd);
if($userData->getAdmin($user_id)!=1)
{
//echo "check admin";
header("Location: ../index.php");
}
}
if(!empty($_POST))
{
$error = "";
$name = $_POST['name'];
if($name!="")
{
$newStyle = new Style($bdd);
if($newStyle->existStyle($name)==1)
{
$error = "Your style already exist";
$class_message = "error";
}
else
{
$newStyle->addStyle($name);
$error = "Your style has been created";
$class_message = "validate";
}
}
else
{
$error = "You must add a style name";
$class_message = "error";
}
}
else
{
$name = "";
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Playfair+Display" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/dreamwatch_site.css" type="text/css">
<link href="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/theme-default.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../asset/framework/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="../asset/plugins/HorizontalDropDownMenu/css/component.css" />
<link rel="stylesheet" type="text/css" href="../asset/plugins/Carousel/slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="../asset/js/jquery/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="../asset/plugins/Carousel/slick/slick-theme.css"/>
<link rel="stylesheet" type="text/css" href="../asset/plugins/multiselect/multiselect.css"/>
</head>
<body>
<header class="admin">
<div class="row text-center">
<div class="text-center logo"><h1>THE DREAMWATCH BACK-OFFICE</h1></div>
</div>
<nav id="cbp-hrmenu" class="text-center admin cbp-hrmenu">
<ul class="resize-submenu">
<li>
<a href="admin.php?form=functionality">USERS</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>User settings</h4>
<ul>
<li><a href="add_user.php">Add a user</a></li>
<li><a href="edit_user.php">Edit a user</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="#" target="_SELF">PRODUCTS</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Product settings</h4>
<ul>
<li><a href="add_product.php">Add a product</a></li>
<li><a href="edit_product.php">Edit a product</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=category">CATEGORIES</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Category settings</h4>
<ul>
<li><a href="add_category.php">Add a category</a></li>
<li><a href="edit_category.php">Edit a category</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=material">MATERIALS</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Material settings</h4>
<ul>
<li><a href="add_material.php">Add a material</a></li>
<li><a href="edit_material.php">Edit a material</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=brands">BRANDS</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Brand settings</h4>
<ul>
<li><a href="add_brand.php">Add a brand</a></li>
<li><a href="edit_brand.php">Edit a brand</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=styles">STYLES</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Style settings</h4>
<ul>
<li><a href="add_style.php">Add a style</a></li>
<li><a href="edit_style.php">Edit a style</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=shapes">SHAPES</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Shape settings</h4>
<ul>
<li><a href="add_shape.php">Add a shape</a></li>
<li><a href="edit_shape.php">Edit a shape</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
<li>
<a href="admin.php?form=functionality">FUNCTIONALITIES</a>
<div class="cbp-hrsub">
<div class="cbp-hrsub-inner">
<div class="liste-submenu">
<h4>Functionality settings</h4>
<ul>
<li><a href="add_functionality.php">Add a functionality</a></li>
<li><a href="edit_functionality.php">Edit a functionality</a></li>
</ul>
</div>
</div><!-- /cbp-hrsub-inner -->
</div><!-- /cbp-hrsub -->
</li>
</ul>
</nav>
</header>
<main>
<div class="container admin">
<br/>
<br/>
<h4>Add Style</h4>
<?php
if(isset($error) && $error != "")
{
echo "<span class='".$class_message."'>".$error."</span>";
}
?>
<br/><br/>
<form action="add_style.php" method="POST">
<label for="label">Name:</label>
<input type="text" name="name" id="label" value="<?php echo $name ?>" />
<br/>
<br/>
<input type="submit" value="Add style">
</form>
<br/>
<br/>
<br/>
</div>
</main>
<script src="../asset/js/jquery/external/jquery/jquery.js"></script>
<script src="../asset/js/jquery/jquery-ui.js"></script>
<script src="../asset/framework/bootstrap/js/bootstrap.min.js"></script>
<script src="../asset/plugins/HorizontalDropDownMenu/js/cbpHorizontalMenu.min.js"></script>
<script type="text/javascript" src="../asset/plugins/Carousel/slick/slick.min.js"></script>
<script type="text/javascript" src="../asset/plugins/multiselect/multiselect.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
<script>
$(document).ready(function(){
cbpHorizontalMenu.init();
});
</script>
</body>
</html> | {
"content_hash": "b7004581831fb93ec7b37173c7860e77",
"timestamp": "",
"source": "github",
"line_count": 259,
"max_line_length": 133,
"avg_line_length": 30.10810810810811,
"alnum_prop": 0.520261605539882,
"repo_name": "aznsilence/dreamwatch",
"id": "099c0ee7eff45aa88e479d3d550c81386e48e864",
"size": "7798",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "admin/add_style.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "42454"
},
{
"name": "HTML",
"bytes": "43270"
},
{
"name": "JavaScript",
"bytes": "151795"
},
{
"name": "Makefile",
"bytes": "133"
},
{
"name": "PHP",
"bytes": "229477"
},
{
"name": "Ruby",
"bytes": "161"
}
],
"symlink_target": ""
} |
// $Id: NT_Service.cpp 96985 2013-04-11 15:50:32Z huangh $
#include "ace/config-all.h"
#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES)
#include "ace/NT_Service.h"
#if !defined (__ACE_INLINE__)
#include "ace/NT_Service.inl"
#endif /* __ACE_INLINE__ */
#include "ace/Log_Category.h"
#include "ace/Service_Object.h"
#include "ace/OS_NS_errno.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_NT_Service)
// ACE_NT_Service destructor.
ACE_NT_Service::~ACE_NT_Service (void)
{
if (this->svc_sc_handle_ != 0)
{
CloseServiceHandle (this->svc_sc_handle_);
this->svc_sc_handle_ = 0;
}
delete [] this->desc_;
delete [] this->name_;
delete [] this->host_;
}
// This default implementation of ACE_NT_Service::open sets the
// service's status to START_PENDING with the estimated time until
// STARTED set to the value given when this object was constructed.
// Then the svc function is called, which implements the guts of the
// service. Note that this function is running in a thread created by
// the OS, not by ACE_Thread_Manager. The thread manager does not
// know anything about this thread. The service can, however, use
// ACE_Thread_Manager to start more threads if desired. When the svc
// function returns, the service status is set to STOPPED, and exit
// codes set based on errno/GetLastError if the svc function returns
// -1.
//
// The svc function is expected to set the service status to SERVICE_RUNNING
// after it initializes.
//
// The handle_control function will be called for each time there is a
// request for the service. It is up to that function and svc to
// cooperate to both respond appropriately to the request (by at least
// updating the service's status) and to fulfill the request.
int
ACE_NT_Service::open (void *args)
{
ACE_UNUSED_ARG (args);
this->report_status (SERVICE_START_PENDING, 0);
int svc_return = this->svc ();
if (svc_return == 0)
{
this->svc_status_.dwWin32ExitCode = NO_ERROR;
this->svc_status_.dwServiceSpecificExitCode = 0;
}
else
{
if (errno == 0)
{
this->svc_status_.dwWin32ExitCode = GetLastError ();
}
else
{
this->svc_status_.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR;
this->svc_status_.dwServiceSpecificExitCode = errno;
}
}
return svc_return;
}
int
ACE_NT_Service::fini (void)
{
return this->report_status (SERVICE_STOPPED, 0);
}
void
ACE_NT_Service::handle_control (DWORD control_code)
{
switch (control_code)
{
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
this->stop_requested (control_code);
break;
case SERVICE_CONTROL_PAUSE:
this->pause_requested (control_code);
break;
case SERVICE_CONTROL_CONTINUE:
this->continue_requested (control_code);
break;
case SERVICE_CONTROL_INTERROGATE:
this->interrogate_requested (control_code);
break;
}
}
void
ACE_NT_Service::stop_requested (DWORD)
{
this->report_status (SERVICE_STOP_PENDING);
/* how to cancel? */
}
void
ACE_NT_Service::pause_requested (DWORD)
{
this->report_status (SERVICE_PAUSE_PENDING);
this->suspend ();
this->report_status (SERVICE_PAUSED);
}
void
ACE_NT_Service::continue_requested (DWORD)
{
this->report_status (SERVICE_CONTINUE_PENDING);
this->resume ();
this->report_status (SERVICE_RUNNING);
}
void
ACE_NT_Service::interrogate_requested (DWORD)
{
this->report_status (0);
}
void
ACE_NT_Service::name (const ACE_TCHAR *name, const ACE_TCHAR *desc)
{
delete [] this->desc_;
delete [] this->name_;
if (desc == 0)
desc = name;
this->name_ = ACE::strnew (name);
this->desc_ = ACE::strnew (desc);
}
void
ACE_NT_Service::host (const ACE_TCHAR *host)
{
delete [] this->host_;
if (this->svc_sc_handle_ != 0)
{
CloseServiceHandle (this->svc_sc_handle_);
this->svc_sc_handle_ = 0;
}
if (host == 0)
{
this->host_ = 0;
}
else
{
this->host_ = ACE::strnew (host);
}
}
int
ACE_NT_Service::insert (DWORD start_type,
DWORD error_control,
const ACE_TCHAR *exe_path,
const ACE_TCHAR *group_name,
LPDWORD tag_id,
const ACE_TCHAR *dependencies,
const ACE_TCHAR *account_name,
const ACE_TCHAR *password,
DWORD desired_access)
{
ACE_TCHAR this_exe[MAXPATHLEN + 2];
// Insure ACE_OS::last_error finds GetLastError unless we set errno.
errno = 0;
if (exe_path == 0)
{
if (ACE_TEXT_GetModuleFileName (0, this_exe + 1, MAXPATHLEN) == 0)
return -1;
// Make sure that this_exe is quoted
this_exe[0] = ACE_TEXT ('\"');
ACE_OS::strcat (this_exe, ACE_TEXT ("\""));
exe_path = this_exe;
}
SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
0,
SC_MANAGER_ALL_ACCESS);
if (sc_mgr == 0)
return -1;
SC_HANDLE sh = ACE_TEXT_CreateService (sc_mgr,
this->name (),
this->desc (),
desired_access,
this->svc_status_.dwServiceType,
start_type,
error_control,
exe_path,
group_name,
tag_id,
dependencies,
account_name,
password);
// If there was an error, stash GetLastError before CloseServiceHandle
// smashes it. ACE_OS::last_error will find the saved error value.
if (sh == 0)
ACE_OS::set_errno_to_last_error ();
CloseServiceHandle (sc_mgr);
if (sh == 0)
return -1;
if (this->svc_sc_handle_ != 0)
CloseServiceHandle (this->svc_sc_handle_);
this->svc_sc_handle_ = sh;
return 0;
}
int
ACE_NT_Service::remove (void)
{
if (this->svc_sc_handle () == 0)
return -1;
if (DeleteService (this->svc_sc_handle()) == 0
&& GetLastError () != ERROR_SERVICE_MARKED_FOR_DELETE)
return -1;
return 0;
}
// Sets the startup type for the service. Returns -1 on error, 0 on
// success.
int
ACE_NT_Service::startup (DWORD startup)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
BOOL ok =
ChangeServiceConfig (svc,
(DWORD) SERVICE_NO_CHANGE,// No change to service type
startup, // New startup type
(DWORD) SERVICE_NO_CHANGE,// No change to error ctrl
0, // No change to pathname
0, // No change to load group
0, // No change to tag
0, // No change to dependencies
0, 0, // No change to acct/passwd
0); // No change to name
return ok ? 0 : -1;
}
// Returns the current startup type.
DWORD
ACE_NT_Service::startup (void)
{
// The query buffer will hold strings as well as the defined struct.
// The string pointers in the struct point to other areas in the
// passed memory area, so it has to be large enough to hold the
// struct plus all the strings.
char cfgbuff[1024];
LPQUERY_SERVICE_CONFIG cfg;
DWORD cfgsize, needed_size;
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
{
// To distinguish this error from the QueryServiceConfig failure
// below, return the DWORD equivalent of -2, rather than -1.
return MAXDWORD - 1;
}
cfgsize = sizeof cfgbuff;
cfg = (LPQUERY_SERVICE_CONFIG) cfgbuff;
BOOL ok = QueryServiceConfig (svc, cfg, cfgsize, &needed_size);
if (ok)
return cfg->dwStartType;
// Zero is a valid return value for QueryServiceConfig, so if
// QueryServiceConfig fails, return the DWORD equivalent of -1.
return MAXDWORD;
}
void
ACE_NT_Service::capture_log_msg_attributes (void)
{
ACE_Log_Msg::init_hook (this->log_msg_attributes_);
}
void
ACE_NT_Service::inherit_log_msg_attributes (void)
{
// There's no thread descriptor involved with a NT-started
// thread, so the first arg is 0.
ACE_Log_Msg::inherit_hook (0, this->log_msg_attributes_);
}
int
ACE_NT_Service::start_svc (ACE_Time_Value *wait_time,
DWORD *svc_state,
DWORD argc, const ACE_TCHAR **argv)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
if (!ACE_TEXT_StartService (svc, argc, argv))
return -1;
this->wait_for_service_state (SERVICE_RUNNING, wait_time);
if (svc_state != 0)
*svc_state = this->svc_status_.dwCurrentState;
return 0;
}
int
ACE_NT_Service::stop_svc (ACE_Time_Value *wait_time,
DWORD *svc_state)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
if (!ControlService (svc,
SERVICE_CONTROL_STOP,
&this->svc_status_))
return -1;
this->wait_for_service_state (SERVICE_STOPPED,
wait_time);
if (svc_state != 0)
*svc_state = this->svc_status_.dwCurrentState;
return 0;
}
int
ACE_NT_Service::pause_svc (ACE_Time_Value *wait_time,
DWORD *svc_state)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
if (!ControlService (svc,
SERVICE_CONTROL_PAUSE,
&this->svc_status_))
return -1;
this->wait_for_service_state (SERVICE_PAUSED,
wait_time);
if (svc_state != 0)
*svc_state = this->svc_status_.dwCurrentState;
return 0;
}
int
ACE_NT_Service::continue_svc (ACE_Time_Value *wait_time,
DWORD *svc_state)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
if (!ControlService (svc,
SERVICE_CONTROL_CONTINUE,
&this->svc_status_))
return -1;
this->wait_for_service_state (SERVICE_RUNNING,
wait_time);
if (svc_state != 0)
*svc_state = this->svc_status_.dwCurrentState;
return 0;
}
DWORD
ACE_NT_Service::state (ACE_Time_Value *wait_hint)
{
DWORD curr_state;
if (this->state (&curr_state,
wait_hint) == -1)
return 0;
return curr_state;
}
int
ACE_NT_Service::state (DWORD *pstate,
ACE_Time_Value *wait_hint)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
// Need to create a temporary copy of this variable since the
// QueryServiceStatus call will modify the setting depending on the
// current state of the Service. If the service is currently
// STOPPED, the value will be cleared.
DWORD controls_accepted = this->svc_status_.dwControlsAccepted;
if (QueryServiceStatus (svc,
&this->svc_status_) == 0)
return -1;
if (wait_hint != 0)
wait_hint->msec (static_cast<long> (this->svc_status_.dwWaitHint));
*pstate = this->svc_status_.dwCurrentState;
this->svc_status_.dwControlsAccepted = controls_accepted;
return 0;
}
// test_access
//
// Open a new handle, ignoring any handle open in svc_sc_handle_.
// This function's results are returned without leaving the handle
// open.
int
ACE_NT_Service::test_access (DWORD desired_access)
{
int status = -1; // Guilty until proven innocent
SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
0,
GENERIC_READ);
if (sc_mgr != 0)
{
SC_HANDLE handle = ACE_TEXT_OpenService (sc_mgr,
this->name (),
desired_access);
CloseServiceHandle (sc_mgr);
if (handle != 0)
{
status = 0;
CloseServiceHandle (handle);
}
}
return status;
}
// report_status
//
// Reports the current status. If new_status is not 0, it sets the
// status to the new value before reporting. NOTE - this assumes that
// no actual service status values have the value 0. This is true in
// WinNT 4. If the status is a 'pending' type, the supplied time hint
// is used unless it's 0, in which case the existing hint is used.
// The dwWaitHint is not updated by this function. The checkpoint is
// incremented by one after a pending report.
int
ACE_NT_Service::report_status (DWORD new_status,
DWORD time_hint)
{
int bump_checkpoint = 0;
int retval = 0;
DWORD save_controls = 0;
if (new_status != 0)
this->svc_status_.dwCurrentState = new_status;
switch (this->svc_status_.dwCurrentState)
{
case SERVICE_START_PENDING:
save_controls = this->svc_status_.dwControlsAccepted;
this->svc_status_.dwControlsAccepted = 0;
/* Fall through */
case SERVICE_STOP_PENDING:
case SERVICE_CONTINUE_PENDING:
case SERVICE_PAUSE_PENDING:
this->svc_status_.dwWaitHint = time_hint ? time_hint : this->start_time_;
bump_checkpoint = 1;
break;
default:
this->svc_status_.dwCheckPoint = 0;
}
retval = SetServiceStatus (this->svc_handle_,
&this->svc_status_) ? 0 : -1;
if (save_controls != 0)
this->svc_status_.dwControlsAccepted = save_controls;
if (bump_checkpoint)
++this->svc_status_.dwCheckPoint;
return retval;
}
SC_HANDLE
ACE_NT_Service::svc_sc_handle (void)
{
if (this->svc_sc_handle_ == 0)
{
SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
0,
SC_MANAGER_ALL_ACCESS);
if (sc_mgr != 0)
{
this->svc_sc_handle_ = ACE_TEXT_OpenService (sc_mgr,
this->name (),
SERVICE_ALL_ACCESS);
if (this->svc_sc_handle_ == 0)
ACE_OS::set_errno_to_last_error ();
CloseServiceHandle (sc_mgr);
}
else
ACE_OS::set_errno_to_last_error ();
}
return this->svc_sc_handle_;
}
void
ACE_NT_Service::wait_for_service_state (DWORD desired_state,
ACE_Time_Value *wait_time)
{
DWORD last_state = 0;
DWORD last_check_point = 0;
int first_time = 1;
int service_ok;
ACE_Time_Value time_out = ACE_OS::gettimeofday ();
if (wait_time != 0)
time_out += *wait_time;
// Poll until the service reaches the desired state.
for (;;)
{
service_ok = 0 != QueryServiceStatus (this->svc_sc_handle_,
&this->svc_status_);
// If we cannot query the service, we are done.
if (!service_ok)
break;
// If the service has the desired state, we are done.
if (desired_state == this->svc_status_.dwCurrentState)
break;
// If we time-out, we are done
if (wait_time != 0 && ACE_OS::gettimeofday () > time_out )
{
errno = ETIME;
break;
}
if (first_time)
{
// remember the service state, the first time we wait
last_state = this->svc_status_.dwCurrentState;
last_check_point = this->svc_status_.dwCheckPoint;
first_time = 0;
}
else
{
// update the state change.
if (last_state != this->svc_status_.dwCurrentState)
{
last_state = this->svc_status_.dwCurrentState;
last_check_point = this->svc_status_.dwCheckPoint;
}
else
{
// The check-point should have increased
if (this->svc_status_.dwCheckPoint > last_check_point)
last_check_point = this->svc_status_.dwCheckPoint;
else
{
// Service control failure, we are done.
service_ok = 0;
break;
}
}
}
::Sleep (this->svc_status_.dwWaitHint);
}
return;
}
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */
| {
"content_hash": "4cc388a7ebd2b2fe32cb3ae5437a765b",
"timestamp": "",
"source": "github",
"line_count": 618,
"max_line_length": 79,
"avg_line_length": 27.027508090614887,
"alnum_prop": 0.5584625516374304,
"repo_name": "batmancn/TinySDNController",
"id": "e70550b4092b1841b297dc6a45682f550c2ebf33",
"size": "16703",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "ACE_wrappers/ace/NT_Service.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4318"
},
{
"name": "C",
"bytes": "579143"
},
{
"name": "C++",
"bytes": "18861139"
},
{
"name": "CMake",
"bytes": "10969"
},
{
"name": "CSS",
"bytes": "40195"
},
{
"name": "Emacs Lisp",
"bytes": "7179"
},
{
"name": "Gnuplot",
"bytes": "48098"
},
{
"name": "Groff",
"bytes": "740"
},
{
"name": "HTML",
"bytes": "2567378"
},
{
"name": "LLVM",
"bytes": "4067"
},
{
"name": "Logos",
"bytes": "204"
},
{
"name": "Makefile",
"bytes": "4724573"
},
{
"name": "Max",
"bytes": "84490"
},
{
"name": "Objective-C",
"bytes": "420"
},
{
"name": "Perl",
"bytes": "1936593"
},
{
"name": "Perl6",
"bytes": "776"
},
{
"name": "PostScript",
"bytes": "152076"
},
{
"name": "Python",
"bytes": "138897"
},
{
"name": "Shell",
"bytes": "154140"
},
{
"name": "Tcl",
"bytes": "397"
},
{
"name": "Yacc",
"bytes": "14880"
}
],
"symlink_target": ""
} |
import logging
import copy
from itertools import count
import claripy
from claripy.vsa import ValueSet, RegionAnnotation
from ..storage.memory import SimMemory, AddressWrapper, MemoryStoreRequest
from ..errors import SimMemoryError, SimAbstractMemoryError
from ..sim_options import KEEP_MEMORY_READS_DISCRETE, AVOID_MULTIVALUED_READS, REGION_MAPPING
from .symbolic_memory import SimSymbolicMemory
from ..state_plugins.sim_action_object import _raw_ast
l = logging.getLogger("angr.state_plugins.abstract_memory")
WRITE_TARGETS_LIMIT = 2048
READ_TARGETS_LIMIT = 4096
#pylint:disable=unidiomatic-typecheck
invalid_read_ctr = count()
class MemoryRegion(object):
def __init__(self, id, state, is_stack=False, related_function_addr=None, init_memory=True, backer_dict=None, endness=None): #pylint:disable=redefined-builtin,unused-argument
self._endness = endness
self._id = id
self._state = state
self._is_stack = id.startswith('stack_') # TODO: Fix it
self._related_function_addr = related_function_addr
# This is a map from tuple (basicblock_key, stmt_id) to
# AbstractLocation objects
self._alocs = { }
if init_memory:
if backer_dict is None:
self._memory = SimSymbolicMemory(memory_id=id, endness=self._endness, abstract_backer=True)
else:
self._memory = SimSymbolicMemory(memory_backer=backer_dict, memory_id=id, endness=self._endness, abstract_backer=True)
self._memory.set_state(state)
@property
def id(self):
return self._id
@property
def memory(self):
return self._memory
@property
def state(self):
return self._state
@property
def alocs(self):
return self._alocs
@property
def is_stack(self):
return self._is_stack
@property
def related_function_addr(self):
return self._related_function_addr
def get_abstract_locations(self, addr, size):
"""
Get a list of abstract locations that is within the range of [addr, addr + size]
This implementation is pretty slow. But since this method won't be called frequently, we can live with the bad
implementation for now.
:param addr: Starting address of the memory region.
:param size: Size of the memory region, in bytes.
:return: A list of covered AbstractLocation objects, or an empty list if there is none.
"""
ret = [ ]
for aloc in self._alocs.itervalues():
for seg in aloc.segments:
if seg.offset >= addr and seg.offset < addr + size:
ret.append(aloc)
break
return ret
def addrs_for_name(self, name):
return self.memory.addrs_for_name(name)
def set_state(self, state):
self._state = state
self._memory.set_state(state)
@SimMemory.memo
def copy(self, memo):
r = MemoryRegion(self._id, self.state,
is_stack=self._is_stack,
related_function_addr=self._related_function_addr,
init_memory=False, endness=self._endness)
r._memory = self.memory.copy(memo)
r._alocs = copy.deepcopy(self._alocs)
return r
def store(self, request, bbl_addr, stmt_id, ins_addr):
if ins_addr is not None:
#aloc_id = (bbl_addr, stmt_id)
aloc_id = ins_addr
else:
# It comes from a SimProcedure. We'll use bbl_addr as the aloc_id
aloc_id = bbl_addr
if aloc_id not in self._alocs:
self._alocs[aloc_id] = self.state.se.AbstractLocation(bbl_addr,
stmt_id,
self.id,
region_offset=request.addr,
size=len(request.data) // self.state.arch.byte_width)
return self.memory._store(request)
else:
if self._alocs[aloc_id].update(request.addr, len(request.data) // self.state.arch.byte_width):
return self.memory._store(request)
else:
#return self.memory._store_with_merge(request)
return self.memory._store(request)
def load(self, addr, size, bbl_addr, stmt_idx, ins_addr): #pylint:disable=unused-argument
#if bbl_addr is not None and stmt_id is not None:
return self.memory.load(addr, size, inspect=False)
def _merge_alocs(self, other_region):
"""
Helper function for merging.
"""
merging_occurred = False
for aloc_id, aloc in other_region.alocs.iteritems():
if aloc_id not in self.alocs:
self.alocs[aloc_id] = aloc.copy()
merging_occurred = True
else:
# Update it
merging_occurred |= self.alocs[aloc_id].merge(aloc)
return merging_occurred
def merge(self, others, merge_conditions, common_ancestor=None):
merging_occurred = False
for other_region in others:
merging_occurred |= self._merge_alocs(other_region)
merging_occurred |= self.memory.merge(
[other_region.memory], merge_conditions, common_ancestor=common_ancestor
)
return merging_occurred
def widen(self, others):
widening_occurred = False
for other_region in others:
widening_occurred |= self._merge_alocs(other_region)
widening_occurred |= self.memory.widen([ other_region.memory ])
return widening_occurred
def __contains__(self, addr):
return addr in self.memory
def was_written_to(self, addr):
return self.memory.was_written_to(addr)
def dbg_print(self, indent=0):
"""
Print out debugging information
"""
print "%sA-locs:" % (" " * indent)
for aloc_id, aloc in self._alocs.items():
print "%s<0x%x> %s" % (" " * (indent + 2), aloc_id, aloc)
print "%sMemory:" % (" " * indent)
self.memory.dbg_print(indent=indent + 2)
class SimAbstractMemory(SimMemory): #pylint:disable=abstract-method
"""
This is an implementation of the abstract store in paper [TODO].
Some differences:
- For stack variables, we map the absolute stack address to each region so
that we can effectively trace stack accesses. When tracing into a new
function, you should call set_stack_address_mapping() to create a new mapping.
When exiting from a function, you should cancel the previous mapping by
calling unset_stack_address_mapping().
Currently this is only used for stack!
"""
def __init__(self, memory_backer=None, memory_id="mem", endness=None, stack_region_map=None,
generic_region_map=None):
SimMemory.__init__(self,
endness=endness,
stack_region_map=stack_region_map,
generic_region_map=generic_region_map,
)
self._regions = {}
self._stack_size = None
self._memory_id = memory_id
self.id = self._memory_id
# Since self.state is None at this time (self.state will be set to the real SimState instance later when
# self.set_state() is called), we just save the backer argument to a temporary variable, and then initialize it
# later in self.set_state() method.
self._temp_backer = memory_backer
@property
def regions(self):
return self._regions
def _region_base(self, region):
"""
Get the base address of a memory region.
:param str region: ID of the memory region
:return: Address of the memory region
:rtype: int
"""
if region == 'global':
region_base_addr = 0
elif region.startswith('stack_'):
region_base_addr = self._stack_region_map.absolutize(region, 0)
else:
region_base_addr = self._generic_region_map.absolutize(region, 0)
return region_base_addr
def set_stack_size(self, size):
self._stack_size = size
def create_region(self, key, state, is_stack, related_function_addr, endness, backer_dict=None):
"""
Create a new MemoryRegion with the region key specified, and store it to self._regions.
:param key: a string which is the region key
:param state: the SimState instance
:param bool is_stack: Whether this memory region is on stack. True/False
:param related_function_addr: Which function first creates this memory region. Just for reference.
:param endness: The endianness.
:param backer_dict: The memory backer object.
:return: None
"""
self._regions[key] = MemoryRegion(key,
state=state,
is_stack=is_stack,
related_function_addr=related_function_addr,
endness=endness,
backer_dict=backer_dict,
)
def _normalize_address(self, region_id, relative_address, target_region=None):
"""
If this is a stack address, we convert it to a correct region and address
:param region_id: a string indicating which region the address is relative to
:param relative_address: an address that is relative to the region parameter
:param target_region: the ideal target region that address is normalized to. None means picking the best fit.
:return: an AddressWrapper object
"""
if self._stack_region_map.is_empty and self._generic_region_map.is_empty:
# We don't have any mapped region right now
return AddressWrapper(region_id, 0, relative_address, False, None)
# We wanna convert this address to an absolute address first
if region_id.startswith('stack_'):
absolute_address = self._stack_region_map.absolutize(region_id, relative_address)
else:
absolute_address = self._generic_region_map.absolutize(region_id, relative_address)
stack_base = self._stack_region_map.stack_base
if (relative_address <= stack_base and
relative_address > stack_base - self._stack_size) or \
(target_region is not None and target_region.startswith('stack_')):
# The absolute address seems to be in the stack region.
# Map it to stack
new_region_id, new_relative_address, related_function_addr = self._stack_region_map.relativize(
absolute_address,
target_region_id=target_region
)
return AddressWrapper(new_region_id, self._region_base(new_region_id), new_relative_address, True,
related_function_addr
)
else:
new_region_id, new_relative_address, related_function_addr = self._generic_region_map.relativize(
absolute_address,
target_region_id=target_region
)
return AddressWrapper(new_region_id, self._region_base(new_region_id), new_relative_address, False, None)
def set_state(self, state):
"""
Overriding the SimStatePlugin.set_state() method
:param state: A SimState object
:return: None
"""
# Sanity check
if REGION_MAPPING not in state.options:
# add REGION_MAPPING into state.options
l.warning('Option "REGION_MAPPING" must be enabled when using SimAbstractMemory as the memory model. '
'The option is added to state options as a courtesy.'
)
state.options.add(REGION_MAPPING)
SimMemory.set_state(self, state)
for _,v in self._regions.items():
v.set_state(state)
# Delayed initialization of backer argument from __init__
if self._temp_backer is not None:
for region, backer_dict in self._temp_backer.items():
self._regions[region] = MemoryRegion(region, self.state,
init_memory=True,
backer_dict=backer_dict,
endness=self.endness
)
self._temp_backer = None
def normalize_address(self, addr, is_write=False, convert_to_valueset=False, target_region=None, condition=None): #pylint:disable=arguments-differ
"""
Convert a ValueSet object into a list of addresses.
:param addr: A ValueSet object (which describes an address)
:param is_write: Is this address used in a write or not
:param convert_to_valueset: True if you want to have a list of ValueSet instances instead of AddressWrappers,
False otherwise
:param target_region: Which region to normalize the address to. To leave the decision to SimuVEX, set it to None
:return: A list of AddressWrapper or ValueSet objects
"""
# Apply the condition if necessary
if condition is not None:
addr = self._apply_condition_to_symbolic_addr(addr, condition)
if type(addr) in (int, long):
addr = self.state.se.BVV(addr, self.state.arch.bits)
addr_with_regions = self._normalize_address_type(addr)
address_wrappers = [ ]
for region, addr_si in addr_with_regions:
if is_write:
concrete_addrs = addr_si.eval(WRITE_TARGETS_LIMIT)
if len(concrete_addrs) == WRITE_TARGETS_LIMIT:
self.state.history.add_event('mem', message='too many targets to write to. address = %s' % addr_si)
else:
concrete_addrs = addr_si.eval(READ_TARGETS_LIMIT)
if len(concrete_addrs) == READ_TARGETS_LIMIT:
self.state.history.add_event('mem', message='too many targets to read from. address = %s' % addr_si)
for c in concrete_addrs:
aw = self._normalize_address(region, c, target_region=target_region)
address_wrappers.append(aw)
if convert_to_valueset:
return [ i.to_valueset(self.state) for i in address_wrappers ]
else:
return address_wrappers
def _normalize_address_type(self, addr): #pylint:disable=no-self-use
"""
Convert address of different types to a list of mapping between region IDs and offsets (strided intervals).
:param claripy.ast.Base addr: Address to convert
:return: A list of mapping between region IDs and offsets.
:rtype: dict
"""
addr_e = _raw_ast(addr)
if isinstance(addr_e, (claripy.bv.BVV, claripy.vsa.StridedInterval, claripy.vsa.ValueSet)):
raise SimMemoryError('_normalize_address_type() does not take claripy models.')
if isinstance(addr_e, claripy.ast.Base):
if not isinstance(addr_e._model_vsa, ValueSet):
# Convert it to a ValueSet first by annotating it
addr_e = addr_e.annotate(RegionAnnotation('global', 0, addr_e._model_vsa))
return addr_e._model_vsa.items()
else:
raise SimAbstractMemoryError('Unsupported address type %s' % type(addr_e))
# FIXME: symbolic_length is also a hack!
def _store(self, req):
address_wrappers = self.normalize_address(req.addr, is_write=True, convert_to_valueset=False)
req.actual_addresses = [ ]
req.stored_values = [ ]
for aw in address_wrappers:
r = self._do_store(aw.address, req.data, aw.region, req.endness,
is_stack=aw.is_on_stack, related_function_addr=aw.function_address)
if r.completed:
req.completed = True
req.actual_addresses.append(aw.to_valueset(self.state))
req.constraints.extend(r.constraints)
req.stored_values.extend(r.stored_values)
# No constraints are generated...
return req
def _do_store(self, addr, data, key, endness, is_stack=False, related_function_addr=None):
if type(key) is not str:
raise Exception('Incorrect type %s of region_key' % type(key))
bbl_addr, stmt_id, ins_addr = self.state.scratch.bbl_addr, self.state.scratch.stmt_idx, self.state.scratch.ins_addr
if key not in self._regions:
self.create_region(key, self.state, is_stack, related_function_addr, self.endness)
r = MemoryStoreRequest(addr, data=data, endness=endness)
self._regions[key].store(r, bbl_addr, stmt_id, ins_addr)
return r
def _load(self, addr, size, condition=None, fallback=None,
inspect=True, events=True, ret_on_segv=False):
address_wrappers = self.normalize_address(addr, is_write=False, condition=condition)
if isinstance(size, claripy.ast.BV) and isinstance(size._model_vsa, ValueSet):
# raise Exception('Unsupported type %s for size' % type(size._model_vsa))
l.warning('_load(): size %s is a ValueSet. Something is wrong.', size)
if self.state.scratch.ins_addr is not None:
var_name = 'invalid_read_%d_%#x' % (
invalid_read_ctr.next(),
self.state.scratch.ins_addr
)
else:
var_name = 'invalid_read_%d_None' % invalid_read_ctr.next()
return address_wrappers, self.state.se.Unconstrained(var_name, 32), [True]
val = None
if len(address_wrappers) > 1 and AVOID_MULTIVALUED_READS in self.state.options:
val = self.state.se.Unconstrained('unconstrained_read', size * self.state.arch.byte_width)
return address_wrappers, val, [True]
for aw in address_wrappers:
new_val = self._do_load(aw.address, size, aw.region,
is_stack=aw.is_on_stack,
related_function_addr=aw.function_address,
)
if val is None:
if KEEP_MEMORY_READS_DISCRETE in self.state.options:
val = self.state.se.DSIS(to_conv=new_val, max_card=100000)
else:
val = new_val
else:
val = val.union(new_val)
return address_wrappers, val, [True]
def _do_load(self, addr, size, key, is_stack=False, related_function_addr=None):
if type(key) is not str:
raise Exception('Incorrect type %s of region_key' % type(key))
bbl_addr, stmt_id, ins_addr = self.state.scratch.bbl_addr, self.state.scratch.stmt_idx, self.state.scratch.ins_addr
if key not in self._regions:
self.create_region(key, self.state, is_stack, related_function_addr, self.endness)
return self._regions[key].load(addr, size, bbl_addr, stmt_id, ins_addr)
def _apply_condition_to_symbolic_addr(self, addr, condition):
_, converted = self.state.solver.constraint_to_si(condition)
for original_expr, constrained_expr in converted:
addr = addr.replace(original_expr, constrained_expr)
return addr
def _copy_contents(self, dst, src, size, condition=None, src_memory=None, dst_memory=None, inspect=True,
disable_actions=False):
src_memory = self if src_memory is None else src_memory
dst_memory = self if dst_memory is None else dst_memory
max_size = self.state.se.max_int(size)
if max_size == 0:
return None, [ ]
data = src_memory.load(src, max_size, inspect=inspect, disable_actions=disable_actions)
dst_memory.store(dst, data, size=size, condition=condition, inspect=inspect, disable_actions=disable_actions)
return data
def find(self, addr, what, max_search=None, max_symbolic_bytes=None, default=None, step=1):
if type(addr) in (int, long):
addr = self.state.se.BVV(addr, self.state.arch.bits)
addr = self._normalize_address_type(addr)
# TODO: For now we are only finding in one region!
for region, si in addr:
si = self.state.se.SI(to_conv=si)
r, s, i = self._regions[region].memory.find(si, what, max_search=max_search,
max_symbolic_bytes=max_symbolic_bytes, default=default,
step=step
)
# Post process r so that it's still a ValueSet variable
region_base_addr = self._region_base(region)
r = self.state.se.ValueSet(r.size(), region, region_base_addr, r._model_vsa)
return r, s, i
def get_segments(self, addr, size):
"""
Get a segmented memory region based on AbstractLocation information available from VSA.
Here are some assumptions to make this method fast:
- The entire memory region [addr, addr + size] is located within the same MemoryRegion
- The address 'addr' has only one concrete value. It cannot be concretized to multiple values.
:param addr: An address
:param size: Size of the memory area in bytes
:return: An ordered list of sizes each segment in the requested memory region
"""
address_wrappers = self.normalize_address(addr, is_write=False)
# assert len(address_wrappers) > 0
aw = address_wrappers[0]
region_id = aw.region
if region_id in self.regions:
region = self.regions[region_id]
alocs = region.get_abstract_locations(aw.address, size)
# Collect all segments and sort them
segments = [ ]
for aloc in alocs:
segments.extend(aloc.segments)
segments = sorted(segments, key=lambda x: x.offset)
# Remove all overlapping segments
processed_segments = [ ]
last_seg = None
for seg in segments:
if last_seg is None:
last_seg = seg
processed_segments.append(seg)
else:
# Are they overlapping?
if seg.offset >= last_seg.offset and seg.offset <= last_seg.offset + size:
continue
processed_segments.append(seg)
# Make it a list of sizes
sizes = [ ]
next_pos = aw.address
for seg in processed_segments:
if seg.offset > next_pos:
gap = seg.offset - next_pos
assert gap > 0
sizes.append(gap)
next_pos += gap
if seg.size + next_pos > aw.address + size:
sizes.append(aw.address + size - next_pos)
next_pos += aw.address + size - next_pos
else:
sizes.append(seg.size)
next_pos += seg.size
if not sizes:
return [ size ]
return sizes
else:
# The region doesn't exist. Then there is only one segment!
return [ size ]
@SimMemory.memo
def copy(self, memo):
"""
Make a copy of this SimAbstractMemory object
:return:
"""
am = SimAbstractMemory(
memory_id=self._memory_id,
endness=self.endness,
stack_region_map=self._stack_region_map,
generic_region_map=self._generic_region_map
)
for region_id, region in self._regions.items():
am._regions[region_id] = region.copy(memo)
am._stack_size = self._stack_size
return am
def merge(self, others, merge_conditions, common_ancestor=None):
"""
Merge this guy with another SimAbstractMemory instance
"""
merging_occurred = False
for o in others:
for region_id, region in o._regions.items():
if region_id in self._regions:
merging_occurred |= self._regions[region_id].merge(
[region], merge_conditions, common_ancestor=common_ancestor
)
else:
merging_occurred = True
self._regions[region_id] = region
return merging_occurred
def widen(self, others):
widening_occurred = False
for o in others:
for region_id, region in o._regions.items():
if region_id in self._regions:
widening_occurred |= self._regions[region_id].widen([ region ])
else:
widening_occurred = True
self._regions[region_id] = region
return widening_occurred
def __contains__(self, dst):
if type(dst) in (int, long):
dst = self.state.se.BVV(dst, self.state.arch.bits)
addrs = self._normalize_address_type(dst)
for region, addr in addrs:
address_wrapper = self._normalize_address(region, addr.min)
return address_wrapper.address in self.regions[address_wrapper.region]
return False
def map_region(self, addr, length, permissions, init_zero=False): # pylint: disable=unused-argument
"""
Map a number of pages at address `addr` with permissions `permissions`.
:param addr: address to map the pages at
:param length: length in bytes of region to map, will be rounded upwards to the page size
:param permissions: AST of permissions to map, will be a bitvalue representing flags
:param init_zero: Initialize page with zeros
"""
l.warning('map_region() is not yet supported by SimAbstractMmeory.')
return
def unmap_region(self, addr, length): # pylint: disable=unused-argument
"""
Unmap a number of pages at address `addr`
:param addr: address to unmap the pages at
:param length: length in bytes of region to map, will be rounded upwards to the page size
"""
l.warning('unmap_region() is not yet supported by SimAbstractMmeory.')
return
def was_written_to(self, dst):
if type(dst) in (int, long):
dst = self.state.se.BVV(dst, self.state.arch.bits)
addrs = self._normalize_address_type(dst)
for region, addr in addrs:
address_wrapper = self._normalize_address(region, addr.min)
return self.regions[address_wrapper.region].was_written_to(address_wrapper.address)
return False
def dbg_print(self):
"""
Print out debugging information
"""
for region_id, region in self.regions.items():
print "Region [%s]:" % region_id
region.dbg_print(indent=2)
from ..sim_state import SimState
SimState.register_default('abs_memory', SimAbstractMemory)
| {
"content_hash": "b3f1c8698e14ea8ec31cd9bfc0e37339",
"timestamp": "",
"source": "github",
"line_count": 692,
"max_line_length": 178,
"avg_line_length": 39.895953757225435,
"alnum_prop": 0.5804476963199072,
"repo_name": "tyb0807/angr",
"id": "f58b3b7f4a04e5d146024d138070575d5c0dbfce",
"size": "27608",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "angr/state_plugins/abstract_memory.py",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "6375"
},
{
"name": "C++",
"bytes": "39875"
},
{
"name": "Makefile",
"bytes": "610"
},
{
"name": "Python",
"bytes": "3884780"
}
],
"symlink_target": ""
} |
var declarativeWebRequestSchema =
requireNative('schema_registry').GetSchema('declarativeWebRequest');
apiBridge.registerCustomHook(function(api) {
var webViewRequest = api.compiledApi;
// Helper function for the constructor of concrete datatypes of the
// declarative webRequest API.
// Makes sure that |this| contains the union of parameters and
// {'instanceType': 'declarativeWebRequest.' + typeId} and validates the
// generated union dictionary against the schema for |typeId|.
function setupInstance(instance, parameters, typeId) {
for (var key in parameters) {
if ($Object.hasOwnProperty(parameters, key)) {
instance[key] = parameters[key];
}
}
var qualifiedType = 'declarativeWebRequest.' + typeId;
instance.instanceType = qualifiedType;
bindingUtil.validateType(qualifiedType, instance);
}
// Setup all data types for the declarative webRequest API from the schema.
for (var i = 0; i < declarativeWebRequestSchema.types.length; ++i) {
var typeSchema = declarativeWebRequestSchema.types[i];
var typeId = $String.replace(typeSchema.id, 'declarativeWebRequest.', '');
var action = function(typeId) {
return function(parameters) {
setupInstance(this, parameters, typeId);
};
}(typeId);
webViewRequest[typeId] = action;
}
});
| {
"content_hash": "e759dc00227733db651285248c8fb2b8",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 78,
"avg_line_length": 38.31428571428572,
"alnum_prop": 0.7099179716629381,
"repo_name": "nwjs/chromium.src",
"id": "690cfd34410cc42f2dd8f59974640aec0fdd275a",
"size": "1532",
"binary": false,
"copies": "6",
"ref": "refs/heads/nw70",
"path": "extensions/renderer/resources/guest_view/web_view/web_view_request_custom_bindings.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
package com.sun.jini.mahalo;
import com.sun.jini.constants.TimeConstants;
import com.sun.jini.constants.TxnConstants;
import com.sun.jini.landlord.LeasedResource;
import com.sun.jini.logging.Levels;
import com.sun.jini.mahalo.log.ClientLog;
import com.sun.jini.mahalo.log.LogException;
import com.sun.jini.mahalo.log.LogManager;
import com.sun.jini.thread.TaskManager;
import com.sun.jini.thread.WakeupManager;
import java.rmi.RemoteException;
import java.util.Enumeration;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.Vector;
import net.jini.core.transaction.CannotAbortException;
import net.jini.core.transaction.CannotCommitException;
import net.jini.core.transaction.CannotJoinException;
import net.jini.core.transaction.TimeoutExpiredException;
import net.jini.core.transaction.Transaction;
import net.jini.core.transaction.TransactionException;
import net.jini.core.transaction.server.CrashCountException;
import net.jini.core.transaction.server.ServerTransaction;
import net.jini.core.transaction.server.TransactionConstants;
import net.jini.core.transaction.server.TransactionManager;
import net.jini.core.transaction.server.TransactionParticipant;
import net.jini.id.Uuid;
import net.jini.security.ProxyPreparer;
/**
* TxnManagerTransaction is a class which
* captures the internal representation of a transaction
* in the TxnManagerImpl server. This class is associated
* with a transaction id.
* The information encapsulated includes the list of participants
* which have joined the transaction, the state of the
* transaction, the crash.
*
* The user of a ParticipantHolder must make the association
* between an instance of a ParticipantHolder and some sort
* of key or index.
*
*
*
*/
class TxnManagerTransaction
implements TransactionConstants, TimeConstants, LeasedResource
{
static final long serialVersionUID = -2088463193687796098L;
/*
* Table of valid state transitions which a
* TransactionManager may make.
*
* This represents the following diagram from the
* Jini Transaction Spec:
*
* ACTIVE ----> VOTING ------->COMMITTED
* \ |
* \ |
* ---------------------->ABORTED
*
*
* ACTIVE VOTING PREPARED NOTCHANGED COMMITTED ABORTED
* ----------------------------------------------------------------------
* ACTIVE true true false false false true
* VOTING false true false false true true
* PREPARED false false false false false false
* NOTCHANGED false false false false false false
* COMMITTED false false false false true false
* ABORTED false false false false false true
*
* The table is indexed using the ordered pair
* <current_state, next_state>. A value of true means
* that the transition is possible, while a false
* means that the transition is not possible.
*
* Note: Some rows are "{false, false, false, false}" as
* unused filler to account for the fact that the
* TransactionManager's valid states are a subset
* of the TransactionConstants.
*
* <zero>
* ACTIVE = 1
* VOTING = 2
* PREPARED = 3
* NOTCHANGED = 4
* COMMITTED = 5
* ABORTED = 6
*/
private static final boolean states[][] = {
/* <zero> */ {false, false, false, false, false, false, false},
/* ACTIVE */ {false, true, true, false, false, false, true},
/* VOTING */ {false, false, true, false, false, true, true},
/* PREPARED */ {false, false, false, false, false, false, false},
/* NOTCHANGED*/ {false, false, false, false, false, false, false},
/* COMMITTED */ {false, false, false, false, false, true, false},
/* ABORTED */ {false, false, false, false, false, false, true}};
/**
* @serial
*/
private List parts = new Vector();
/**
* @serial
*/
private final ServerTransaction str;
/**
* @serial
*/
private int trstate;
/**
* @serial
*/
private long expires; //expiration time
/**
* @serial
*/
private LogManager logmgr;
/**
* "Parallelizing" the interaction between the manager
* and participants means using threads to interact with
* participants on behalf of the manager. In the thread
* pool model, a TaskManager provides a finite set of
* threads used to accomplish a variety of tasks.
* A Job encapsulates a body of work which needs to be
* performed during the two-phase commit: preparing,
* committing and aborting. Each work item is broken
* into smaller pieces of work- interactions with a
* single participant- each assigned to a task.
*
* When a transaction is committing, a PrepareJob is
* created and its tasks are scheduled. After completion,
* the PrepareJob's outcome is computed. Depending on
* the outcome, either an AbortJob or CommitJob is
* scheduled. When a transaction is aborted, an AbortJob
* is scheduled.
*
* A caller may specify a timeout value for commit/abort.
* The timeout represents the length of time a caller is
* willing to wait for participants to be instructed to
* roll-forward/back. Should this timeout expire, a
* TimeoutExpiredException is thrown. This causes the
* caller's thread to return back to the caller. Someone
* needs to finish contacting all the participants. This
* is accomplished by the SettlerTask. SettlerTasks must
* use a different thread pool from what is used by the
* various Job types, otherwise deadlock will occur.
*
* @serial
*/
private TaskManager threadpool;
/**
* @serial
*/
private WakeupManager wm;
/**
* @serial
*/
private TxnSettler settler;
/**
* @serial
*/
private Job job;
/**
* @serial
*/
private Uuid uuid;
/**
* Interlock for the expiration time since
* lease renewal which set it may compete
* against lease checks which read it.
*
* @serial
*/
private Object leaseLock = new Object();
/**
* Interlock for Jobs is needed since many
* threads on behalf of many clients can
* simultaneously access or modify the Job
* associated with this transaction when
* when attempting to prepare, roll forward
* or roll back participants.
*
* @serial
*/
private Object jobLock = new Object();
/**
* Interlock for transaction state needed
* since many threads on behalf of many
* clients can simultaneously access or
* attempt to modify this transaction's
* state as a side effect of calling
* commit or abort.
*
* @serial
*/
private Object stateLock = new Object();
/** Logger for operation related messages */
private static final Logger operationsLogger =
TxnManagerImpl.operationsLogger;
/** Logger for transaction related messages */
private static final Logger transactionsLogger =
TxnManagerImpl.transactionsLogger;
/**
* Constructs a <code>TxnManagerTransaction</code>
*
* @param mgr <code>TransactionManager</code> which owns
* this internal representation.
* @param logmgr <code>LogManager</code> responsible for
* recording COMMITTED and ABORTED transactions
* to stable storage.
*
* @param id The transaction id
*
* @param threadpool The <code>TaskManager</code> which provides
* the pool of threads used to interact with
* participants.
*
* @param settler TxnSettler responsible for this transaction if
* unsettled.
*/
TxnManagerTransaction(TransactionManager mgr, LogManager logmgr, long id,
TaskManager threadpool, WakeupManager wm, TxnSettler settler,
Uuid uuid)
{
if (logmgr == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"log manager must be non-null");
if (mgr == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"transaction manager must be non-null");
if (threadpool == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"threadpool must be non-null");
if (wm == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"wakeup manager must be non-null");
if (settler == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"settler must be non-null");
if (uuid == null)
throw new IllegalArgumentException("TxnManagerTransaction: " +
"uuid must be non-null");
this.threadpool = threadpool;
this.wm = wm;
this.logmgr = logmgr ;
str = new ServerTransaction(mgr, id);
this.settler = settler;
this.uuid = uuid;
trstate = ACTIVE; //this is implied since ACTIVE is initial state
// Expires is set after object is created when the associated
// lease is constructed.
}
/**
* Convenience method which adds a given <code>ParticipantHandle</code>
* to the set of <code>ParticpantHandle</code>s associated with this
* transaction.
*
* @param handle The added handle
*/
void add(ParticipantHandle handle)
throws InternalManagerException
{
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"add", handle);
}
if (handle == null)
throw new NullPointerException("ParticipantHolder: add: " +
"cannot add null handle");
//NOTE: if the same participant re-joins, then that is
// fine.
try {
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Adding ParticipantHandle: {0}", handle);
}
parts.add(handle);
} catch (Exception e) {
if (transactionsLogger.isLoggable(Level.SEVERE)) {
transactionsLogger.log(Level.SEVERE,
"Unable to add ParticipantHandle", e);
}
throw new InternalManagerException("TxnManagerTransaction: " +
"add: " + e.getMessage());
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"add");
}
}
/**
* Convenience method which allows the caller to modify the
* prepState associated with a given <code>ParticipantHandle</code>
*
* @param handle The <code>ParticipantHandle</code> being modified
*
* @param state The new prepstate
*/
void modifyParticipant(ParticipantHandle handle, int state) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"modifyParticipant", new Object[] {handle, Integer.valueOf(state)});
}
ParticipantHandle ph = null;
if (handle == null)
throw new NullPointerException("ParticipantHolder: " +
"modifyParticipant: cannot modify null handle");
if (parts.contains(ph))
ph = (ParticipantHandle) parts.get(parts.indexOf(handle));
if (ph == null) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(
TxnManagerTransaction.class.getName(),
"modifyParticipant");
}
//TODO - ignore??
return;
}
ph.setPrepState(state);
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"modifyParticipant");
}
}
/**
* Changes the manager-side state of the transaction. This
* method makes only valid state changes and informs the
* caller if the change was successful. Calls to this method
* synchronize around the manager-side state variable appropriately.
*
* @param state the new desired state
*/
boolean modifyTxnState(int state) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"modifyTxnState", Integer.valueOf(state));
}
boolean result = false;
synchronized (stateLock) {
switch (state) {
case ACTIVE:
case VOTING:
case COMMITTED:
case ABORTED:
result = states[trstate][state];
break;
default:
throw new IllegalArgumentException("TxnManagerTransaction: " +
"modifyTxnState: invalid state");
}
if (result)
trstate = state;
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"modifyTxnState", Boolean.valueOf(result));
}
return result;
}
/**
* Implementation of the join method.
*
* @param preparedPart The joining <code>TransactionParticpant</code>
*
* @param crashCount The crashcount associated with the joining
* <code>TransactionParticipant</code>
*
* @see net.jini.core.transaction.server.TransactionParticipant
*/
public void
join(TransactionParticipant preparedPart, long crashCount)
throws CannotJoinException, CrashCountException, RemoteException
{
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"join", new Object[] {preparedPart, Long.valueOf(crashCount)});
}
//if the lease has expired, or the state is not
//amenable there is no need to continue
if (getState() != ACTIVE)
throw new CannotJoinException("not active");
if ((getState() == ACTIVE) && (ensureCurrent() == false)) {
doAbort(0);
throw new CannotJoinException("Lease expired");
}
//Create a ParticipantHandle for the new participant
//and mark the transactional state as ACTIVE
try {
ParticipantHandle ph =
new ParticipantHandle(preparedPart, crashCount);
ParticipantHandle phtmp = (ParticipantHandle)
((parts.contains(ph))?
parts.get(parts.indexOf(ph)):
null);
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Retrieved ParticipantHandle: {0}", phtmp);
}
if (phtmp != null) {
long oldcount = phtmp.getCrashCount();
if (oldcount == crashCount) {
return;
} else {
throw new CrashCountException("TxnManagerTransaction: " +
"join: old = " + oldcount +
" new = " + crashCount);
}
}
add(ph);
} catch (InternalManagerException ime) {
if (transactionsLogger.isLoggable(Level.SEVERE)) {
transactionsLogger.log(Level.SEVERE,
"TransactionParticipant unable to join", ime);
}
throw ime;
} catch (RemoteException re) {
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"TransactionParticipant unable to be stored", re);
}
throw re;
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"join");
}
}
/**
* This method returns the state of the transaction.
* Since the purpose of the set of ParticipantHolders is
* to associate a Transaction with a group of
* participants joined the transaction, we would like
* to get the state of the transaction associated with
* the aforementioned set.
*
*/
public int getState() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"getState");
}
synchronized (stateLock) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"getState", Integer.valueOf(trstate));
}
return trstate;
}
}
/**
* Commits the transaction.
* This initiates the two-phase commit protocol. First,
* each <code>net.jini.core.transaction.server.TransactionParticipant</code>
* in the set of participants joined in the
* <code>net.jini.core.transaction.server.Transaction</code>
* is instructed to vote and the votes are tallied. This is the
* first phase (prepare phase).
*
* Depending on the outcome of the votes, the transaction
* is considered committed or aborted. Once commit/abort
* status is known, the participants are notified with
* a message to either roll-forward (commit case) or
* roll-back (abort case). This is the roll-phase.
*
* Since there may be a one-to-many relationship between
* a transaction and its participants,
* <code>com.sun.jini.thread.TaskManager</code>s are used
* as a generic mechanism to provide the threads needed
* to interact with the participants.
*
*/
void commit(long waitFor)
throws CannotCommitException, TimeoutExpiredException, RemoteException
{
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"commit", Long.valueOf(waitFor));
}
long starttime = System.currentTimeMillis();
//If the transaction has already expired or the state
//is not amenable, don't even try to continue
if ((getState() == ACTIVE) && (ensureCurrent() == false)) {
doAbort(0);
throw new CannotCommitException("Lease expired");
}
if (getState() == ABORTED)
throw new CannotCommitException("attempt to commit " +
"ABORTED transaction");
//Check to see if anyone joined the transaction. Even
//if no one has joined, at this point, attempt to
//get to the COMMITTED state through valid state changes
Vector joinvec = parthandles();
if (joinvec == null) {
if (!modifyTxnState(VOTING))
throw new CannotCommitException("attempt to commit " +
"ABORTED transaction");
if (modifyTxnState(COMMITTED))
return;
else
throw new CannotCommitException("attempt to commit " +
"ABORTED transaction");
}
try {
Enumeration joined = joinvec.elements();
int numparts = joinvec.size();
ParticipantHandle[] phs = new ParticipantHandle[numparts];
joinvec.copyInto(phs);
long now = starttime;
long transpired = 0;
long remainder = 0;
ClientLog log = logmgr.logFor(str.id);
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"{0} TransactionParticipants have joined",
Integer.valueOf(numparts));
}
//If commit is called after recovery, do not
//log a CommitRecord since it already exists
//exists in the Log file for this transaction.
//Remember that a log is not invalidated until
//after the transaction is committed.
//
//Only new occurrences of activities requiring
//logging which happen after recovery should
//be added to the log file. So, we add records
//for voting and roll forward/back activity for
//ACTIVE participants.
//
//If the state cannot validly transition to VOTING,
//it is either because someone already aborted or
//committed. Only throw an exception if someone
//has previously aborted. In the case of a prior
//commit, fall through and wait for the CommitJob
//to complete.
int oldstate = getState();
Integer result = Integer.valueOf(ABORTED);
Exception alternateException = null;
//On an ACTIVE to VOTING transition, create
//and schedule a Prepare or PrepareAndCommitJob.
//If the state transition is VOTING to VOTING,
//then the PrepareJob has already been created
//in the past, so just fall through and wait
//for it to complete.
//
//Only log the commit on ACTIVE to VOTING
//transitions.
if (modifyTxnState(VOTING)) {
if (oldstate == ACTIVE)
log.write(new CommitRecord(phs));
//preparing a participant can never override
//the other activities (abort or commit),
//so only set when the job is null.
synchronized (jobLock) {
if (job == null) {
if (phs.length == 1)
job = new
PrepareAndCommitJob(
str, threadpool, wm, log, phs[0]);
else
job = new PrepareJob(str, threadpool, wm, log, phs);
job.scheduleTasks();
}
}
//Wait for the PrepareJob to complete.
//PrepareJobs are given maximum time for
//completion. This is required in order to
//know the transaction's completion status.
//Remember that the timeout ONLY controls how
//long the caller is willing to wait to inform
//participants. This means that a completion
//status for the transaction MUST be computed
//before consulting the timeout.
//Timeout is ignored until completion status
//is known. If extra time is left, wait for
//the remainder to inform participants.
//We must explicitly check for Job type
//because someone else could have aborted
//the transaction at this point.
synchronized (jobLock) {
if ((job instanceof PrepareJob) ||
(job instanceof PrepareAndCommitJob)) {
try {
if (job.isCompleted(Long.MAX_VALUE)) {
result = (Integer) job.computeResult();
if (result.intValue() == ABORTED &&
job instanceof PrepareAndCommitJob) {
PrepareAndCommitJob pj =
(PrepareAndCommitJob)job;
alternateException =
pj.getAlternateException();
}
}
} catch (JobNotStartedException jnse) {
//no participants voted, so do nothing
result = Integer.valueOf(NOTCHANGED);
} catch (ResultNotReadyException rnre) {
//consider aborted
} catch (JobException je) {
//consider aborted
}
}
}
} else {
//Cannot be VOTING, so we either have
//an abort or commit in progress.
if (getState() == ABORTED)
throw new CannotCommitException("transaction ABORTED");
//If a CommitJob is already in progress
//(the state is COMMITTED) cause a fall
//through to the code which waits for
//the CommitJob to complete.
if (getState() == COMMITTED)
result = Integer.valueOf(COMMITTED);
}
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Voting result: {0}",
TxnConstants.getName(result.intValue()));
}
switch (result.intValue()) {
case NOTCHANGED:
break;
case ABORTED:
now = System.currentTimeMillis();
transpired = now - starttime;
remainder = waitFor - transpired;
if (remainder >=0)
doAbort(remainder);
else
doAbort(0);
if (alternateException == null) {
throw new CannotCommitException(
"Unable to commit transaction: "
+ getParticipantInfo());
} else {
throw new RemoteException(
"Problem communicating with participant",
alternateException);
}
case PREPARED:
//This entrypoint is entered if a PrepareJob
//tallied the votes with an outcome of
//PREPARED. In order to inform participants,
//a CommitJob must be scheduled.
if(modifyTxnState(COMMITTED)) {
//TODO - log committed state record?
synchronized (jobLock) {
job = new CommitJob(str, threadpool, wm, log, phs);
job.scheduleTasks();
}
} else {
throw new CannotCommitException("attempt to commit " +
"ABORTED transaction");
}
//Fall through to code with waits
//for CommitJob to complete.
case COMMITTED:
//This entrypoint is the starting place for the code
//which waits for a CommitJob to complete and
//computes its resulting outcome. In addition,
//the wait time is enforced. Should the wait time
//expire, a SettlerTask is scheduled on a thread
//pool. The SettlerTask is needed to complete
//the commit (instruct participants to roll-forward)
//on behalf of the thread which exits when
//the TimeoutExpiredException is thrown.
//
//It is reached when...
//
// a) A commit was called on the same transaction twice.
// When the thread comes in on the commit call, a
// CommitJob already exists and the state is COMMITTED.
//
// b) The normal case where a PrepareJob was found to
// have prepared the transaction and the tally of
// votes resulted in a PREPARED outcome. This causes
// the state to be changed to COMMITTED and a
// CommitJob to be created.
//
// c) A PrepareAndCommitJob has successfully prepared
// a participant which rolled its changes forward.
//
//Note: By checking to see if the CommitJob is already
// present, this check allows us to use the same
// wait-for-CommitJob code for the regular
// PREPARE/COMMIT, the COMMIT/COMMIT and
// the PREPAREANDCOMMIT cases.
synchronized (jobLock) {
//A prepareAndCommitJob is done at this
//point since the TransactionParticipant
//would have instructed itself to roll
//forward.
if (job instanceof PrepareAndCommitJob) {
if(!modifyTxnState(COMMITTED))
throw new CannotCommitException("transaction " +
"ABORTED");
break;
}
//If the abort already arrived, then stop
if (job instanceof AbortJob)
throw new CannotCommitException("transaction " +
"ABORTED");
}
if (getState() != COMMITTED)
throw new
InternalManagerException("TxnManagerTransaction: " +
"commit: " + job + " got bad state: " +
TxnConstants.getName(result.intValue()));
now = System.currentTimeMillis();
transpired = now - starttime;
boolean committed = false;
//If the commit is asynchronous then...
//
// a) check to see if the wait time has transpired
//
// b) If it hasn't, sleep for what's left from the wait time
try {
remainder = waitFor - transpired;
synchronized (jobLock) {
if (remainder <= 0 || !job.isCompleted(remainder)) {
/*
* Note - SettlerTask will kick off another Commit/Abort task for the same txn
* which will try go through the VOTING->Commit states again.
*/
//TODO - Kill off existing task? Postpone SettlerTask?
settler.noteUnsettledTxn(str.id);
throw new TimeoutExpiredException(
"timeout expired", true);
} else {
result = (Integer) job.computeResult();
committed = true;
}
}
} catch (ResultNotReadyException rnre) {
//this should not happen, so flag
//as an error.
} catch (JobNotStartedException jnse) {
//an error
} catch (JobException je) {
//an error
}
if (committed)
break;
default:
throw new InternalManagerException("TxnManagerTransaction: " +
"commit: " + job + " got bad state: " +
TxnConstants.getName(result.intValue()));
}
//We don't care about the result from
//the CommitJob
log.invalidate();
} catch (RuntimeException rte) {
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Problem committing transaction",
rte);
}
throw rte;
} catch (LogException le) {
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Problem persisting transaction",
le);
}
throw new CannotCommitException("Unable to log");
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"commit");
}
}
/**
* Aborts the transaction.
* This method attempts to set the state of the transaction
* to the ABORTED state. If successful, it then creates
* an AbortJob which schedules tasks executed on a
* thread pool. These tasks interact with the participants
* joined in this transaction to inform them to roll back.
*
* @param waitFor Timeout value which controls how long,
* the caller is willing to wait for the
* participants joined in the transaction
* to be instructed to roll-back.
*
* @see com.sun.jini.mahalo.AbortJob
* @see com.sun.jini.mahalo.ParticipantTask
* @see com.sun.jini.thread.TaskManager
* @see net.jini.core.transaction.server.TransactionParticipant
*/
void abort(long waitFor)
throws CannotAbortException, TimeoutExpiredException
{
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"abort", Long.valueOf(waitFor));
}
long starttime = System.currentTimeMillis();
/*
* Since lease cancellation process sets expiration to 0
* and then calls abort, can't reliably check expiration
* at this point.
*/
//TODO - Change internal, lease logic to call overload w/o expiration check
//TODO - Add expiration check to abort for external clients
try {
Vector joinvec = parthandles();
if (joinvec == null) {
if (modifyTxnState(ABORTED))
return;
else
throw new
CannotAbortException("Transaction already COMMITTED");
}
int numparts = joinvec.size();
ParticipantHandle[] phs = new ParticipantHandle[numparts];
joinvec.copyInto(phs);
ClientLog log = logmgr.logFor(str.id);
//When attempting to abort, if someone has already
//committed the transaction, then throw an Exception.
//
//If an abort is possible, and you find that an AbortJob
//is already in progress, let the existing AbortJob
//proceed.
//
//If an abort is possible, but a PrepareJob is in progress,
//go ahead an halt the PrepareJob and replace it with
//an AbortJob.
if (modifyTxnState(ABORTED)) {
log.write(new AbortRecord(phs));
synchronized (jobLock) {
if (!(job instanceof AbortJob)) {
if (job != null)
job.stop();
job = new AbortJob(str, threadpool, wm, log, phs);
job.scheduleTasks();
}
}
} else {
throw new CannotAbortException("Transaction already COMMITTED");
}
//This code waits for an AbortJob to complete and
//computes its resulting outcome. In addition,
//the wait time is enforced. Should the wait time
//expire, a SettlerTask is scheduled on a thread
//pool. The SettlerTask is needed to complete
//the abort (instruct participants to roll-back)
//on behalf of the thread which exits when
//the TimeoutExpiredException is thrown.
long now = System.currentTimeMillis();
long transpired = now - starttime;
Integer result = Integer.valueOf(ACTIVE);
boolean aborted = false;
long remainder = waitFor - transpired;
try {
synchronized (jobLock) {
if (remainder<= 0 || !job.isCompleted(remainder)) {
settler.noteUnsettledTxn(str.id);
throw new TimeoutExpiredException(
"timeout expired",false);
} else {
result = (Integer) job.computeResult();
aborted = true;
}
}
} catch (ResultNotReadyException rnre) {
//should not happen, so flag as error
} catch (JobNotStartedException jnse) {
//error
} catch (JobException je) {
settler.noteUnsettledTxn(str.id);
throw new TimeoutExpiredException("timeout expired", false);
}
if (!aborted)
throw new InternalManagerException("TxnManagerTransaction: " +
"abort: AbortJob got bad state: " +
TxnConstants.getName(result.intValue()));
log.invalidate();
} catch (RuntimeException rte) {
if (transactionsLogger.isLoggable(Level.SEVERE)) {
transactionsLogger.log(Level.SEVERE,
"Problem aborting transaction",
rte);
}
throw new InternalManagerException("TxnManagerTransaction: " +
"abort: fatal error");
} catch (LogException le) {
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Problem persisting transaction",
le);
}
throw new CannotAbortException("Unable to log");
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"abort");
}
}
public Transaction getTransaction() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"getTransaction");
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"getTransaction", str);
}
return str;
}
public long getExpiration() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"getExpiration");
}
synchronized (leaseLock) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"getExpiration", new Date(expires));
}
return expires;
}
}
public void setExpiration(long newExpiration) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"setExpiration", new Date(newExpiration));
}
synchronized (leaseLock) {
expires = newExpiration;
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"setExpiration");
}
}
public Uuid getCookie() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"getCookie");
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"getCookie", uuid);
}
return uuid;
}
private void doAbort(long timeout) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"doAbort", Long.valueOf(timeout));
}
try {
str.abort(timeout);
} catch (RemoteException re) {
//abort must have happened, so ignore
if (transactionsLogger.isLoggable(Levels.HANDLED)) {
transactionsLogger.log(Levels.HANDLED,
"Trouble aborting transaction", re);
}
} catch (TimeoutExpiredException te) {
//Swallow this because we really only
//care about a scheduling a SettlerTask
if (transactionsLogger.isLoggable(Levels.HANDLED)) {
transactionsLogger.log(Levels.HANDLED,
"Trouble aborting transaction", te);
}
} catch (TransactionException bte) {
//If abort has problems, swallow
//it because the abort must have
//happened
if (transactionsLogger.isLoggable(Levels.HANDLED)) {
transactionsLogger.log(Levels.HANDLED,
"Trouble aborting transaction", bte);
}
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"doAbort");
}
}
synchronized boolean ensureCurrent() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"ensureCurrent");
}
long cur = System.currentTimeMillis();
boolean result = false;
long useby = getExpiration();
if (useby > cur)
result = true;
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"ensureCurrent", Boolean.valueOf(result));
}
return result;
}
private Vector parthandles() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"parthandles");
}
if ( (parts == null ) || ( parts.size() == 0 ) )
return null;
Vector vect = new Vector(parts);
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Retrieved {0} participants",
Integer.valueOf(vect.size()));
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"parthandles");
}
return vect;
}
private String getParticipantInfo() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"getParticipantInfo");
}
if ( (parts == null ) || ( parts.size() == 0 ) )
return "No participants";
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"{0} participants joined", Integer.valueOf(parts.size()));
}
StringBuffer sb = new StringBuffer(parts.size() + " Participants: ");
ParticipantHandle ph;
for (int i=0; i < parts.size(); i++) {
ph = (ParticipantHandle)parts.get(i);
sb.append(
"{" + i + ", "
+ ph.getPreParedParticipant().toString() + ", "
+ TxnConstants.getName(ph.getPrepState())
+ "} ");
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"getParticipantInfo", sb.toString());
}
return sb.toString();
}
void restoreTransientState(ProxyPreparer preparer)
throws RemoteException
{
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(TxnManagerTransaction.class.getName(),
"restoreTransientState");
}
if ( (parts == null ) || ( parts.size() == 0 ) )
return;
ParticipantHandle[] handles = (ParticipantHandle[])
parts.toArray(new ParticipantHandle[parts.size()]);
for (int i=0; i < handles.length; i++) {
handles[i].restoreTransientState(preparer);
if (transactionsLogger.isLoggable(Level.FINEST)) {
transactionsLogger.log(Level.FINEST,
"Restored transient state for {0}",
handles[i]);
}
}
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(TxnManagerTransaction.class.getName(),
"restoreTransientState");
}
}
}
| {
"content_hash": "90ca5e03cca28d454f0dd155b42f0c68",
"timestamp": "",
"source": "github",
"line_count": 1221,
"max_line_length": 80,
"avg_line_length": 33.13349713349713,
"alnum_prop": 0.6218360688155032,
"repo_name": "cdegroot/river",
"id": "45dae09ac9d841157874c633cbbb52432c770c14",
"size": "41262",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/com/sun/jini/mahalo/TxnManagerTransaction.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2047"
},
{
"name": "Groovy",
"bytes": "16876"
},
{
"name": "Java",
"bytes": "22265383"
},
{
"name": "Shell",
"bytes": "117083"
}
],
"symlink_target": ""
} |
package GoDynamoDB
import "github.com/aws/aws-sdk-go/service/dynamodb"
import (
"testing"
)
func Test_decode(t *testing.T) {
var attMap map[string]*dynamodb.AttributeValue
var err error
attMap, err = encode(&TestStruct{Name: "John", Id: "123"})
if err != nil {
t.Error("can not trans to AttributeValue")
}
outStruct := TestStruct{Name: "test", Id: "ddd"}
decodeErr := decode(attMap, &outStruct)
if nil != decodeErr {
t.Error("can't decode")
}
if outStruct.Name != "John" {
t.Error("wrong Name")
}
if outStruct.Id != "123" {
t.Error("wrong Id")
}
}
| {
"content_hash": "1ea90aadc71f6bfa048058c2070f46ba",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 59,
"avg_line_length": 19.2,
"alnum_prop": 0.6579861111111112,
"repo_name": "Misfit-John/GoDynamoDB",
"id": "3908d489de7497bfb6eeb35d9300d211eb540fa4",
"size": "576",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Decoder_test.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "64056"
},
{
"name": "Makefile",
"bytes": "34"
}
],
"symlink_target": ""
} |
import { Entity, EntityField } from "pouchable";
import { identity } from "lodash";
/**
* Represent a product entity
*/
export class Purchase extends Entity {
@EntityField({
group: "default",
mandatory: true,
name: "readable_id",
description: "Payment's readable id"
})
public readable_id: string;
@EntityField({
group: "default",
mandatory: true,
name: "product_ids",
description: "List of products purchased"
})
public product_ids: string[];
@EntityField({
group: "default",
mandatory: true,
name: "total_price",
description: "Purchase total price"
})
public total_price: number;
@EntityField({
group: "default",
mandatory: true,
name: "tax",
description: "Purchase tax"
})
public tax: number;
@EntityField({
group: "default",
mandatory: true,
name: "payment_type",
description: "Payment's type (cash or card)"
})
public payment_type: string;
@EntityField({
group: "default",
mandatory: true,
name: "payment_id",
search_by: [identity],
description: "Payment's id"
})
public payment_id: string;
@EntityField({
group: "refund",
name: "refund_id",
description: "Refund's id"
})
public refund_id: string;
}
| {
"content_hash": "df3bb132f0bd663036bfe3ed225c73eb",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 52,
"avg_line_length": 22.25,
"alnum_prop": 0.5554775280898876,
"repo_name": "sudzy-group/com.sudzy.db",
"id": "cffd78bd9d164aba12d74bdda36f3b5fa486972f",
"size": "1424",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/entities/Purchase.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "82699"
},
{
"name": "Shell",
"bytes": "5411"
},
{
"name": "TypeScript",
"bytes": "229632"
}
],
"symlink_target": ""
} |
The MIT License
Copyright (c) 2017 Daniel Roberson
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.
| {
"content_hash": "1164c9ea3cfe2ea58140d516cab9895d",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 77,
"avg_line_length": 51.23809523809524,
"alnum_prop": 0.8057620817843866,
"repo_name": "droberson/davenavarrosgoatee",
"id": "53556206b7285105d65458bc3a0d63f2b59e9f42",
"size": "1076",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "LICENSE.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "11576"
}
],
"symlink_target": ""
} |
<?php
namespace Symfony\Component\Form;
/**
* Field for entering URLs.
*
* Available options:
*
* * default_protocol: If specified, {default_protocol}:// (e.g. http://)
* will be prepended onto any input string that
* doesn't begin with the protocol.
*
* @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
*/
class UrlField extends TextField
{
/**
* {@inheritDoc}
*/
protected function configure()
{
$this->addOption('default_protocol', 'http');
parent::configure();
}
/**
* {@inheritDoc}
*/
protected function processData($data)
{
$protocol = $this->getOption('default_protocol');
if ($protocol && $data && !preg_match('~^\w+://~', $data)) {
$data = $protocol . '://' . $data;
}
return $data;
}
}
| {
"content_hash": "4e84326ebb8b23d81b933951cd257dbb",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 78,
"avg_line_length": 20.88372093023256,
"alnum_prop": 0.5311804008908686,
"repo_name": "l3l0/BehatExamples",
"id": "a8b49f7d08e36a4331941be1c0186530806b9499",
"size": "1145",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "vendor/symfony/src/Symfony/Component/Form/UrlField.php",
"mode": "33261",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package mcjty.rftoolsdim.network;
import io.netty.buffer.ByteBuf;
import mcjty.lib.network.NetworkTools;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
public class ByteBufTools {
public static void writeMapAsStrings(ByteBuf buf, Map<String, String> s) {
if (s == null) {
buf.writeInt(-1);
} else {
buf.writeInt(s.size());
s.entrySet().stream().forEach(entry -> {
NetworkTools.writeString(buf, entry.getKey());
NetworkTools.writeString(buf, entry.getValue());
});
}
}
public static Map<String, String> readMapFromStrings(ByteBuf buf) {
int size = buf.readInt();
if (size == -1) {
return null;
} else {
Map<String, String> result = new HashMap<>(size);
for (int i = 0 ; i < size ; i++) {
String key = NetworkTools.readString(buf);
String value = NetworkTools.readString(buf);
result.put(key, value);
}
return result;
}
}
public static <T> void writeSetAsStrings(ByteBuf buf, Set<T> s) {
if (s == null) {
buf.writeInt(-1);
} else {
buf.writeInt(s.size());
s.stream().forEach(p -> NetworkTools.writeString(buf, p.toString()));
}
}
public static Set<String> readSetFromStrings(ByteBuf buf) {
return readSetFromStringsWithMapper(buf, Function.identity());
}
public static <T> Set<T> readSetFromStringsWithMapper(ByteBuf buf, Function<String, T> mapper) {
int size = buf.readInt();
if (size == -1) {
return null;
} else {
Set<T> result = new HashSet<>(size);
for (int i = 0 ; i < size ; i++) {
result.add(mapper.apply(NetworkTools.readString(buf)));
}
return result;
}
}
public static <T extends Enum<T>> void writeSetAsEnums(ByteBuf buf, Set<T> s) {
if (s == null) {
buf.writeInt(-1);
} else {
buf.writeInt(s.size());
s.stream().forEach(p -> buf.writeShort(p.ordinal()));
}
}
public static <T> Set<T> readSetFromShortsWithMapper(ByteBuf buf, Function<Integer, T> mapper) {
int size = buf.readInt();
if (size == -1) {
return null;
} else {
Set<T> result = new HashSet<>(size);
for (int i = 0 ; i < size ; i++) {
result.add(mapper.apply((int) buf.readShort()));
}
return result;
}
}
public static void writeSetAsShorts(ByteBuf buf, Set<Integer> s) {
if (s == null) {
buf.writeInt(-1);
} else {
buf.writeInt(s.size());
s.stream().forEach(buf::writeShort);
}
}
public static Set<Integer> readSetFromShorts(ByteBuf buf) {
int size = buf.readInt();
if (size == -1) {
return null;
} else {
Set<Integer> result = new HashSet<>(size);
for (int i = 0 ; i < size ; i++) {
result.add((int) buf.readShort());
}
return result;
}
}
}
| {
"content_hash": "80fba5eb2a0eb9142135a8d317fd0cf8",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 100,
"avg_line_length": 30.354545454545455,
"alnum_prop": 0.5172207247678946,
"repo_name": "McJty/RFToolsDimensions",
"id": "dda6d4ff9e81240d0d8a2fc33b43c3adeab83d5b",
"size": "3339",
"binary": false,
"copies": "1",
"ref": "refs/heads/1.12",
"path": "src/main/java/mcjty/rftoolsdim/network/ByteBufTools.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "1523186"
}
],
"symlink_target": ""
} |
<?php
namespace Mikroking\Exception;
abstract class BaseException extends \Exception
{
public function getHeaders()
{
return [];
}
}
| {
"content_hash": "844294d5f551c4bb9897c49567534bf9",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 47,
"avg_line_length": 15.4,
"alnum_prop": 0.6623376623376623,
"repo_name": "taavit/mikroking",
"id": "8622c70525fba14cbfca054acb16930407d42dd1",
"size": "154",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Mikroking/Exception/BaseException.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "6241"
}
],
"symlink_target": ""
} |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.2.3.5-4-169
description: >
Object.create - one property in 'Properties' is a Number object
that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a)
---*/
var numObj = new Number(123);
numObj.value = "NumValue";
var newObj = Object.create({}, {
prop: numObj
});
assert.sameValue(newObj.prop, "NumValue", 'newObj.prop');
| {
"content_hash": "3e475e39380c440fc34fe84032a3f3fa",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 70,
"avg_line_length": 27.85,
"alnum_prop": 0.6265709156193896,
"repo_name": "baslr/ArangoDB",
"id": "529e7b3feefc25e86210dbca3401e75006300513",
"size": "557",
"binary": false,
"copies": "3",
"ref": "refs/heads/3.1-silent",
"path": "3rdParty/V8/V8-5.0.71.39/test/test262/data/test/built-ins/Object/create/15.2.3.5-4-169.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ada",
"bytes": "89080"
},
{
"name": "Assembly",
"bytes": "391227"
},
{
"name": "Awk",
"bytes": "4272"
},
{
"name": "Batchfile",
"bytes": "62892"
},
{
"name": "C",
"bytes": "7932707"
},
{
"name": "C#",
"bytes": "96430"
},
{
"name": "C++",
"bytes": "284363933"
},
{
"name": "CLIPS",
"bytes": "5291"
},
{
"name": "CMake",
"bytes": "681903"
},
{
"name": "CSS",
"bytes": "1036656"
},
{
"name": "CWeb",
"bytes": "174166"
},
{
"name": "Cuda",
"bytes": "52444"
},
{
"name": "DIGITAL Command Language",
"bytes": "259402"
},
{
"name": "Emacs Lisp",
"bytes": "14637"
},
{
"name": "Fortran",
"bytes": "1856"
},
{
"name": "Groovy",
"bytes": "131"
},
{
"name": "HTML",
"bytes": "2318016"
},
{
"name": "Java",
"bytes": "2325801"
},
{
"name": "JavaScript",
"bytes": "67878359"
},
{
"name": "LLVM",
"bytes": "24129"
},
{
"name": "Lex",
"bytes": "1231"
},
{
"name": "Lua",
"bytes": "16189"
},
{
"name": "M4",
"bytes": "600550"
},
{
"name": "Makefile",
"bytes": "509612"
},
{
"name": "Max",
"bytes": "36857"
},
{
"name": "Module Management System",
"bytes": "1545"
},
{
"name": "NSIS",
"bytes": "28404"
},
{
"name": "Objective-C",
"bytes": "19321"
},
{
"name": "Objective-C++",
"bytes": "2503"
},
{
"name": "PHP",
"bytes": "98503"
},
{
"name": "Pascal",
"bytes": "145688"
},
{
"name": "Perl",
"bytes": "720157"
},
{
"name": "Perl 6",
"bytes": "9918"
},
{
"name": "Python",
"bytes": "5859911"
},
{
"name": "QMake",
"bytes": "16692"
},
{
"name": "R",
"bytes": "5123"
},
{
"name": "Rebol",
"bytes": "354"
},
{
"name": "Roff",
"bytes": "1010686"
},
{
"name": "Ruby",
"bytes": "922159"
},
{
"name": "SAS",
"bytes": "1847"
},
{
"name": "Scheme",
"bytes": "10604"
},
{
"name": "Shell",
"bytes": "511077"
},
{
"name": "Swift",
"bytes": "116"
},
{
"name": "Tcl",
"bytes": "1172"
},
{
"name": "TeX",
"bytes": "32117"
},
{
"name": "Vim script",
"bytes": "4075"
},
{
"name": "Visual Basic",
"bytes": "11568"
},
{
"name": "XSLT",
"bytes": "551977"
},
{
"name": "Yacc",
"bytes": "53005"
}
],
"symlink_target": ""
} |
/**
* \file Definitions.h
* \brief Contains functions and constants used in multiple classes.
*/
#ifndef RVO_DEFINITIONS_H_
#define RVO_DEFINITIONS_H_
#include "API.h"
namespace RVO {
/**
* \brief Computes the square of a float.
* \param scalar The float to be squared.
* \return The square of the float.
*/
inline float sqr(float scalar)
{
return scalar * scalar;
}
}
#endif /* RVO_DEFINITIONS_H_ */
| {
"content_hash": "8961fb652a6a11d8bffcfb2db671eb0c",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 69,
"avg_line_length": 17.32,
"alnum_prop": 0.6558891454965358,
"repo_name": "honix/godot",
"id": "a73aca9908752c8823c9d54a0136558ee0be9c6a",
"size": "1476",
"binary": false,
"copies": "17",
"ref": "refs/heads/master",
"path": "thirdparty/rvo2/Definitions.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "50004"
},
{
"name": "C++",
"bytes": "16813390"
},
{
"name": "HTML",
"bytes": "10302"
},
{
"name": "Java",
"bytes": "497061"
},
{
"name": "Makefile",
"bytes": "451"
},
{
"name": "Objective-C",
"bytes": "2644"
},
{
"name": "Objective-C++",
"bytes": "145442"
},
{
"name": "Python",
"bytes": "262658"
},
{
"name": "Shell",
"bytes": "11105"
}
],
"symlink_target": ""
} |
require File.dirname(__FILE__) + '/../test_helper'
context "Asset Tagging" do
fixtures :taggings, :tags, :assets
specify "should show taggable tags" do
assert_models_equal [tags(:ruby)], assets(:gif).tags
end
specify "should add tags" do
assert_difference Tagging, :count do
assert_no_difference Tag, :count do
Tagging.add_to assets(:gif), [tags(:rails)]
end
end
assert_models_equal [tags(:rails), tags(:ruby)], assets(:gif).reload.tags
end
specify "should delete tags" do
assert_difference Tagging, :count, -1 do
assert_no_difference Tag, :count do
Tagging.delete_from assets(:gif), [tags(:ruby)]
end
end
assert_equal [], assets(:gif).reload.tags
end
specify "should change tags" do
assert_difference Tagging, :count, 2 do
assert_difference Tag, :count do
Tagging.set_on assets(:gif), 'rails, mongrel, foo'
end
end
assert_models_equal [Tag[:foo], tags(:mongrel), tags(:rails)], assets(:gif).reload.tags
end
specify "should find by tags" do
assert_models_equal [assets(:gif)], Asset.find_tagged_with('ruby, rails')
end
end
context "Article Tagging" do
fixtures :taggings, :tags, :contents, :sites
specify "should show taggable tags" do
assert_models_equal [tags(:rails)], contents(:another).tags
end
specify "should add tags" do
assert_difference Tagging, :count do
assert_no_difference Tag, :count do
Tagging.add_to contents(:another), [tags(:ruby)]
end
end
assert_models_equal [tags(:rails), tags(:ruby)], contents(:another).reload.tags
end
specify "should delete tags" do
assert_difference Tagging, :count, -1 do
assert_no_difference Tag, :count do
Tagging.delete_from contents(:another), [tags(:rails)]
end
end
assert_equal [], contents(:another).reload.tags
end
specify "should change tags" do
assert_difference Tagging, :count, 2 do
assert_difference Tag, :count do
Tagging.set_on contents(:another), 'ruby, mongrel, foo'
end
end
assert_models_equal [Tag[:foo], tags(:mongrel), tags(:ruby)], contents(:another).reload.tags
end
specify "should find by tags in site" do
assert_models_equal [tags(:mongrel), tags(:rails), tags(:ruby)], sites(:first).tags
end
end
| {
"content_hash": "f03fd1bb40fce588406151fe9993f52b",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 96,
"avg_line_length": 29.49367088607595,
"alnum_prop": 0.6596566523605151,
"repo_name": "mwatha/cezobal",
"id": "c8ba8f14a33fb2cf0eb822c2776622d92f852c7d",
"size": "2330",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "test/unit/tagging_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "54381"
},
{
"name": "Ruby",
"bytes": "435772"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="item"
android:textColor="#f333"
android:textSize="14dp"
android:padding="16dp"
/>
| {
"content_hash": "0b4346f46171a1b124fcea5dbacf2046",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 68,
"avg_line_length": 37.77777777777778,
"alnum_prop": 0.611764705882353,
"repo_name": "MaTriXy/Paginize",
"id": "f2eef89bb3321bc25c0252411f88d97d0f218258",
"size": "340",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Legacy/PaginizeDemo/res/layout/listview_item.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "521825"
},
{
"name": "Perl",
"bytes": "1119"
}
],
"symlink_target": ""
} |
source ../testsupport.sh
. ./cleanup.sh
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f test.txt.hello ] && err "Failed to find expected output test.txt"
[ ! -f test.txt.hello.world ] && err "Failed to find expected output test.txt.hello.world"
true
| {
"content_hash": "cc7f2a4f39c2c313989ddd0ce3875631",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 90,
"avg_line_length": 29.153846153846153,
"alnum_prop": 0.6992084432717678,
"repo_name": "vivovip/bpipe",
"id": "b9f2144c42edda7515145d1c140dfc7da1383153",
"size": "379",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "tests/forward/run.sh",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "Groovy",
"bytes": "757945"
},
{
"name": "HTML",
"bytes": "27122"
},
{
"name": "Java",
"bytes": "21214"
},
{
"name": "Shell",
"bytes": "114828"
}
],
"symlink_target": ""
} |
@interface ThreadSafeDictionary()
{
SyncType type;
NSMutableDictionary* dictionary;
NSLock* nsLock;
OSSpinLock osSpinLock;
dispatch_queue_t queue;
dispatch_semaphore_t semaphore;
pthread_mutex_t ptMutex;
}
@end
@implementation ThreadSafeDictionary
- (instancetype)init
{
self = [super init];
if (self)
{
type = TypeSynchronized;
dictionary = [NSMutableDictionary dictionary];
nsLock = [[NSLock alloc] init];
osSpinLock = OS_SPINLOCK_INIT;
queue = dispatch_queue_create("com.2bc.synctest", DISPATCH_QUEUE_SERIAL);
semaphore = dispatch_semaphore_create(1);
pthread_mutex_init(&ptMutex, NULL);
}
return self;
}
- (instancetype)initWithType:(SyncType)aType
{
self = [self init];
if (self)
{
type = aType;
}
return self;
}
- (NSUInteger)count
{
__block NSUInteger count = 0;
switch (type)
{
case TypeSynchronized:
{
@synchronized(dictionary)
{
count = dictionary.count;
}
break;
}
case TypeNSLock:
{
[nsLock lock];
count = dictionary.count;
[nsLock unlock];
break;
}
case TypeOSSpinLock:
{
OSSpinLockLock(&osSpinLock);
count = dictionary.count;
OSSpinLockUnlock(&osSpinLock);
break;
}
case TypeGCDQueue:
{
dispatch_sync(queue, ^{
count = dictionary.count;
});
break;
}
case TypePTMutex:
{
pthread_mutex_lock(&ptMutex);
count = dictionary.count;
pthread_mutex_unlock(&ptMutex);
}
case TypeGCDSemaphore:
{
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
count = dictionary.count;
dispatch_semaphore_signal(semaphore);
break;
}
}
return count;
}
- (id)objectForKey:(id)aKey
{
__block id object = nil;
if (aKey != nil && [aKey conformsToProtocol:@protocol(NSCopying)])
{
switch (type)
{
case TypeSynchronized:
{
@synchronized(dictionary)
{
object = [dictionary objectForKey:aKey];
}
break;
}
case TypeNSLock:
{
[nsLock lock];
object = [dictionary objectForKey:aKey];
[nsLock unlock];
break;
}
case TypeOSSpinLock:
{
OSSpinLockLock(&osSpinLock);
object = [dictionary objectForKey:aKey];
OSSpinLockUnlock(&osSpinLock);
break;
}
case TypeGCDQueue:
{
dispatch_sync(queue, ^{
object = [dictionary objectForKey:aKey];
});
break;
}
case TypePTMutex:
{
pthread_mutex_lock(&ptMutex);
object = [dictionary objectForKey:aKey];
pthread_mutex_unlock(&ptMutex);
}
case TypeGCDSemaphore:
{
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
object = [dictionary objectForKey:aKey];
dispatch_semaphore_signal(semaphore);
break;
}
}
}
return object;
}
- (void)setObject:(id)object forKey:(id)aKey
{
if (object != nil && aKey != nil && [aKey conformsToProtocol:@protocol(NSCopying)])
{
switch (type)
{
case TypeSynchronized:
{
@synchronized(dictionary)
{
[dictionary setObject:object forKey:aKey];
}
break;
}
case TypeNSLock:
{
[nsLock lock];
[dictionary setObject:object forKey:aKey];
[nsLock unlock];
break;
}
case TypePTMutex:
{
pthread_mutex_lock(&ptMutex);
[dictionary setObject:object forKey:aKey];
pthread_mutex_unlock(&ptMutex);
}
case TypeOSSpinLock:
{
OSSpinLockLock(&osSpinLock);
[dictionary setObject:object forKey:aKey];
OSSpinLockUnlock(&osSpinLock);
break;
}
case TypeGCDQueue:
{
dispatch_sync(queue, ^{
[dictionary setObject:object forKey:aKey];
});
break;
}
case TypeGCDSemaphore:
{
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
[dictionary setObject:object forKey:aKey];
dispatch_semaphore_signal(semaphore);
break;
}
}
}
}
- (void)removeAllObjects
{
switch (type)
{
case TypeSynchronized:
{
@synchronized(dictionary)
{
[dictionary removeAllObjects];
}
break;
}
case TypeNSLock:
{
[nsLock lock];
[dictionary removeAllObjects];
[nsLock unlock];
break;
}
case TypePTMutex:
{
pthread_mutex_lock(&ptMutex);
[dictionary removeAllObjects];
pthread_mutex_unlock(&ptMutex);
}
case TypeOSSpinLock:
{
OSSpinLockLock(&osSpinLock);
[dictionary removeAllObjects];
OSSpinLockUnlock(&osSpinLock);
break;
}
case TypeGCDQueue:
{
dispatch_sync(queue, ^{
[dictionary removeAllObjects];
});
break;
}
case TypeGCDSemaphore:
{
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
[dictionary removeAllObjects];
dispatch_semaphore_signal(semaphore);
break;
}
}
}
@end
| {
"content_hash": "feab3ec5cbae214621de58c66417c68c",
"timestamp": "",
"source": "github",
"line_count": 308,
"max_line_length": 87,
"avg_line_length": 22.87012987012987,
"alnum_prop": 0.42461669505962524,
"repo_name": "migonin/SynchronizationTests",
"id": "6788d4301871b3c3c7b0a1e7c4e67965b1b55a8e",
"size": "7278",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SynchronizationTests/ThreadSafeDictionary.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "25494"
}
],
"symlink_target": ""
} |
using Mobet.Authorization.Controllers.Shared;
using Mobet.Authorization.Models;
using Mobet.Authorization.Models.Passport;
using Mobet.Caching;
using Mobet.Extensions;
using Mobet.Net.Mail;
using Mobet.Runtime.Cookie;
using Mobet.Runtime.Security;
using Mobet.Services;
using Mobet.Services.Requests.Captcha;
using Mobet.Services.Requests.User;
using Mobet.Services.Services;
using Mobet.Web.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
namespace Mobet.Authorization.Controllers
{
[Authorize]
public class PassportController : BaseController
{
private readonly IUserService userService;
private readonly ICaptchaService captchaService;
private readonly ICacheManager cacheManager;
private readonly IEmailSender emailSender;
public PassportController(IUserService userService, ICacheManager cacheManager, ICaptchaService captchaService, IEmailSender emailSender)
{
this.cacheManager = cacheManager;
this.captchaService = captchaService;
this.userService = userService;
this.emailSender = emailSender;
}
/// <summary>
/// 首页
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
return View();
}
#region [ Security ]
/// <summary>
/// 账号安全
/// </summary>
/// <returns></returns>
public ActionResult Security(PassportSecurityViewModel model)
{
var user = userService.GetUserProfileData(new UserGetProfileDataRequest { UserId = AppSession.UserId.TryInt(0) }).Model ?? new Mobet.Services.Models.User();
model.Email = user.Email;
model.Telphone = user.Telphone;
return View(model);
}
/// <summary>
/// 设置/修改密码
/// </summary>
/// <returns></returns>
public ActionResult PasswordDetail()
{
return View();
}
/// <summary>
/// 绑定/修改手机号码
/// </summary>
/// <returns></returns>
public ActionResult TelphoneDetail()
{
return View();
}
/// <summary>
/// 绑定/修改邮箱
/// </summary>
/// <returns></returns>
public ActionResult EmailDetail()
{
return View();
}
/// <summary>
/// 设置/修改密保问题
/// </summary>
/// <returns></returns>
public ActionResult QuestionDetail()
{
return View();
}
/// <summary>
/// 设置/修改密码
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public JsonResult SetPassword(UserSetPasswordViewModel model)
{
var captcha = CryptoManager.DecryptDES(CookieManager.GetCookieValue(Constants.CookieNames.CaptchSetPassword));
if (captcha != model.Captcha)
{
return Json(new MvcAjaxResponse(false, "错误的验证码"));
}
var response = userService.SetPassword(new UserSetPasswordRequest
{
Id = AppSession.UserId,
OldPassword = model.OldPassword,
Password = model.Password
});
return Json(new MvcAjaxResponse(response.Result, response.Message));
}
/// <summary>
/// 发送邮件验证码
/// </summary>
/// <param name="email"></param>
/// <returns></returns>
[HttpPost]
public async Task<JsonResult> EmailCaptchaSendAsync(string email)
{
var response = await captchaService.EmailCaptchaSendAsync(new EmailCaptchaSendRequest
{
Captcha = EmailCaptcha.Bind,
Email = email,
ExpiredTime = 30
});
return Json(new MvcAjaxResponse(response.Result, response.Message));
}
/// <summary>
/// 验证/绑定邮箱
/// </summary>
/// <param name="email"></param>
/// <param name="captcha"></param>
/// <returns></returns>
[HttpPost]
public JsonResult ValidateEmailCaptchaAsync(string email, string captcha)
{
if (cacheManager.Get<string>(string.Format(Constants.CacheNames.EmailCaptcha, EmailCaptcha.Bind, email, captcha)) != captcha)
{
return Json(new MvcAjaxResponse(false, "邮件验证码无效"));
}
var response = userService.SetEmail(new UserSetEmailRequest { Id = AppSession.UserId, Email = email });
return Json(new MvcAjaxResponse(response.Result, response.Message));
}
#endregion
/// <summary>
/// 个人信息
/// </summary>
/// <returns></returns>
public ActionResult Profile()
{
return View();
}
/// <summary>
/// 获取设置密码图片验证码
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult GetCaptcha()
{
return File(Captcha.GetBytes(Constants.CookieNames.CaptchSetPassword), @"image/jpeg");
}
}
} | {
"content_hash": "d876e7cb051a8c10e403b56e005d515c",
"timestamp": "",
"source": "github",
"line_count": 171,
"max_line_length": 168,
"avg_line_length": 30.75438596491228,
"alnum_prop": 0.5658870507701084,
"repo_name": "Mobet/Mobet-Net",
"id": "a82e513c8ccc086a7caa75240793a642cef98fc8",
"size": "5423",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Mobet-Net/Mobet.Authorization/Controllers/PassportController.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "332"
},
{
"name": "C#",
"bytes": "1314946"
},
{
"name": "CSS",
"bytes": "701233"
},
{
"name": "HTML",
"bytes": "113290"
},
{
"name": "JavaScript",
"bytes": "1518406"
}
],
"symlink_target": ""
} |
package org.apache.accumulo.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.accumulo.core.client.Accumulo;
import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.TableId;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
import org.apache.accumulo.server.fs.PerTableVolumeChooser;
import org.apache.accumulo.server.fs.PreferredVolumeChooser;
import org.apache.accumulo.server.fs.RandomVolumeChooser;
import org.apache.accumulo.server.fs.VolumeChooserEnvironment.ChooserScope;
import org.apache.accumulo.test.functional.ConfigurableMacBase;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.RawLocalFileSystem;
import org.apache.hadoop.io.Text;
import org.junit.Test;
public class VolumeChooserIT extends ConfigurableMacBase {
private static final String TP = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey();
static final String PREFERRED_CHOOSER_PROP = TP + "volume.preferred";
static final String PERTABLE_CHOOSER_PROP = TP + "volume.chooser";
private static final String GP = Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey();
static final String getPreferredProp(ChooserScope scope) {
return GP + "volume.preferred." + scope.name().toLowerCase();
}
static final String getPerTableProp(ChooserScope scope) {
return GP + "volume.chooser." + scope.name().toLowerCase();
}
private static final Text EMPTY = new Text();
private static final Value EMPTY_VALUE = new Value(new byte[] {});
private File volDirBase;
@SuppressWarnings("unused")
private Path v1, v2, v3, v4;
public static String[] alpha_rows =
"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z".split(",");
private String namespace1;
private String namespace2;
private String systemPreferredVolumes;
@Override
protected int defaultTimeoutSeconds() {
return 60;
}
@Override
public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
// Get 2 tablet servers
cfg.setNumTservers(2);
namespace1 = "ns_" + getUniqueNames(2)[0];
namespace2 = "ns_" + getUniqueNames(2)[1];
// Set the general volume chooser to the PerTableVolumeChooser so that different choosers can be
// specified
Map<String,String> siteConfig = new HashMap<>();
siteConfig.put(Property.GENERAL_VOLUME_CHOOSER.getKey(), PerTableVolumeChooser.class.getName());
// if a table doesn't have a volume chooser, use the preferred volume chooser
siteConfig.put(PERTABLE_CHOOSER_PROP, PreferredVolumeChooser.class.getName());
// Set up 4 different volume paths
File baseDir = cfg.getDir();
volDirBase = new File(baseDir, "volumes");
File v1f = new File(volDirBase, "v1");
File v2f = new File(volDirBase, "v2");
File v3f = new File(volDirBase, "v3");
File v4f = new File(volDirBase, "v4");
v1 = new Path("file://" + v1f.getAbsolutePath());
v2 = new Path("file://" + v2f.getAbsolutePath());
v3 = new Path("file://" + v3f.getAbsolutePath());
v4 = new Path("file://" + v4f.getAbsolutePath());
systemPreferredVolumes = v1 + "," + v2;
// exclude v4
siteConfig.put(PREFERRED_CHOOSER_PROP, systemPreferredVolumes);
cfg.setSiteConfig(siteConfig);
siteConfig.put(getPerTableProp(ChooserScope.LOGGER), PreferredVolumeChooser.class.getName());
siteConfig.put(getPreferredProp(ChooserScope.LOGGER), v2.toString());
siteConfig.put(getPerTableProp(ChooserScope.INIT), PreferredVolumeChooser.class.getName());
siteConfig.put(getPreferredProp(ChooserScope.INIT), systemPreferredVolumes);
cfg.setSiteConfig(siteConfig);
// Only add volumes 1, 2, and 4 to the list of instance volumes to have one volume that isn't in
// the options list when they are choosing
cfg.setProperty(Property.INSTANCE_VOLUMES, v1 + "," + v2 + "," + v4);
// use raw local file system so walogs sync and flush will work
hadoopCoreSite.set("fs.file.impl", RawLocalFileSystem.class.getName());
super.configure(cfg, hadoopCoreSite);
}
public static void addSplits(AccumuloClient accumuloClient, String tableName)
throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
// Add 10 splits to the table
SortedSet<Text> partitions = new TreeSet<>();
for (String s : alpha_rows)
partitions.add(new Text(s));
accumuloClient.tableOperations().addSplits(tableName, partitions);
}
public static void writeAndReadData(AccumuloClient accumuloClient, String tableName)
throws Exception {
writeDataToTable(accumuloClient, tableName, alpha_rows);
// Write the data to disk, read it back
accumuloClient.tableOperations().flush(tableName, null, null, true);
try (Scanner scanner = accumuloClient.createScanner(tableName, Authorizations.EMPTY)) {
int i = 0;
for (Entry<Key,Value> entry : scanner) {
assertEquals("Data read is not data written", alpha_rows[i++],
entry.getKey().getRow().toString());
}
}
}
public static void writeDataToTable(AccumuloClient accumuloClient, String tableName,
String[] rows) throws Exception {
// Write some data to the table
try (BatchWriter bw = accumuloClient.createBatchWriter(tableName)) {
for (String s : rows) {
Mutation m = new Mutation(new Text(s));
m.put(EMPTY, EMPTY, EMPTY_VALUE);
bw.addMutation(m);
}
}
}
public static void verifyVolumes(AccumuloClient accumuloClient, Range tableRange, String vol)
throws Exception {
// Verify the new files are written to the Volumes specified
ArrayList<String> volumes = new ArrayList<>();
for (String s : vol.split(","))
volumes.add(s);
TreeSet<String> volumesSeen = new TreeSet<>();
int fileCount = 0;
try (Scanner scanner = accumuloClient.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.setRange(tableRange);
scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
for (Entry<Key,Value> entry : scanner) {
boolean inVolume = false;
for (String volume : volumes) {
if (entry.getKey().getColumnQualifier().toString().contains(volume)) {
volumesSeen.add(volume);
inVolume = true;
}
}
assertTrue(
"Data not written to the correct volumes. " + entry.getKey().getColumnQualifier(),
inVolume);
fileCount++;
}
}
assertEquals(
"Did not see all the volumes. volumes: " + volumes + " volumes seen: " + volumesSeen,
volumes.size(), volumesSeen.size());
assertEquals("Wrong number of files", 26, fileCount);
}
public static void verifyNoVolumes(AccumuloClient accumuloClient, Range tableRange)
throws Exception {
try (Scanner scanner = accumuloClient.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.setRange(tableRange);
scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
for (Entry<Key,Value> entry : scanner) {
fail("Data incorrectly written to " + entry.getKey().getColumnQualifier());
}
}
}
private void configureNamespace(AccumuloClient accumuloClient, String volumeChooserClassName,
String configuredVolumes, String namespace) throws Exception {
accumuloClient.namespaceOperations().create(namespace);
// Set properties on the namespace
accumuloClient.namespaceOperations().setProperty(namespace, PERTABLE_CHOOSER_PROP,
volumeChooserClassName);
accumuloClient.namespaceOperations().setProperty(namespace, PREFERRED_CHOOSER_PROP,
configuredVolumes);
}
private void verifyVolumesForWritesToNewTable(AccumuloClient accumuloClient, String myNamespace,
String expectedVolumes) throws Exception {
String tableName = myNamespace + ".1";
accumuloClient.tableOperations().create(tableName);
TableId tableID = TableId.of(accumuloClient.tableOperations().tableIdMap().get(tableName));
// Add 10 splits to the table
addSplits(accumuloClient, tableName);
// Write some data to the table
writeAndReadData(accumuloClient, tableName);
// Verify the new files are written to the Volumes specified
verifyVolumes(accumuloClient, TabletsSection.getRange(tableID), expectedVolumes);
}
public static void verifyWaLogVolumes(AccumuloClient accumuloClient, Range tableRange, String vol)
throws TableNotFoundException {
// Verify the new files are written to the Volumes specified
ArrayList<String> volumes = new ArrayList<>();
for (String s : vol.split(","))
volumes.add(s);
TreeSet<String> volumesSeen = new TreeSet<>();
try (Scanner scanner = accumuloClient.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.setRange(tableRange);
scanner.fetchColumnFamily(TabletsSection.LogColumnFamily.NAME);
for (Entry<Key,Value> entry : scanner) {
boolean inVolume = false;
for (String volume : volumes) {
if (entry.getKey().getColumnQualifier().toString().contains(volume))
volumesSeen.add(volume);
inVolume = true;
}
assertTrue(
"Data not written to the correct volumes. " + entry.getKey().getColumnQualifier(),
inVolume);
}
}
}
// Test that uses two tables with 10 split points each. They each use the PreferredVolumeChooser
// to choose volumes.
@Test
public void twoTablesPreferredVolumeChooser() throws Exception {
log.info("Starting twoTablesPreferredVolumeChooser");
// Create namespace
try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
// Set properties on the namespace
// namespace 1 -> v2
configureNamespace(c, PreferredVolumeChooser.class.getName(), v2.toString(), namespace1);
// Create table1 on namespace1
verifyVolumesForWritesToNewTable(c, namespace1, v2.toString());
configureNamespace(c, PreferredVolumeChooser.class.getName(), v1.toString(), namespace2);
// Create table2 on namespace2
verifyVolumesForWritesToNewTable(c, namespace2, v1.toString());
}
}
// Test that uses two tables with 10 split points each. They each use the RandomVolumeChooser to
// choose volumes.
@Test
public void twoTablesRandomVolumeChooser() throws Exception {
log.info("Starting twoTablesRandomVolumeChooser()");
// Create namespace
try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
createAndVerify(client, namespace1, v1 + "," + v2 + "," + v4);
createAndVerify(client, namespace2, v1 + "," + v2 + "," + v4);
}
}
private void createAndVerify(AccumuloClient client, String ns, String expectedVolumes)
throws Exception {
client.namespaceOperations().create(ns);
// Set properties on the namespace
client.namespaceOperations().setProperty(ns, PERTABLE_CHOOSER_PROP,
RandomVolumeChooser.class.getName());
verifyVolumesForWritesToNewTable(client, ns, expectedVolumes);
}
// Test that uses 2 tables with 10 split points each. The first uses the RandomVolumeChooser and
// the second uses the StaticVolumeChooser to choose volumes.
@Test
public void twoTablesDiffChoosers() throws Exception {
log.info("Starting twoTablesDiffChoosers");
// Create namespace
try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
createAndVerify(c, namespace1, v1 + "," + v2 + "," + v4);
configureNamespace(c, PreferredVolumeChooser.class.getName(), v1.toString(), namespace2);
// Create table2 on namespace2
verifyVolumesForWritesToNewTable(c, namespace2, v1.toString());
}
}
@Test
public void includeSpecialVolumeForTable() throws Exception {
log.info("Starting includeSpecialVolumeForTable");
try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
// the following table will be configured to go to the excluded volume
String configuredVolumes = v4.toString();
configureNamespace(client, PreferredVolumeChooser.class.getName(), configuredVolumes,
namespace2);
verifyVolumesForWritesToNewTable(client, namespace2, configuredVolumes);
}
}
@Test
public void waLogsSentToConfiguredVolumes() throws Exception {
log.info("Starting waLogsSentToConfiguredVolumes");
try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
String tableName = "anotherTable";
client.tableOperations().create(tableName);
VolumeChooserIT.addSplits(client, tableName);
VolumeChooserIT.writeDataToTable(client, tableName, alpha_rows);
// should only go to v2 as per configuration in configure()
VolumeChooserIT.verifyWaLogVolumes(client, new Range(), v2.toString());
}
}
}
| {
"content_hash": "d61705d54a954132384f0125b0bb3ee6",
"timestamp": "",
"source": "github",
"line_count": 342,
"max_line_length": 100,
"avg_line_length": 40.87134502923977,
"alnum_prop": 0.7205608813850336,
"repo_name": "keith-turner/accumulo",
"id": "d1b576185414a559c5d9b1505dca92de7b409ba2",
"size": "14785",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/src/main/java/org/apache/accumulo/test/VolumeChooserIT.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "2465"
},
{
"name": "C++",
"bytes": "37312"
},
{
"name": "CSS",
"bytes": "6443"
},
{
"name": "FreeMarker",
"bytes": "57422"
},
{
"name": "HTML",
"bytes": "5454"
},
{
"name": "Java",
"bytes": "18457738"
},
{
"name": "JavaScript",
"bytes": "71755"
},
{
"name": "Makefile",
"bytes": "2872"
},
{
"name": "Python",
"bytes": "7344"
},
{
"name": "Shell",
"bytes": "61899"
},
{
"name": "Thrift",
"bytes": "40724"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
Fl. Australia 8:372, 392. 1982
#### Original name
Didymotheca tepperi H.Walter
### Remarks
null | {
"content_hash": "b61864d5fb9faf1c0b63b05b2cb418df",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 13.538461538461538,
"alnum_prop": 0.7272727272727273,
"repo_name": "mdoering/backbone",
"id": "15582713d6d9d936e1eaa8efeebf9267dce04d6c",
"size": "252",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Brassicales/Gyrostemonaceae/Gyrostemon/Gyrostemon tepperi/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package com.amazonaws.services.lightsail.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.lightsail.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.protocol.*;
import com.amazonaws.protocol.Protocol;
import com.amazonaws.annotation.SdkInternalApi;
/**
* StartRelationalDatabaseRequest Marshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class StartRelationalDatabaseRequestProtocolMarshaller implements Marshaller<Request<StartRelationalDatabaseRequest>, StartRelationalDatabaseRequest> {
private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/")
.httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true)
.operationIdentifier("Lightsail_20161128.StartRelationalDatabase").serviceName("AmazonLightsail").build();
private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory;
public StartRelationalDatabaseRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) {
this.protocolFactory = protocolFactory;
}
public Request<StartRelationalDatabaseRequest> marshall(StartRelationalDatabaseRequest startRelationalDatabaseRequest) {
if (startRelationalDatabaseRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
final ProtocolRequestMarshaller<StartRelationalDatabaseRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(
SDK_OPERATION_BINDING, startRelationalDatabaseRequest);
protocolMarshaller.startMarshalling();
StartRelationalDatabaseRequestMarshaller.getInstance().marshall(startRelationalDatabaseRequest, protocolMarshaller);
return protocolMarshaller.finishMarshalling();
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| {
"content_hash": "c27d66a004192badc30309afc5ddd38c",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 158,
"avg_line_length": 43.01923076923077,
"alnum_prop": 0.7751452838623156,
"repo_name": "aws/aws-sdk-java",
"id": "0a92ad91de7816486fde501b3a03ee43bcecd926",
"size": "2817",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/transform/StartRelationalDatabaseRequestProtocolMarshaller.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
\hypertarget{group___r_t_c_ex}{}\section{R\+T\+C\+Ex}
\label{group___r_t_c_ex}\index{R\+T\+C\+Ex@{R\+T\+C\+Ex}}
\subsection*{Modules}
\begin{DoxyCompactItemize}
\item
\hyperlink{group___r_t_c_ex___exported___types}{R\+T\+C\+Ex Exported Types}
\item
\hyperlink{group___r_t_c_ex___exported___constants}{R\+T\+C\+Ex Exported Constants}
\item
\hyperlink{group___r_t_c_ex___exported___macros}{R\+T\+C\+Ex Exported Macros}
\item
\hyperlink{group___r_t_c_ex___exported___functions}{R\+T\+C\+Ex Exported Functions}
\item
\hyperlink{group___r_t_c_ex___private___constants}{R\+T\+C\+Ex Private Constants}
\item
\hyperlink{group___r_t_c_ex___private___macros}{R\+T\+C\+Ex Private Macros}
\end{DoxyCompactItemize}
\subsection{Detailed Description}
| {
"content_hash": "1a9bd1bcff4b46d501d1bfc5f33f834a",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 83,
"avg_line_length": 37.2,
"alnum_prop": 0.6733870967741935,
"repo_name": "team-diana/nucleo-dynamixel",
"id": "841ca296e1565e29376e6a41b77174b6d084df0b",
"size": "744",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/latex/group___r_t_c_ex.tex",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "3649584"
},
{
"name": "C++",
"bytes": "362036"
},
{
"name": "HTML",
"bytes": "109"
},
{
"name": "Makefile",
"bytes": "58234"
}
],
"symlink_target": ""
} |
/* jshint node:true, browser:true */
(function( root, factory ) {
// CommonJS
if( typeof exports === 'object' ) {
module.exports = factory(require('spin.js'));
}
// AMD module
else if( typeof define === 'function' && define.amd ) {
define( [ 'spin' ], factory );
}
// Browser global
else {
root.Ladda = factory( root.Spinner );
}
}
(this, function( Spinner ) {
'use strict';
// All currently instantiated instances of Ladda
var ALL_INSTANCES = [];
/**
* Creates a new instance of Ladda which wraps the
* target button element.
*
* @return An API object that can be used to control
* the loading animation state.
*/
function create( button ) {
if( typeof button === 'undefined' ) {
console.warn( "Ladda button target must be defined." );
return;
}
// The text contents must be wrapped in a ladda-label
// element, create one if it doesn't already exist
if( !button.querySelector( '.ladda-label' ) ) {
button.innerHTML = '<span class="ladda-label">'+ button.innerHTML +'</span>';
}
// The spinner component
var spinner;
// Wrapper element for the spinner
var spinnerWrapper = document.createElement( 'span' );
spinnerWrapper.className = 'ladda-spinner';
button.appendChild( spinnerWrapper );
// Timer used to delay starting/stopping
var timer;
var instance = {
/**
* Enter the loading state.
*/
start: function() {
// Create the spinner if it doesn't already exist
if( !spinner ) spinner = createSpinner( button );
button.setAttribute( 'disabled', '' );
button.setAttribute( 'data-loading', '' );
clearTimeout( timer );
spinner.spin( spinnerWrapper );
this.setProgress( 0 );
return this; // chain
},
/**
* Enter the loading state, after a delay.
*/
startAfter: function( delay ) {
clearTimeout( timer );
timer = setTimeout( function() { instance.start(); }, delay );
return this; // chain
},
/**
* Exit the loading state.
*/
stop: function() {
button.removeAttribute( 'disabled' );
button.removeAttribute( 'data-loading' );
// Kill the animation after a delay to make sure it
// runs for the duration of the button transition
clearTimeout( timer );
if( spinner ) {
timer = setTimeout( function() { spinner.stop(); }, 1000 );
}
return this; // chain
},
/**
* Toggle the loading state on/off.
*/
toggle: function() {
if( this.isLoading() ) {
this.stop();
}
else {
this.start();
}
return this; // chain
},
/**
* Sets the width of the visual progress bar inside of
* this Ladda button
*
* @param {Number} progress in the range of 0-1
*/
setProgress: function( progress ) {
// Cap it
progress = Math.max( Math.min( progress, 1 ), 0 );
var progressElement = button.querySelector( '.ladda-progress' );
// Remove the progress bar if we're at 0 progress
if( progress === 0 && progressElement && progressElement.parentNode ) {
progressElement.parentNode.removeChild( progressElement );
}
else {
if( !progressElement ) {
progressElement = document.createElement( 'div' );
progressElement.className = 'ladda-progress';
button.appendChild( progressElement );
}
progressElement.style.width = ( ( progress || 0 ) * button.offsetWidth ) + 'px';
}
},
enable: function() {
this.stop();
return this; // chain
},
disable: function () {
this.stop();
button.setAttribute( 'disabled', '' );
return this; // chain
},
isLoading: function() {
return button.hasAttribute( 'data-loading' );
},
remove: function() {
clearTimeout( timer );
button.removeAttribute( 'disabled', '' );
button.removeAttribute( 'data-loading', '' );
if( spinner ) {
spinner.stop();
spinner = null;
}
for( var i = 0, len = ALL_INSTANCES.length; i < len; i++ ) {
if( instance === ALL_INSTANCES[i] ) {
ALL_INSTANCES.splice( i, 1 );
break;
}
}
}
};
ALL_INSTANCES.push( instance );
return instance;
}
/**
* Get the first ancestor node from an element, having a
* certain type.
*
* @param elem An HTML element
* @param type an HTML tag type (uppercased)
*
* @return An HTML element
*/
function getAncestorOfTagType( elem, type ) {
while ( elem.parentNode && elem.tagName !== type ) {
elem = elem.parentNode;
}
return ( type === elem.tagName ) ? elem : undefined;
}
/**
* Returns a list of all inputs in the given form that
* have their `required` attribute set.
*
* @param form The from HTML element to look in
*
* @return A list of elements
*/
function getRequiredFields( form ) {
var requirables = [ 'input', 'textarea' ];
var inputs = [];
for( var i = 0; i < requirables.length; i++ ) {
var candidates = form.getElementsByTagName( requirables[i] );
for( var j = 0; j < candidates.length; j++ ) {
if ( candidates[j].hasAttribute( 'required' ) ) {
inputs.push( candidates[j] );
}
}
}
return inputs;
}
/**
* Binds the target buttons to automatically enter the
* loading state when clicked.
*
* @param target Either an HTML element or a CSS selector.
* @param options
* - timeout Number of milliseconds to wait before
* automatically cancelling the animation.
*/
function bind( target, options ) {
options = options || {};
var targets = [];
if( typeof target === 'string' ) {
targets = toArray( document.querySelectorAll( target ) );
}
else if( typeof target === 'object' && typeof target.nodeName === 'string' ) {
targets = [ target ];
}
for( var i = 0, len = targets.length; i < len; i++ ) {
(function() {
var element = targets[i];
// Make sure we're working with a DOM element
if( typeof element.addEventListener === 'function' ) {
var instance = create( element );
var timeout = -1;
element.addEventListener( 'click', function( event ) {
// If the button belongs to a form, make sure all the
// fields in that form are filled out
var valid = true;
var form = getAncestorOfTagType( element, 'FORM' );
if( typeof form !== 'undefined' ) {
var requireds = getRequiredFields( form );
for( var i = 0; i < requireds.length; i++ ) {
// Alternatively to this trim() check,
// we could have use .checkValidity() or .validity.valid
if( requireds[i].value.replace( /^\s+|\s+$/g, '' ) === '' ) {
valid = false;
}
}
}
if( valid ) {
// This is asynchronous to avoid an issue where setting
// the disabled attribute on the button prevents forms
// from submitting
instance.startAfter( 1 );
// Set a loading timeout if one is specified
if( typeof options.timeout === 'number' ) {
clearTimeout( timeout );
timeout = setTimeout( instance.stop, options.timeout );
}
// Invoke callbacks
if( typeof options.callback === 'function' ) {
options.callback.apply( null, [ instance ] );
}
}
}, false );
}
})();
}
}
/**
* Stops ALL current loading animations.
*/
function stopAll() {
for( var i = 0, len = ALL_INSTANCES.length; i < len; i++ ) {
ALL_INSTANCES[i].stop();
}
}
function createSpinner( button ) {
var height = button.offsetHeight,
spinnerColor;
if( height === 0 ) {
// We may have an element that is not visible so
// we attempt to get the height in a different way
height = parseFloat( window.getComputedStyle( button ).height );
}
// If the button is tall we can afford some padding
if( height > 32 ) {
height *= 0.8;
}
// Prefer an explicit height if one is defined
if( button.hasAttribute( 'data-spinner-size' ) ) {
height = parseInt( button.getAttribute( 'data-spinner-size' ), 10 );
}
// Allow buttons to specify the color of the spinner element
if( button.hasAttribute( 'data-spinner-color' ) ) {
spinnerColor = button.getAttribute( 'data-spinner-color' );
}
var lines = 12,
radius = height * 0.2,
length = radius * 0.6,
width = radius < 7 ? 2 : 3;
return new Spinner( {
color: spinnerColor || '#fff',
lines: lines,
radius: radius,
length: length,
width: width,
zIndex: 'auto',
top: 'auto',
left: 'auto',
className: ''
} );
}
function toArray( nodes ) {
var a = [];
for ( var i = 0; i < nodes.length; i++ ) {
a.push( nodes[ i ] );
}
return a;
}
// Public API
return {
bind: bind,
create: create,
stopAll: stopAll
};
}));
| {
"content_hash": "fe736f61e97970dfe29234759efc9ec5",
"timestamp": "",
"source": "github",
"line_count": 406,
"max_line_length": 85,
"avg_line_length": 22.492610837438423,
"alnum_prop": 0.5705212439772229,
"repo_name": "tolentinojohnkenneth/hlcc",
"id": "52bd3a44691701498a532aa5090813c05c8a531f",
"size": "9257",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "assets/plugins/resources/spinner/js/ladda.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "378"
},
{
"name": "CSS",
"bytes": "975772"
},
{
"name": "CoffeeScript",
"bytes": "21688"
},
{
"name": "HTML",
"bytes": "8648601"
},
{
"name": "JavaScript",
"bytes": "1965799"
},
{
"name": "PHP",
"bytes": "2077187"
}
],
"symlink_target": ""
} |
namespace TestStack.BDDfy.Configuration
{
public interface IKeyGenerator
{
string GetScenarioId();
string GetStepId();
void Reset();
}
} | {
"content_hash": "6cbfa208421463538d0bf314120e5dab",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 39,
"avg_line_length": 19.11111111111111,
"alnum_prop": 0.622093023255814,
"repo_name": "TestStack/TestStack.BDDfy",
"id": "10904c0fe6928b4119ffc9bbd52740499d1fe744",
"size": "172",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "src/TestStack.BDDfy/Configuration/IKeyGenerator.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "495512"
},
{
"name": "CSS",
"bytes": "26030"
},
{
"name": "JavaScript",
"bytes": "1548"
},
{
"name": "PowerShell",
"bytes": "9657"
}
],
"symlink_target": ""
} |
ossimGdalElevationDatabaseFactory *ossimGdalElevationDatabaseFactory::m_instance = 0;
ossimGdalElevationDatabaseFactory *ossimGdalElevationDatabaseFactory::instance()
{
if(!m_instance)
{
m_instance = new ossimGdalElevationDatabaseFactory();
}
return m_instance;
}
ossimElevationDatabase *ossimGdalElevationDatabaseFactory::createDatabase(const ossimString &typeName) const
{
ossimElevationDatabase* result = nullptr;
// std::cout << "ossimGdalElevationDatabaseFactory::createDatabase -------------------------" << typeName << "\n";
if(typeName == "image_directory_shx")
{
result = new ossimGdalImageElevationDatabase();
}
return result;
}
ossimElevationDatabase *ossimGdalElevationDatabaseFactory::createDatabase(const ossimKeywordlist &kwl,
const char *prefix) const
{
// std::cout << "ossimGdalElevationDatabaseFactory::createDatabase\n";
ossimRefPtr<ossimElevationDatabase> result = 0;
ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
if (!type.empty())
{
result = createDatabase(type);
if (result.valid())
{
if (!result->loadState(kwl, prefix))
{
result = 0;
}
}
}
return result.release();
}
ossimElevationDatabase *ossimGdalElevationDatabaseFactory::open(const ossimString &connectionString) const
{
ossimRefPtr<ossimElevationDatabase> result = 0;
// need a detector that will take your directory and check for a shape idx file
// in that connection string location
// This method will only open individual image files for use as dems. It will not utilize the
// file walker to search over directories:
ossimFilename filename (connectionString);
if (filename.isFile())
{
result = new ossimGdalImageElevationDatabase;
if (!result->open(connectionString))
{
std::cerr << "ERROR: ossimGdalElevationDatabaseFactory::createDatabase failed\n";
}
else
{
std::cout << "ossimGdalElevationDatabaseFactory::createDatabase success\n";
}
}
return result.release();
}
void ossimGdalElevationDatabaseFactory::getTypeNameList(std::vector<ossimString> &typeList) const
{
// Modify this for your new database handler
typeList.push_back(STATIC_TYPE_NAME(ossimGdalImageElevationDatabase));
typeList.push_back("image_directory_shx");
}
| {
"content_hash": "a79ccaf803cf0aa1b1d01b46bf91f470",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 117,
"avg_line_length": 32.27272727272727,
"alnum_prop": 0.6740442655935613,
"repo_name": "ossimlabs/ossim-plugins",
"id": "dc05033a9c86d41b159042c7cd580f53531a6308",
"size": "2620",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev",
"path": "gdal/src/ossimGdalElevationDataFactory.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "158984"
},
{
"name": "C++",
"bytes": "4436079"
},
{
"name": "CMake",
"bytes": "56205"
}
],
"symlink_target": ""
} |
'use strict';
const common = require('../common');
const assert = require('assert');
if (common.isWindows) {
assert.strictEqual(process.setgroups, undefined);
return;
}
if (!common.isMainThread)
return;
assert.throws(
() => {
process.setgroups();
},
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "groups" argument must be an instance of Array. ' +
'Received undefined'
}
);
assert.throws(
() => {
process.setgroups([1, -1]);
},
{
code: 'ERR_OUT_OF_RANGE',
name: 'RangeError',
message: 'The value of "groups[1]" is out of range. ' +
'It must be >= 0 && < 4294967296. Received -1'
}
);
[undefined, null, true, {}, [], () => {}].forEach((val) => {
assert.throws(
() => {
process.setgroups([val]);
},
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "groups[0]" argument must be ' +
'one of type number or string.' +
common.invalidArgTypeHelper(val)
}
);
});
assert.throws(() => {
process.setgroups([1, 'fhqwhgadshgnsdhjsdbkhsdabkfabkveyb']);
}, {
code: 'ERR_UNKNOWN_CREDENTIAL',
message: 'Group identifier does not exist: fhqwhgadshgnsdhjsdbkhsdabkfabkveyb'
});
| {
"content_hash": "c84edb3f3de5633b0330d83275746676",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 80,
"avg_line_length": 22.12280701754386,
"alnum_prop": 0.578112609040444,
"repo_name": "enclose-io/compiler",
"id": "2e04c8a1756383a36accc2fee4faabec092d1ada",
"size": "1261",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "lts/test/parallel/test-process-setgroups.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "11474"
},
{
"name": "Shell",
"bytes": "131"
}
],
"symlink_target": ""
} |
package org.apache.hadoop.hdfs.server.blockmanagement;
import java.util.Random;
import java.util.UUID;
import static org.junit.Assert.assertEquals;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DFSTestUtil;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.Block;
import org.apache.hadoop.hdfs.protocol.DatanodeID;
import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy;
import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
import org.apache.hadoop.hdfs.protocol.LocatedStripedBlock;
import org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies;
import org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys;
import org.apache.hadoop.hdfs.server.common.GenerationStamp;
import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import org.apache.hadoop.hdfs.server.common.StorageInfo;
import org.apache.hadoop.hdfs.server.datanode.DataNode;
import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
import org.apache.hadoop.util.VersionInfo;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.internal.util.reflection.Whitebox;
/**
* Test if FSNamesystem handles heartbeat right
*/
public class TestComputeInvalidateWork {
private Configuration conf;
private final int NUM_OF_DATANODES = 3;
private MiniDFSCluster cluster;
private FSNamesystem namesystem;
private BlockManager bm;
private DatanodeDescriptor[] nodes;
private ErasureCodingPolicy ecPolicy;
private DistributedFileSystem fs;
private Path ecFile;
private int totalBlockGroups, blockGroupSize, stripesPerBlock, cellSize;
private LocatedStripedBlock locatedStripedBlock;
@Before
public void setup() throws Exception {
ecPolicy = SystemErasureCodingPolicies.getByID(
SystemErasureCodingPolicies.XOR_2_1_POLICY_ID);
conf = new HdfsConfiguration();
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(NUM_OF_DATANODES)
.build();
cluster.waitActive();
namesystem = cluster.getNamesystem();
bm = namesystem.getBlockManager();
nodes = bm.getDatanodeManager().getHeartbeatManager().getDatanodes();
BlockManagerTestUtil.stopRedundancyThread(bm);
assertEquals(nodes.length, NUM_OF_DATANODES);
// Create a striped file
Path ecDir = new Path("/ec");
fs = cluster.getFileSystem();
fs.enableErasureCodingPolicy(ecPolicy.getName());
fs.mkdirs(ecDir);
fs.getClient().setErasureCodingPolicy(ecDir.toString(), ecPolicy.getName());
ecFile = new Path(ecDir, "ec-file");
stripesPerBlock = 2;
cellSize = ecPolicy.getCellSize();
int blockSize = stripesPerBlock * cellSize;
blockGroupSize = ecPolicy.getNumDataUnits() * blockSize;
totalBlockGroups = 4;
DFSTestUtil.createStripedFile(cluster, ecFile, ecDir, totalBlockGroups,
stripesPerBlock, false, ecPolicy);
LocatedBlocks lbs = cluster.getFileSystem().getClient().
getNamenode().getBlockLocations(
ecFile.toString(), 0, blockGroupSize);
assert lbs.get(0) instanceof LocatedStripedBlock;
locatedStripedBlock = (LocatedStripedBlock)(lbs.get(0));
}
@After
public void teardown() throws Exception {
if (cluster != null) {
cluster.shutdown();
cluster = null;
}
}
private void verifyInvalidationWorkCounts(int blockInvalidateLimit) {
assertEquals(blockInvalidateLimit * NUM_OF_DATANODES,
bm.computeInvalidateWork(NUM_OF_DATANODES + 1));
assertEquals(blockInvalidateLimit * NUM_OF_DATANODES,
bm.computeInvalidateWork(NUM_OF_DATANODES));
assertEquals(blockInvalidateLimit * (NUM_OF_DATANODES - 1),
bm.computeInvalidateWork(NUM_OF_DATANODES - 1));
int workCount = bm.computeInvalidateWork(1);
if (workCount == 1) {
assertEquals(blockInvalidateLimit + 1, bm.computeInvalidateWork(2));
} else {
assertEquals(workCount, blockInvalidateLimit);
assertEquals(2, bm.computeInvalidateWork(2));
}
}
/**
* Test if {@link BlockManager#computeInvalidateWork(int)}
* can schedule invalidate work correctly for the replicas.
*/
@Test(timeout=120000)
public void testComputeInvalidateReplicas() throws Exception {
final int blockInvalidateLimit = bm.getDatanodeManager()
.getBlockInvalidateLimit();
namesystem.writeLock();
try {
for (int i=0; i<nodes.length; i++) {
for(int j=0; j<3*blockInvalidateLimit+1; j++) {
Block block = new Block(i*(blockInvalidateLimit+1)+j, 0,
GenerationStamp.LAST_RESERVED_STAMP);
bm.addToInvalidates(block, nodes[i]);
}
}
verifyInvalidationWorkCounts(blockInvalidateLimit);
} finally {
namesystem.writeUnlock();
}
}
/**
* Test if {@link BlockManager#computeInvalidateWork(int)}
* can schedule invalidate work correctly for the striped block groups.
*/
@Test(timeout=120000)
public void testComputeInvalidateStripedBlockGroups() throws Exception {
final int blockInvalidateLimit =
bm.getDatanodeManager().getBlockInvalidateLimit();
namesystem.writeLock();
try {
int nodeCount = ecPolicy.getNumDataUnits() + ecPolicy.getNumParityUnits();
for (int i = 0; i < nodeCount; i++) {
for(int j = 0; j < 3 * blockInvalidateLimit + 1; j++) {
Block blk = new Block(locatedStripedBlock.getBlock().getBlockId() +
(i * 10 + j), stripesPerBlock * cellSize,
locatedStripedBlock.getBlock().getGenerationStamp());
bm.addToInvalidates(blk, nodes[i]);
}
}
verifyInvalidationWorkCounts(blockInvalidateLimit);
} finally {
namesystem.writeUnlock();
}
}
/**
* Test if {@link BlockManager#computeInvalidateWork(int)}
* can schedule invalidate work correctly for both replicas and striped
* block groups, combined.
*/
@Test(timeout=120000)
public void testComputeInvalidate() throws Exception {
final int blockInvalidateLimit =
bm.getDatanodeManager().getBlockInvalidateLimit();
final Random random = new Random(System.currentTimeMillis());
namesystem.writeLock();
try {
int nodeCount = ecPolicy.getNumDataUnits() + ecPolicy.getNumParityUnits();
for (int i = 0; i < nodeCount; i++) {
for(int j = 0; j < 3 * blockInvalidateLimit + 1; j++) {
if (random.nextBoolean()) {
Block stripedBlock = new Block(
locatedStripedBlock.getBlock().getBlockId() + (i * 10 + j),
stripesPerBlock * cellSize,
locatedStripedBlock.getBlock().getGenerationStamp());
bm.addToInvalidates(stripedBlock, nodes[i]);
} else {
Block replica = new Block(i * (blockInvalidateLimit + 1) + j, 0,
GenerationStamp.LAST_RESERVED_STAMP);
bm.addToInvalidates(replica, nodes[i]);
}
}
}
verifyInvalidationWorkCounts(blockInvalidateLimit);
} finally {
namesystem.writeUnlock();
}
}
/**
* Reformatted DataNodes will replace the original UUID in the
* {@link DatanodeManager#datanodeMap}. This tests if block
* invalidation work on the original DataNode can be skipped.
*/
@Test(timeout=120000)
public void testDatanodeReformat() throws Exception {
namesystem.writeLock();
try {
// Change the datanode UUID to emulate a reformat
String poolId = cluster.getNamesystem().getBlockPoolId();
DatanodeRegistration dnr = cluster.getDataNode(nodes[0].getIpcPort())
.getDNRegistrationForBP(poolId);
dnr = new DatanodeRegistration(UUID.randomUUID().toString(), dnr);
cluster.stopDataNode(nodes[0].getXferAddr());
Block block = new Block(0, 0, GenerationStamp.LAST_RESERVED_STAMP);
bm.addToInvalidates(block, nodes[0]);
Block stripedBlock = new Block(
locatedStripedBlock.getBlock().getBlockId() + 100,
stripesPerBlock * cellSize,
locatedStripedBlock.getBlock().getGenerationStamp());
bm.addToInvalidates(stripedBlock, nodes[0]);
bm.getDatanodeManager().registerDatanode(dnr);
// Since UUID has changed, the invalidation work should be skipped
assertEquals(0, bm.computeInvalidateWork(1));
assertEquals(0, bm.getPendingDeletionBlocksCount());
} finally {
namesystem.writeUnlock();
}
}
@Test(timeout=12000)
public void testDatanodeReRegistration() throws Exception {
// Create a test file
final DistributedFileSystem dfs = cluster.getFileSystem();
final Path path = new Path("/testRR");
// Create a file and shutdown the DNs, which populates InvalidateBlocks
short totalReplicas = NUM_OF_DATANODES;
DFSTestUtil.createFile(dfs, path, dfs.getDefaultBlockSize(),
totalReplicas, 0xED0ED0);
DFSTestUtil.waitForReplication(dfs, path, (short) NUM_OF_DATANODES, 12000);
for (DataNode dn : cluster.getDataNodes()) {
dn.shutdown();
}
dfs.delete(path, false);
dfs.delete(ecFile, false);
namesystem.writeLock();
InvalidateBlocks invalidateBlocks;
int totalStripedDataBlocks = totalBlockGroups * (ecPolicy.getNumDataUnits()
+ ecPolicy.getNumParityUnits());
int expected = totalReplicas + totalStripedDataBlocks;
try {
invalidateBlocks = (InvalidateBlocks) Whitebox
.getInternalState(cluster.getNamesystem().getBlockManager(),
"invalidateBlocks");
assertEquals("Invalidate blocks should include both Replicas and " +
"Striped BlockGroups!",
(long) expected, invalidateBlocks.numBlocks());
assertEquals("Unexpected invalidate count for replicas!",
totalReplicas, invalidateBlocks.getBlocks());
assertEquals("Unexpected invalidate count for striped block groups!",
totalStripedDataBlocks, invalidateBlocks.getECBlocks());
} finally {
namesystem.writeUnlock();
}
// Re-register each DN and see that it wipes the invalidation work
int totalBlockGroupsPerDataNode = totalBlockGroups;
int totalReplicasPerDataNode = totalReplicas / NUM_OF_DATANODES;
for (DataNode dn : cluster.getDataNodes()) {
DatanodeID did = dn.getDatanodeId();
DatanodeRegistration reg = new DatanodeRegistration(
new DatanodeID(UUID.randomUUID().toString(), did),
new StorageInfo(HdfsServerConstants.NodeType.DATA_NODE),
new ExportedBlockKeys(),
VersionInfo.getVersion());
namesystem.writeLock();
try {
bm.getDatanodeManager().registerDatanode(reg);
expected -= (totalReplicasPerDataNode + totalBlockGroupsPerDataNode);
assertEquals("Expected number of invalidate blocks to decrease",
(long) expected, invalidateBlocks.numBlocks());
} finally {
namesystem.writeUnlock();
}
}
}
}
| {
"content_hash": "32e5522af465db82120d370126e43653",
"timestamp": "",
"source": "github",
"line_count": 280,
"max_line_length": 80,
"avg_line_length": 39.614285714285714,
"alnum_prop": 0.7000540930400289,
"repo_name": "979969786/hadoop",
"id": "cf4299b50158d00c8714ee19c9714202c93da9a0",
"size": "11898",
"binary": false,
"copies": "7",
"ref": "refs/heads/trunk",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestComputeInvalidateWork.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AspectJ",
"bytes": "29602"
},
{
"name": "Batchfile",
"bytes": "67517"
},
{
"name": "C",
"bytes": "1431136"
},
{
"name": "C++",
"bytes": "1741547"
},
{
"name": "CMake",
"bytes": "50732"
},
{
"name": "CSS",
"bytes": "43072"
},
{
"name": "HTML",
"bytes": "151850"
},
{
"name": "Java",
"bytes": "52624472"
},
{
"name": "JavaScript",
"bytes": "28573"
},
{
"name": "Protocol Buffer",
"bytes": "240736"
},
{
"name": "Python",
"bytes": "38263"
},
{
"name": "Shell",
"bytes": "384206"
},
{
"name": "TeX",
"bytes": "19322"
},
{
"name": "XSLT",
"bytes": "15460"
}
],
"symlink_target": ""
} |
This file describes how best to contribute and collaborate on this project. | {
"content_hash": "ec50662f6441b61f00f95056d975c2a3",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 75,
"avg_line_length": 75,
"alnum_prop": 0.84,
"repo_name": "CMGI/cmgi-pet-utils",
"id": "c09522554d1ea6cea8ae6d16f67b7f86d3da15f0",
"size": "91",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "CONTRIBUTING.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1370376"
},
{
"name": "CMake",
"bytes": "20761"
},
{
"name": "Makefile",
"bytes": "16785"
},
{
"name": "Matlab",
"bytes": "555339"
},
{
"name": "Shell",
"bytes": "21677"
},
{
"name": "Tcl",
"bytes": "1811"
}
],
"symlink_target": ""
} |
<?php
namespace Codeception\Command;
use Codeception\Configuration;
use Codeception\Util\FileSystem;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Clean extends Base {
public function getDescription() {
return 'Cleans _log directory';
}
protected function configure()
{
$this->setDefinition(array(
new InputOption('config', 'c', InputOption::VALUE_OPTIONAL, 'Use custom path for config'),
));
parent::configure();
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$conf = $this->getGlobalConfig($input->getOption('config'));
$output->writeln("<info>Cleaning up ".Configuration::logDir()."...</info>");
FileSystem::doEmptyDir(Configuration::logDir());
$output->writeln("Done");
}
} | {
"content_hash": "c3bc3fbdff222de5ddc2009b70382f53",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 102,
"avg_line_length": 28.314285714285713,
"alnum_prop": 0.6851664984863775,
"repo_name": "slivas/hoz",
"id": "f5cf1cd3cf2fd9bfc527db562bd8a8f0bd983226",
"size": "991",
"binary": false,
"copies": "5",
"ref": "refs/heads/dev",
"path": "vendor/codeception/codeception/src/Codeception/Command/Clean.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "246609"
},
{
"name": "JavaScript",
"bytes": "359665"
},
{
"name": "PHP",
"bytes": "2712214"
},
{
"name": "Shell",
"bytes": "866"
}
],
"symlink_target": ""
} |
class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :null_session
end
| {
"content_hash": "a80dfa1150f0b743daaa211bc3ae8c87",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 56,
"avg_line_length": 39.25,
"alnum_prop": 0.7770700636942676,
"repo_name": "MrChristofferson/Farmbot-Web-API",
"id": "bede28f44b86a4036925d2f11711a1c6bc428e9e",
"size": "157",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/controllers/application_controller.rb",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "54414"
},
{
"name": "HTML",
"bytes": "34344"
},
{
"name": "JavaScript",
"bytes": "104062"
},
{
"name": "Ruby",
"bytes": "270903"
},
{
"name": "TypeScript",
"bytes": "735777"
}
],
"symlink_target": ""
} |
@interface PodsDummy_RamblerTyphoonUtils_AssemblyCollector_AssemblyTesting : NSObject
@end
@implementation PodsDummy_RamblerTyphoonUtils_AssemblyCollector_AssemblyTesting
@end
| {
"content_hash": "1112826b35b49a831c29d62770ea4790",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 85,
"avg_line_length": 44,
"alnum_prop": 0.8920454545454546,
"repo_name": "rambler-digital-solutions/rambler-it-ios",
"id": "8207d5a7bfa3ab175d797d680917292dc57be981",
"size": "210",
"binary": false,
"copies": "3",
"ref": "refs/heads/develop",
"path": "Pods/Target Support Files/RamblerTyphoonUtils-AssemblyCollector-AssemblyTesting/RamblerTyphoonUtils-AssemblyCollector-AssemblyTesting-dummy.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "30544"
},
{
"name": "Liquid",
"bytes": "19363"
},
{
"name": "Objective-C",
"bytes": "2815725"
},
{
"name": "Ruby",
"bytes": "2554"
},
{
"name": "Shell",
"bytes": "1656"
}
],
"symlink_target": ""
} |
using set.messaging.Controllers;
namespace set.messaging.test.Shared.Builders
{
public class HomeControllerBuilder : BaseBuilder
{
internal HomeController Build()
{
return new HomeController();
}
}
} | {
"content_hash": "876404e629d94f2613ce0709d6b5b69e",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 52,
"avg_line_length": 20.833333333333332,
"alnum_prop": 0.64,
"repo_name": "argeset/set-messaging",
"id": "a5b8e107bbc2dd7a79298e8ac53b9a262c9a8535",
"size": "252",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "sources/set.messaging.test/Shared/Builders/HomeControllerBuilder.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "96"
},
{
"name": "C#",
"bytes": "91731"
},
{
"name": "CSS",
"bytes": "400"
},
{
"name": "JavaScript",
"bytes": "25"
}
],
"symlink_target": ""
} |
'use strict';
var util = require('hexo-util');
var highlight = util.highlight;
var stripIndent = require('strip-indent');
var jsDom = require('jsdom');
var rCaptionUrl = /(\S[\S\s]*)\s+(https?:\/\/)(\S+)/i;
var rCaption = /(\S[\S\s]*)/;
var rTab = /<!--\s*tab (\w*)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g;
// create a window with a document to use jQuery library
jsDom.env('', function(err, window) {
if (err) {
console.error(err);
return;
}
var $ = require('jquery')(window);
/**
* Tabbed code block
* @param {Array} args
* @param {String} content
* @returns {string}
*/
function tabbedCodeBlock(args, content) {
var arg = args.join(' ');
var config = hexo.config.highlight || {};
var html;
var matches = [];
var match;
var caption = '';
var codes = '';
// extract languages and source codes
while ((match = rTab.exec(content))) {
matches.push(match[1]);
matches.push(match[2]);
}
// create tabs and tabs content
for (var i = 0; i < matches.length; i += 2) {
var lang = matches[i];
var code = matches[i + 1];
var $code;
// trim code
code = stripIndent(code).trim();
if (config.enable) {
// highlight code
code = highlight(code, {
lang: lang,
gutter: config.line_number,
tab: config.tab_replace,
autoDetect: config.auto_detect
});
}
else {
code = code.replace(/</g, '<').replace(/>/g, '>');
code = '<pre><code>' + code + '</code></pre>';
}
// used to parse HTML code and ease DOM manipulation
$code = $('<div>').append(code).find('>:first-child');
// add tab
// active the first tab
// display the first code block
if (i === 0) {
caption += '<li class="tab active">' + lang + '</li>';
$code.css('display', 'block');
}
else {
$code.css('display', 'none');
caption += '<li class="tab">' + lang + '</li>';
}
codes += $code.prop('outerHTML');
}
// build caption
caption = '<ul class="tabs">' + caption + '</ul>';
// add caption title
if (rCaptionUrl.test(arg)) {
match = arg.match(rCaptionUrl);
caption = '<a href="' + match[2] + match[3] + '">' + match[1] + '</a>' + caption;
}
else if (rCaption.test(arg)) {
match = arg.match(rCaption);
caption = '<span>' + match[1] + '</span>' + caption;
}
codes = '<div class="tabs-content">' + codes + '</div>';
// wrap caption
caption = '<figcaption>' + caption + '</figcaption>';
html = '<figure class="codeblock codeblock--tabbed">' + caption + codes + '</figure>';
return html;
}
/**
* Tabbed code block tag
*
* Syntax:
* {% tabbed_codeblock %}
* <!-- tab [lang] -->
* content
* <!-- endtab -->
* {% endtabbed_codeblock %}
* E.g:
* {% tabbed_codeblock %}
* <!-- tab js -->
* var test = 'test';
* <!-- endtab -->
* <!-- tab css -->
* .btn {
* color: red;
* }
* <!-- endtab -->
* {% endtabbed_codeblock %}
*/
hexo.extend.tag.register('tabbed_codeblock', tabbedCodeBlock, {ends: true});
});
| {
"content_hash": "4601ace37557e73ca358f514be2c1a3d",
"timestamp": "",
"source": "github",
"line_count": 119,
"max_line_length": 90,
"avg_line_length": 27.798319327731093,
"alnum_prop": 0.4996977025392987,
"repo_name": "saholman/saholman.com",
"id": "e6599c7d1767bbae6f3fd0d1d520fa4b900d750e",
"size": "3308",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "themes/tranquilpeak/scripts/tags/tabbed_codeblock.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "354344"
},
{
"name": "HTML",
"bytes": "245387"
},
{
"name": "JavaScript",
"bytes": "186176"
},
{
"name": "Shell",
"bytes": "267"
}
],
"symlink_target": ""
} |
<?php
namespace Symfony\Component\HttpKernel;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Config\Loader\DelegatingLoader;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\ClassLoader\ClassCollectionLoader;
/**
* The Kernel is the heart of the Symfony system.
*
* It manages an environment made of bundles.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class Kernel implements KernelInterface, TerminableInterface
{
/**
* @var BundleInterface[]
*/
protected $bundles = array();
protected $bundleMap;
protected $container;
protected $rootDir;
protected $environment;
protected $debug;
protected $booted = false;
protected $name;
protected $startTime;
protected $loadClassCache;
const VERSION = '3.2.13';
const VERSION_ID = 30213;
const MAJOR_VERSION = 3;
const MINOR_VERSION = 2;
const RELEASE_VERSION = 13;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '07/2017';
const END_OF_LIFE = '01/2018';
/**
* Constructor.
*
* @param string $environment The environment
* @param bool $debug Whether to enable debugging or not
*/
public function __construct($environment, $debug)
{
$this->environment = $environment;
$this->debug = (bool) $debug;
$this->rootDir = $this->getRootDir();
$this->name = $this->getName();
if ($this->debug) {
$this->startTime = microtime(true);
}
}
public function __clone()
{
if ($this->debug) {
$this->startTime = microtime(true);
}
$this->booted = false;
$this->container = null;
}
/**
* Boots the current kernel.
*/
public function boot()
{
if (true === $this->booted) {
return;
}
if ($this->loadClassCache) {
$this->doLoadClassCache($this->loadClassCache[0], $this->loadClassCache[1]);
}
// init bundles
$this->initializeBundles();
// init container
$this->initializeContainer();
foreach ($this->getBundles() as $bundle) {
$bundle->setContainer($this->container);
$bundle->boot();
}
$this->booted = true;
}
/**
* {@inheritdoc}
*/
public function terminate(Request $request, Response $response)
{
if (false === $this->booted) {
return;
}
if ($this->getHttpKernel() instanceof TerminableInterface) {
$this->getHttpKernel()->terminate($request, $response);
}
}
/**
* {@inheritdoc}
*/
public function shutdown()
{
if (false === $this->booted) {
return;
}
$this->booted = false;
foreach ($this->getBundles() as $bundle) {
$bundle->shutdown();
$bundle->setContainer(null);
}
$this->container = null;
}
/**
* {@inheritdoc}
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
if (false === $this->booted) {
$this->boot();
}
return $this->getHttpKernel()->handle($request, $type, $catch);
}
/**
* Gets a HTTP kernel from the container.
*
* @return HttpKernel
*/
protected function getHttpKernel()
{
return $this->container->get('http_kernel');
}
/**
* {@inheritdoc}
*/
public function getBundles()
{
return $this->bundles;
}
/**
* {@inheritdoc}
*/
public function getBundle($name, $first = true)
{
if (!isset($this->bundleMap[$name])) {
throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this)));
}
if (true === $first) {
return $this->bundleMap[$name][0];
}
return $this->bundleMap[$name];
}
/**
* {@inheritdoc}
*
* @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle
*/
public function locateResource($name, $dir = null, $first = true)
{
if ('@' !== $name[0]) {
throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name));
}
if (false !== strpos($name, '..')) {
throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name));
}
$bundleName = substr($name, 1);
$path = '';
if (false !== strpos($bundleName, '/')) {
list($bundleName, $path) = explode('/', $bundleName, 2);
}
$isResource = 0 === strpos($path, 'Resources') && null !== $dir;
$overridePath = substr($path, 9);
$resourceBundle = null;
$bundles = $this->getBundle($bundleName, false);
$files = array();
foreach ($bundles as $bundle) {
if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
if (null !== $resourceBundle) {
throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.',
$file,
$resourceBundle,
$dir.'/'.$bundles[0]->getName().$overridePath
));
}
if ($first) {
return $file;
}
$files[] = $file;
}
if (file_exists($file = $bundle->getPath().'/'.$path)) {
if ($first && !$isResource) {
return $file;
}
$files[] = $file;
$resourceBundle = $bundle->getName();
}
}
if (count($files) > 0) {
return $first && $isResource ? $files[0] : $files;
}
throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name));
}
/**
* {@inheritdoc}
*/
public function getName()
{
if (null === $this->name) {
$this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
if (ctype_digit($this->name[0])) {
$this->name = '_'.$this->name;
}
}
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getEnvironment()
{
return $this->environment;
}
/**
* {@inheritdoc}
*/
public function isDebug()
{
return $this->debug;
}
/**
* {@inheritdoc}
*/
public function getRootDir()
{
if (null === $this->rootDir) {
$r = new \ReflectionObject($this);
$this->rootDir = dirname($r->getFileName());
}
return $this->rootDir;
}
/**
* {@inheritdoc}
*/
public function getContainer()
{
return $this->container;
}
/**
* Loads the PHP class cache.
*
* This methods only registers the fact that you want to load the cache classes.
* The cache will actually only be loaded when the Kernel is booted.
*
* That optimization is mainly useful when using the HttpCache class in which
* case the class cache is not loaded if the Response is in the cache.
*
* @param string $name The cache name prefix
* @param string $extension File extension of the resulting file
*/
public function loadClassCache($name = 'classes', $extension = '.php')
{
$this->loadClassCache = array($name, $extension);
}
/**
* @internal
*/
public function setClassCache(array $classes)
{
file_put_contents($this->getCacheDir().'/classes.map', sprintf('<?php return %s;', var_export($classes, true)));
}
/**
* @internal
*/
public function setAnnotatedClassCache(array $annotatedClasses)
{
file_put_contents($this->getCacheDir().'/annotations.map', sprintf('<?php return %s;', var_export($annotatedClasses, true)));
}
/**
* {@inheritdoc}
*/
public function getStartTime()
{
return $this->debug ? $this->startTime : -INF;
}
/**
* {@inheritdoc}
*/
public function getCacheDir()
{
return $this->rootDir.'/cache/'.$this->environment;
}
/**
* {@inheritdoc}
*/
public function getLogDir()
{
return $this->rootDir.'/logs';
}
/**
* {@inheritdoc}
*/
public function getCharset()
{
return 'UTF-8';
}
protected function doLoadClassCache($name, $extension)
{
if (!$this->booted && is_file($this->getCacheDir().'/classes.map')) {
ClassCollectionLoader::load(include($this->getCacheDir().'/classes.map'), $this->getCacheDir(), $name, $this->debug, false, $extension);
}
}
/**
* Initializes the data structures related to the bundle management.
*
* - the bundles property maps a bundle name to the bundle instance,
* - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first).
*
* @throws \LogicException if two bundles share a common name
* @throws \LogicException if a bundle tries to extend a non-registered bundle
* @throws \LogicException if a bundle tries to extend itself
* @throws \LogicException if two bundles extend the same ancestor
*/
protected function initializeBundles()
{
// init bundles
$this->bundles = array();
$topMostBundles = array();
$directChildren = array();
foreach ($this->registerBundles() as $bundle) {
$name = $bundle->getName();
if (isset($this->bundles[$name])) {
throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
}
$this->bundles[$name] = $bundle;
if ($parentName = $bundle->getParent()) {
if (isset($directChildren[$parentName])) {
throw new \LogicException(sprintf('Bundle "%s" is directly extended by two bundles "%s" and "%s".', $parentName, $name, $directChildren[$parentName]));
}
if ($parentName == $name) {
throw new \LogicException(sprintf('Bundle "%s" can not extend itself.', $name));
}
$directChildren[$parentName] = $name;
} else {
$topMostBundles[$name] = $bundle;
}
}
// look for orphans
if (!empty($directChildren) && count($diff = array_diff_key($directChildren, $this->bundles))) {
$diff = array_keys($diff);
throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0]));
}
// inheritance
$this->bundleMap = array();
foreach ($topMostBundles as $name => $bundle) {
$bundleMap = array($bundle);
$hierarchy = array($name);
while (isset($directChildren[$name])) {
$name = $directChildren[$name];
array_unshift($bundleMap, $this->bundles[$name]);
$hierarchy[] = $name;
}
foreach ($hierarchy as $hierarchyBundle) {
$this->bundleMap[$hierarchyBundle] = $bundleMap;
array_pop($bundleMap);
}
}
}
/**
* Gets the container class.
*
* @return string The container class
*/
protected function getContainerClass()
{
return $this->name.ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer';
}
/**
* Gets the container's base class.
*
* All names except Container must be fully qualified.
*
* @return string
*/
protected function getContainerBaseClass()
{
return 'Container';
}
/**
* Initializes the service container.
*
* The cached version of the service container is used when fresh, otherwise the
* container is built.
*/
protected function initializeContainer()
{
$class = $this->getContainerClass();
$cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug);
$fresh = true;
if (!$cache->isFresh()) {
$container = $this->buildContainer();
$container->compile();
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
$fresh = false;
}
require_once $cache->getPath();
$this->container = new $class();
$this->container->set('kernel', $this);
if (!$fresh && $this->container->has('cache_warmer')) {
$this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
}
}
/**
* Returns the kernel parameters.
*
* @return array An array of kernel parameters
*/
protected function getKernelParameters()
{
$bundles = array();
$bundlesMetadata = array();
foreach ($this->bundles as $name => $bundle) {
$bundles[$name] = get_class($bundle);
$bundlesMetadata[$name] = array(
'parent' => $bundle->getParent(),
'path' => $bundle->getPath(),
'namespace' => $bundle->getNamespace(),
);
}
return array_merge(
array(
'kernel.root_dir' => realpath($this->rootDir) ?: $this->rootDir,
'kernel.environment' => $this->environment,
'kernel.debug' => $this->debug,
'kernel.name' => $this->name,
'kernel.cache_dir' => realpath($this->getCacheDir()) ?: $this->getCacheDir(),
'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(),
'kernel.bundles' => $bundles,
'kernel.bundles_metadata' => $bundlesMetadata,
'kernel.charset' => $this->getCharset(),
'kernel.container_class' => $this->getContainerClass(),
),
$this->getEnvParameters()
);
}
/**
* Gets the environment parameters.
*
* Only the parameters starting with "SYMFONY__" are considered.
*
* @return array An array of parameters
*/
protected function getEnvParameters()
{
$parameters = array();
foreach ($_SERVER as $key => $value) {
if (0 === strpos($key, 'SYMFONY__')) {
$parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;
}
}
return $parameters;
}
/**
* Builds the service container.
*
* @return ContainerBuilder The compiled service container
*
* @throws \RuntimeException
*/
protected function buildContainer()
{
foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) {
if (!is_dir($dir)) {
if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) {
throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir));
}
} elseif (!is_writable($dir)) {
throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
}
}
$container = $this->getContainerBuilder();
$container->addObjectResource($this);
$this->prepareContainer($container);
if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) {
$container->merge($cont);
}
$container->addCompilerPass(new AddClassesToCachePass($this));
$container->addResource(new EnvParametersResource('SYMFONY__'));
return $container;
}
/**
* Prepares the ContainerBuilder before it is compiled.
*
* @param ContainerBuilder $container A ContainerBuilder instance
*/
protected function prepareContainer(ContainerBuilder $container)
{
$extensions = array();
foreach ($this->bundles as $bundle) {
if ($extension = $bundle->getContainerExtension()) {
$container->registerExtension($extension);
$extensions[] = $extension->getAlias();
}
if ($this->debug) {
$container->addObjectResource($bundle);
}
}
foreach ($this->bundles as $bundle) {
$bundle->build($container);
}
// ensure these extensions are implicitly loaded
$container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
}
/**
* Gets a new ContainerBuilder instance used to build the service container.
*
* @return ContainerBuilder
*/
protected function getContainerBuilder()
{
$container = new ContainerBuilder();
$container->getParameterBag()->add($this->getKernelParameters());
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) {
$container->setProxyInstantiator(new RuntimeInstantiator());
}
return $container;
}
/**
* Dumps the service container to PHP code in the cache.
*
* @param ConfigCache $cache The config cache
* @param ContainerBuilder $container The service container
* @param string $class The name of the class to generate
* @param string $baseClass The name of the container's base class
*/
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass)
{
// cache the container
$dumper = new PhpDumper($container);
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
$dumper->setProxyDumper(new ProxyDumper(md5($cache->getPath())));
}
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath(), 'debug' => $this->debug));
$cache->write($content, $container->getResources());
}
/**
* Returns a loader for the container.
*
* @param ContainerInterface $container The service container
*
* @return DelegatingLoader The loader
*/
protected function getContainerLoader(ContainerInterface $container)
{
$locator = new FileLocator($this);
$resolver = new LoaderResolver(array(
new XmlFileLoader($container, $locator),
new YamlFileLoader($container, $locator),
new IniFileLoader($container, $locator),
new PhpFileLoader($container, $locator),
new DirectoryLoader($container, $locator),
new ClosureLoader($container),
));
return new DelegatingLoader($resolver);
}
/**
* Removes comments from a PHP source string.
*
* We don't use the PHP php_strip_whitespace() function
* as we want the content to be readable and well-formatted.
*
* @param string $source A PHP string
*
* @return string The PHP string with the comments removed
*/
public static function stripComments($source)
{
if (!function_exists('token_get_all')) {
return $source;
}
$rawChunk = '';
$output = '';
$tokens = token_get_all($source);
$ignoreSpace = false;
for ($i = 0; isset($tokens[$i]); ++$i) {
$token = $tokens[$i];
if (!isset($token[1]) || 'b"' === $token) {
$rawChunk .= $token;
} elseif (T_START_HEREDOC === $token[0]) {
$output .= $rawChunk.$token[1];
do {
$token = $tokens[++$i];
$output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token;
} while ($token[0] !== T_END_HEREDOC);
$rawChunk = '';
} elseif (T_WHITESPACE === $token[0]) {
if ($ignoreSpace) {
$ignoreSpace = false;
continue;
}
// replace multiple new lines with a single newline
$rawChunk .= preg_replace(array('/\n{2,}/S'), "\n", $token[1]);
} elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
$ignoreSpace = true;
} else {
$rawChunk .= $token[1];
// The PHP-open tag already has a new-line
if (T_OPEN_TAG === $token[0]) {
$ignoreSpace = true;
}
}
}
$output .= $rawChunk;
if (\PHP_VERSION_ID >= 70000) {
// PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098
unset($tokens, $rawChunk);
gc_mem_caches();
}
return $output;
}
public function serialize()
{
return serialize(array($this->environment, $this->debug));
}
public function unserialize($data)
{
list($environment, $debug) = unserialize($data);
$this->__construct($environment, $debug);
}
}
| {
"content_hash": "abee71735010caaa6a5a7a1b0b800c78",
"timestamp": "",
"source": "github",
"line_count": 745,
"max_line_length": 214,
"avg_line_length": 30.868456375838925,
"alnum_prop": 0.5554637561421055,
"repo_name": "samokiss/etf",
"id": "3b3d87814b6ab4079ea434545994cf5978390209",
"size": "23226",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "symfony/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "13245"
},
{
"name": "HTML",
"bytes": "73996"
},
{
"name": "JavaScript",
"bytes": "7076"
},
{
"name": "Makefile",
"bytes": "313"
},
{
"name": "PHP",
"bytes": "213808"
},
{
"name": "Shell",
"bytes": "349"
}
],
"symlink_target": ""
} |
define(["angular", "feed-mgr/feeds/define-feed/module-name"], function (angular, moduleName) {
/**
* Displays a table option stepper template.
*/
var kyloTableOptionsStepper = function ($compile, $mdDialog, $templateRequest, StateService, UiComponentsService) {
return {
restrict: "E",
scope: {
selectedStepIndex: "=",
stepIndex: "=",
steps: "=",
type: "@"
},
link: function ($scope, $element) {
/**
* Gets the object for the table option step at the specified index.
* @param {number} index - the table option step index
* @returns {Object} the step
*/
$scope.getStep = function (index) {
return $scope.steps[$scope.getStepIndex(index)];
};
/**
* Gets the stepper step index for the specified table option step index.
* @param {number} index - the table option step index
* @returns {number} the stepper step index
*/
$scope.getStepIndex = function (index) {
$scope.totalOptions = Math.max(index + 1, $scope.totalOptions);
return $scope.stepIndex + index;
};
/**
* Indicates if the specified step is selected.
* @param {number} index - the table option step index
* @returns {boolean} true if the step is selected
*/
$scope.isStepSelected = function (index) {
return $scope.selectedStepIndex === $scope.getStepIndex(index);
};
/**
* Indicates if the specified step has been visited.
* @param {number} index - the table option step index
* @returns {boolean} true if the step is visited
*/
$scope.isStepVisited = function (index) {
return $scope.steps[$scope.getStepIndex(index)].visited;
};
// Loads the table option template
UiComponentsService.getTemplateTableOption($scope.type)
.then(function (tableOption) {
return (tableOption.stepperTemplateUrl !== null) ? $templateRequest(tableOption.stepperTemplateUrl) : null;
})
.then(function (html) {
if (html !== null) {
var template = angular.element(html);
$element.append(template);
$compile(template)($scope);
}
}, function () {
$mdDialog.show(
$mdDialog.alert()
.clickOutsideToClose(true)
.title("Create Failed")
.textContent("The table option template could not be loaded.")
.ariaLabel("Failed to create feed")
.ok("Got it!")
);
StateService.FeedManager().Feed().navigateToFeeds();
});
}
};
};
angular.module(moduleName).directive("kyloTableOptionsStepper", ["$compile", "$mdDialog", "$templateRequest", "StateService", "UiComponentsService", kyloTableOptionsStepper]);
});
| {
"content_hash": "cf7f0110b0dfb1d22f07158e533039f1",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 179,
"avg_line_length": 45.721518987341774,
"alnum_prop": 0.4684385382059801,
"repo_name": "peter-gergely-horvath/kylo",
"id": "32741de9dee2697fb4e5a2163ee1c0ceb40bb6c6",
"size": "3612",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed/TableOptionsStepperDirective.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "149051"
},
{
"name": "FreeMarker",
"bytes": "785"
},
{
"name": "HTML",
"bytes": "630108"
},
{
"name": "Java",
"bytes": "8383122"
},
{
"name": "JavaScript",
"bytes": "3556299"
},
{
"name": "PLpgSQL",
"bytes": "19852"
},
{
"name": "SQLPL",
"bytes": "8654"
},
{
"name": "Scala",
"bytes": "47591"
},
{
"name": "Shell",
"bytes": "76430"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spirit:vendor>xilinx.com</spirit:vendor>
<spirit:library>customized_ip</spirit:library>
<spirit:name>design_1_blk_mem_gen_0_0</spirit:name>
<spirit:version>1.0</spirit:version>
<spirit:busInterfaces>
<spirit:busInterface>
<spirit:name>CLK.ACLK</spirit:name>
<spirit:displayName>ACLK</spirit:displayName>
<spirit:description>AXI4 Interconnect Clock Input</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CLK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_aclk</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>ASSOCIATED_BUSIF</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.CLK.ACLK.ASSOCIATED_BUSIF">AXI_SLAVE_S_AXI:AXILite_SLAVE_S_AXI</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ASSOCIATED_RESET</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.CLK.ACLK.ASSOCIATED_RESET">s_aresetn</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>FREQ_HZ</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLK.ACLK.FREQ_HZ">100000000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PHASE</spirit:name>
<spirit:value spirit:format="float" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLK.ACLK.PHASE">0.000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>CLK_DOMAIN</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLK.ACLK.CLK_DOMAIN"/>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>RST.ARESETN</spirit:name>
<spirit:displayName>ARESETN</spirit:displayName>
<spirit:description>AXI4 Interconnect Reset Input</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_aresetn</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>POLARITY</spirit:name>
<spirit:value spirit:id="BUSIFPARAM_VALUE.RST.ARESETN.POLARITY">ACTIVE_LOW</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>AXI_SLAVE_S_AXI</spirit:name>
<spirit:displayName>AXI_SLAVE</spirit:displayName>
<spirit:description>AXI_SLAVE</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_araddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARBURST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arburst</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARLEN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arlen</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARSIZE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arsize</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awaddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWBURST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awburst</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWLEN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awlen</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWSIZE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awsize</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RLAST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rlast</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WLAST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wlast</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WSTRB</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wstrb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>DATA_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.DATA_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PROTOCOL</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.PROTOCOL">AXI4</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>FREQ_HZ</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.FREQ_HZ">100000000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ID_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.ID_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ADDR_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.ADDR_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>AWUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.AWUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ARUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.ARUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>WUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.WUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.RUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>BUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.BUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>READ_WRITE_MODE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.READ_WRITE_MODE">READ_WRITE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_BURST</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_BURST">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_LOCK</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_LOCK">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_PROT</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_PROT">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_CACHE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_CACHE">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_QOS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_QOS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_REGION</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_REGION">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_WSTRB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_WSTRB">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_BRESP</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_BRESP">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_RRESP</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.HAS_RRESP">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SUPPORTS_NARROW_BURST</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.SUPPORTS_NARROW_BURST">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_READ_OUTSTANDING</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.NUM_READ_OUTSTANDING">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_WRITE_OUTSTANDING</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.NUM_WRITE_OUTSTANDING">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MAX_BURST_LENGTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.MAX_BURST_LENGTH">256</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PHASE</spirit:name>
<spirit:value spirit:format="float" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.PHASE">0.000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>CLK_DOMAIN</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.CLK_DOMAIN"/>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_READ_THREADS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.NUM_READ_THREADS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_WRITE_THREADS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.NUM_WRITE_THREADS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RUSER_BITS_PER_BYTE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.RUSER_BITS_PER_BYTE">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>WUSER_BITS_PER_BYTE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXI_SLAVE_S_AXI.WUSER_BITS_PER_BYTE">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.AXI_SLAVE_S_AXI" xilinx:dependency="(((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')))=1) and ((spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')))= 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>AXILite_SLAVE_S_AXI</spirit:name>
<spirit:displayName>AXILite_SLAVE</spirit:displayName>
<spirit:description>AXILite_SLAVE</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_araddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARBURST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arburst</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARLEN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arlen</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARSIZE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arsize</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ARVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_arvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awaddr</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWBURST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awburst</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWLEN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awlen</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWSIZE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awsize</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>AWVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_awvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_bvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RLAST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rlast</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RRESP</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rresp</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_rvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WDATA</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wdata</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WLAST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wlast</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WREADY</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wready</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WSTRB</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wstrb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WVALID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>s_axi_wvalid</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>DATA_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.DATA_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PROTOCOL</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.PROTOCOL">AXI4</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>FREQ_HZ</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.FREQ_HZ">100000000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ID_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.ID_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ADDR_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.ADDR_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>AWUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.AWUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ARUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.ARUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>WUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.WUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.RUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>BUSER_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.BUSER_WIDTH">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>READ_WRITE_MODE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.READ_WRITE_MODE">READ_WRITE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_BURST</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_BURST">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_LOCK</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_LOCK">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_PROT</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_PROT">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_CACHE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_CACHE">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_QOS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_QOS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_REGION</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_REGION">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_WSTRB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_WSTRB">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_BRESP</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_BRESP">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>HAS_RRESP</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.HAS_RRESP">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>SUPPORTS_NARROW_BURST</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.SUPPORTS_NARROW_BURST">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_READ_OUTSTANDING</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.NUM_READ_OUTSTANDING">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_WRITE_OUTSTANDING</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.NUM_WRITE_OUTSTANDING">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MAX_BURST_LENGTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.MAX_BURST_LENGTH">256</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PHASE</spirit:name>
<spirit:value spirit:format="float" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.PHASE">0.000</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>CLK_DOMAIN</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.CLK_DOMAIN"/>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_READ_THREADS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.NUM_READ_THREADS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>NUM_WRITE_THREADS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.NUM_WRITE_THREADS">1</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RUSER_BITS_PER_BYTE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.RUSER_BITS_PER_BYTE">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>WUSER_BITS_PER_BYTE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AXILITE_SLAVE_S_AXI.WUSER_BITS_PER_BYTE">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.AXILite_SLAVE_S_AXI" xilinx:dependency="(((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')))=1) and ((spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')))= 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>BRAM_PORTA</spirit:name>
<spirit:displayName>BRAM_PORTA</spirit:displayName>
<spirit:description>BRAM_PORTA</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bram" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bram_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>addra</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CLK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>clka</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DIN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>dina</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DOUT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>douta</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>EN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>ena</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>rsta</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>wea</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>MEM_SIZE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_SIZE">8192</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MEM_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MEM_ECC</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_ECC">NONE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MASTER_TYPE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTA.MASTER_TYPE">BRAM_CTRL</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>READ_WRITE_MODE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTA.READ_WRITE_MODE">READ_WRITE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.BRAM_PORTA" xilinx:dependency="spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE'))=0">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>BRAM_PORTB</spirit:name>
<spirit:displayName>BRAM_PORTB</spirit:displayName>
<spirit:description>BRAM_PORTB</spirit:description>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bram" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bram_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>ADDR</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>addrb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CLK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>clkb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DIN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>dinb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DOUT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>doutb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>EN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>enb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>rstb</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>WE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>web</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:parameters>
<spirit:parameter>
<spirit:name>MEM_SIZE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_SIZE">588</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MEM_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_WIDTH">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MEM_ECC</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_ECC">NONE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MASTER_TYPE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTB.MASTER_TYPE">BRAM_CTRL</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>READ_WRITE_MODE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.BRAM_PORTB.READ_WRITE_MODE">READ_WRITE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:parameterUsage>none</xilinx:parameterUsage>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.BRAM_PORTB" xilinx:dependency="(((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')))=0) and ((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')))!= 0) and ((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')))!= 3))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
</spirit:busInterfaces>
<spirit:memoryMaps>
<spirit:memoryMap>
<spirit:name>S_1</spirit:name>
<spirit:addressBlock>
<spirit:name>Mem0</spirit:name>
<spirit:baseAddress spirit:format="long">0</spirit:baseAddress>
<spirit:range spirit:format="long" spirit:resolve="generated">4096</spirit:range>
<spirit:width spirit:format="long">32</spirit:width>
<spirit:usage>memory</spirit:usage>
<spirit:access>read-write</spirit:access>
<spirit:parameters>
<spirit:parameter>
<spirit:name>OFFSET_BASE_PARAM</spirit:name>
<spirit:value spirit:id="ADDRBLOCKPARAM_VALUE.S_1.MEM0.OFFSET_BASE_PARAM">C_BASEADDR</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>OFFSET_HIGH_PARAM</spirit:name>
<spirit:value spirit:id="ADDRBLOCKPARAM_VALUE.S_1.MEM0.OFFSET_HIGH_PARAM">C_HIGHADDR</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:addressBlock>
</spirit:memoryMap>
</spirit:memoryMaps>
<spirit:model>
<spirit:views>
<spirit:view>
<spirit:name>xilinx_vhdlsynthesis</spirit:name>
<spirit:displayName>VHDL Synthesis</spirit:displayName>
<spirit:envIdentifier>vhdlSource:vivado.xilinx.com:synthesis</spirit:envIdentifier>
<spirit:language>vhdl</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_vhdlsynthesis_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Oct 18 23:08:31 UTC 2017</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:0fce880a</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_vhdlsynthesiswrapper</spirit:name>
<spirit:displayName>VHDL Synthesis Wrapper</spirit:displayName>
<spirit:envIdentifier>vhdlSource:vivado.xilinx.com:synthesis.wrapper</spirit:envIdentifier>
<spirit:language>vhdl</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_vhdlsynthesiswrapper_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Oct 18 23:08:31 UTC 2017</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:0fce880a</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_anylanguagebehavioralsimulation</spirit:name>
<spirit:displayName>Simulation</spirit:displayName>
<spirit:envIdentifier>:vivado.xilinx.com:simulation</spirit:envIdentifier>
<spirit:modelName>blk_mem_gen_v8_4_0</spirit:modelName>
<spirit:fileSetRef>
<spirit:localName>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Oct 18 23:08:31 UTC 2017</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:d6c003cd</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_verilogsimulationwrapper</spirit:name>
<spirit:displayName>Verilog Simulation Wrapper</spirit:displayName>
<spirit:envIdentifier>verilogSource:vivado.xilinx.com:simulation.wrapper</spirit:envIdentifier>
<spirit:language>verilog</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_verilogsimulationwrapper_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Oct 18 23:08:31 UTC 2017</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:d6c003cd</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
</spirit:views>
<spirit:ports>
<spirit:port>
<spirit:name>clka</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.clka" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1)">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>rsta</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.rsta" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_RSTA')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>ena</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.ena" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_ENA')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>regcea</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.regcea" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_REGCEA')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>wea</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WEA_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.wea" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 4) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>addra</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_ADDRA_WIDTH'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.addra" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1)">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>dina</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WRITE_WIDTH_A'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.dina" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 4) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>douta</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_READ_WIDTH_A'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.douta" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>clkb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.clkb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>rstb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.rstb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_RSTB')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>enb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.enb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and(spirit:decode(id('MODELPARAM_VALUE.C_HAS_ENB')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>regceb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.regceb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_REGCEB')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>web</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WEB_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.web" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 4) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>addrb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_ADDRB_WIDTH'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.addrb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>dinb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WRITE_WIDTH_B'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.dinb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 4) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>doutb</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_READ_WIDTH_B'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.doutb" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>injectsbiterr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.injectsbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) != 2) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>injectdbiterr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.injectdbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) != 1) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>eccpipece</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.eccpipece" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexu' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'kintexu' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'artixu') and spirit:decode(id('MODELPARAM_VALUE.C_EN_ECC_PIPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>sbiterr</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.sbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) != 0) or (spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>dbiterr</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.dbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) != 0) or (spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>rdaddrecc</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_ADDRB_WIDTH'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.rdaddrecc" xilinx:dependency="((((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) != 0) and id('MODELPARAM_VALUE.C_FAMILY') != 'virtex5')) or ((spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) != 1)))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>sleep</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.sleep" xilinx:dependency="(((spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexu' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'kintexu' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'artixu') or (spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexuplushbm' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexuplus' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'kintexuplus' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'zynquplus'))and spirit:decode(id('MODELPARAM_VALUE.C_EN_SLEEP_PIN')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>deepsleep</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.deepsleep" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexum' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'zynque') and spirit:decode(id('MODELPARAM_VALUE.C_EN_DEEPSLEEP_PIN')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>shutdown</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.shutdown" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'virtexum' or spirit:decode(id('MODELPARAM_VALUE.C_FAMILY')) = 'zynque' ) and spirit:decode(id('MODELPARAM_VALUE.C_EN_SHUTDOWN_PIN')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>rsta_busy</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.rsta_busy" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_EN_SAFETY_CKT')) = 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>rstb_busy</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.rstb_busy" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 0) and (spirit:decode(id('MODELPARAM_VALUE.C_MEM_TYPE')) != 3) and (spirit:decode(id('MODELPARAM_VALUE.C_EN_SAFETY_CKT')) != 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_aclk</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0x0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_aclk" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_aresetn</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_aresetn" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_AXI_ID_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awid" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_AXI_ID')) = 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awaddr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awaddr" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awlen</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">7</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awlen" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awsize</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">2</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awsize" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_SLAVE_TYPE')) = 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awburst</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awburst" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_SLAVE_TYPE')) = 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awvalid" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_awready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_awready" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wdata</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WRITE_WIDTH_A'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_wdata" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wstrb</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WEA_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_wstrb" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wlast</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_wlast" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE'))=1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_wvalid" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_wready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_wready" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_AXI_ID_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_bid" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_AXI_ID')) = 1 ))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bresp</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_bresp" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bvalid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_bvalid" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_bready</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_bready" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_AXI_ID_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arid" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_AXI_ID')) = 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_araddr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_araddr" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arlen</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">7</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arlen" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arsize</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">2</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arsize" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_SLAVE_TYPE')) = 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arburst</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arburst" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) =1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_SLAVE_TYPE')) = 0))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arvalid</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arvalid" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_arready</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_arready" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_AXI_ID_WIDTH'))-1">3</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rid" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_HAS_AXI_ID')) = 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rdata</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_WRITE_WIDTH_B'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rdata" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rresp</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">1</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rresp" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rlast</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rlast" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1) and (spirit:decode(id('MODELPARAM_VALUE.C_AXI_TYPE')) = 1))">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rvalid</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rvalid" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rready</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rready" xilinx:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_injectsbiterr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_injectsbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) = 1 or spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) = 3) and spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_injectdbiterr</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_injectdbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) = 2 or spirit:decode(id('MODELPARAM_VALUE.C_HAS_INJECTERR')) = 3) and spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_sbiterr</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_sbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) = 1 or spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) = 1) and spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_dbiterr</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_dbiterr" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) = 1 or spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) = 1) and spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>s_axi_rdaddrecc</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="spirit:decode(id('MODELPARAM_VALUE.C_ADDRB_WIDTH'))-1">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.s_axi_rdaddrecc" xilinx:dependency="((spirit:decode(id('MODELPARAM_VALUE.C_USE_ECC')) = 1 or spirit:decode(id('MODELPARAM_VALUE.C_USE_SOFTECC')) = 1) and spirit:decode(id('MODELPARAM_VALUE.C_INTERFACE_TYPE')) = 1)">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
</spirit:ports>
<spirit:modelParameters>
<spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="STRING">
<spirit:name>C_FAMILY</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_FAMILY">zynq</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_XDEVICEFAMILY</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_XDEVICEFAMILY">zynq</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_ELABORATION_DIR</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_ELABORATION_DIR">./</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_INTERFACE_TYPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_INTERFACE_TYPE">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_AXI_TYPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AXI_TYPE">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_AXI_SLAVE_TYPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AXI_SLAVE_TYPE">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_BRAM_BLOCK</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_BRAM_BLOCK">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_ENABLE_32BIT_ADDRESS</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_ENABLE_32BIT_ADDRESS">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_CTRL_ECC_ALGO</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_CTRL_ECC_ALGO">NONE</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_AXI_ID</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_AXI_ID">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_AXI_ID_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AXI_ID_WIDTH">4</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_MEM_TYPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_MEM_TYPE">2</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_BYTE_SIZE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_BYTE_SIZE">8</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_ALGORITHM</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_ALGORITHM">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_PRIM_TYPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_PRIM_TYPE">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_LOAD_INIT_FILE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_LOAD_INIT_FILE">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_INIT_FILE_NAME</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_INIT_FILE_NAME">no_coe_file_loaded</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_INIT_FILE</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_INIT_FILE">NONE</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_DEFAULT_DATA</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_DEFAULT_DATA">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_DEFAULT_DATA</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_DEFAULT_DATA">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_RSTA</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_RSTA">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_RST_PRIORITY_A</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_RST_PRIORITY_A">CE</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_RSTRAM_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_RSTRAM_A">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_INITA_VAL</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_INITA_VAL">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_ENA</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_ENA">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_REGCEA</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_REGCEA">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_BYTE_WEA</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_BYTE_WEA">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WEA_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WEA_WIDTH">4</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_WRITE_MODE_A</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_MODE_A">WRITE_FIRST</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WRITE_WIDTH_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_WIDTH_A">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_READ_WIDTH_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_READ_WIDTH_A">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WRITE_DEPTH_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_DEPTH_A">2048</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_READ_DEPTH_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_READ_DEPTH_A">2048</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_ADDRA_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_ADDRA_WIDTH">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_RSTB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_RSTB">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_RST_PRIORITY_B</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_RST_PRIORITY_B">CE</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_RSTRAM_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_RSTRAM_B">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_INITB_VAL</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_INITB_VAL">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_ENB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_ENB">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_REGCEB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_REGCEB">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_BYTE_WEB</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_BYTE_WEB">1</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WEB_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WEB_WIDTH">4</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_WRITE_MODE_B</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_MODE_B">WRITE_FIRST</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WRITE_WIDTH_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_WIDTH_B">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_READ_WIDTH_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_READ_WIDTH_B">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_WRITE_DEPTH_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_WRITE_DEPTH_B">2048</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_READ_DEPTH_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_READ_DEPTH_B">2048</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_ADDRB_WIDTH</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_ADDRB_WIDTH">32</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_MEM_OUTPUT_REGS_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_MEM_OUTPUT_REGS_A">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_MEM_OUTPUT_REGS_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_MEM_OUTPUT_REGS_B">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_MUX_OUTPUT_REGS_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_MUX_OUTPUT_REGS_A">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_MUX_OUTPUT_REGS_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_MUX_OUTPUT_REGS_B">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_MUX_PIPELINE_STAGES</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_MUX_PIPELINE_STAGES">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_SOFTECC_INPUT_REGS_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_SOFTECC_INPUT_REGS_A">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_SOFTECC_OUTPUT_REGS_B</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_SOFTECC_OUTPUT_REGS_B">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_SOFTECC</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_SOFTECC">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_ECC</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_ECC">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_ECC_PIPE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_ECC_PIPE">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_HAS_INJECTERR</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_HAS_INJECTERR">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_SIM_COLLISION_CHECK</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_SIM_COLLISION_CHECK">ALL</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_COMMON_CLK</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_COMMON_CLK">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_DISABLE_WARN_BHV_COLL</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_DISABLE_WARN_BHV_COLL">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_SLEEP_PIN</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_SLEEP_PIN">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_USE_URAM</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_USE_URAM">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_RDADDRA_CHG</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_RDADDRA_CHG">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_RDADDRB_CHG</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_RDADDRB_CHG">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_DEEPSLEEP_PIN</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_DEEPSLEEP_PIN">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_SHUTDOWN_PIN</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_SHUTDOWN_PIN">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_EN_SAFETY_CKT</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_SAFETY_CKT">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="INTEGER">
<spirit:name>C_DISABLE_WARN_BHV_RANGE</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_DISABLE_WARN_BHV_RANGE">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_COUNT_36K_BRAM</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_COUNT_36K_BRAM">2</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_COUNT_18K_BRAM</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_COUNT_18K_BRAM">0</spirit:value>
</spirit:modelParameter>
<spirit:modelParameter spirit:dataType="STRING">
<spirit:name>C_EST_POWER_SUMMARY</spirit:name>
<spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EST_POWER_SUMMARY">Estimated Power for IP : 10.7492 mW</spirit:value>
</spirit:modelParameter>
</spirit:modelParameters>
</spirit:model>
<spirit:choices>
<spirit:choice>
<spirit:name>choice_list_0132492a</spirit:name>
<spirit:enumeration>32</spirit:enumeration>
<spirit:enumeration>64</spirit:enumeration>
<spirit:enumeration>128</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_302d3091</spirit:name>
<spirit:enumeration>16kx1</spirit:enumeration>
<spirit:enumeration>8kx2</spirit:enumeration>
<spirit:enumeration>4kx4</spirit:enumeration>
<spirit:enumeration>2kx9</spirit:enumeration>
<spirit:enumeration>1kx18</spirit:enumeration>
<spirit:enumeration>512x36</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_6e3ded9c</spirit:name>
<spirit:enumeration>0</spirit:enumeration>
<spirit:enumeration>1</spirit:enumeration>
<spirit:enumeration>2</spirit:enumeration>
<spirit:enumeration>3</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_6fc15197</spirit:name>
<spirit:enumeration>32</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_89a27b2f</spirit:name>
<spirit:enumeration>8</spirit:enumeration>
<spirit:enumeration>9</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_bdf7387e</spirit:name>
<spirit:enumeration>BRAM</spirit:enumeration>
<spirit:enumeration>URAM</spirit:enumeration>
<spirit:enumeration>AUTO</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_c8df20f0</spirit:name>
<spirit:enumeration>NONE</spirit:enumeration>
<spirit:enumeration>ECCH32-7</spirit:enumeration>
<spirit:enumeration>ECCH64-8</spirit:enumeration>
<spirit:enumeration>ECCHSIAO32-7</spirit:enumeration>
<spirit:enumeration>ECCHSIAO64-8</spirit:enumeration>
<spirit:enumeration>ECCHSIAO128-9</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_list_f9a6a28b</spirit:name>
<spirit:enumeration>Native</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_1f270a52</spirit:name>
<spirit:enumeration spirit:text="BRAM Controller">BRAM_Controller</spirit:enumeration>
<spirit:enumeration spirit:text="Stand Alone">Stand_Alone</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_246d8066</spirit:name>
<spirit:enumeration spirit:text="Write First">WRITE_FIRST</spirit:enumeration>
<spirit:enumeration spirit:text="Read First">READ_FIRST</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_2adcaf32</spirit:name>
<spirit:enumeration spirit:text="Synchronous">SYNC</spirit:enumeration>
<spirit:enumeration spirit:text="Asynchronous">ASYNC</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_2d73cdeb</spirit:name>
<spirit:enumeration spirit:text="Always Enabled">Always_Enabled</spirit:enumeration>
<spirit:enumeration spirit:text="Use ENB Pin">Use_ENB_Pin</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_3949ecbf</spirit:name>
<spirit:enumeration spirit:text="Always Enabled">Always_Enabled</spirit:enumeration>
<spirit:enumeration spirit:text="Use ENA Pin">Use_ENA_Pin</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_3e9ce7ae</spirit:name>
<spirit:enumeration spirit:text="Minimum Area">Minimum_Area</spirit:enumeration>
<spirit:enumeration spirit:text="Low Power">Low_Power</spirit:enumeration>
<spirit:enumeration spirit:text="Fixed Primitives">Fixed_Primitives</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_44b9b2d1</spirit:name>
<spirit:enumeration spirit:text="All">ALL</spirit:enumeration>
<spirit:enumeration spirit:text="None">NONE</spirit:enumeration>
<spirit:enumeration spirit:text="Warning Only">WARNING_ONLY</spirit:enumeration>
<spirit:enumeration spirit:text="Generate X-Only">GENERATE_X_ONLY</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_63de7f78</spirit:name>
<spirit:enumeration spirit:text="CE (Latch or Register Enable)">CE</spirit:enumeration>
<spirit:enumeration spirit:text="SR (Set Reset)">SR</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_716d2fba</spirit:name>
<spirit:enumeration spirit:text="Single Bit Error Injection">Single_Bit_Error_Injection</spirit:enumeration>
<spirit:enumeration spirit:text="Double Bit Error Injection">Double_Bit_Error_Injection</spirit:enumeration>
<spirit:enumeration spirit:text="Single and Double Bit Error Injection">Single_and_Double_Bit_Error_Injection</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_a6697bba</spirit:name>
<spirit:enumeration spirit:text="Single Port RAM">Single_Port_RAM</spirit:enumeration>
<spirit:enumeration spirit:text="True Dual Port RAM">True_Dual_Port_RAM</spirit:enumeration>
<spirit:enumeration spirit:text="Single Port ROM">Single_Port_ROM</spirit:enumeration>
<spirit:enumeration spirit:text="Dual Port ROM">Dual_Port_ROM</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_b91edaa2</spirit:name>
<spirit:enumeration spirit:text="Memory Slave">Memory_Slave</spirit:enumeration>
<spirit:enumeration spirit:text="Peripheral Slave">Peripheral_Slave</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_c1013cbe</spirit:name>
<spirit:enumeration spirit:text="No ECC">No_ECC</spirit:enumeration>
<spirit:enumeration spirit:text="Soft ECC">Soft_ECC</spirit:enumeration>
<spirit:enumeration spirit:text="BuiltIn ECC">BuiltIn_ECC</spirit:enumeration>
</spirit:choice>
<spirit:choice>
<spirit:name>choice_pairs_e4c322cb</spirit:name>
<spirit:enumeration spirit:text="AXI4">AXI4_Full</spirit:enumeration>
<spirit:enumeration spirit:text="AXI4 Lite">AXI4_Lite</spirit:enumeration>
</spirit:choice>
</spirit:choices>
<spirit:fileSets>
<spirit:fileSet>
<spirit:name>xilinx_vhdlsynthesis_view_fileset</spirit:name>
<spirit:file>
<spirit:name>design_1_blk_mem_gen_0_0_ooc.xdc</spirit:name>
<spirit:userFileType>xdc</spirit:userFileType>
<spirit:userFileType>USED_IN_implementation</spirit:userFileType>
<spirit:userFileType>USED_IN_out_of_context</spirit:userFileType>
<spirit:userFileType>USED_IN_synthesis</spirit:userFileType>
</spirit:file>
<spirit:file>
<spirit:name>../../ipshared/e50b/hdl/blk_mem_gen_v8_4_vhsyn_rfs.vhd</spirit:name>
<spirit:fileType>vhdlSource</spirit:fileType>
<spirit:logicalName>blk_mem_gen_v8_4_0</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_vhdlsynthesiswrapper_view_fileset</spirit:name>
<spirit:file>
<spirit:name>synth/design_1_blk_mem_gen_0_0.vhd</spirit:name>
<spirit:fileType>vhdlSource</spirit:fileType>
<spirit:logicalName>xil_defaultlib</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:name>
<spirit:file>
<spirit:name>../../ipshared/e50b/simulation/blk_mem_gen_v8_4.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:userFileType>USED_IN_ipstatic</spirit:userFileType>
<spirit:logicalName>blk_mem_gen_v8_4_0</spirit:logicalName>
<spirit:exportedName>blk_mem_gen_v8_4_0</spirit:exportedName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_verilogsimulationwrapper_view_fileset</spirit:name>
<spirit:file>
<spirit:name>sim/design_1_blk_mem_gen_0_0.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:logicalName>xil_defaultlib</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
</spirit:fileSets>
<spirit:description>The Xilinx LogiCORE IP Block Memory Generator replaces the Dual Port Block Memory and Single Port Block Memory LogiCOREs, but is not a direct drop-in replacement. It should be used in all new Xilinx designs. The core supports RAM and ROM functions over a wide range of widths and depths. Use this core to generate block memories with symmetric or asymmetric read and write port widths, as well as cores which can perform simultaneous write operations to separate locations, and simultaneous read operations from the same location. For more information on differences in interface and feature support between this core and the Dual Port Block Memory and Single Port Block Memory LogiCOREs, please consult the data sheet.</spirit:description>
<spirit:parameters>
<spirit:parameter>
<spirit:name>Component_Name</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">design_1_blk_mem_gen_0_0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Component_Name">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Interface_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Interface_Type" spirit:choiceRef="choice_list_f9a6a28b" spirit:order="2">Native</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Interface_Type">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>AXI_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.AXI_Type" spirit:choiceRef="choice_pairs_e4c322cb" spirit:order="4">AXI4_Full</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.AXI_Type">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>AXI_Slave_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.AXI_Slave_Type" spirit:choiceRef="choice_pairs_b91edaa2" spirit:order="5">Memory_Slave</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.AXI_Slave_Type">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_AXI_ID</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_AXI_ID" spirit:order="6">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_AXI_ID">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>AXI_ID_Width</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.AXI_ID_Width" spirit:order="7" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">4</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.AXI_ID_Width">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Memory_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Memory_Type" spirit:choiceRef="choice_pairs_a6697bba" spirit:order="8">True_Dual_Port_RAM</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Memory_Type">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>PRIM_type_to_Implement</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.PRIM_type_to_Implement" spirit:choiceRef="choice_list_bdf7387e" spirit:order="8.001">BRAM</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.PRIM_type_to_Implement">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Enable_32bit_Address</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Enable_32bit_Address" spirit:order="9">true</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Enable_32bit_Address">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ecctype</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.ecctype" spirit:choiceRef="choice_pairs_c1013cbe" spirit:order="10">No_ECC</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.ecctype">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>ECC</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.ECC" spirit:order="11">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.ECC">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>softecc</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.softecc" spirit:order="12">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.softecc">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>EN_SLEEP_PIN</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.EN_SLEEP_PIN" spirit:order="13">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.EN_SLEEP_PIN">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>EN_DEEPSLEEP_PIN</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.EN_DEEPSLEEP_PIN" spirit:order="14">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.EN_DEEPSLEEP_PIN">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>EN_SHUTDOWN_PIN</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.EN_SHUTDOWN_PIN" spirit:order="15">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.EN_SHUTDOWN_PIN">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>EN_ECC_PIPE</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.EN_ECC_PIPE" spirit:order="16">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.EN_ECC_PIPE">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RD_ADDR_CHNG_A</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.RD_ADDR_CHNG_A" spirit:order="17">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.RD_ADDR_CHNG_A">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>RD_ADDR_CHNG_B</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.RD_ADDR_CHNG_B" spirit:order="18">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.RD_ADDR_CHNG_B">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_Error_Injection_Pins</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_Error_Injection_Pins" spirit:order="13">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_Error_Injection_Pins">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Error_Injection_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Error_Injection_Type" spirit:choiceRef="choice_pairs_716d2fba" spirit:order="14">Single_Bit_Error_Injection</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Error_Injection_Type">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_Byte_Write_Enable</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_Byte_Write_Enable" spirit:order="15">true</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_Byte_Write_Enable">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Byte_Size</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Byte_Size" spirit:choiceRef="choice_list_89a27b2f" spirit:order="16">8</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Byte_Size">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Algorithm</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Algorithm" spirit:choiceRef="choice_pairs_3e9ce7ae" spirit:order="20">Minimum_Area</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Algorithm">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Primitive</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Primitive" spirit:choiceRef="choice_list_302d3091" spirit:order="21">8kx2</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Primitive">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Assume_Synchronous_Clk</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Assume_Synchronous_Clk" spirit:order="17">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Assume_Synchronous_Clk">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Write_Width_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Write_Width_A" spirit:order="18" spirit:minimum="32" spirit:maximum="1024" spirit:rangeType="long">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Write_Width_A">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Write_Depth_A</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Write_Depth_A" spirit:order="19" spirit:minimum="2" spirit:maximum="1048576" spirit:rangeType="long">2048</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Write_Depth_A">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Read_Width_A</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Read_Width_A" spirit:choiceRef="choice_list_6fc15197" spirit:order="22">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Read_Width_A">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Operating_Mode_A</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Operating_Mode_A" spirit:choiceRef="choice_pairs_246d8066" spirit:order="23">WRITE_FIRST</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Operating_Mode_A">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Enable_A</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Enable_A" spirit:choiceRef="choice_pairs_3949ecbf" spirit:order="24">Use_ENA_Pin</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Enable_A">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Write_Width_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Write_Width_B" spirit:choiceRef="choice_list_0132492a" spirit:order="25">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Write_Width_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Read_Width_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Read_Width_B" spirit:choiceRef="choice_list_6fc15197" spirit:order="26">32</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Read_Width_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Operating_Mode_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Operating_Mode_B" spirit:choiceRef="choice_pairs_246d8066" spirit:order="27">WRITE_FIRST</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Operating_Mode_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Enable_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Enable_B" spirit:choiceRef="choice_pairs_2d73cdeb" spirit:order="28">Use_ENB_Pin</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Enable_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Register_PortA_Output_of_Memory_Primitives</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Register_PortA_Output_of_Memory_Primitives" spirit:order="29">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Register_PortA_Output_of_Memory_Primitives">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Register_PortA_Output_of_Memory_Core</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Register_PortA_Output_of_Memory_Core" spirit:order="30">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Register_PortA_Output_of_Memory_Core">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_REGCEA_Pin</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_REGCEA_Pin" spirit:order="31">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_REGCEA_Pin">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Register_PortB_Output_of_Memory_Primitives</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Register_PortB_Output_of_Memory_Primitives" spirit:order="32">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Register_PortB_Output_of_Memory_Primitives">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Register_PortB_Output_of_Memory_Core</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Register_PortB_Output_of_Memory_Core" spirit:order="33">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Register_PortB_Output_of_Memory_Core">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_REGCEB_Pin</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_REGCEB_Pin" spirit:order="34">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_REGCEB_Pin">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>register_porta_input_of_softecc</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.register_porta_input_of_softecc" spirit:order="35">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.register_porta_input_of_softecc">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>register_portb_output_of_softecc</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.register_portb_output_of_softecc" spirit:order="36">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.register_portb_output_of_softecc">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Pipeline_Stages</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Pipeline_Stages" spirit:choiceRef="choice_list_6e3ded9c" spirit:order="37">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Pipeline_Stages">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Load_Init_File</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Load_Init_File" spirit:order="38">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Load_Init_File">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Coe_File</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Coe_File" spirit:order="39">no_coe_file_loaded</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Coe_File">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Fill_Remaining_Memory_Locations</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Fill_Remaining_Memory_Locations" spirit:order="40">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Fill_Remaining_Memory_Locations">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Remaining_Memory_Locations</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Remaining_Memory_Locations" spirit:order="41">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Remaining_Memory_Locations">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_RSTA_Pin</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_RSTA_Pin" spirit:order="42">true</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_RSTA_Pin">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Reset_Memory_Latch_A</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Reset_Memory_Latch_A" spirit:order="43">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Reset_Memory_Latch_A">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Reset_Priority_A</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Reset_Priority_A" spirit:choiceRef="choice_pairs_63de7f78" spirit:order="44">CE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Reset_Priority_A">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Output_Reset_Value_A</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Output_Reset_Value_A" spirit:order="45">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Output_Reset_Value_A">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Use_RSTB_Pin</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Use_RSTB_Pin" spirit:order="46">true</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Use_RSTB_Pin">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Reset_Memory_Latch_B</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Reset_Memory_Latch_B" spirit:order="47">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Reset_Memory_Latch_B">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Reset_Priority_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Reset_Priority_B" spirit:choiceRef="choice_pairs_63de7f78" spirit:order="48">CE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Reset_Priority_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Output_Reset_Value_B</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Output_Reset_Value_B" spirit:order="49">0</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Output_Reset_Value_B">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Reset_Type</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Reset_Type" spirit:choiceRef="choice_pairs_2adcaf32" spirit:order="50">SYNC</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Reset_Type">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Additional_Inputs_for_Power_Estimation</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Additional_Inputs_for_Power_Estimation" spirit:order="51">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Additional_Inputs_for_Power_Estimation">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_A_Clock</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_A_Clock" spirit:order="52" spirit:minimum="0" spirit:maximum="800" spirit:rangeType="long">100</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_A_Clock">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_A_Write_Rate</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_A_Write_Rate" spirit:order="53" spirit:minimum="0" spirit:maximum="100" spirit:rangeType="long">50</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_A_Write_Rate">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_B_Clock</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_B_Clock" spirit:order="54" spirit:minimum="0" spirit:maximum="800" spirit:rangeType="long">100</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_B_Clock">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_B_Write_Rate</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_B_Write_Rate" spirit:order="55" spirit:minimum="0" spirit:maximum="100" spirit:rangeType="long">50</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_B_Write_Rate">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_A_Enable_Rate</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_A_Enable_Rate" spirit:order="56" spirit:minimum="0" spirit:maximum="100" spirit:rangeType="long">100</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_A_Enable_Rate">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Port_B_Enable_Rate</spirit:name>
<spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.Port_B_Enable_Rate" spirit:order="57" spirit:minimum="0" spirit:maximum="100" spirit:rangeType="long">100</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Port_B_Enable_Rate">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Collision_Warnings</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Collision_Warnings" spirit:choiceRef="choice_pairs_44b9b2d1" spirit:order="58">ALL</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Collision_Warnings">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Disable_Collision_Warnings</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Disable_Collision_Warnings" spirit:order="59">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Disable_Collision_Warnings">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>Disable_Out_of_Range_Warnings</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.Disable_Out_of_Range_Warnings" spirit:order="60">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.Disable_Out_of_Range_Warnings">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>use_bram_block</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.use_bram_block" spirit:choiceRef="choice_pairs_1f270a52" spirit:order="3">BRAM_Controller</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.use_bram_block">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>MEM_FILE</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.MEM_FILE" spirit:order="61">NONE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.MEM_FILE">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>CTRL_ECC_ALGO</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.CTRL_ECC_ALGO" spirit:choiceRef="choice_list_c8df20f0" spirit:order="62">NONE</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.CTRL_ECC_ALGO">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
<spirit:parameter>
<spirit:name>EN_SAFETY_CKT</spirit:name>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.EN_SAFETY_CKT" spirit:order="63">false</spirit:value>
<spirit:vendorExtensions>
<xilinx:parameterInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PARAM_ENABLEMENT.EN_SAFETY_CKT">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:parameterInfo>
</spirit:vendorExtensions>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:coreExtensions>
<xilinx:displayName>Block Memory Generator</xilinx:displayName>
<xilinx:xpmLibraries>
<xilinx:xpmLibrary>XPM_MEMORY</xilinx:xpmLibrary>
</xilinx:xpmLibraries>
<xilinx:coreRevision>0</xilinx:coreRevision>
<xilinx:configElementInfos>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTA.MASTER_TYPE" xilinx:valueSource="user" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_ECC" xilinx:valueSource="user_prop" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_SIZE" xilinx:valueSource="ip_propagated" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTA.MEM_WIDTH" xilinx:valueSource="ip_propagated" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTA.READ_WRITE_MODE" xilinx:valueSource="propagated" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTB.MASTER_TYPE" xilinx:valueSource="user" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_ECC" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_SIZE" xilinx:valueSource="constant_prop" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTB.MEM_WIDTH" xilinx:valueSource="constant_prop" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.BRAM_PORTB.READ_WRITE_MODE" xilinx:valueSource="propagated" xilinx:valuePermission="bd"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CTRL_ECC_ALGO" xilinx:valueSource="propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.EN_SAFETY_CKT" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Enable_B" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MEM_FILE" xilinx:valueSource="ip_propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Memory_Type" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Port_B_Clock" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Port_B_Enable_Rate" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Port_B_Write_Rate" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Read_Width_A" xilinx:valueSource="propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Read_Width_B" xilinx:valueSource="propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Use_RSTB_Pin" xilinx:valueSource="user"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Write_Depth_A" xilinx:valueSource="propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Write_Width_A" xilinx:valueSource="propagated"/>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.Write_Width_B" xilinx:valueSource="propagated"/>
</xilinx:configElementInfos>
</xilinx:coreExtensions>
<xilinx:packagingInfo>
<xilinx:xilinxVersion>2017.3</xilinx:xilinxVersion>
<xilinx:checksum xilinx:scope="busInterfaces" xilinx:value="52ed1045"/>
<xilinx:checksum xilinx:scope="memoryMaps" xilinx:value="a1d35893"/>
<xilinx:checksum xilinx:scope="fileGroups" xilinx:value="ea267366"/>
<xilinx:checksum xilinx:scope="ports" xilinx:value="3dea8d14"/>
<xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="9d445d56"/>
<xilinx:checksum xilinx:scope="parameters" xilinx:value="e35db4a0"/>
</xilinx:packagingInfo>
</spirit:vendorExtensions>
</spirit:component>
| {
"content_hash": "15d46b15d301a2ab7ea094eb5d64f1fe",
"timestamp": "",
"source": "github",
"line_count": 4247,
"max_line_length": 802,
"avg_line_length": 51.1276194961149,
"alnum_prop": 0.6466134595811899,
"repo_name": "MarkBlanco/FPGA_Sandbox",
"id": "b4cb01bdc5295e362a39ecb79a2ca6466f8c31e5",
"size": "217139",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "RecComp/Lab3/lab3_project.xpr/project_1/project_1.srcs/sources_1/bd/design_1/ip/design_1_blk_mem_gen_0_0/design_1_blk_mem_gen_0_0.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ada",
"bytes": "1853536"
},
{
"name": "Assembly",
"bytes": "493540"
},
{
"name": "Batchfile",
"bytes": "6053"
},
{
"name": "C",
"bytes": "40574492"
},
{
"name": "C++",
"bytes": "17922230"
},
{
"name": "CartoCSS",
"bytes": "49152"
},
{
"name": "Coq",
"bytes": "168379"
},
{
"name": "Forth",
"bytes": "19057"
},
{
"name": "LLVM",
"bytes": "387609"
},
{
"name": "Makefile",
"bytes": "831993"
},
{
"name": "Objective-C",
"bytes": "3324"
},
{
"name": "Pascal",
"bytes": "8794"
},
{
"name": "Ruby",
"bytes": "661"
},
{
"name": "Shell",
"bytes": "238949"
},
{
"name": "Stata",
"bytes": "496440"
},
{
"name": "SystemVerilog",
"bytes": "10322055"
},
{
"name": "Tcl",
"bytes": "3836476"
},
{
"name": "VHDL",
"bytes": "388664833"
},
{
"name": "Verilog",
"bytes": "69945353"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_04) on Thu Jan 10 14:33:56 CET 2013 -->
<TITLE>
NormalRelativeUrlResolver
</TITLE>
<META NAME="date" CONTENT="2013-01-10">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="NormalRelativeUrlResolver";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/ivy/core/LogOptions.html" title="class in org.apache.ivy.core"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/ivy/core/NormalRelativeUrlResolver.html" target="_top"><B>FRAMES</B></A>
<A HREF="NormalRelativeUrlResolver.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.ivy.core</FONT>
<BR>
Class NormalRelativeUrlResolver</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core">org.apache.ivy.core.RelativeUrlResolver</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.ivy.core.NormalRelativeUrlResolver</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>NormalRelativeUrlResolver</B><DT>extends <A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core">RelativeUrlResolver</A></DL>
</PRE>
<P>
Normal implementation of RelativeUrlResolver.
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/ivy/core/NormalRelativeUrlResolver.html#NormalRelativeUrlResolver()">NormalRelativeUrlResolver</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.net.URL</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/ivy/core/NormalRelativeUrlResolver.html#getURL(java.net.URL, java.lang.String)">getURL</A></B>(java.net.URL context,
java.lang.String url)</CODE>
<BR>
Resolve the url in the context of context.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.ivy.core.RelativeUrlResolver"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.ivy.core.<A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core">RelativeUrlResolver</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html#getURL(java.net.URL, java.lang.String, java.lang.String)">getURL</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="NormalRelativeUrlResolver()"><!-- --></A><H3>
NormalRelativeUrlResolver</H3>
<PRE>
public <B>NormalRelativeUrlResolver</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getURL(java.net.URL, java.lang.String)"><!-- --></A><H3>
getURL</H3>
<PRE>
public java.net.URL <B>getURL</B>(java.net.URL context,
java.lang.String url)
throws java.net.MalformedURLException</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html#getURL(java.net.URL, java.lang.String)">RelativeUrlResolver</A></CODE></B></DD>
<DD>Resolve the url in the context of context.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html#getURL(java.net.URL, java.lang.String)">getURL</A></CODE> in class <CODE><A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core">RelativeUrlResolver</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - The URL of the ressource containing the reference url<DD><CODE>url</CODE> - a relative or absolution url string
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/ivy/core/LogOptions.html" title="class in org.apache.ivy.core"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/ivy/core/RelativeUrlResolver.html" title="class in org.apache.ivy.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/ivy/core/NormalRelativeUrlResolver.html" target="_top"><B>FRAMES</B></A>
<A HREF="NormalRelativeUrlResolver.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| {
"content_hash": "802a3432d8938da50640c41b465b3927",
"timestamp": "",
"source": "github",
"line_count": 275,
"max_line_length": 312,
"avg_line_length": 42.585454545454546,
"alnum_prop": 0.6364102126206131,
"repo_name": "adriancmiranda/flash-compiler",
"id": "d6b4c1c7a1b51a1953d62009bac29878bad7450c",
"size": "11711",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ApacheFlexSDK4/ant/ivy/doc/reports/api/org/apache/ivy/core/NormalRelativeUrlResolver.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ActionScript",
"bytes": "33714531"
},
{
"name": "Batchfile",
"bytes": "65217"
},
{
"name": "C",
"bytes": "52818"
},
{
"name": "CSS",
"bytes": "576224"
},
{
"name": "HTML",
"bytes": "51021362"
},
{
"name": "Java",
"bytes": "190833"
},
{
"name": "JavaScript",
"bytes": "599657"
},
{
"name": "Objective-C",
"bytes": "79911"
},
{
"name": "Perl",
"bytes": "9844"
},
{
"name": "Python",
"bytes": "3299"
},
{
"name": "R",
"bytes": "1782"
},
{
"name": "Shell",
"bytes": "149532"
},
{
"name": "Visual Basic",
"bytes": "3122"
},
{
"name": "XSLT",
"bytes": "977241"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Sun Mar 17 11:03:40 MST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.undertow.configuration.ReverseProxySupplier (BOM: * : All 2.4.0.Final API)</title>
<meta name="date" content="2019-03-17">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.wildfly.swarm.config.undertow.configuration.ReverseProxySupplier (BOM: * : All 2.4.0.Final API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.4.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/wildfly/swarm/config/undertow/configuration/class-use/ReverseProxySupplier.html" target="_top">Frames</a></li>
<li><a href="ReverseProxySupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface org.wildfly.swarm.config.undertow.configuration.ReverseProxySupplier" class="title">Uses of Interface<br>org.wildfly.swarm.config.undertow.configuration.ReverseProxySupplier</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">ReverseProxySupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.undertow">org.wildfly.swarm.config.undertow</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.undertow">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">ReverseProxySupplier</a> in <a href="../../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">ReverseProxySupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/undertow/HandlerConfiguration.html" title="type parameter in HandlerConfiguration">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">HandlerConfiguration.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/undertow/HandlerConfiguration.html#reverseProxy-org.wildfly.swarm.config.undertow.configuration.ReverseProxySupplier-">reverseProxy</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">ReverseProxySupplier</a> supplier)</code>
<div class="block">Install a supplied ReverseProxy object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../org/wildfly/swarm/config/undertow/configuration/ReverseProxySupplier.html" title="interface in org.wildfly.swarm.config.undertow.configuration">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.4.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/wildfly/swarm/config/undertow/configuration/class-use/ReverseProxySupplier.html" target="_top">Frames</a></li>
<li><a href="ReverseProxySupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "584c856eb02c950b377d1f2e80343b45",
"timestamp": "",
"source": "github",
"line_count": 170,
"max_line_length": 529,
"avg_line_length": 46.93529411764706,
"alnum_prop": 0.6525880436144881,
"repo_name": "wildfly-swarm/wildfly-swarm-javadocs",
"id": "8a13f15cc6cdb39245d468baa647b5dd6aa89ead",
"size": "7979",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "2.4.0.Final/apidocs/org/wildfly/swarm/config/undertow/configuration/class-use/ReverseProxySupplier.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package nao_pose
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.5.1 (2014-11-13)
------------------
* bugfix: fixing python imports for nao_robot
* bugfix: python imports
* Contributors: Karsten Knese
0.5.0 (2014-11-06)
------------------
* moved pose manager into nao_robot
* transfer nao_robot
* 0.4.1
* update changelogs
* get the accent right in Séverin's name
* 0.4.0
* update changelogs
* 0.3.0
* update changelogs
* Fix xapparser __init__.py encoding, UTF used in header
* Moved the predefined pose support from pose_manager to nao_controller. Action name changed as well
* Support for predefined postures via actionlib
* "0.2.3"
* Changelogs
* {ahornung->ros-nao}
* {ahornung->ros-nao}
* "0.2.2"
* changelog
* Replace accented character in package.xml files, seems to cause
problems with bloom
* "0.2.1"
* Changelogs
* "0.2.0"
* Adjust version number mismatch
* Adding (edited) catkin-generated changelogs
* Adding bugtracker and repo URLs to package manifests
* Fix xapparser.py encoding, UTF used in header:
http://www.python.org/peps/pep-0263.html
* Small cleanup after many merges
* Merge pull request `#5 <https://github.com/ros-naoqi/nao_robot/issues/5>`_ from severin-lemaignan/minor-tweaks
Minor tweaks in nao_pose
* [nao_pose] Added support for Choregraphe's XAP posture library
This allows a user to create Nao posture from Choregraphe, export them to XAP files
and load them in the pose library for later invokation with body_pose action.
* [nao_pose] Add a parser for Choregraphe XAP posture libraries
* [nao_pose] Remove useless build dependencies
* [nao_pose] Do not include nao_driver.launch in pose manager launch file
* [nao_pose] remove references to roslib
* Import pose_manager from nao_remote into nao_robot/nao_pose
* Contributors: Armin Hornung, Karsten Knese, Manos Tsardoulias, Miguel Sarabia, Séverin Lemaignan, Vincent Rabaud
| {
"content_hash": "887819b02671621af202d62ee636cb37",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 114,
"avg_line_length": 36.61538461538461,
"alnum_prop": 0.7195378151260504,
"repo_name": "kochigami/nao_robot",
"id": "c668b64418893c7bc02eeaa272b90b5b7f31e566",
"size": "1906",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "nao_pose/CHANGELOG.rst",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "5973"
},
{
"name": "Python",
"bytes": "130433"
}
],
"symlink_target": ""
} |
class IRepository
{
public:
virtual bool download(std::string url, std::string destiny_path) = 0;
virtual std::string search(std::string name) = 0;
};
#endif | {
"content_hash": "f1ee43d405a8e55959b418c80603bb15",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 75,
"avg_line_length": 21.625,
"alnum_prop": 0.6647398843930635,
"repo_name": "igordeoliveirasa/mp3-finder",
"id": "aee1028949cc75909325fe5157fe548d3cfd113d",
"size": "239",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "mp3_finder/irepository.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "450332"
},
{
"name": "C++",
"bytes": "99274006"
},
{
"name": "Perl",
"bytes": "6080"
},
{
"name": "Python",
"bytes": "190686"
},
{
"name": "Shell",
"bytes": "338607"
}
],
"symlink_target": ""
} |
package org.mapfish.print.map.geotools.grid;
import java.awt.Font;
/**
* Enumeration of all the allowed font styles.
*/
public enum FontStyle {
/**
* The plain style.
*/
PLAIN(Font.PLAIN),
/**
* The bold style.
*/
BOLD(Font.BOLD),
/**
* The italic style.
*/
ITALIC(Font.ITALIC);
// CSOFF: VisibilityModifier
final int styleId;
// CSON: VisibilityModifier
private FontStyle(final int styleId) {
this.styleId = styleId;
}
}
| {
"content_hash": "3a482f8f362bca0dc92b5d5fd7d7617c",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 46,
"avg_line_length": 17.586206896551722,
"alnum_prop": 0.5862745098039216,
"repo_name": "Galigeo/mapfish-print",
"id": "63290f8f5493a5abc31fa9a4dccbfa43cc532545",
"size": "510",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/src/main/java/org/mapfish/print/map/geotools/grid/FontStyle.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Batchfile",
"bytes": "2616"
},
{
"name": "HTML",
"bytes": "8775"
},
{
"name": "Java",
"bytes": "2237862"
},
{
"name": "Scheme",
"bytes": "40153"
},
{
"name": "Shell",
"bytes": "6144"
},
{
"name": "XSLT",
"bytes": "1876"
}
],
"symlink_target": ""
} |
/**
*/
package br.ufpe.cin.tupi;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Events Decl</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link br.ufpe.cin.tupi.EventsDecl#getEvents <em>Events</em>}</li>
* </ul>
*
* @see br.ufpe.cin.tupi.TupiPackage#getEventsDecl()
* @model
* @generated
*/
public interface EventsDecl extends EObject
{
/**
* Returns the value of the '<em><b>Events</b></em>' containment reference list.
* The list contents are of type {@link br.ufpe.cin.tupi.Event}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Events</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Events</em>' containment reference list.
* @see br.ufpe.cin.tupi.TupiPackage#getEventsDecl_Events()
* @model containment="true"
* @generated
*/
EList<Event> getEvents();
} // EventsDecl
| {
"content_hash": "51ea0524e04049f84443835bad775924",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 84,
"avg_line_length": 26.41860465116279,
"alnum_prop": 0.6329225352112676,
"repo_name": "fmca/Tupi",
"id": "283cd74bde282aaeff1d6af5bcf9337ddc47c512",
"size": "1136",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "projects/br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/tupi/EventsDecl.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "GAP",
"bytes": "633632"
},
{
"name": "Java",
"bytes": "5623361"
},
{
"name": "Xtend",
"bytes": "25082"
}
],
"symlink_target": ""
} |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>is_class</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../reference.html" title="Alphabetical Reference">
<link rel="prev" href="is_bounded_array.html" title="is_bounded_array">
<link rel="next" href="is_complete.html" title="is_complete">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_bounded_array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_complete.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.reference.is_class"></a><a class="link" href="is_class.html" title="is_class">is_class</a>
</h3></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">is_class</span> <span class="special">:</span> <span class="keyword">public</span> <em class="replaceable"><code><a class="link" href="integral_constant.html" title="integral_constant">true_type</a>-or-<a class="link" href="integral_constant.html" title="integral_constant">false_type</a></code></em> <span class="special">{};</span>
</pre>
<p>
<span class="bold"><strong>Inherits:</strong></span> If T is a (possibly cv-qualified)
class type (and not a union type) then inherits from <a class="link" href="integral_constant.html" title="integral_constant">true_type</a>,
otherwise inherits from <a class="link" href="integral_constant.html" title="integral_constant">false_type</a>.
</p>
<p>
<span class="bold"><strong>C++ Standard Reference:</strong></span> 3.9.2 and 9.2.
</p>
<p>
<span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <span class="preprocessor">#include</span>
<span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_class</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<p>
<span class="bold"><strong>Compiler Compatibility:</strong></span> This trait works
correctly for almost all current compilers (as of June 2015), with just a
minority of older compilers not correctly detecting all the corner cases.
You can check the macro <code class="computeroutput"><span class="identifier">BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION</span></code>
which is defined to 1 when the class works correctly in all cases.
</p>
<p>
<span class="bold"><strong>Examples:</strong></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
Given: <code class="computeroutput"><span class="keyword">class</span> <span class="identifier">MyClass</span><span class="special">;</span></code> then:
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span></code>
inherits from <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span></code>
is the type <code class="computeroutput"><a class="link" href="integral_constant.html" title="integral_constant">true_type</a></code>.
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">value</span></code> is an integral constant expression
that evaluates to <span class="emphasis"><em>true</em></span>.
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">&>::</span><span class="identifier">value</span></code> is an integral constant expression
that evaluates to <span class="emphasis"><em>false</em></span>.
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">*>::</span><span class="identifier">value</span></code> is an integral constant expression
that evaluates to <span class="emphasis"><em>false</em></span>.
</p></blockquote></div>
<div class="blockquote"><blockquote class="blockquote"><p>
<code class="computeroutput"><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value_type</span></code> is the type <code class="computeroutput"><span class="keyword">bool</span></code>.
</p></blockquote></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_bounded_array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_complete.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
| {
"content_hash": "e420c0839eed5076c2d074c2886684b9",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 438,
"avg_line_length": 85.96969696969697,
"alnum_prop": 0.6589119962401598,
"repo_name": "davehorton/drachtio-server",
"id": "abeed47de19352d31d35c115bfda03af5f59971f",
"size": "8514",
"binary": false,
"copies": "4",
"ref": "refs/heads/main",
"path": "deps/boost_1_77_0/libs/type_traits/doc/html/boost_typetraits/reference/is_class.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "662596"
},
{
"name": "Dockerfile",
"bytes": "1330"
},
{
"name": "JavaScript",
"bytes": "60639"
},
{
"name": "M4",
"bytes": "35273"
},
{
"name": "Makefile",
"bytes": "5960"
},
{
"name": "Shell",
"bytes": "47298"
}
],
"symlink_target": ""
} |
package Homework;
import java.util.ArrayList;
public class IndexOfLetters {
public void indexOfLetters(String word){
ArrayList<Character> alphabet = new ArrayList<>();
StringBuilder result = new StringBuilder();
for (int i = 97; i < 123; i++){
alphabet.add(((char) i));
}
for(int i = 0; i < word.length(); i++){
if(alphabet.contains(word.charAt(i))){
char stringResult = word.charAt(i);
int index = alphabet.indexOf(word.charAt(i));
result.append(stringResult + " -> " + index);
result.append(System.getProperty("line.separator"));
}
}
System.out.print(result.toString());
}
}
| {
"content_hash": "543e21069ca06b8450ebad51c98d48a2",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 68,
"avg_line_length": 28.73076923076923,
"alnum_prop": 0.5475234270414994,
"repo_name": "sevdalin/Software-University-SoftUni",
"id": "59886ced998dba81e0885c53f89e5fe02fd6d4ca",
"size": "747",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Software-Technologies/Java Exercises/Homework Part 2/src/Homework/IndexOfLetters.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "388"
},
{
"name": "C#",
"bytes": "3998101"
},
{
"name": "CSS",
"bytes": "161101"
},
{
"name": "HTML",
"bytes": "261529"
},
{
"name": "Java",
"bytes": "20909"
},
{
"name": "JavaScript",
"bytes": "609440"
},
{
"name": "PHP",
"bytes": "16185"
},
{
"name": "PLSQL",
"bytes": "723"
},
{
"name": "PLpgSQL",
"bytes": "4714"
},
{
"name": "PowerShell",
"bytes": "471"
},
{
"name": "Ruby",
"bytes": "1030"
},
{
"name": "SQLPL",
"bytes": "3383"
},
{
"name": "Smalltalk",
"bytes": "2065"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="ro">
<head>
<!-- Generated by javadoc (version 1.7.0_07) on Tue May 27 14:37:26 EEST 2014 -->
<title>Uses of Package net.sf.jasperreports.charts.xml (JasperReports 5.6.0 API)</title>
<meta name="date" content="2014-05-27">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package net.sf.jasperreports.charts.xml (JasperReports 5.6.0 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/sf/jasperreports/charts/xml/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Uses of Package net.sf.jasperreports.charts.xml" class="title">Uses of Package<br>net.sf.jasperreports.charts.xml</h1>
</div>
<div class="contentContainer">No usage of net.sf.jasperreports.charts.xml</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?net/sf/jasperreports/charts/xml/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<span style="font-decoration:none;font-family:Arial,Helvetica,sans-serif;font-size:8pt;font-style:normal;color:#000000;">© 2001-2010 Jaspersoft Corporation <a href="http://www.jaspersoft.com" target="_blank" style="color:#000000;">www.jaspersoft.com</a></span>
</small></p>
</body>
</html>
| {
"content_hash": "2135da13f3089e6117aa3dc87f1d2e01",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 265,
"avg_line_length": 35.208333333333336,
"alnum_prop": 0.6175147928994082,
"repo_name": "phurtado1112/cnaemvc",
"id": "54121e2aa0e09d5bcb60c7e6d3283972926a1283",
"size": "4225",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/JasperReport__5.6/docs/api/net/sf/jasperreports/charts/xml/package-use.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "11139"
},
{
"name": "HTML",
"bytes": "112926414"
},
{
"name": "Java",
"bytes": "532942"
}
],
"symlink_target": ""
} |
require 'pry'
if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start do
add_filter 'test/'
end
end
if ENV["PROFILE"]
require 'ruby-prof'
require 'ruby-prof-flamegraph'
end
ENV["STATSD_USE_NEW_CLIENT"] ||= "1" # support forwards compatibility with v3.0
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
require 'krane'
require 'kubeclient'
require 'timecop'
require 'minitest/autorun'
require 'minitest/stub/const'
require 'webmock/minitest'
require 'mocha/minitest'
require 'minitest/parallel'
require "minitest/reporters"
include(StatsD::Instrument::Assertions)
Dir.glob(File.expand_path("../helpers/*.rb", __FILE__)).each { |file| require file }
Mocha.configure do |c|
c.stubbing_method_unnecessarily = :prevent
c.stubbing_non_existent_method = :prevent
c.stubbing_non_public_method = :prevent
end
if ENV["PARALLELIZE_ME"]
Minitest::Reporters.use!([
Minitest::Reporters::ParallelizableReporter.new(
fast_fail: ENV['VERBOSE'] == '1',
slow_count: 10,
detailed_skip: false,
verbose: ENV['VERBOSE'] == '1'
),
])
else
Minitest::Reporters.use!([
Minitest::Reporters::DefaultReporter.new(
slow_count: 10,
detailed_skip: false,
verbose: ENV['VERBOSE'] == '1'
),
])
end
module Krane
class TestCase < ::Minitest::Test
attr_reader :logger
def run
ban_net_connect? ? WebMock.disable_net_connect! : WebMock.allow_net_connect!
yield if block_given?
super
end
def setup
Kubectl.any_instance.expects(:run).never if ban_net_connect? # can't use mocha in Minitest::Test#run
configure_logger
@mock_output_stream = StringIO.new
end
def configure_logger
@logger_stream = StringIO.new
if log_to_real_fds?
ColorizedString.disable_colorization = false
# Allows you to view the integration test output as a series of tophat scenarios
test_header = <<~MESSAGE
\033[0;35m***************************************************************************
Begin test: #{name}
***************************************************************************\033[0m
MESSAGE
test_header.each_line { |l| $stderr.puts l }
device = $stderr
else
ColorizedString.disable_colorization = true
device = @logger_stream
end
@logger = Krane::FormattedLogger.build(@namespace, KubeclientHelper::TEST_CONTEXT, device)
end
def ban_net_connect?
true
end
def reset_logger
return if log_to_real_fds?
# Flush StringIO buffer if not closed
unless @logger_stream.closed?
@logger_stream.truncate(0)
@logger_stream.rewind
end
end
def assert_deploy_failure(result, cause = nil)
assert_equal(false, result, "Deploy succeeded when it was expected to fail.#{logs_message_if_captured}")
logging_assertion do |logs|
cause_string = cause == :timed_out ? "TIMED OUT" : "FAILURE"
assert_match(Regexp.new("Result: #{cause_string}"), logs,
"'Result: #{cause_string}' not found in the following logs:\n#{logs}")
end
end
alias_method :assert_restart_failure, :assert_deploy_failure
alias_method :assert_task_run_failure, :assert_deploy_failure
def assert_deploy_success(result)
assert_equal(true, result, "Deploy failed when it was expected to succeed.#{logs_message_if_captured}")
logging_assertion do |logs|
assert_match(Regexp.new("Result: SUCCESS"), logs, "'Result: SUCCESS' not found in the following logs:\n#{logs}")
end
end
alias_method :assert_restart_success, :assert_deploy_success
alias_method :assert_task_run_success, :assert_deploy_success
def assert_logs_match(regexp, times = nil)
logging_assertion do |logs|
unless times
assert_match(regexp, logs, "'#{regexp}' not found in the following logs:\n#{logs}")
return
end
count = logs.scan(regexp).count
fail_msg = "Expected #{regexp} to appear #{times} time(s) in the log, but it appeared #{count} times"
assert_equal(times, count, fail_msg)
end
end
def assert_logs_match_all(entry_list, in_order: false)
logging_assertion do |logs|
scanner = StringScanner.new(logs)
entry_list.each do |entry|
regex = entry.is_a?(Regexp) ? entry : Regexp.new(Regexp.escape(entry))
if in_order
failure_msg = "'#{entry}' not found in the expected sequence in the following logs:\n#{logs}"
assert(scanner.scan_until(regex), failure_msg)
else
assert(regex =~ logs, "'#{entry}' not found in the following logs:\n#{logs}")
end
end
end
end
def refute_logs_match(regexp)
logging_assertion do |logs|
regexp = regexp.is_a?(Regexp) ? regexp : Regexp.new(Regexp.escape(regexp))
refute(regexp =~ logs, "Expected '#{regexp}' not to appear in the following logs:\n#{logs}")
end
end
def assert_raises(*exp, message: nil)
case exp.last
when String, Regexp
raise ArgumentError, "Please use the kwarg message instead of the positional one.\n"\
"To assert the message exception, use `assert_raises_message` or the return value of `assert_raises`"
else
exp += Array(message)
super(*exp) { yield }
end
end
def assert_raises_message(exception_class, exception_message)
exception = assert_raises(exception_class) { yield }
assert_match(exception_message, exception.message)
exception
end
def fixture_path(set_name)
source_dir = File.expand_path("../fixtures/#{set_name}", __FILE__)
raise ArgumentError,
"Fixture set #{set_name} does not exist as directory #{source_dir}" unless File.directory?(source_dir)
source_dir
end
def stub_kubectl_response(*args, kwargs: {}, resp:, err: "", success: true, json: true, times: 1)
if json
kwargs[:output] = "json"
resp = resp.to_json
end
response = [resp, err, stub(success?: success)]
Krane::Kubectl.any_instance.expects(:run).with(*args, kwargs.presence).returns(response).times(times)
end
def build_runless_kubectl
obj = Krane::Kubectl.new(task_config: task_config(namespace: 'test'),
log_failure_by_default: false)
def obj.run(*, **)
["", "", SystemExit.new(0)]
end
def obj.server_dry_run_enabled?
true
end
obj
end
def logs_message_if_captured
unless log_to_real_fds?
" Logs:\n#{@logger_stream.string}"
end
end
def mock_output_stream
if log_to_real_fds?
$stdout
else
@mock_output_stream
end
end
def task_config(context: KubeclientHelper::TEST_CONTEXT, namespace: @namespace, logger: @logger)
Krane::TaskConfig.new(context, namespace, logger)
end
def krane_black_box(command, args = "", stdin: nil)
path = File.expand_path("../../exe/krane", __FILE__)
Open3.capture3("#{path} #{command} #{args}", stdin_data: stdin)
end
private
def log_to_real_fds?
ENV["PRINT_LOGS"] == "1"
end
def logging_assertion
if log_to_real_fds?
$stderr.puts("\033[0;33mWARNING: Skipping logging assertions while logs are redirected to stderr\033[0m")
else
yield @logger_stream.string
end
end
def stdout_assertion
if log_to_real_fds?
$stderr.puts("\033[0;33mWARNING: Skipping stream assertions while logs are redirected to stderr\033[0m")
else
yield @mock_output_stream.string
end
end
end
end
| {
"content_hash": "9ad2c518db8b4506e0eb794536c0c0d3",
"timestamp": "",
"source": "github",
"line_count": 253,
"max_line_length": 120,
"avg_line_length": 30.533596837944664,
"alnum_prop": 0.6194174757281553,
"repo_name": "Shopify/kubernetes-deploy",
"id": "159409e9345e9ed99dd54e4b3fc5af3f61b66995",
"size": "7755",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/test_helper.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "599814"
},
{
"name": "Shell",
"bytes": "3126"
}
],
"symlink_target": ""
} |
<footer id="footer">
<p class="small">© Copyright {{ site.time | date: '%Y' }} {{ site.author }}</p>
</footer>
<a href="#scrollTop" class="topHead">Back to Top</a>
| {
"content_hash": "2ac4b8ac87a5b0310351c7db182c4673",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 83,
"avg_line_length": 42,
"alnum_prop": 0.5952380952380952,
"repo_name": "markyun/markyun.github.io",
"id": "6b0a74d88b2a849adbf22e54dcdd581f590c4aae",
"size": "169",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "_includes/footer.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "16460"
},
{
"name": "HTML",
"bytes": "6653"
},
{
"name": "JavaScript",
"bytes": "2752"
}
],
"symlink_target": ""
} |
#include <isl_ctx_private.h>
#include <isl_map_private.h>
#include <isl/map.h>
#include <isl_seq.h>
#include <isl_space_private.h>
#include <isl_lp_private.h>
#include <isl/union_map.h>
#include <isl_mat_private.h>
#include <isl_vec_private.h>
#include <isl_options_private.h>
#include <isl_tarjan.h>
isl_bool isl_map_is_transitively_closed(__isl_keep isl_map *map)
{
isl_map *map2;
isl_bool closed;
map2 = isl_map_apply_range(isl_map_copy(map), isl_map_copy(map));
closed = isl_map_is_subset(map2, map);
isl_map_free(map2);
return closed;
}
isl_bool isl_union_map_is_transitively_closed(__isl_keep isl_union_map *umap)
{
isl_union_map *umap2;
isl_bool closed;
umap2 = isl_union_map_apply_range(isl_union_map_copy(umap),
isl_union_map_copy(umap));
closed = isl_union_map_is_subset(umap2, umap);
isl_union_map_free(umap2);
return closed;
}
/* Given a map that represents a path with the length of the path
* encoded as the difference between the last output coordindate
* and the last input coordinate, set this length to either
* exactly "length" (if "exactly" is set) or at least "length"
* (if "exactly" is not set).
*/
static __isl_give isl_map *set_path_length(__isl_take isl_map *map,
int exactly, int length)
{
isl_space *space;
struct isl_basic_map *bmap;
isl_size d;
isl_size nparam;
isl_size total;
int k;
isl_int *c;
if (!map)
return NULL;
space = isl_map_get_space(map);
d = isl_space_dim(space, isl_dim_in);
nparam = isl_space_dim(space, isl_dim_param);
total = isl_space_dim(space, isl_dim_all);
if (d < 0 || nparam < 0 || total < 0)
space = isl_space_free(space);
bmap = isl_basic_map_alloc_space(space, 0, 1, 1);
if (exactly) {
k = isl_basic_map_alloc_equality(bmap);
if (k < 0)
goto error;
c = bmap->eq[k];
} else {
k = isl_basic_map_alloc_inequality(bmap);
if (k < 0)
goto error;
c = bmap->ineq[k];
}
isl_seq_clr(c, 1 + total);
isl_int_set_si(c[0], -length);
isl_int_set_si(c[1 + nparam + d - 1], -1);
isl_int_set_si(c[1 + nparam + d + d - 1], 1);
bmap = isl_basic_map_finalize(bmap);
map = isl_map_intersect(map, isl_map_from_basic_map(bmap));
return map;
error:
isl_basic_map_free(bmap);
isl_map_free(map);
return NULL;
}
/* Check whether the overapproximation of the power of "map" is exactly
* the power of "map". Let R be "map" and A_k the overapproximation.
* The approximation is exact if
*
* A_1 = R
* A_k = A_{k-1} \circ R k >= 2
*
* Since A_k is known to be an overapproximation, we only need to check
*
* A_1 \subset R
* A_k \subset A_{k-1} \circ R k >= 2
*
* In practice, "app" has an extra input and output coordinate
* to encode the length of the path. So, we first need to add
* this coordinate to "map" and set the length of the path to
* one.
*/
static isl_bool check_power_exactness(__isl_take isl_map *map,
__isl_take isl_map *app)
{
isl_bool exact;
isl_map *app_1;
isl_map *app_2;
map = isl_map_add_dims(map, isl_dim_in, 1);
map = isl_map_add_dims(map, isl_dim_out, 1);
map = set_path_length(map, 1, 1);
app_1 = set_path_length(isl_map_copy(app), 1, 1);
exact = isl_map_is_subset(app_1, map);
isl_map_free(app_1);
if (!exact || exact < 0) {
isl_map_free(app);
isl_map_free(map);
return exact;
}
app_1 = set_path_length(isl_map_copy(app), 0, 1);
app_2 = set_path_length(app, 0, 2);
app_1 = isl_map_apply_range(map, app_1);
exact = isl_map_is_subset(app_2, app_1);
isl_map_free(app_1);
isl_map_free(app_2);
return exact;
}
/* Check whether the overapproximation of the power of "map" is exactly
* the power of "map", possibly after projecting out the power (if "project"
* is set).
*
* If "project" is set and if "steps" can only result in acyclic paths,
* then we check
*
* A = R \cup (A \circ R)
*
* where A is the overapproximation with the power projected out, i.e.,
* an overapproximation of the transitive closure.
* More specifically, since A is known to be an overapproximation, we check
*
* A \subset R \cup (A \circ R)
*
* Otherwise, we check if the power is exact.
*
* Note that "app" has an extra input and output coordinate to encode
* the length of the part. If we are only interested in the transitive
* closure, then we can simply project out these coordinates first.
*/
static isl_bool check_exactness(__isl_take isl_map *map,
__isl_take isl_map *app, int project)
{
isl_map *test;
isl_bool exact;
isl_size d;
if (!project)
return check_power_exactness(map, app);
d = isl_map_dim(map, isl_dim_in);
if (d < 0)
app = isl_map_free(app);
app = set_path_length(app, 0, 1);
app = isl_map_project_out(app, isl_dim_in, d, 1);
app = isl_map_project_out(app, isl_dim_out, d, 1);
app = isl_map_reset_space(app, isl_map_get_space(map));
test = isl_map_apply_range(isl_map_copy(map), isl_map_copy(app));
test = isl_map_union(test, isl_map_copy(map));
exact = isl_map_is_subset(app, test);
isl_map_free(app);
isl_map_free(test);
isl_map_free(map);
return exact;
}
/*
* The transitive closure implementation is based on the paper
* "Computing the Transitive Closure of a Union of Affine Integer
* Tuple Relations" by Anna Beletska, Denis Barthou, Wlodzimierz Bielecki and
* Albert Cohen.
*/
/* Given a set of n offsets v_i (the rows of "steps"), construct a relation
* of the given dimension specification (Z^{n+1} -> Z^{n+1})
* that maps an element x to any element that can be reached
* by taking a non-negative number of steps along any of
* the extended offsets v'_i = [v_i 1].
* That is, construct
*
* { [x] -> [y] : exists k_i >= 0, y = x + \sum_i k_i v'_i }
*
* For any element in this relation, the number of steps taken
* is equal to the difference in the final coordinates.
*/
static __isl_give isl_map *path_along_steps(__isl_take isl_space *space,
__isl_keep isl_mat *steps)
{
int i, j, k;
struct isl_basic_map *path = NULL;
isl_size d;
unsigned n;
isl_size nparam;
isl_size total;
d = isl_space_dim(space, isl_dim_in);
nparam = isl_space_dim(space, isl_dim_param);
if (d < 0 || nparam < 0 || !steps)
goto error;
n = steps->n_row;
path = isl_basic_map_alloc_space(isl_space_copy(space), n, d, n);
for (i = 0; i < n; ++i) {
k = isl_basic_map_alloc_div(path);
if (k < 0)
goto error;
isl_assert(steps->ctx, i == k, goto error);
isl_int_set_si(path->div[k][0], 0);
}
total = isl_basic_map_dim(path, isl_dim_all);
if (total < 0)
goto error;
for (i = 0; i < d; ++i) {
k = isl_basic_map_alloc_equality(path);
if (k < 0)
goto error;
isl_seq_clr(path->eq[k], 1 + total);
isl_int_set_si(path->eq[k][1 + nparam + i], 1);
isl_int_set_si(path->eq[k][1 + nparam + d + i], -1);
if (i == d - 1)
for (j = 0; j < n; ++j)
isl_int_set_si(path->eq[k][1 + nparam + 2 * d + j], 1);
else
for (j = 0; j < n; ++j)
isl_int_set(path->eq[k][1 + nparam + 2 * d + j],
steps->row[j][i]);
}
for (i = 0; i < n; ++i) {
k = isl_basic_map_alloc_inequality(path);
if (k < 0)
goto error;
isl_seq_clr(path->ineq[k], 1 + total);
isl_int_set_si(path->ineq[k][1 + nparam + 2 * d + i], 1);
}
isl_space_free(space);
path = isl_basic_map_simplify(path);
path = isl_basic_map_finalize(path);
return isl_map_from_basic_map(path);
error:
isl_space_free(space);
isl_basic_map_free(path);
return NULL;
}
#define IMPURE 0
#define PURE_PARAM 1
#define PURE_VAR 2
#define MIXED 3
/* Check whether the parametric constant term of constraint c is never
* positive in "bset".
*/
static isl_bool parametric_constant_never_positive(
__isl_keep isl_basic_set *bset, isl_int *c, int *div_purity)
{
isl_size d;
isl_size n_div;
isl_size nparam;
isl_size total;
int i;
int k;
isl_bool empty;
n_div = isl_basic_set_dim(bset, isl_dim_div);
d = isl_basic_set_dim(bset, isl_dim_set);
nparam = isl_basic_set_dim(bset, isl_dim_param);
total = isl_basic_set_dim(bset, isl_dim_all);
if (n_div < 0 || d < 0 || nparam < 0 || total < 0)
return isl_bool_error;
bset = isl_basic_set_copy(bset);
bset = isl_basic_set_cow(bset);
bset = isl_basic_set_extend_constraints(bset, 0, 1);
k = isl_basic_set_alloc_inequality(bset);
if (k < 0)
goto error;
isl_seq_clr(bset->ineq[k], 1 + total);
isl_seq_cpy(bset->ineq[k], c, 1 + nparam);
for (i = 0; i < n_div; ++i) {
if (div_purity[i] != PURE_PARAM)
continue;
isl_int_set(bset->ineq[k][1 + nparam + d + i],
c[1 + nparam + d + i]);
}
isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1);
empty = isl_basic_set_is_empty(bset);
isl_basic_set_free(bset);
return empty;
error:
isl_basic_set_free(bset);
return isl_bool_error;
}
/* Return PURE_PARAM if only the coefficients of the parameters are non-zero.
* Return PURE_VAR if only the coefficients of the set variables are non-zero.
* Return MIXED if only the coefficients of the parameters and the set
* variables are non-zero and if moreover the parametric constant
* can never attain positive values.
* Return IMPURE otherwise.
*/
static int purity(__isl_keep isl_basic_set *bset, isl_int *c, int *div_purity,
int eq)
{
isl_size d;
isl_size n_div;
isl_size nparam;
isl_bool empty;
int i;
int p = 0, v = 0;
n_div = isl_basic_set_dim(bset, isl_dim_div);
d = isl_basic_set_dim(bset, isl_dim_set);
nparam = isl_basic_set_dim(bset, isl_dim_param);
if (n_div < 0 || d < 0 || nparam < 0)
return -1;
for (i = 0; i < n_div; ++i) {
if (isl_int_is_zero(c[1 + nparam + d + i]))
continue;
switch (div_purity[i]) {
case PURE_PARAM: p = 1; break;
case PURE_VAR: v = 1; break;
default: return IMPURE;
}
}
if (!p && isl_seq_first_non_zero(c + 1, nparam) == -1)
return PURE_VAR;
if (!v && isl_seq_first_non_zero(c + 1 + nparam, d) == -1)
return PURE_PARAM;
empty = parametric_constant_never_positive(bset, c, div_purity);
if (eq && empty >= 0 && !empty) {
isl_seq_neg(c, c, 1 + nparam + d + n_div);
empty = parametric_constant_never_positive(bset, c, div_purity);
}
return empty < 0 ? -1 : empty ? MIXED : IMPURE;
}
/* Return an array of integers indicating the type of each div in bset.
* If the div is (recursively) defined in terms of only the parameters,
* then the type is PURE_PARAM.
* If the div is (recursively) defined in terms of only the set variables,
* then the type is PURE_VAR.
* Otherwise, the type is IMPURE.
*/
static __isl_give int *get_div_purity(__isl_keep isl_basic_set *bset)
{
int i, j;
int *div_purity;
isl_size d;
isl_size n_div;
isl_size nparam;
n_div = isl_basic_set_dim(bset, isl_dim_div);
d = isl_basic_set_dim(bset, isl_dim_set);
nparam = isl_basic_set_dim(bset, isl_dim_param);
if (n_div < 0 || d < 0 || nparam < 0)
return NULL;
div_purity = isl_alloc_array(bset->ctx, int, n_div);
if (n_div && !div_purity)
return NULL;
for (i = 0; i < bset->n_div; ++i) {
int p = 0, v = 0;
if (isl_int_is_zero(bset->div[i][0])) {
div_purity[i] = IMPURE;
continue;
}
if (isl_seq_first_non_zero(bset->div[i] + 2, nparam) != -1)
p = 1;
if (isl_seq_first_non_zero(bset->div[i] + 2 + nparam, d) != -1)
v = 1;
for (j = 0; j < i; ++j) {
if (isl_int_is_zero(bset->div[i][2 + nparam + d + j]))
continue;
switch (div_purity[j]) {
case PURE_PARAM: p = 1; break;
case PURE_VAR: v = 1; break;
default: p = v = 1; break;
}
}
div_purity[i] = v ? p ? IMPURE : PURE_VAR : PURE_PARAM;
}
return div_purity;
}
/* Given a path with the as yet unconstrained length at div position "pos",
* check if setting the length to zero results in only the identity
* mapping.
*/
static isl_bool empty_path_is_identity(__isl_keep isl_basic_map *path,
unsigned pos)
{
isl_basic_map *test = NULL;
isl_basic_map *id = NULL;
isl_bool is_id;
test = isl_basic_map_copy(path);
test = isl_basic_map_fix_si(test, isl_dim_div, pos, 0);
id = isl_basic_map_identity(isl_basic_map_get_space(path));
is_id = isl_basic_map_is_equal(test, id);
isl_basic_map_free(test);
isl_basic_map_free(id);
return is_id;
}
/* If any of the constraints is found to be impure then this function
* sets *impurity to 1.
*
* If impurity is NULL then we are dealing with a non-parametric set
* and so the constraints are obviously PURE_VAR.
*/
static __isl_give isl_basic_map *add_delta_constraints(
__isl_take isl_basic_map *path,
__isl_keep isl_basic_set *delta, unsigned off, unsigned nparam,
unsigned d, int *div_purity, int eq, int *impurity)
{
int i, k;
int n = eq ? delta->n_eq : delta->n_ineq;
isl_int **delta_c = eq ? delta->eq : delta->ineq;
isl_size n_div, total;
n_div = isl_basic_set_dim(delta, isl_dim_div);
total = isl_basic_map_dim(path, isl_dim_all);
if (n_div < 0 || total < 0)
return isl_basic_map_free(path);
for (i = 0; i < n; ++i) {
isl_int *path_c;
int p = PURE_VAR;
if (impurity)
p = purity(delta, delta_c[i], div_purity, eq);
if (p < 0)
goto error;
if (p != PURE_VAR && p != PURE_PARAM && !*impurity)
*impurity = 1;
if (p == IMPURE)
continue;
if (eq && p != MIXED) {
k = isl_basic_map_alloc_equality(path);
if (k < 0)
goto error;
path_c = path->eq[k];
} else {
k = isl_basic_map_alloc_inequality(path);
if (k < 0)
goto error;
path_c = path->ineq[k];
}
isl_seq_clr(path_c, 1 + total);
if (p == PURE_VAR) {
isl_seq_cpy(path_c + off,
delta_c[i] + 1 + nparam, d);
isl_int_set(path_c[off + d], delta_c[i][0]);
} else if (p == PURE_PARAM) {
isl_seq_cpy(path_c, delta_c[i], 1 + nparam);
} else {
isl_seq_cpy(path_c + off,
delta_c[i] + 1 + nparam, d);
isl_seq_cpy(path_c, delta_c[i], 1 + nparam);
}
isl_seq_cpy(path_c + off - n_div,
delta_c[i] + 1 + nparam + d, n_div);
}
return path;
error:
isl_basic_map_free(path);
return NULL;
}
/* Given a set of offsets "delta", construct a relation of the
* given dimension specification (Z^{n+1} -> Z^{n+1}) that
* is an overapproximation of the relations that
* maps an element x to any element that can be reached
* by taking a non-negative number of steps along any of
* the elements in "delta".
* That is, construct an approximation of
*
* { [x] -> [y] : exists f \in \delta, k \in Z :
* y = x + k [f, 1] and k >= 0 }
*
* For any element in this relation, the number of steps taken
* is equal to the difference in the final coordinates.
*
* In particular, let delta be defined as
*
* \delta = [p] -> { [x] : A x + a >= 0 and B p + b >= 0 and
* C x + C'p + c >= 0 and
* D x + D'p + d >= 0 }
*
* where the constraints C x + C'p + c >= 0 are such that the parametric
* constant term of each constraint j, "C_j x + C'_j p + c_j",
* can never attain positive values, then the relation is constructed as
*
* { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and
* A f + k a >= 0 and B p + b >= 0 and
* C f + C'p + c >= 0 and k >= 1 }
* union { [x] -> [x] }
*
* If the zero-length paths happen to correspond exactly to the identity
* mapping, then we return
*
* { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and
* A f + k a >= 0 and B p + b >= 0 and
* C f + C'p + c >= 0 and k >= 0 }
*
* instead.
*
* Existentially quantified variables in \delta are handled by
* classifying them as independent of the parameters, purely
* parameter dependent and others. Constraints containing
* any of the other existentially quantified variables are removed.
* This is safe, but leads to an additional overapproximation.
*
* If there are any impure constraints, then we also eliminate
* the parameters from \delta, resulting in a set
*
* \delta' = { [x] : E x + e >= 0 }
*
* and add the constraints
*
* E f + k e >= 0
*
* to the constructed relation.
*/
static __isl_give isl_map *path_along_delta(__isl_take isl_space *space,
__isl_take isl_basic_set *delta)
{
isl_basic_map *path = NULL;
isl_size d;
isl_size n_div;
isl_size nparam;
isl_size total;
unsigned off;
int i, k;
isl_bool is_id;
int *div_purity = NULL;
int impurity = 0;
n_div = isl_basic_set_dim(delta, isl_dim_div);
d = isl_basic_set_dim(delta, isl_dim_set);
nparam = isl_basic_set_dim(delta, isl_dim_param);
if (n_div < 0 || d < 0 || nparam < 0)
goto error;
path = isl_basic_map_alloc_space(isl_space_copy(space), n_div + d + 1,
d + 1 + delta->n_eq, delta->n_eq + delta->n_ineq + 1);
off = 1 + nparam + 2 * (d + 1) + n_div;
for (i = 0; i < n_div + d + 1; ++i) {
k = isl_basic_map_alloc_div(path);
if (k < 0)
goto error;
isl_int_set_si(path->div[k][0], 0);
}
total = isl_basic_map_dim(path, isl_dim_all);
if (total < 0)
goto error;
for (i = 0; i < d + 1; ++i) {
k = isl_basic_map_alloc_equality(path);
if (k < 0)
goto error;
isl_seq_clr(path->eq[k], 1 + total);
isl_int_set_si(path->eq[k][1 + nparam + i], 1);
isl_int_set_si(path->eq[k][1 + nparam + d + 1 + i], -1);
isl_int_set_si(path->eq[k][off + i], 1);
}
div_purity = get_div_purity(delta);
if (n_div && !div_purity)
goto error;
path = add_delta_constraints(path, delta, off, nparam, d,
div_purity, 1, &impurity);
path = add_delta_constraints(path, delta, off, nparam, d,
div_purity, 0, &impurity);
if (impurity) {
isl_space *space = isl_basic_set_get_space(delta);
delta = isl_basic_set_project_out(delta,
isl_dim_param, 0, nparam);
delta = isl_basic_set_add_dims(delta, isl_dim_param, nparam);
delta = isl_basic_set_reset_space(delta, space);
if (!delta)
goto error;
path = isl_basic_map_extend_constraints(path, delta->n_eq,
delta->n_ineq + 1);
path = add_delta_constraints(path, delta, off, nparam, d,
NULL, 1, NULL);
path = add_delta_constraints(path, delta, off, nparam, d,
NULL, 0, NULL);
path = isl_basic_map_gauss(path, NULL);
}
is_id = empty_path_is_identity(path, n_div + d);
if (is_id < 0)
goto error;
k = isl_basic_map_alloc_inequality(path);
if (k < 0)
goto error;
isl_seq_clr(path->ineq[k], 1 + total);
if (!is_id)
isl_int_set_si(path->ineq[k][0], -1);
isl_int_set_si(path->ineq[k][off + d], 1);
free(div_purity);
isl_basic_set_free(delta);
path = isl_basic_map_finalize(path);
if (is_id) {
isl_space_free(space);
return isl_map_from_basic_map(path);
}
return isl_basic_map_union(path, isl_basic_map_identity(space));
error:
free(div_purity);
isl_space_free(space);
isl_basic_set_free(delta);
isl_basic_map_free(path);
return NULL;
}
/* Given a dimension specification Z^{n+1} -> Z^{n+1} and a parameter "param",
* construct a map that equates the parameter to the difference
* in the final coordinates and imposes that this difference is positive.
* That is, construct
*
* { [x,x_s] -> [y,y_s] : k = y_s - x_s > 0 }
*/
static __isl_give isl_map *equate_parameter_to_length(
__isl_take isl_space *space, unsigned param)
{
struct isl_basic_map *bmap;
isl_size d;
isl_size nparam;
isl_size total;
int k;
d = isl_space_dim(space, isl_dim_in);
nparam = isl_space_dim(space, isl_dim_param);
total = isl_space_dim(space, isl_dim_all);
if (d < 0 || nparam < 0 || total < 0)
space = isl_space_free(space);
bmap = isl_basic_map_alloc_space(space, 0, 1, 1);
k = isl_basic_map_alloc_equality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->eq[k], 1 + total);
isl_int_set_si(bmap->eq[k][1 + param], -1);
isl_int_set_si(bmap->eq[k][1 + nparam + d - 1], -1);
isl_int_set_si(bmap->eq[k][1 + nparam + d + d - 1], 1);
k = isl_basic_map_alloc_inequality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->ineq[k], 1 + total);
isl_int_set_si(bmap->ineq[k][1 + param], 1);
isl_int_set_si(bmap->ineq[k][0], -1);
bmap = isl_basic_map_finalize(bmap);
return isl_map_from_basic_map(bmap);
error:
isl_basic_map_free(bmap);
return NULL;
}
/* Check whether "path" is acyclic, where the last coordinates of domain
* and range of path encode the number of steps taken.
* That is, check whether
*
* { d | d = y - x and (x,y) in path }
*
* does not contain any element with positive last coordinate (positive length)
* and zero remaining coordinates (cycle).
*/
static isl_bool is_acyclic(__isl_take isl_map *path)
{
int i;
isl_bool acyclic;
isl_size dim;
struct isl_set *delta;
delta = isl_map_deltas(path);
dim = isl_set_dim(delta, isl_dim_set);
if (dim < 0)
delta = isl_set_free(delta);
for (i = 0; i < dim; ++i) {
if (i == dim -1)
delta = isl_set_lower_bound_si(delta, isl_dim_set, i, 1);
else
delta = isl_set_fix_si(delta, isl_dim_set, i, 0);
}
acyclic = isl_set_is_empty(delta);
isl_set_free(delta);
return acyclic;
}
/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D
* and a dimension specification (Z^{n+1} -> Z^{n+1}),
* construct a map that is an overapproximation of the map
* that takes an element from the space D \times Z to another
* element from the same space, such that the first n coordinates of the
* difference between them is a sum of differences between images
* and pre-images in one of the R_i and such that the last coordinate
* is equal to the number of steps taken.
* That is, let
*
* \Delta_i = { y - x | (x, y) in R_i }
*
* then the constructed map is an overapproximation of
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = (\sum_i k_i \delta_i, \sum_i k_i) }
*
* The elements of the singleton \Delta_i's are collected as the
* rows of the steps matrix. For all these \Delta_i's together,
* a single path is constructed.
* For each of the other \Delta_i's, we compute an overapproximation
* of the paths along elements of \Delta_i.
* Since each of these paths performs an addition, composition is
* symmetric and we can simply compose all resulting paths in any order.
*/
static __isl_give isl_map *construct_extended_path(__isl_take isl_space *space,
__isl_keep isl_map *map, int *project)
{
struct isl_mat *steps = NULL;
struct isl_map *path = NULL;
isl_size d;
int i, j, n;
d = isl_map_dim(map, isl_dim_in);
if (d < 0)
goto error;
path = isl_map_identity(isl_space_copy(space));
steps = isl_mat_alloc(map->ctx, map->n, d);
if (!steps)
goto error;
n = 0;
for (i = 0; i < map->n; ++i) {
struct isl_basic_set *delta;
delta = isl_basic_map_deltas(isl_basic_map_copy(map->p[i]));
for (j = 0; j < d; ++j) {
isl_bool fixed;
fixed = isl_basic_set_plain_dim_is_fixed(delta, j,
&steps->row[n][j]);
if (fixed < 0) {
isl_basic_set_free(delta);
goto error;
}
if (!fixed)
break;
}
if (j < d) {
path = isl_map_apply_range(path,
path_along_delta(isl_space_copy(space), delta));
path = isl_map_coalesce(path);
} else {
isl_basic_set_free(delta);
++n;
}
}
if (n > 0) {
steps->n_row = n;
path = isl_map_apply_range(path,
path_along_steps(isl_space_copy(space), steps));
}
if (project && *project) {
*project = is_acyclic(isl_map_copy(path));
if (*project < 0)
goto error;
}
isl_space_free(space);
isl_mat_free(steps);
return path;
error:
isl_space_free(space);
isl_mat_free(steps);
isl_map_free(path);
return NULL;
}
static isl_bool isl_set_overlaps(__isl_keep isl_set *set1,
__isl_keep isl_set *set2)
{
return isl_bool_not(isl_set_is_disjoint(set1, set2));
}
/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D
* and a dimension specification (Z^{n+1} -> Z^{n+1}),
* construct a map that is an overapproximation of the map
* that takes an element from the dom R \times Z to an
* element from ran R \times Z, such that the first n coordinates of the
* difference between them is a sum of differences between images
* and pre-images in one of the R_i and such that the last coordinate
* is equal to the number of steps taken.
* That is, let
*
* \Delta_i = { y - x | (x, y) in R_i }
*
* then the constructed map is an overapproximation of
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = (\sum_i k_i \delta_i, \sum_i k_i) and
* x in dom R and x + d in ran R and
* \sum_i k_i >= 1 }
*/
static __isl_give isl_map *construct_component(__isl_take isl_space *space,
__isl_keep isl_map *map, isl_bool *exact, int project)
{
struct isl_set *domain = NULL;
struct isl_set *range = NULL;
struct isl_map *app = NULL;
struct isl_map *path = NULL;
isl_bool overlaps;
int check;
domain = isl_map_domain(isl_map_copy(map));
domain = isl_set_coalesce(domain);
range = isl_map_range(isl_map_copy(map));
range = isl_set_coalesce(range);
overlaps = isl_set_overlaps(domain, range);
if (overlaps < 0 || !overlaps) {
isl_set_free(domain);
isl_set_free(range);
isl_space_free(space);
if (overlaps < 0)
map = NULL;
map = isl_map_copy(map);
map = isl_map_add_dims(map, isl_dim_in, 1);
map = isl_map_add_dims(map, isl_dim_out, 1);
map = set_path_length(map, 1, 1);
return map;
}
app = isl_map_from_domain_and_range(domain, range);
app = isl_map_add_dims(app, isl_dim_in, 1);
app = isl_map_add_dims(app, isl_dim_out, 1);
check = exact && *exact == isl_bool_true;
path = construct_extended_path(isl_space_copy(space), map,
check ? &project : NULL);
app = isl_map_intersect(app, path);
if (check &&
(*exact = check_exactness(isl_map_copy(map), isl_map_copy(app),
project)) < 0)
goto error;
isl_space_free(space);
app = set_path_length(app, 0, 1);
return app;
error:
isl_space_free(space);
isl_map_free(app);
return NULL;
}
/* Call construct_component and, if "project" is set, project out
* the final coordinates.
*/
static __isl_give isl_map *construct_projected_component(
__isl_take isl_space *space,
__isl_keep isl_map *map, isl_bool *exact, int project)
{
isl_map *app;
unsigned d;
if (!space)
return NULL;
d = isl_space_dim(space, isl_dim_in);
app = construct_component(space, map, exact, project);
if (project) {
app = isl_map_project_out(app, isl_dim_in, d - 1, 1);
app = isl_map_project_out(app, isl_dim_out, d - 1, 1);
}
return app;
}
/* Compute an extended version, i.e., with path lengths, of
* an overapproximation of the transitive closure of "bmap"
* with path lengths greater than or equal to zero and with
* domain and range equal to "dom".
*/
static __isl_give isl_map *q_closure(__isl_take isl_space *space,
__isl_take isl_set *dom, __isl_keep isl_basic_map *bmap,
isl_bool *exact)
{
int project = 1;
isl_map *path;
isl_map *map;
isl_map *app;
dom = isl_set_add_dims(dom, isl_dim_set, 1);
app = isl_map_from_domain_and_range(dom, isl_set_copy(dom));
map = isl_map_from_basic_map(isl_basic_map_copy(bmap));
path = construct_extended_path(space, map, &project);
app = isl_map_intersect(app, path);
if ((*exact = check_exactness(map, isl_map_copy(app), project)) < 0)
goto error;
return app;
error:
isl_map_free(app);
return NULL;
}
/* Check whether qc has any elements of length at least one
* with domain and/or range outside of dom and ran.
*/
static isl_bool has_spurious_elements(__isl_keep isl_map *qc,
__isl_keep isl_set *dom, __isl_keep isl_set *ran)
{
isl_set *s;
isl_bool subset;
isl_size d;
d = isl_map_dim(qc, isl_dim_in);
if (d < 0 || !dom || !ran)
return isl_bool_error;
qc = isl_map_copy(qc);
qc = set_path_length(qc, 0, 1);
qc = isl_map_project_out(qc, isl_dim_in, d - 1, 1);
qc = isl_map_project_out(qc, isl_dim_out, d - 1, 1);
s = isl_map_domain(isl_map_copy(qc));
subset = isl_set_is_subset(s, dom);
isl_set_free(s);
if (subset < 0)
goto error;
if (!subset) {
isl_map_free(qc);
return isl_bool_true;
}
s = isl_map_range(qc);
subset = isl_set_is_subset(s, ran);
isl_set_free(s);
return isl_bool_not(subset);
error:
isl_map_free(qc);
return isl_bool_error;
}
#define LEFT 2
#define RIGHT 1
/* For each basic map in "map", except i, check whether it combines
* with the transitive closure that is reflexive on C combines
* to the left and to the right.
*
* In particular, if
*
* dom map_j \subseteq C
*
* then right[j] is set to 1. Otherwise, if
*
* ran map_i \cap dom map_j = \emptyset
*
* then right[j] is set to 0. Otherwise, composing to the right
* is impossible.
*
* Similar, for composing to the left, we have if
*
* ran map_j \subseteq C
*
* then left[j] is set to 1. Otherwise, if
*
* dom map_i \cap ran map_j = \emptyset
*
* then left[j] is set to 0. Otherwise, composing to the left
* is impossible.
*
* The return value is or'd with LEFT if composing to the left
* is possible and with RIGHT if composing to the right is possible.
*/
static int composability(__isl_keep isl_set *C, int i,
isl_set **dom, isl_set **ran, int *left, int *right,
__isl_keep isl_map *map)
{
int j;
int ok;
ok = LEFT | RIGHT;
for (j = 0; j < map->n && ok; ++j) {
isl_bool overlaps, subset;
if (j == i)
continue;
if (ok & RIGHT) {
if (!dom[j])
dom[j] = isl_set_from_basic_set(
isl_basic_map_domain(
isl_basic_map_copy(map->p[j])));
if (!dom[j])
return -1;
overlaps = isl_set_overlaps(ran[i], dom[j]);
if (overlaps < 0)
return -1;
if (!overlaps)
right[j] = 0;
else {
subset = isl_set_is_subset(dom[j], C);
if (subset < 0)
return -1;
if (subset)
right[j] = 1;
else
ok &= ~RIGHT;
}
}
if (ok & LEFT) {
if (!ran[j])
ran[j] = isl_set_from_basic_set(
isl_basic_map_range(
isl_basic_map_copy(map->p[j])));
if (!ran[j])
return -1;
overlaps = isl_set_overlaps(dom[i], ran[j]);
if (overlaps < 0)
return -1;
if (!overlaps)
left[j] = 0;
else {
subset = isl_set_is_subset(ran[j], C);
if (subset < 0)
return -1;
if (subset)
left[j] = 1;
else
ok &= ~LEFT;
}
}
}
return ok;
}
static __isl_give isl_map *anonymize(__isl_take isl_map *map)
{
map = isl_map_reset(map, isl_dim_in);
map = isl_map_reset(map, isl_dim_out);
return map;
}
/* Return a map that is a union of the basic maps in "map", except i,
* composed to left and right with qc based on the entries of "left"
* and "right".
*/
static __isl_give isl_map *compose(__isl_keep isl_map *map, int i,
__isl_take isl_map *qc, int *left, int *right)
{
int j;
isl_map *comp;
comp = isl_map_empty(isl_map_get_space(map));
for (j = 0; j < map->n; ++j) {
isl_map *map_j;
if (j == i)
continue;
map_j = isl_map_from_basic_map(isl_basic_map_copy(map->p[j]));
map_j = anonymize(map_j);
if (left && left[j])
map_j = isl_map_apply_range(map_j, isl_map_copy(qc));
if (right && right[j])
map_j = isl_map_apply_range(isl_map_copy(qc), map_j);
comp = isl_map_union(comp, map_j);
}
comp = isl_map_compute_divs(comp);
comp = isl_map_coalesce(comp);
isl_map_free(qc);
return comp;
}
/* Compute the transitive closure of "map" incrementally by
* computing
*
* map_i^+ \cup qc^+
*
* or
*
* map_i^+ \cup ((id \cup map_i^) \circ qc^+)
*
* or
*
* map_i^+ \cup (qc^+ \circ (id \cup map_i^))
*
* depending on whether left or right are NULL.
*/
static __isl_give isl_map *compute_incremental(
__isl_take isl_space *space, __isl_keep isl_map *map,
int i, __isl_take isl_map *qc, int *left, int *right, isl_bool *exact)
{
isl_map *map_i;
isl_map *tc;
isl_map *rtc = NULL;
if (!map)
goto error;
isl_assert(map->ctx, left || right, goto error);
map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i]));
tc = construct_projected_component(isl_space_copy(space), map_i,
exact, 1);
isl_map_free(map_i);
if (*exact)
qc = isl_map_transitive_closure(qc, exact);
if (!*exact) {
isl_space_free(space);
isl_map_free(tc);
isl_map_free(qc);
return isl_map_universe(isl_map_get_space(map));
}
if (!left || !right)
rtc = isl_map_union(isl_map_copy(tc),
isl_map_identity(isl_map_get_space(tc)));
if (!right)
qc = isl_map_apply_range(rtc, qc);
if (!left)
qc = isl_map_apply_range(qc, rtc);
qc = isl_map_union(tc, qc);
isl_space_free(space);
return qc;
error:
isl_space_free(space);
isl_map_free(qc);
return NULL;
}
/* Given a map "map", try to find a basic map such that
* map^+ can be computed as
*
* map^+ = map_i^+ \cup
* \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+
*
* with C the simple hull of the domain and range of the input map.
* map_i^ \cup Id_C is computed by allowing the path lengths to be zero
* and by intersecting domain and range with C.
* Of course, we need to check that this is actually equal to map_i^ \cup Id_C.
* Also, we only use the incremental computation if all the transitive
* closures are exact and if the number of basic maps in the union,
* after computing the integer divisions, is smaller than the number
* of basic maps in the input map.
*/
static isl_bool incremental_on_entire_domain(__isl_keep isl_space *space,
__isl_keep isl_map *map,
isl_set **dom, isl_set **ran, int *left, int *right,
__isl_give isl_map **res)
{
int i;
isl_set *C;
isl_size d;
*res = NULL;
d = isl_map_dim(map, isl_dim_in);
if (d < 0)
return isl_bool_error;
C = isl_set_union(isl_map_domain(isl_map_copy(map)),
isl_map_range(isl_map_copy(map)));
C = isl_set_from_basic_set(isl_set_simple_hull(C));
if (!C)
return isl_bool_error;
if (C->n != 1) {
isl_set_free(C);
return isl_bool_false;
}
for (i = 0; i < map->n; ++i) {
isl_map *qc;
isl_bool exact_i;
isl_bool spurious;
int j;
dom[i] = isl_set_from_basic_set(isl_basic_map_domain(
isl_basic_map_copy(map->p[i])));
ran[i] = isl_set_from_basic_set(isl_basic_map_range(
isl_basic_map_copy(map->p[i])));
qc = q_closure(isl_space_copy(space), isl_set_copy(C),
map->p[i], &exact_i);
if (!qc)
goto error;
if (!exact_i) {
isl_map_free(qc);
continue;
}
spurious = has_spurious_elements(qc, dom[i], ran[i]);
if (spurious) {
isl_map_free(qc);
if (spurious < 0)
goto error;
continue;
}
qc = isl_map_project_out(qc, isl_dim_in, d, 1);
qc = isl_map_project_out(qc, isl_dim_out, d, 1);
qc = isl_map_compute_divs(qc);
for (j = 0; j < map->n; ++j)
left[j] = right[j] = 1;
qc = compose(map, i, qc, left, right);
if (!qc)
goto error;
if (qc->n >= map->n) {
isl_map_free(qc);
continue;
}
*res = compute_incremental(isl_space_copy(space), map, i, qc,
left, right, &exact_i);
if (!*res)
goto error;
if (exact_i)
break;
isl_map_free(*res);
*res = NULL;
}
isl_set_free(C);
return isl_bool_ok(*res != NULL);
error:
isl_set_free(C);
return isl_bool_error;
}
/* Try and compute the transitive closure of "map" as
*
* map^+ = map_i^+ \cup
* \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+
*
* with C either the simple hull of the domain and range of the entire
* map or the simple hull of domain and range of map_i.
*/
static __isl_give isl_map *incremental_closure(__isl_take isl_space *space,
__isl_keep isl_map *map, isl_bool *exact, int project)
{
int i;
isl_set **dom = NULL;
isl_set **ran = NULL;
int *left = NULL;
int *right = NULL;
isl_set *C;
isl_size d;
isl_map *res = NULL;
if (!project)
return construct_projected_component(space, map, exact,
project);
if (!map)
goto error;
if (map->n <= 1)
return construct_projected_component(space, map, exact,
project);
d = isl_map_dim(map, isl_dim_in);
if (d < 0)
goto error;
dom = isl_calloc_array(map->ctx, isl_set *, map->n);
ran = isl_calloc_array(map->ctx, isl_set *, map->n);
left = isl_calloc_array(map->ctx, int, map->n);
right = isl_calloc_array(map->ctx, int, map->n);
if (!ran || !dom || !left || !right)
goto error;
if (incremental_on_entire_domain(space, map, dom, ran, left, right,
&res) < 0)
goto error;
for (i = 0; !res && i < map->n; ++i) {
isl_map *qc;
int comp;
isl_bool exact_i, spurious;
if (!dom[i])
dom[i] = isl_set_from_basic_set(
isl_basic_map_domain(
isl_basic_map_copy(map->p[i])));
if (!dom[i])
goto error;
if (!ran[i])
ran[i] = isl_set_from_basic_set(
isl_basic_map_range(
isl_basic_map_copy(map->p[i])));
if (!ran[i])
goto error;
C = isl_set_union(isl_set_copy(dom[i]),
isl_set_copy(ran[i]));
C = isl_set_from_basic_set(isl_set_simple_hull(C));
if (!C)
goto error;
if (C->n != 1) {
isl_set_free(C);
continue;
}
comp = composability(C, i, dom, ran, left, right, map);
if (!comp || comp < 0) {
isl_set_free(C);
if (comp < 0)
goto error;
continue;
}
qc = q_closure(isl_space_copy(space), C, map->p[i], &exact_i);
if (!qc)
goto error;
if (!exact_i) {
isl_map_free(qc);
continue;
}
spurious = has_spurious_elements(qc, dom[i], ran[i]);
if (spurious) {
isl_map_free(qc);
if (spurious < 0)
goto error;
continue;
}
qc = isl_map_project_out(qc, isl_dim_in, d, 1);
qc = isl_map_project_out(qc, isl_dim_out, d, 1);
qc = isl_map_compute_divs(qc);
qc = compose(map, i, qc, (comp & LEFT) ? left : NULL,
(comp & RIGHT) ? right : NULL);
if (!qc)
goto error;
if (qc->n >= map->n) {
isl_map_free(qc);
continue;
}
res = compute_incremental(isl_space_copy(space), map, i, qc,
(comp & LEFT) ? left : NULL,
(comp & RIGHT) ? right : NULL, &exact_i);
if (!res)
goto error;
if (exact_i)
break;
isl_map_free(res);
res = NULL;
}
for (i = 0; i < map->n; ++i) {
isl_set_free(dom[i]);
isl_set_free(ran[i]);
}
free(dom);
free(ran);
free(left);
free(right);
if (res) {
isl_space_free(space);
return res;
}
return construct_projected_component(space, map, exact, project);
error:
if (dom)
for (i = 0; i < map->n; ++i)
isl_set_free(dom[i]);
free(dom);
if (ran)
for (i = 0; i < map->n; ++i)
isl_set_free(ran[i]);
free(ran);
free(left);
free(right);
isl_space_free(space);
return NULL;
}
/* Given an array of sets "set", add "dom" at position "pos"
* and search for elements at earlier positions that overlap with "dom".
* If any can be found, then merge all of them, together with "dom", into
* a single set and assign the union to the first in the array,
* which becomes the new group leader for all groups involved in the merge.
* During the search, we only consider group leaders, i.e., those with
* group[i] = i, as the other sets have already been combined
* with one of the group leaders.
*/
static int merge(isl_set **set, int *group, __isl_take isl_set *dom, int pos)
{
int i;
group[pos] = pos;
set[pos] = isl_set_copy(dom);
for (i = pos - 1; i >= 0; --i) {
isl_bool o;
if (group[i] != i)
continue;
o = isl_set_overlaps(set[i], dom);
if (o < 0)
goto error;
if (!o)
continue;
set[i] = isl_set_union(set[i], set[group[pos]]);
set[group[pos]] = NULL;
if (!set[i])
goto error;
group[group[pos]] = i;
group[pos] = i;
}
isl_set_free(dom);
return 0;
error:
isl_set_free(dom);
return -1;
}
/* Construct a map [x] -> [x+1], with parameters prescribed by "space".
*/
static __isl_give isl_map *increment(__isl_take isl_space *space)
{
int k;
isl_basic_map *bmap;
isl_size total;
space = isl_space_set_from_params(space);
space = isl_space_add_dims(space, isl_dim_set, 1);
space = isl_space_map_from_set(space);
bmap = isl_basic_map_alloc_space(space, 0, 1, 0);
total = isl_basic_map_dim(bmap, isl_dim_all);
k = isl_basic_map_alloc_equality(bmap);
if (total < 0 || k < 0)
goto error;
isl_seq_clr(bmap->eq[k], 1 + total);
isl_int_set_si(bmap->eq[k][0], 1);
isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_in)], 1);
isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_out)], -1);
return isl_map_from_basic_map(bmap);
error:
isl_basic_map_free(bmap);
return NULL;
}
/* Replace each entry in the n by n grid of maps by the cross product
* with the relation { [i] -> [i + 1] }.
*/
static isl_stat add_length(__isl_keep isl_map *map, isl_map ***grid, int n)
{
int i, j;
isl_space *space;
isl_map *step;
space = isl_space_params(isl_map_get_space(map));
step = increment(space);
if (!step)
return isl_stat_error;
for (i = 0; i < n; ++i)
for (j = 0; j < n; ++j)
grid[i][j] = isl_map_product(grid[i][j],
isl_map_copy(step));
isl_map_free(step);
return isl_stat_ok;
}
/* The core of the Floyd-Warshall algorithm.
* Updates the given n x x matrix of relations in place.
*
* The algorithm iterates over all vertices. In each step, the whole
* matrix is updated to include all paths that go to the current vertex,
* possibly stay there a while (including passing through earlier vertices)
* and then come back. At the start of each iteration, the diagonal
* element corresponding to the current vertex is replaced by its
* transitive closure to account for all indirect paths that stay
* in the current vertex.
*/
static void floyd_warshall_iterate(isl_map ***grid, int n, isl_bool *exact)
{
int r, p, q;
for (r = 0; r < n; ++r) {
isl_bool r_exact;
int check = exact && *exact == isl_bool_true;
grid[r][r] = isl_map_transitive_closure(grid[r][r],
check ? &r_exact : NULL);
if (check && !r_exact)
*exact = isl_bool_false;
for (p = 0; p < n; ++p)
for (q = 0; q < n; ++q) {
isl_map *loop;
if (p == r && q == r)
continue;
loop = isl_map_apply_range(
isl_map_copy(grid[p][r]),
isl_map_copy(grid[r][q]));
grid[p][q] = isl_map_union(grid[p][q], loop);
loop = isl_map_apply_range(
isl_map_copy(grid[p][r]),
isl_map_apply_range(
isl_map_copy(grid[r][r]),
isl_map_copy(grid[r][q])));
grid[p][q] = isl_map_union(grid[p][q], loop);
grid[p][q] = isl_map_coalesce(grid[p][q]);
}
}
}
/* Given a partition of the domains and ranges of the basic maps in "map",
* apply the Floyd-Warshall algorithm with the elements in the partition
* as vertices.
*
* In particular, there are "n" elements in the partition and "group" is
* an array of length 2 * map->n with entries in [0,n-1].
*
* We first construct a matrix of relations based on the partition information,
* apply Floyd-Warshall on this matrix of relations and then take the
* union of all entries in the matrix as the final result.
*
* If we are actually computing the power instead of the transitive closure,
* i.e., when "project" is not set, then the result should have the
* path lengths encoded as the difference between an extra pair of
* coordinates. We therefore apply the nested transitive closures
* to relations that include these lengths. In particular, we replace
* the input relation by the cross product with the unit length relation
* { [i] -> [i + 1] }.
*/
static __isl_give isl_map *floyd_warshall_with_groups(
__isl_take isl_space *space, __isl_keep isl_map *map,
isl_bool *exact, int project, int *group, int n)
{
int i, j, k;
isl_map ***grid = NULL;
isl_map *app;
if (!map)
goto error;
if (n == 1) {
free(group);
return incremental_closure(space, map, exact, project);
}
grid = isl_calloc_array(map->ctx, isl_map **, n);
if (!grid)
goto error;
for (i = 0; i < n; ++i) {
grid[i] = isl_calloc_array(map->ctx, isl_map *, n);
if (!grid[i])
goto error;
for (j = 0; j < n; ++j)
grid[i][j] = isl_map_empty(isl_map_get_space(map));
}
for (k = 0; k < map->n; ++k) {
i = group[2 * k];
j = group[2 * k + 1];
grid[i][j] = isl_map_union(grid[i][j],
isl_map_from_basic_map(
isl_basic_map_copy(map->p[k])));
}
if (!project && add_length(map, grid, n) < 0)
goto error;
floyd_warshall_iterate(grid, n, exact);
app = isl_map_empty(isl_map_get_space(grid[0][0]));
for (i = 0; i < n; ++i) {
for (j = 0; j < n; ++j)
app = isl_map_union(app, grid[i][j]);
free(grid[i]);
}
free(grid);
free(group);
isl_space_free(space);
return app;
error:
if (grid)
for (i = 0; i < n; ++i) {
if (!grid[i])
continue;
for (j = 0; j < n; ++j)
isl_map_free(grid[i][j]);
free(grid[i]);
}
free(grid);
free(group);
isl_space_free(space);
return NULL;
}
/* Partition the domains and ranges of the n basic relations in list
* into disjoint cells.
*
* To find the partition, we simply consider all of the domains
* and ranges in turn and combine those that overlap.
* "set" contains the partition elements and "group" indicates
* to which partition element a given domain or range belongs.
* The domain of basic map i corresponds to element 2 * i in these arrays,
* while the domain corresponds to element 2 * i + 1.
* During the construction group[k] is either equal to k,
* in which case set[k] contains the union of all the domains and
* ranges in the corresponding group, or is equal to some l < k,
* with l another domain or range in the same group.
*/
static int *setup_groups(isl_ctx *ctx, __isl_keep isl_basic_map **list, int n,
isl_set ***set, int *n_group)
{
int i;
int *group = NULL;
int g;
*set = isl_calloc_array(ctx, isl_set *, 2 * n);
group = isl_alloc_array(ctx, int, 2 * n);
if (!*set || !group)
goto error;
for (i = 0; i < n; ++i) {
isl_set *dom;
dom = isl_set_from_basic_set(isl_basic_map_domain(
isl_basic_map_copy(list[i])));
if (merge(*set, group, dom, 2 * i) < 0)
goto error;
dom = isl_set_from_basic_set(isl_basic_map_range(
isl_basic_map_copy(list[i])));
if (merge(*set, group, dom, 2 * i + 1) < 0)
goto error;
}
g = 0;
for (i = 0; i < 2 * n; ++i)
if (group[i] == i) {
if (g != i) {
(*set)[g] = (*set)[i];
(*set)[i] = NULL;
}
group[i] = g++;
} else
group[i] = group[group[i]];
*n_group = g;
return group;
error:
if (*set) {
for (i = 0; i < 2 * n; ++i)
isl_set_free((*set)[i]);
free(*set);
*set = NULL;
}
free(group);
return NULL;
}
/* Check if the domains and ranges of the basic maps in "map" can
* be partitioned, and if so, apply Floyd-Warshall on the elements
* of the partition. Note that we also apply this algorithm
* if we want to compute the power, i.e., when "project" is not set.
* However, the results are unlikely to be exact since the recursive
* calls inside the Floyd-Warshall algorithm typically result in
* non-linear path lengths quite quickly.
*/
static __isl_give isl_map *floyd_warshall(__isl_take isl_space *space,
__isl_keep isl_map *map, isl_bool *exact, int project)
{
int i;
isl_set **set = NULL;
int *group = NULL;
int n;
if (!map)
goto error;
if (map->n <= 1)
return incremental_closure(space, map, exact, project);
group = setup_groups(map->ctx, map->p, map->n, &set, &n);
if (!group)
goto error;
for (i = 0; i < 2 * map->n; ++i)
isl_set_free(set[i]);
free(set);
return floyd_warshall_with_groups(space, map, exact, project, group, n);
error:
isl_space_free(space);
return NULL;
}
/* Structure for representing the nodes of the graph of which
* strongly connected components are being computed.
*
* list contains the actual nodes
* check_closed is set if we may have used the fact that
* a pair of basic maps can be interchanged
*/
struct isl_tc_follows_data {
isl_basic_map **list;
int check_closed;
};
/* Check whether in the computation of the transitive closure
* "list[i]" (R_1) should follow (or be part of the same component as)
* "list[j]" (R_2).
*
* That is check whether
*
* R_1 \circ R_2
*
* is a subset of
*
* R_2 \circ R_1
*
* If so, then there is no reason for R_1 to immediately follow R_2
* in any path.
*
* *check_closed is set if the subset relation holds while
* R_1 \circ R_2 is not empty.
*/
static isl_bool basic_map_follows(int i, int j, void *user)
{
struct isl_tc_follows_data *data = user;
struct isl_map *map12 = NULL;
struct isl_map *map21 = NULL;
isl_bool applies, subset;
applies = isl_basic_map_applies_range(data->list[j], data->list[i]);
if (applies < 0)
return isl_bool_error;
if (!applies)
return isl_bool_false;
map21 = isl_map_from_basic_map(
isl_basic_map_apply_range(
isl_basic_map_copy(data->list[j]),
isl_basic_map_copy(data->list[i])));
subset = isl_map_is_empty(map21);
if (subset < 0)
goto error;
if (subset) {
isl_map_free(map21);
return isl_bool_false;
}
if (!isl_basic_map_is_transformation(data->list[i]) ||
!isl_basic_map_is_transformation(data->list[j])) {
isl_map_free(map21);
return isl_bool_true;
}
map12 = isl_map_from_basic_map(
isl_basic_map_apply_range(
isl_basic_map_copy(data->list[i]),
isl_basic_map_copy(data->list[j])));
subset = isl_map_is_subset(map21, map12);
isl_map_free(map12);
isl_map_free(map21);
if (subset)
data->check_closed = 1;
return isl_bool_not(subset);
error:
isl_map_free(map21);
return isl_bool_error;
}
/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D
* and a dimension specification (Z^{n+1} -> Z^{n+1}),
* construct a map that is an overapproximation of the map
* that takes an element from the dom R \times Z to an
* element from ran R \times Z, such that the first n coordinates of the
* difference between them is a sum of differences between images
* and pre-images in one of the R_i and such that the last coordinate
* is equal to the number of steps taken.
* If "project" is set, then these final coordinates are not included,
* i.e., a relation of type Z^n -> Z^n is returned.
* That is, let
*
* \Delta_i = { y - x | (x, y) in R_i }
*
* then the constructed map is an overapproximation of
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = (\sum_i k_i \delta_i, \sum_i k_i) and
* x in dom R and x + d in ran R }
*
* or
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = (\sum_i k_i \delta_i) and
* x in dom R and x + d in ran R }
*
* if "project" is set.
*
* We first split the map into strongly connected components, perform
* the above on each component and then join the results in the correct
* order, at each join also taking in the union of both arguments
* to allow for paths that do not go through one of the two arguments.
*/
static __isl_give isl_map *construct_power_components(
__isl_take isl_space *space, __isl_keep isl_map *map, isl_bool *exact,
int project)
{
int i, n, c;
struct isl_map *path = NULL;
struct isl_tc_follows_data data;
struct isl_tarjan_graph *g = NULL;
isl_bool *orig_exact;
isl_bool local_exact;
if (!map)
goto error;
if (map->n <= 1)
return floyd_warshall(space, map, exact, project);
data.list = map->p;
data.check_closed = 0;
g = isl_tarjan_graph_init(map->ctx, map->n, &basic_map_follows, &data);
if (!g)
goto error;
orig_exact = exact;
if (data.check_closed && !exact)
exact = &local_exact;
c = 0;
i = 0;
n = map->n;
if (project)
path = isl_map_empty(isl_map_get_space(map));
else
path = isl_map_empty(isl_space_copy(space));
path = anonymize(path);
while (n) {
struct isl_map *comp;
isl_map *path_comp, *path_comb;
comp = isl_map_alloc_space(isl_map_get_space(map), n, 0);
while (g->order[i] != -1) {
comp = isl_map_add_basic_map(comp,
isl_basic_map_copy(map->p[g->order[i]]));
--n;
++i;
}
path_comp = floyd_warshall(isl_space_copy(space),
comp, exact, project);
path_comp = anonymize(path_comp);
path_comb = isl_map_apply_range(isl_map_copy(path),
isl_map_copy(path_comp));
path = isl_map_union(path, path_comp);
path = isl_map_union(path, path_comb);
isl_map_free(comp);
++i;
++c;
}
if (c > 1 && data.check_closed && !*exact) {
isl_bool closed;
closed = isl_map_is_transitively_closed(path);
if (closed < 0)
goto error;
if (!closed) {
isl_tarjan_graph_free(g);
isl_map_free(path);
return floyd_warshall(space, map, orig_exact, project);
}
}
isl_tarjan_graph_free(g);
isl_space_free(space);
return path;
error:
isl_tarjan_graph_free(g);
isl_space_free(space);
isl_map_free(path);
return NULL;
}
/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D,
* construct a map that is an overapproximation of the map
* that takes an element from the space D to another
* element from the same space, such that the difference between
* them is a strictly positive sum of differences between images
* and pre-images in one of the R_i.
* The number of differences in the sum is equated to parameter "param".
* That is, let
*
* \Delta_i = { y - x | (x, y) in R_i }
*
* then the constructed map is an overapproximation of
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = \sum_i k_i \delta_i and k = \sum_i k_i > 0 }
* or
*
* { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i :
* d = \sum_i k_i \delta_i and \sum_i k_i > 0 }
*
* if "project" is set.
*
* If "project" is not set, then
* we construct an extended mapping with an extra coordinate
* that indicates the number of steps taken. In particular,
* the difference in the last coordinate is equal to the number
* of steps taken to move from a domain element to the corresponding
* image element(s).
*/
static __isl_give isl_map *construct_power(__isl_keep isl_map *map,
isl_bool *exact, int project)
{
struct isl_map *app = NULL;
isl_space *space = NULL;
if (!map)
return NULL;
space = isl_map_get_space(map);
space = isl_space_add_dims(space, isl_dim_in, 1);
space = isl_space_add_dims(space, isl_dim_out, 1);
app = construct_power_components(isl_space_copy(space), map,
exact, project);
isl_space_free(space);
return app;
}
/* Compute the positive powers of "map", or an overapproximation.
* If the result is exact, then *exact is set to 1.
*
* If project is set, then we are actually interested in the transitive
* closure, so we can use a more relaxed exactness check.
* The lengths of the paths are also projected out instead of being
* encoded as the difference between an extra pair of final coordinates.
*/
static __isl_give isl_map *map_power(__isl_take isl_map *map,
isl_bool *exact, int project)
{
struct isl_map *app = NULL;
if (exact)
*exact = isl_bool_true;
if (isl_map_check_transformation(map) < 0)
return isl_map_free(map);
app = construct_power(map, exact, project);
isl_map_free(map);
return app;
}
/* Compute the positive powers of "map", or an overapproximation.
* The result maps the exponent to a nested copy of the corresponding power.
* If the result is exact, then *exact is set to 1.
* map_power constructs an extended relation with the path lengths
* encoded as the difference between the final coordinates.
* In the final step, this difference is equated to an extra parameter
* and made positive. The extra coordinates are subsequently projected out
* and the parameter is turned into the domain of the result.
*/
__isl_give isl_map *isl_map_power(__isl_take isl_map *map, isl_bool *exact)
{
isl_space *target_space;
isl_space *space;
isl_map *diff;
isl_size d;
isl_size param;
d = isl_map_dim(map, isl_dim_in);
param = isl_map_dim(map, isl_dim_param);
if (d < 0 || param < 0)
return isl_map_free(map);
map = isl_map_compute_divs(map);
map = isl_map_coalesce(map);
if (isl_map_plain_is_empty(map)) {
map = isl_map_from_range(isl_map_wrap(map));
map = isl_map_add_dims(map, isl_dim_in, 1);
map = isl_map_set_dim_name(map, isl_dim_in, 0, "k");
return map;
}
target_space = isl_map_get_space(map);
target_space = isl_space_from_range(isl_space_wrap(target_space));
target_space = isl_space_add_dims(target_space, isl_dim_in, 1);
target_space = isl_space_set_dim_name(target_space, isl_dim_in, 0, "k");
map = map_power(map, exact, 0);
map = isl_map_add_dims(map, isl_dim_param, 1);
space = isl_map_get_space(map);
diff = equate_parameter_to_length(space, param);
map = isl_map_intersect(map, diff);
map = isl_map_project_out(map, isl_dim_in, d, 1);
map = isl_map_project_out(map, isl_dim_out, d, 1);
map = isl_map_from_range(isl_map_wrap(map));
map = isl_map_move_dims(map, isl_dim_in, 0, isl_dim_param, param, 1);
map = isl_map_reset_space(map, target_space);
return map;
}
/* Compute a relation that maps each element in the range of the input
* relation to the lengths of all paths composed of edges in the input
* relation that end up in the given range element.
* The result may be an overapproximation, in which case *exact is set to 0.
* The resulting relation is very similar to the power relation.
* The difference are that the domain has been projected out, the
* range has become the domain and the exponent is the range instead
* of a parameter.
*/
__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map,
isl_bool *exact)
{
isl_space *space;
isl_map *diff;
isl_size d;
isl_size param;
d = isl_map_dim(map, isl_dim_in);
param = isl_map_dim(map, isl_dim_param);
if (d < 0 || param < 0)
return isl_map_free(map);
map = isl_map_compute_divs(map);
map = isl_map_coalesce(map);
if (isl_map_plain_is_empty(map)) {
if (exact)
*exact = isl_bool_true;
map = isl_map_project_out(map, isl_dim_out, 0, d);
map = isl_map_add_dims(map, isl_dim_out, 1);
return map;
}
map = map_power(map, exact, 0);
map = isl_map_add_dims(map, isl_dim_param, 1);
space = isl_map_get_space(map);
diff = equate_parameter_to_length(space, param);
map = isl_map_intersect(map, diff);
map = isl_map_project_out(map, isl_dim_in, 0, d + 1);
map = isl_map_project_out(map, isl_dim_out, d, 1);
map = isl_map_reverse(map);
map = isl_map_move_dims(map, isl_dim_out, 0, isl_dim_param, param, 1);
return map;
}
/* Given a map, compute the smallest superset of this map that is of the form
*
* { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p }
*
* (where p ranges over the (non-parametric) dimensions),
* compute the transitive closure of this map, i.e.,
*
* { i -> j : exists k > 0:
* k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p }
*
* and intersect domain and range of this transitive closure with
* the given domain and range.
*
* If with_id is set, then try to include as much of the identity mapping
* as possible, by computing
*
* { i -> j : exists k >= 0:
* k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p }
*
* instead (i.e., allow k = 0).
*
* In practice, we compute the difference set
*
* delta = { j - i | i -> j in map },
*
* look for stride constraint on the individual dimensions and compute
* (constant) lower and upper bounds for each individual dimension,
* adding a constraint for each bound not equal to infinity.
*/
static __isl_give isl_map *box_closure_on_domain(__isl_take isl_map *map,
__isl_take isl_set *dom, __isl_take isl_set *ran, int with_id)
{
int i;
int k;
unsigned d;
unsigned nparam;
unsigned total;
isl_space *space;
isl_set *delta;
isl_map *app = NULL;
isl_basic_set *aff = NULL;
isl_basic_map *bmap = NULL;
isl_vec *obj = NULL;
isl_int opt;
isl_int_init(opt);
delta = isl_map_deltas(isl_map_copy(map));
aff = isl_set_affine_hull(isl_set_copy(delta));
if (!aff)
goto error;
space = isl_map_get_space(map);
d = isl_space_dim(space, isl_dim_in);
nparam = isl_space_dim(space, isl_dim_param);
total = isl_space_dim(space, isl_dim_all);
bmap = isl_basic_map_alloc_space(space,
aff->n_div + 1, aff->n_div, 2 * d + 1);
for (i = 0; i < aff->n_div + 1; ++i) {
k = isl_basic_map_alloc_div(bmap);
if (k < 0)
goto error;
isl_int_set_si(bmap->div[k][0], 0);
}
for (i = 0; i < aff->n_eq; ++i) {
if (!isl_basic_set_eq_is_stride(aff, i))
continue;
k = isl_basic_map_alloc_equality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->eq[k], 1 + nparam);
isl_seq_cpy(bmap->eq[k] + 1 + nparam + d,
aff->eq[i] + 1 + nparam, d);
isl_seq_neg(bmap->eq[k] + 1 + nparam,
aff->eq[i] + 1 + nparam, d);
isl_seq_cpy(bmap->eq[k] + 1 + nparam + 2 * d,
aff->eq[i] + 1 + nparam + d, aff->n_div);
isl_int_set_si(bmap->eq[k][1 + total + aff->n_div], 0);
}
obj = isl_vec_alloc(map->ctx, 1 + nparam + d);
if (!obj)
goto error;
isl_seq_clr(obj->el, 1 + nparam + d);
for (i = 0; i < d; ++ i) {
enum isl_lp_result res;
isl_int_set_si(obj->el[1 + nparam + i], 1);
res = isl_set_solve_lp(delta, 0, obj->el, map->ctx->one, &opt,
NULL, NULL);
if (res == isl_lp_error)
goto error;
if (res == isl_lp_ok) {
k = isl_basic_map_alloc_inequality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->ineq[k],
1 + nparam + 2 * d + bmap->n_div);
isl_int_set_si(bmap->ineq[k][1 + nparam + i], -1);
isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], 1);
isl_int_neg(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt);
}
res = isl_set_solve_lp(delta, 1, obj->el, map->ctx->one, &opt,
NULL, NULL);
if (res == isl_lp_error)
goto error;
if (res == isl_lp_ok) {
k = isl_basic_map_alloc_inequality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->ineq[k],
1 + nparam + 2 * d + bmap->n_div);
isl_int_set_si(bmap->ineq[k][1 + nparam + i], 1);
isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], -1);
isl_int_set(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt);
}
isl_int_set_si(obj->el[1 + nparam + i], 0);
}
k = isl_basic_map_alloc_inequality(bmap);
if (k < 0)
goto error;
isl_seq_clr(bmap->ineq[k],
1 + nparam + 2 * d + bmap->n_div);
if (!with_id)
isl_int_set_si(bmap->ineq[k][0], -1);
isl_int_set_si(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], 1);
app = isl_map_from_domain_and_range(dom, ran);
isl_vec_free(obj);
isl_basic_set_free(aff);
isl_map_free(map);
bmap = isl_basic_map_finalize(bmap);
isl_set_free(delta);
isl_int_clear(opt);
map = isl_map_from_basic_map(bmap);
map = isl_map_intersect(map, app);
return map;
error:
isl_vec_free(obj);
isl_basic_map_free(bmap);
isl_basic_set_free(aff);
isl_set_free(dom);
isl_set_free(ran);
isl_map_free(map);
isl_set_free(delta);
isl_int_clear(opt);
return NULL;
}
/* Given a map, compute the smallest superset of this map that is of the form
*
* { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p }
*
* (where p ranges over the (non-parametric) dimensions),
* compute the transitive closure of this map, i.e.,
*
* { i -> j : exists k > 0:
* k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p }
*
* and intersect domain and range of this transitive closure with
* domain and range of the original map.
*/
static __isl_give isl_map *box_closure(__isl_take isl_map *map)
{
isl_set *domain;
isl_set *range;
domain = isl_map_domain(isl_map_copy(map));
domain = isl_set_coalesce(domain);
range = isl_map_range(isl_map_copy(map));
range = isl_set_coalesce(range);
return box_closure_on_domain(map, domain, range, 0);
}
/* Given a map, compute the smallest superset of this map that is of the form
*
* { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p }
*
* (where p ranges over the (non-parametric) dimensions),
* compute the transitive and partially reflexive closure of this map, i.e.,
*
* { i -> j : exists k >= 0:
* k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p }
*
* and intersect domain and range of this transitive closure with
* the given domain.
*/
static __isl_give isl_map *box_closure_with_identity(__isl_take isl_map *map,
__isl_take isl_set *dom)
{
return box_closure_on_domain(map, dom, isl_set_copy(dom), 1);
}
/* Check whether app is the transitive closure of map.
* In particular, check that app is acyclic and, if so,
* check that
*
* app \subset (map \cup (map \circ app))
*/
static isl_bool check_exactness_omega(__isl_keep isl_map *map,
__isl_keep isl_map *app)
{
isl_set *delta;
int i;
isl_bool is_empty, is_exact;
isl_size d;
isl_map *test;
delta = isl_map_deltas(isl_map_copy(app));
d = isl_set_dim(delta, isl_dim_set);
if (d < 0)
delta = isl_set_free(delta);
for (i = 0; i < d; ++i)
delta = isl_set_fix_si(delta, isl_dim_set, i, 0);
is_empty = isl_set_is_empty(delta);
isl_set_free(delta);
if (is_empty < 0 || !is_empty)
return is_empty;
test = isl_map_apply_range(isl_map_copy(app), isl_map_copy(map));
test = isl_map_union(test, isl_map_copy(map));
is_exact = isl_map_is_subset(app, test);
isl_map_free(test);
return is_exact;
}
/* Check if basic map M_i can be combined with all the other
* basic maps such that
*
* (\cup_j M_j)^+
*
* can be computed as
*
* M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+
*
* In particular, check if we can compute a compact representation
* of
*
* M_i^* \circ M_j \circ M_i^*
*
* for each j != i.
* Let M_i^? be an extension of M_i^+ that allows paths
* of length zero, i.e., the result of box_closure(., 1).
* The criterion, as proposed by Kelly et al., is that
* id = M_i^? - M_i^+ can be represented as a basic map
* and that
*
* id \circ M_j \circ id = M_j
*
* for each j != i.
*
* If this function returns 1, then tc and qc are set to
* M_i^+ and M_i^?, respectively.
*/
static int can_be_split_off(__isl_keep isl_map *map, int i,
__isl_give isl_map **tc, __isl_give isl_map **qc)
{
isl_map *map_i, *id = NULL;
int j = -1;
isl_set *C;
*tc = NULL;
*qc = NULL;
C = isl_set_union(isl_map_domain(isl_map_copy(map)),
isl_map_range(isl_map_copy(map)));
C = isl_set_from_basic_set(isl_set_simple_hull(C));
if (!C)
goto error;
map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i]));
*tc = box_closure(isl_map_copy(map_i));
*qc = box_closure_with_identity(map_i, C);
id = isl_map_subtract(isl_map_copy(*qc), isl_map_copy(*tc));
if (!id || !*qc)
goto error;
if (id->n != 1 || (*qc)->n != 1)
goto done;
for (j = 0; j < map->n; ++j) {
isl_map *map_j, *test;
int is_ok;
if (i == j)
continue;
map_j = isl_map_from_basic_map(
isl_basic_map_copy(map->p[j]));
test = isl_map_apply_range(isl_map_copy(id),
isl_map_copy(map_j));
test = isl_map_apply_range(test, isl_map_copy(id));
is_ok = isl_map_is_equal(test, map_j);
isl_map_free(map_j);
isl_map_free(test);
if (is_ok < 0)
goto error;
if (!is_ok)
break;
}
done:
isl_map_free(id);
if (j == map->n)
return 1;
isl_map_free(*qc);
isl_map_free(*tc);
*qc = NULL;
*tc = NULL;
return 0;
error:
isl_map_free(id);
isl_map_free(*qc);
isl_map_free(*tc);
*qc = NULL;
*tc = NULL;
return -1;
}
static __isl_give isl_map *box_closure_with_check(__isl_take isl_map *map,
isl_bool *exact)
{
isl_map *app;
app = box_closure(isl_map_copy(map));
if (exact) {
isl_bool is_exact = check_exactness_omega(map, app);
if (is_exact < 0)
app = isl_map_free(app);
else
*exact = is_exact;
}
isl_map_free(map);
return app;
}
/* Compute an overapproximation of the transitive closure of "map"
* using a variation of the algorithm from
* "Transitive Closure of Infinite Graphs and its Applications"
* by Kelly et al.
*
* We first check whether we can can split of any basic map M_i and
* compute
*
* (\cup_j M_j)^+
*
* as
*
* M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+
*
* using a recursive call on the remaining map.
*
* If not, we simply call box_closure on the whole map.
*/
static __isl_give isl_map *transitive_closure_omega(__isl_take isl_map *map,
isl_bool *exact)
{
int i, j;
isl_bool exact_i;
isl_map *app;
if (!map)
return NULL;
if (map->n == 1)
return box_closure_with_check(map, exact);
for (i = 0; i < map->n; ++i) {
int ok;
isl_map *qc, *tc;
ok = can_be_split_off(map, i, &tc, &qc);
if (ok < 0)
goto error;
if (!ok)
continue;
app = isl_map_alloc_space(isl_map_get_space(map), map->n - 1, 0);
for (j = 0; j < map->n; ++j) {
if (j == i)
continue;
app = isl_map_add_basic_map(app,
isl_basic_map_copy(map->p[j]));
}
app = isl_map_apply_range(isl_map_copy(qc), app);
app = isl_map_apply_range(app, qc);
app = isl_map_union(tc, transitive_closure_omega(app, NULL));
exact_i = check_exactness_omega(map, app);
if (exact_i == isl_bool_true) {
if (exact)
*exact = exact_i;
isl_map_free(map);
return app;
}
isl_map_free(app);
if (exact_i < 0)
goto error;
}
return box_closure_with_check(map, exact);
error:
isl_map_free(map);
return NULL;
}
/* Compute the transitive closure of "map", or an overapproximation.
* If the result is exact, then *exact is set to 1.
* Simply use map_power to compute the powers of map, but tell
* it to project out the lengths of the paths instead of equating
* the length to a parameter.
*/
__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map,
isl_bool *exact)
{
isl_space *target_dim;
isl_bool closed;
if (!map)
goto error;
if (map->ctx->opt->closure == ISL_CLOSURE_BOX)
return transitive_closure_omega(map, exact);
map = isl_map_compute_divs(map);
map = isl_map_coalesce(map);
closed = isl_map_is_transitively_closed(map);
if (closed < 0)
goto error;
if (closed) {
if (exact)
*exact = isl_bool_true;
return map;
}
target_dim = isl_map_get_space(map);
map = map_power(map, exact, 1);
map = isl_map_reset_space(map, target_dim);
return map;
error:
isl_map_free(map);
return NULL;
}
static isl_stat inc_count(__isl_take isl_map *map, void *user)
{
int *n = user;
*n += map->n;
isl_map_free(map);
return isl_stat_ok;
}
static isl_stat collect_basic_map(__isl_take isl_map *map, void *user)
{
int i;
isl_basic_map ***next = user;
for (i = 0; i < map->n; ++i) {
**next = isl_basic_map_copy(map->p[i]);
if (!**next)
goto error;
(*next)++;
}
isl_map_free(map);
return isl_stat_ok;
error:
isl_map_free(map);
return isl_stat_error;
}
/* Perform Floyd-Warshall on the given list of basic relations.
* The basic relations may live in different dimensions,
* but basic relations that get assigned to the diagonal of the
* grid have domains and ranges of the same dimension and so
* the standard algorithm can be used because the nested transitive
* closures are only applied to diagonal elements and because all
* compositions are performed on relations with compatible domains and ranges.
*/
static __isl_give isl_union_map *union_floyd_warshall_on_list(isl_ctx *ctx,
__isl_keep isl_basic_map **list, int n, isl_bool *exact)
{
int i, j, k;
int n_group;
int *group = NULL;
isl_set **set = NULL;
isl_map ***grid = NULL;
isl_union_map *app;
group = setup_groups(ctx, list, n, &set, &n_group);
if (!group)
goto error;
grid = isl_calloc_array(ctx, isl_map **, n_group);
if (!grid)
goto error;
for (i = 0; i < n_group; ++i) {
grid[i] = isl_calloc_array(ctx, isl_map *, n_group);
if (!grid[i])
goto error;
for (j = 0; j < n_group; ++j) {
isl_space *space1, *space2, *space;
space1 = isl_space_reverse(isl_set_get_space(set[i]));
space2 = isl_set_get_space(set[j]);
space = isl_space_join(space1, space2);
grid[i][j] = isl_map_empty(space);
}
}
for (k = 0; k < n; ++k) {
i = group[2 * k];
j = group[2 * k + 1];
grid[i][j] = isl_map_union(grid[i][j],
isl_map_from_basic_map(
isl_basic_map_copy(list[k])));
}
floyd_warshall_iterate(grid, n_group, exact);
app = isl_union_map_empty(isl_map_get_space(grid[0][0]));
for (i = 0; i < n_group; ++i) {
for (j = 0; j < n_group; ++j)
app = isl_union_map_add_map(app, grid[i][j]);
free(grid[i]);
}
free(grid);
for (i = 0; i < 2 * n; ++i)
isl_set_free(set[i]);
free(set);
free(group);
return app;
error:
if (grid)
for (i = 0; i < n_group; ++i) {
if (!grid[i])
continue;
for (j = 0; j < n_group; ++j)
isl_map_free(grid[i][j]);
free(grid[i]);
}
free(grid);
if (set) {
for (i = 0; i < 2 * n; ++i)
isl_set_free(set[i]);
free(set);
}
free(group);
return NULL;
}
/* Perform Floyd-Warshall on the given union relation.
* The implementation is very similar to that for non-unions.
* The main difference is that it is applied unconditionally.
* We first extract a list of basic maps from the union map
* and then perform the algorithm on this list.
*/
static __isl_give isl_union_map *union_floyd_warshall(
__isl_take isl_union_map *umap, isl_bool *exact)
{
int i, n;
isl_ctx *ctx;
isl_basic_map **list = NULL;
isl_basic_map **next;
isl_union_map *res;
n = 0;
if (isl_union_map_foreach_map(umap, inc_count, &n) < 0)
goto error;
ctx = isl_union_map_get_ctx(umap);
list = isl_calloc_array(ctx, isl_basic_map *, n);
if (!list)
goto error;
next = list;
if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0)
goto error;
res = union_floyd_warshall_on_list(ctx, list, n, exact);
if (list) {
for (i = 0; i < n; ++i)
isl_basic_map_free(list[i]);
free(list);
}
isl_union_map_free(umap);
return res;
error:
if (list) {
for (i = 0; i < n; ++i)
isl_basic_map_free(list[i]);
free(list);
}
isl_union_map_free(umap);
return NULL;
}
/* Decompose the give union relation into strongly connected components.
* The implementation is essentially the same as that of
* construct_power_components with the major difference that all
* operations are performed on union maps.
*/
static __isl_give isl_union_map *union_components(
__isl_take isl_union_map *umap, isl_bool *exact)
{
int i;
int n;
isl_ctx *ctx;
isl_basic_map **list = NULL;
isl_basic_map **next;
isl_union_map *path = NULL;
struct isl_tc_follows_data data;
struct isl_tarjan_graph *g = NULL;
int c, l;
int recheck = 0;
n = 0;
if (isl_union_map_foreach_map(umap, inc_count, &n) < 0)
goto error;
if (n == 0)
return umap;
if (n <= 1)
return union_floyd_warshall(umap, exact);
ctx = isl_union_map_get_ctx(umap);
list = isl_calloc_array(ctx, isl_basic_map *, n);
if (!list)
goto error;
next = list;
if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0)
goto error;
data.list = list;
data.check_closed = 0;
g = isl_tarjan_graph_init(ctx, n, &basic_map_follows, &data);
if (!g)
goto error;
c = 0;
i = 0;
l = n;
path = isl_union_map_empty(isl_union_map_get_space(umap));
while (l) {
isl_union_map *comp;
isl_union_map *path_comp, *path_comb;
comp = isl_union_map_empty(isl_union_map_get_space(umap));
while (g->order[i] != -1) {
comp = isl_union_map_add_map(comp,
isl_map_from_basic_map(
isl_basic_map_copy(list[g->order[i]])));
--l;
++i;
}
path_comp = union_floyd_warshall(comp, exact);
path_comb = isl_union_map_apply_range(isl_union_map_copy(path),
isl_union_map_copy(path_comp));
path = isl_union_map_union(path, path_comp);
path = isl_union_map_union(path, path_comb);
++i;
++c;
}
if (c > 1 && data.check_closed && !*exact) {
isl_bool closed;
closed = isl_union_map_is_transitively_closed(path);
if (closed < 0)
goto error;
recheck = !closed;
}
isl_tarjan_graph_free(g);
for (i = 0; i < n; ++i)
isl_basic_map_free(list[i]);
free(list);
if (recheck) {
isl_union_map_free(path);
return union_floyd_warshall(umap, exact);
}
isl_union_map_free(umap);
return path;
error:
isl_tarjan_graph_free(g);
if (list) {
for (i = 0; i < n; ++i)
isl_basic_map_free(list[i]);
free(list);
}
isl_union_map_free(umap);
isl_union_map_free(path);
return NULL;
}
/* Compute the transitive closure of "umap", or an overapproximation.
* If the result is exact, then *exact is set to 1.
*/
__isl_give isl_union_map *isl_union_map_transitive_closure(
__isl_take isl_union_map *umap, isl_bool *exact)
{
isl_bool closed;
if (!umap)
return NULL;
if (exact)
*exact = isl_bool_true;
umap = isl_union_map_compute_divs(umap);
umap = isl_union_map_coalesce(umap);
closed = isl_union_map_is_transitively_closed(umap);
if (closed < 0)
goto error;
if (closed)
return umap;
umap = union_components(umap, exact);
return umap;
error:
isl_union_map_free(umap);
return NULL;
}
struct isl_union_power {
isl_union_map *pow;
isl_bool *exact;
};
static isl_stat power(__isl_take isl_map *map, void *user)
{
struct isl_union_power *up = user;
map = isl_map_power(map, up->exact);
up->pow = isl_union_map_from_map(map);
return isl_stat_error;
}
/* Construct a map [[x]->[y]] -> [y-x], with parameters prescribed by "space".
*/
static __isl_give isl_union_map *deltas_map(__isl_take isl_space *space)
{
isl_basic_map *bmap;
space = isl_space_add_dims(space, isl_dim_in, 1);
space = isl_space_add_dims(space, isl_dim_out, 1);
bmap = isl_basic_map_universe(space);
bmap = isl_basic_map_deltas_map(bmap);
return isl_union_map_from_map(isl_map_from_basic_map(bmap));
}
/* Compute the positive powers of "map", or an overapproximation.
* The result maps the exponent to a nested copy of the corresponding power.
* If the result is exact, then *exact is set to 1.
*/
__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap,
isl_bool *exact)
{
isl_size n;
isl_union_map *inc;
isl_union_map *dm;
n = isl_union_map_n_map(umap);
if (n < 0)
return isl_union_map_free(umap);
if (n == 0)
return umap;
if (n == 1) {
struct isl_union_power up = { NULL, exact };
isl_union_map_foreach_map(umap, &power, &up);
isl_union_map_free(umap);
return up.pow;
}
inc = isl_union_map_from_map(increment(isl_union_map_get_space(umap)));
umap = isl_union_map_product(inc, umap);
umap = isl_union_map_transitive_closure(umap, exact);
umap = isl_union_map_zip(umap);
dm = deltas_map(isl_union_map_get_space(umap));
umap = isl_union_map_apply_domain(umap, dm);
return umap;
}
#undef TYPE
#define TYPE isl_map
#include "isl_power_templ.c"
#undef TYPE
#define TYPE isl_union_map
#include "isl_power_templ.c"
| {
"content_hash": "6d1c355ba27568c735d3853f4c8e4ad5",
"timestamp": "",
"source": "github",
"line_count": 2939,
"max_line_length": 79,
"avg_line_length": 26.19360326641715,
"alnum_prop": 0.6282685787771326,
"repo_name": "Meinersbur/isl",
"id": "2733cee563d45db817bb078a195f5552ec007fa8",
"size": "77240",
"binary": false,
"copies": "8",
"ref": "refs/heads/master",
"path": "isl_transitive_closure.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "5275210"
},
{
"name": "C++",
"bytes": "358515"
},
{
"name": "M4",
"bytes": "135582"
},
{
"name": "Makefile",
"bytes": "18299"
},
{
"name": "Python",
"bytes": "15341"
},
{
"name": "Scala",
"bytes": "1789"
},
{
"name": "Shell",
"bytes": "3204"
},
{
"name": "Smalltalk",
"bytes": "152425"
},
{
"name": "SuperCollider",
"bytes": "8868"
}
],
"symlink_target": ""
} |
<?php
// Copyright 2017 DAIMTO ([Linda Lawton](https://twitter.com/LindaLawtonDK)) : [www.daimto.com](http://www.daimto.com/)
//
// 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by DAIMTO-Google-apis-Sample-generator 1.0.0
// Template File Name: methodTemplate.tt
// Build date: 2017-10-08
// PHP generator version: 1.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// About
//
// Unofficial sample for the webmasters v3 API for PHP.
// This sample is designed to be used with the Google PHP client library. (https://github.com/google/google-api-php-client)
//
// API Description: View Google Search Console data for your verified sites.
// API Documentation Link https://developers.google.com/webmaster-tools/
//
// Discovery Doc https://www.googleapis.com/discovery/v1/apis/webmasters/v3/rest
//
//------------------------------------------------------------------------------
// Installation
//
// The preferred method is via https://getcomposer.org. Follow the installation instructions https://getcomposer.org/doc/00-intro.md
// if you do not already have composer installed.
//
// Once composer is installed, execute the following command in your project root to install this library:
//
// composer require google/apiclient:^2.0
//
//------------------------------------------------------------------------------
// Load the Google API PHP Client Library.
require_once __DIR__ . '/vendor/autoload.php';
session_start();
/***************************************************
* Include this line for service account authencation. Note: Not all APIs support service accounts.
//require_once __DIR__ . '/ServiceAccount.php';
* Include the following four lines Oauth2 authencation.
* require_once __DIR__ . '/Oauth2Authentication.php';
* $_SESSION['mainScript'] = basename($_SERVER['PHP_SELF']); // Oauth2callback.php will return here.
* $client = getGoogleClient();
* $service = new Google_Service_Webmasters($client);
****************************************************/
// Option paramaters can be set as needed.
$optParams = array(
'fields' => '*'
);
// Single Request.
$results = sitemapsDeleteExample($service, $siteUrl, $feedpath, $optParams);
/**
* Deletes a sitemap from this site.
* @service Authenticated Webmasters service.
* @optParams Optional paramaters are not required by a request.
* @feedpath The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml
* @siteUrl The site's URL, including protocol. For example: http://www.example.com/
*/
function sitemapsDeleteExample($service, $siteUrl, $feedpath, $optParams)
{
try
{
// Parameter validation.
if ($service == null)
throw new Exception("service is required.");
if ($optParams == null)
throw new Exception("optParams is required.");
if (feedpath == null)
throw new Exception("feedpath is required.");
if (siteUrl == null)
throw new Exception("siteUrl is required.");
// Make the request and return the results.
$service->sitemaps->DeleteSitemaps($siteUrl, $feedpath, $optParams);
}
catch (Exception $e)
{
print "An error occurred: " . $e->getMessage();
}
}
?>
| {
"content_hash": "592f647d435f974ff150f0c3a79d350b",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 133,
"avg_line_length": 41.37894736842105,
"alnum_prop": 0.6387687611294836,
"repo_name": "LindaLawton/Google-APIs-PHP-Samples",
"id": "d7cf65b9fea15edb5fcf59ae24d7820ebeb647f3",
"size": "3933",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Samples/Search Console API/v3/SitemapsDeleteSample.php",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="script.js"></script>
<script src="test.js"></script>
</body>
</html> | {
"content_hash": "ce5288bb6ad33fba4afba9a7a558aebc",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 34,
"avg_line_length": 16.727272727272727,
"alnum_prop": 0.625,
"repo_name": "slbedu/front-end-web-2015",
"id": "7e3d180566a0876a4d1b842308d6bdd10b4557aa",
"size": "184",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "exercises/04-javascript-oop/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "47028"
},
{
"name": "HTML",
"bytes": "217700"
},
{
"name": "JavaScript",
"bytes": "179906"
}
],
"symlink_target": ""
} |
package org.fest.assertions.condition;
import static junit.framework.Assert.assertEquals;
import static org.fest.assertions.test.ExpectedException.none;
import java.util.*;
import org.fest.assertions.core.*;
import org.fest.assertions.test.ExpectedException;
import org.junit.*;
/**
* Tests for <code>{@link AllOf#allOf(Condition...)}</code>.
*
* @author Yvonne Wang
*/
public class AllOf_allOf_with_Collection_Test {
@Rule public ExpectedException thrown = none();
@Test public void should_create_new_AllOf_with_passed_Conditions() {
Collection<Condition<Object>> conditions = new ArrayList<Condition<Object>>();
conditions.add(new TestCondition<Object>());
Condition<Object> created = AllOf.allOf(conditions);
assertEquals(AllOf.class, created.getClass());
AllOf<Object> allOf = (AllOf<Object>) created;
assertEquals(conditions, allOf.conditions);
}
}
| {
"content_hash": "1983333d3c4b41114e974cc48b265356",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 82,
"avg_line_length": 29.833333333333332,
"alnum_prop": 0.7396648044692737,
"repo_name": "nicstrong/fest-assertions-android",
"id": "9106dda17a8e549d2952108774585a7be47dde84",
"size": "1526",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "fest-assert-android-test/src/main/java/org/fest/assertions/condition/AllOf_allOf_with_Collection_Test.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1969088"
}
],
"symlink_target": ""
} |
void genericPlaySound(char* toplay, int soundmode)
{
switch(soundmode)
{
case SOUND_MODE_SYNC:
playSYNCsound(toplay);
break;
case SOUND_MODE_ASYNC:
playASYNCsound(toplay);
break;
case SOUND_MODE_MIX:
playMIXsound(toplay);
break;
}
}
void playRoundDump(PROUND round, bool multiple, int soundmode)
{
char* toplay;
if(multiple)
toplay = DUMP_GENERIC_AMMO_SOUND;
else
{
switch(RetrieveGlobalSubAmmoType(round))
{
default:
case AMMOTYPE_BULLET:
toplay = DUMP_BULLET_SOUND;
break;
case AMMOTYPE_SHOTGUNSHELL:
toplay = DUMP_SHELL_SOUND;
break;
case AMMOTYPE_EXPLOSIVE:
toplay = DUMP_EXPLOSIVE_SOUND;
break;
}
}
genericPlaySound(toplay, soundmode);
}
void playRoundInsert(PROUND round, bool speedload, bool speedfill, int soundmode)
{
char* toplay;
if(speedload){
toplay = LOAD_SPEEDLOAD_SOUND;
}
else{
switch(RetrieveGlobalSubAmmoType(round))
{
default:
case AMMOTYPE_BULLET:
if(speedfill)
toplay = LOAD_FILLBULLET_SOUND;
else
toplay = LOAD_INSERTBULLET_SOUND;
break;
case AMMOTYPE_SHOTGUNSHELL:
case AMMOTYPE_EXPLOSIVE:
if(speedfill)
toplay = LOAD_FILLSHELL_SOUND;
else
toplay = LOAD_INSERTSHELL_SOUND;
break;
}
}
genericPlaySound(toplay, soundmode);
}
void playWeaponSound(PWEAPON weapon, int field, int soundmode)
{
char buf[500];
if (weapon->soundfilename[field]){
genericPlaySound(weapon->soundfilename[field], soundmode);
}
else{
switch (field){
case WEAPONSOUND_SHOOT:
strcpy(buf, WEAPONSOUND_DEFAULT_SHOOT);
break;
case WEAPONSOUND_DROP:
strcpy(buf, WEAPONSOUND_DEFAULT_DROP);
break;
case WEAPONSOUND_THROW:
strcpy(buf, WEAPONSOUND_DEFAULT_THROW);
break;
case WEAPONSOUND_RELOAD:
strcpy(buf, WEAPONSOUND_DEFAULT_RELOAD);
break;
case WEAPONSOUND_BREAK:
strcpy(buf, WEAPONSOUND_DEFAULT_BREAK);
break;
case WEAPONSOUND_HIT:
strcpy(buf, WEAPONSOUND_DEFAULT_HIT);
break;
}
genericPlaySound(buf, soundmode);
}
}
void playAmmoImpactSound(ROUND round, int soundmode)
{
char* name;
PPOTYPE mainammo;
mainammo = ReturnListItemByNumber(round.mainammotype - 1, globals.globalweaponsammo.ammolist);
if(!mainammo){
return;
}
switch(RetrieveGlobalSubAmmoType(&round)){
case AMMOTYPE_BULLET:
name = mainammo->ammo.specialammo.bulletdata[round.subammotype].impactsound;
if(name){
genericPlaySound(name, soundmode);
}
else{
genericPlaySound(IMPACTSOUND_DEFAULT_BULLET, soundmode);
}
return;
case AMMOTYPE_SHOTGUNSHELL:
name = mainammo->ammo.specialammo.shelldata[round.subammotype].impactsound;
if(name){
genericPlaySound(name, soundmode);
}
else{
genericPlaySound(IMPACTSOUND_DEFAULT_SHELL, soundmode);
}
return;
case AMMOTYPE_EXPLOSIVE:
name = mainammo->ammo.specialammo.explosivedata[round.subammotype].impactsound;
if(name){
genericPlaySound(name, soundmode);
}
else{
genericPlaySound(IMPACTSOUND_DEFAULT_EXPLOSIVE, soundmode);
}
return;
}
}
void playRicochet(int soundmode)
{
char buf[255];
sprintf(buf, "sounds\\hits\\ric%d.wav", rand()%5+1);
genericPlaySound(buf, soundmode);
}
void playWeaponSilencer(int soundmode)
{
genericPlaySound(SILENCER_SOUND, soundmode);
}
void playWeaponFlashsuppressor(int soundmode)
{
genericPlaySound(FLASHSUPPRESSOR_SOUND, soundmode);
}
void playWeaponLasersight(int soundmode)
{
genericPlaySound(LASERSIGHT_SOUND, soundmode);
}
void twobeeps()
{
genericPlaySound(TWOBEEPS_SOUND, SOUND_MODE_MIX);
}
void twobeepsmod()
{
genericPlaySound(TWOBEEPSMOD_SOUND, SOUND_MODE_MIX);
}
void onebeepa()
{
genericPlaySound(BEEPA_SOUND, SOUND_MODE_MIX);
}
void onebeepb()
{
genericPlaySound(BEEPB_SOUND, SOUND_MODE_MIX);
}
void onebeepc()
{
genericPlaySound(BEEPC_SOUND, SOUND_MODE_MIX);
}
void typeclick()
{
genericPlaySound(TYPEWRITER_SOUND, SOUND_MODE_MIX);
} | {
"content_hash": "d589e494aad656662161e36cca35f491",
"timestamp": "",
"source": "github",
"line_count": 193,
"max_line_length": 95,
"avg_line_length": 20.849740932642487,
"alnum_prop": 0.6970675944333996,
"repo_name": "agentcox/TheAgencyRazorOne",
"id": "6557b8baab812225331f91505d5b14dfcb6a6853",
"size": "4071",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "sounds.cpp",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "229546"
},
{
"name": "C++",
"bytes": "1395752"
},
{
"name": "Clarion",
"bytes": "9047"
},
{
"name": "Objective-C",
"bytes": "35"
}
],
"symlink_target": ""
} |
"""Functions that deals with local and device ports."""
import contextlib
import fcntl
import httplib
import logging
import os
import re
import socket
import traceback
import cmd_helper
import constants
#The following two methods are used to allocate the port source for various
# types of test servers. Because some net relates tests can be run on shards
# at same time, it's important to have a mechanism to allocate the port process
# safe. In here, we implement the safe port allocation by leveraging flock.
def ResetTestServerPortAllocation():
"""Reset the port allocation to start from TEST_SERVER_PORT_FIRST.
Returns:
Returns True if reset successes. Otherwise returns False.
"""
try:
with open(constants.TEST_SERVER_PORT_FILE, 'w') as fp:
fp.write('%d' % constants.TEST_SERVER_PORT_FIRST)
if os.path.exists(constants.TEST_SERVER_PORT_LOCKFILE):
os.unlink(constants.TEST_SERVER_PORT_LOCKFILE)
return True
except Exception as e:
logging.error(e)
return False
def AllocateTestServerPort():
"""Allocate a port incrementally.
Returns:
Returns a valid port which should be in between TEST_SERVER_PORT_FIRST and
TEST_SERVER_PORT_LAST. Returning 0 means no more valid port can be used.
"""
port = 0
try:
fp_lock = open(constants.TEST_SERVER_PORT_LOCKFILE, 'w')
fcntl.flock(fp_lock, fcntl.LOCK_EX)
# Get current valid port and calculate next valid port.
assert os.path.exists(constants.TEST_SERVER_PORT_FILE)
with open(constants.TEST_SERVER_PORT_FILE, 'r+') as fp:
port = int(fp.read())
while IsHostPortUsed(port):
port += 1
if (port > constants.TEST_SERVER_PORT_LAST or
port < constants.TEST_SERVER_PORT_FIRST):
port = 0
else:
fp.seek(0, os.SEEK_SET)
fp.write('%d' % (port + 1))
except Exception as e:
logging.info(e)
finally:
if fp_lock:
fcntl.flock(fp_lock, fcntl.LOCK_UN)
fp_lock.close()
logging.info('Allocate port %d for test server.', port)
return port
def IsHostPortUsed(host_port):
"""Checks whether the specified host port is used or not.
Uses -n -P to inhibit the conversion of host/port numbers to host/port names.
Args:
host_port: Port on host we want to check.
Returns:
True if the port on host is already used, otherwise returns False.
"""
port_info = '(127\.0\.0\.1)|(localhost)\:%d' % host_port
# TODO(jnd): Find a better way to filter the port.
re_port = re.compile(port_info, re.MULTILINE)
if re_port.findall(cmd_helper.GetCmdOutput(['lsof', '-nPi:%d' % host_port])):
return True
return False
def IsDevicePortUsed(adb, device_port, state=''):
"""Checks whether the specified device port is used or not.
Args:
adb: Instance of AndroidCommands for talking to the device.
device_port: Port on device we want to check.
state: String of the specified state. Default is empty string, which
means any state.
Returns:
True if the port on device is already used, otherwise returns False.
"""
base_url = '127.0.0.1:%d' % device_port
netstat_results = adb.RunShellCommand('netstat', log_result=False)
for single_connect in netstat_results:
# Column 3 is the local address which we want to check with.
connect_results = single_connect.split()
is_state_match = connect_results[5] == state if state else True
if connect_results[3] == base_url and is_state_match:
return True
return False
def IsHttpServerConnectable(host, port, tries=3, command='GET', path='/',
expected_read='', timeout=2):
"""Checks whether the specified http server is ready to serve request or not.
Args:
host: Host name of the HTTP server.
port: Port number of the HTTP server.
tries: How many times we want to test the connection. The default value is
3.
command: The http command we use to connect to HTTP server. The default
command is 'GET'.
path: The path we use when connecting to HTTP server. The default path is
'/'.
expected_read: The content we expect to read from the response. The default
value is ''.
timeout: Timeout (in seconds) for each http connection. The default is 2s.
Returns:
Tuple of (connect status, client error). connect status is a boolean value
to indicate whether the server is connectable. client_error is the error
message the server returns when connect status is false.
"""
assert tries >= 1
for i in xrange(0, tries):
client_error = None
try:
with contextlib.closing(httplib.HTTPConnection(
host, port, timeout=timeout)) as http:
# Output some debug information when we have tried more than 2 times.
http.set_debuglevel(i >= 2)
http.request(command, path)
r = http.getresponse()
content = r.read()
if r.status == 200 and r.reason == 'OK' and content == expected_read:
return (True, '')
client_error = ('Bad response: %s %s version %s\n ' %
(r.status, r.reason, r.version) +
'\n '.join([': '.join(h) for h in r.getheaders()]))
except (httplib.HTTPException, socket.error) as e:
# Probably too quick connecting: try again.
exception_error_msgs = traceback.format_exception_only(type(e), e)
if exception_error_msgs:
client_error = ''.join(exception_error_msgs)
# Only returns last client_error.
return (False, client_error or 'Timeout')
| {
"content_hash": "4f800006316d3dd78ec19683ead33857",
"timestamp": "",
"source": "github",
"line_count": 156,
"max_line_length": 79,
"avg_line_length": 35.544871794871796,
"alnum_prop": 0.6703336339044184,
"repo_name": "keishi/chromium",
"id": "be994c362c74a0ec26f98688d72fb573fc20cfa6",
"size": "5712",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "build/android/pylib/ports.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "853"
},
{
"name": "Arduino",
"bytes": "464"
},
{
"name": "Assembly",
"bytes": "1172794"
},
{
"name": "C",
"bytes": "67452317"
},
{
"name": "C#",
"bytes": "1132"
},
{
"name": "C++",
"bytes": "132681259"
},
{
"name": "F#",
"bytes": "381"
},
{
"name": "Go",
"bytes": "19048"
},
{
"name": "Java",
"bytes": "361412"
},
{
"name": "JavaScript",
"bytes": "16603687"
},
{
"name": "Objective-C",
"bytes": "9609581"
},
{
"name": "PHP",
"bytes": "97796"
},
{
"name": "Perl",
"bytes": "918683"
},
{
"name": "Python",
"bytes": "6407891"
},
{
"name": "R",
"bytes": "524"
},
{
"name": "Shell",
"bytes": "4192593"
},
{
"name": "Tcl",
"bytes": "277077"
}
],
"symlink_target": ""
} |
'use strict';
var reporters = require('../../').reporters;
var Doc = reporters.Doc;
describe('Doc reporter', function () {
var stdout;
var stdoutWrite;
var runner = {};
beforeEach(function () {
stdout = [];
stdoutWrite = process.stdout.write;
process.stdout.write = function (string) {
stdout.push(string);
};
});
describe('on suite', function () {
describe('if suite root does not exist', function () {
var expectedTitle = 'expectedTitle';
var unescapedTitle = '<div>' + expectedTitle + '</div>';
var suite = {
root: false,
title: expectedTitle
};
it('should log html with indents and expected title', function () {
runner.on = function (event, callback) {
if (event === 'suite') {
callback(suite);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <section class="suite">\n',
' <h1>' + expectedTitle + '</h1>\n',
' <dl>\n'
];
stdout.should.deepEqual(expectedArray);
});
it('should escape title where necessary', function () {
var suite = {
root: false,
title: unescapedTitle
};
expectedTitle = '<div>' + expectedTitle + '</div>';
runner.on = function (event, callback) {
if (event === 'suite') {
callback(suite);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <section class="suite">\n',
' <h1>' + expectedTitle + '</h1>\n',
' <dl>\n'
];
stdout.should.deepEqual(expectedArray);
});
});
describe('if suite root does exist', function () {
var suite = {
root: true
};
it('should not log any html', function () {
runner.on = function (event, callback) {
if (event === 'suite') {
callback(suite);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
stdout.should.be.empty();
});
});
});
describe('on suite end', function () {
describe('if suite root does not exist', function () {
var suite = {
root: false
};
it('should log expected html with indents', function () {
runner.on = function (event, callback) {
if (event === 'suite end') {
callback(suite);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' </dl>\n', '</section>\n'
];
stdout.should.deepEqual(expectedArray);
});
});
describe('if suite root does exist', function () {
var suite = {
root: true
};
it('should not log any html', function () {
runner.on = function (event, callback) {
if (event === 'suite end') {
callback(suite);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
stdout.should.be.empty();
});
});
});
describe('on pass', function () {
var expectedTitle = 'some tite';
var expectedBody = 'some body';
var test = {
title: expectedTitle,
body: expectedBody,
slow: function () {
return '';
}
};
it('should log html with indents and expected title and body', function () {
runner.on = function (event, callback) {
if (event === 'pass') {
callback(test);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <dt>' + expectedTitle + '</dt>\n',
' <dd><pre><code>' + expectedBody + '</code></pre></dd>\n'
];
stdout.should.deepEqual(expectedArray);
});
it('should escape title and body where necessary', function () {
var unescapedTitle = '<div>' + expectedTitle + '</div>';
var unescapedBody = '<div>' + expectedBody + '</div>';
test.title = unescapedTitle;
test.body = unescapedBody;
var expectedEscapedTitle = '<div>' + expectedTitle + '</div>';
var expectedEscapedBody = '<div>' + expectedBody + '</div>';
runner.on = function (event, callback) {
if (event === 'pass') {
callback(test);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <dt>' + expectedEscapedTitle + '</dt>\n',
' <dd><pre><code>' + expectedEscapedBody + '</code></pre></dd>\n'
];
stdout.should.deepEqual(expectedArray);
});
});
describe('on fail', function () {
var expectedTitle = 'some tite';
var expectedBody = 'some body';
var expectedError = 'some error';
var test = {
title: expectedTitle,
body: expectedBody,
slow: function () {
return '';
}
};
it('should log html with indents and expected title, body and error', function () {
runner.on = function (event, callback) {
if (event === 'fail') {
callback(test, expectedError);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <dt class="error">' + expectedTitle + '</dt>\n',
' <dd class="error"><pre><code>' + expectedBody + '</code></pre></dd>\n',
' <dd class="error">' + expectedError + '</dd>\n'
];
stdout.should.deepEqual(expectedArray);
});
it('should escape title, body and error where necessary', function () {
var unescapedTitle = '<div>' + expectedTitle + '</div>';
var unescapedBody = '<div>' + expectedBody + '</div>';
var unescapedError = '<div>' + expectedError + '</div>';
test.title = unescapedTitle;
test.body = unescapedBody;
var expectedEscapedTitle = '<div>' + expectedTitle + '</div>';
var expectedEscapedBody = '<div>' + expectedBody + '</div>';
var expectedEscapedError = '<div>' + expectedError + '</div>';
runner.on = function (event, callback) {
if (event === 'fail') {
callback(test, unescapedError);
}
};
Doc.call(this, runner);
process.stdout.write = stdoutWrite;
var expectedArray = [
' <dt class="error">' + expectedEscapedTitle + '</dt>\n',
' <dd class="error"><pre><code>' + expectedEscapedBody + '</code></pre></dd>\n',
' <dd class="error">' + expectedEscapedError + '</dd>\n'
];
stdout.should.deepEqual(expectedArray);
});
});
});
| {
"content_hash": "e2ea2e800a55ed4d16533a10dc641947",
"timestamp": "",
"source": "github",
"line_count": 213,
"max_line_length": 91,
"avg_line_length": 31.863849765258216,
"alnum_prop": 0.5260055989391483,
"repo_name": "apkiernan/mocha",
"id": "2e0d1e029e2e194d5ffefe73445d3cddd92be5b5",
"size": "6787",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "test/reporters/doc.spec.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "5616"
},
{
"name": "CoffeeScript",
"bytes": "212"
},
{
"name": "HTML",
"bytes": "7143"
},
{
"name": "JavaScript",
"bytes": "860115"
},
{
"name": "Makefile",
"bytes": "4775"
},
{
"name": "Shell",
"bytes": "2944"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "fc62565ba6ac0d40a904f9cf7eea1d20",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "a90208ba432d2d8f7289605cceaf158f162dbd67",
"size": "184",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Plantaginaceae/Dopatrium/Dopatrium japonicum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
using Lucene.Net.Util;
using NUnit.Framework;
using Assert = Lucene.Net.TestFramework.Assert;
namespace Lucene.Net.Configuration
{
// The test framework will automatically select the Codec.Default property at random from the complete
// set of codecs. For any codecs that were not registed, they need to be supressed with the SuppressCodecs attribute
// on each test class (or a base class of them).
[SuppressCodecs("Lucene3x", "Lucene40", "Lucene41", "Lucene42", "Lucene45")]
public class TestConfigurationService : LuceneTestCase
{
[Test]
public void TestRetrieveConfiguration()
{
Assert.AreEqual("fooValue", ConfigurationSettings.CurrentConfiguration["foo"]);
Assert.AreEqual("barValue", ConfigurationSettings.CurrentConfiguration["bar"]);
Assert.AreEqual("bazValue", ConfigurationSettings.CurrentConfiguration["baz"]);
}
[Test]
public void TestCustomMaxStackByteLimit()
{
// This custom value is configured in Startup.cs.
// 5000 chosen because it is not likely to ever be made a default.
Assert.AreEqual(5000, Constants.MaxStackByteLimit);
}
}
}
| {
"content_hash": "7c3d83218eb4c279b99b2616526857da",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 120,
"avg_line_length": 39.483870967741936,
"alnum_prop": 0.678921568627451,
"repo_name": "NightOwl888/lucenenet",
"id": "a2d662e87f30e1761c578b214864b146a45fbbab",
"size": "2087",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/Lucene.Net.Tests.TestFramework.DependencyInjection/Configuration/TestConfigurationService.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2827"
},
{
"name": "C#",
"bytes": "41584875"
},
{
"name": "CSS",
"bytes": "13508"
},
{
"name": "Gnuplot",
"bytes": "2444"
},
{
"name": "HTML",
"bytes": "78215"
},
{
"name": "JavaScript",
"bytes": "67020"
},
{
"name": "Liquid",
"bytes": "5637"
},
{
"name": "PowerShell",
"bytes": "150286"
},
{
"name": "Shell",
"bytes": "2611"
},
{
"name": "XSLT",
"bytes": "21773"
}
],
"symlink_target": ""
} |
<?php
namespace CourseHero\ResponsysPHP\Api\Types;
class TriggerCustomEventResponse
{
/**
*
* @var TriggerResult $result
* @access public
*/
public $result = null;
/**
*
* @param TriggerResult $result
* @access public
*/
public function __construct($result = null)
{
$this->result = $result;
}
}
| {
"content_hash": "c13afb75883ed84a53b72397f5db3fc7",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 45,
"avg_line_length": 13.72,
"alnum_prop": 0.6064139941690962,
"repo_name": "course-hero/responsys-php",
"id": "f2178f4769911eb6cab3d9327d6fadc025aad0bd",
"size": "343",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/CourseHero/ResponsysPHP/Api/Types/TriggerCustomEventResponse.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "PHP",
"bytes": "157335"
},
{
"name": "Shell",
"bytes": "1036"
}
],
"symlink_target": ""
} |
package org.dizitart.no2.objects.filters;
import lombok.Getter;
import lombok.ToString;
import org.dizitart.no2.Document;
import org.dizitart.no2.Filter;
import org.dizitart.no2.NitriteId;
import org.dizitart.no2.filters.Filters;
import org.dizitart.no2.store.NitriteMap;
import java.util.Set;
import static org.dizitart.no2.util.ValidationUtils.validateSearchTerm;
/**
* @author Anindya Chatterjee.
*/
@Getter
@ToString
class GreaterObjectFilter extends BaseObjectFilter {
private String field;
private Object value;
GreaterObjectFilter(String field, Object value) {
this.field = field;
this.value = value;
}
@Override
public Set<NitriteId> apply(NitriteMap<NitriteId, Document> documentMap) {
validateSearchTerm(nitriteMapper, field, value);
Comparable comparable;
if (nitriteMapper.isValueType(value)) {
comparable = (Comparable) nitriteMapper.asValue(value);
} else {
comparable = (Comparable) value;
}
Filter gt = Filters.gt(field, comparable);
gt.setNitriteService(nitriteService);
return gt.apply(documentMap);
}
}
| {
"content_hash": "43dd173be6bdc9a870bcc9d50e535d9a",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 78,
"avg_line_length": 25.91111111111111,
"alnum_prop": 0.7015437392795884,
"repo_name": "dizitart/nitrite-database",
"id": "21da00aba8849b4647518c3df947f8d21acc0e32",
"size": "1789",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "nitrite/src/main/java/org/dizitart/no2/objects/filters/GreaterObjectFilter.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "88932"
},
{
"name": "Dockerfile",
"bytes": "818"
},
{
"name": "HTML",
"bytes": "65990"
},
{
"name": "Java",
"bytes": "1853650"
},
{
"name": "JavaScript",
"bytes": "527529"
},
{
"name": "Kotlin",
"bytes": "57471"
},
{
"name": "Shell",
"bytes": "2926"
}
],
"symlink_target": ""
} |
#ifndef NRFX_POWER_CLOCK_H__
#define NRFX_POWER_CLOCK_H__
#include <nrfx.h>
#ifdef __cplusplus
extern "C" {
#endif
__STATIC_INLINE void nrfx_power_clock_irq_init(void);
#ifndef SUPPRESS_INLINE_IMPLEMENTATION
__STATIC_INLINE void nrfx_power_clock_irq_init(void)
{
uint8_t priority;
#if NRFX_CHECK(NRFX_POWER_ENABLED) && NRFX_CHECK(NRFX_CLOCK_ENABLED)
#if NRFX_POWER_CONFIG_IRQ_PRIORITY != NRFX_CLOCK_CONFIG_IRQ_PRIORITY
#error "IRQ priority for POWER and CLOCK have to be the same. Check <nrfx_config.h>."
#endif
priority = NRFX_POWER_CONFIG_IRQ_PRIORITY;
#elif NRFX_CHECK(NRFX_POWER_ENABLED)
priority = NRFX_POWER_CONFIG_IRQ_PRIORITY;
#elif NRFX_CHECK(NRFX_CLOCK_ENABLED)
priority = NRFX_CLOCK_CONFIG_IRQ_PRIORITY;
#endif
if (!NRFX_IRQ_IS_ENABLED(nrfx_get_irq_number(NRF_CLOCK)))
{
NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(NRF_CLOCK), priority);
NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_CLOCK));
}
}
#endif // SUPPRESS_INLINE_IMPLEMENTATION
#if NRFX_CHECK(NRFX_POWER_ENABLED) && NRFX_CHECK(NRFX_CLOCK_ENABLED)
void nrfx_power_clock_irq_handler(void);
#elif NRFX_CHECK(NRFX_POWER_ENABLED)
#define nrfx_power_irq_handler nrfx_power_clock_irq_handler
#elif NRFX_CHECK(NRFX_CLOCK_ENABLED)
#define nrfx_clock_irq_handler nrfx_power_clock_irq_handler
#endif
#ifdef __cplusplus
}
#endif
#endif // NRFX_POWER_CLOCK_H__
| {
"content_hash": "b91e374c13ae13aa72e8d950b875c3f4",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 89,
"avg_line_length": 26.576923076923077,
"alnum_prop": 0.7199710564399421,
"repo_name": "erja-gp/openthread",
"id": "043b0e49b5e486bdd9f0fcc0c5a229acaff1d4f8",
"size": "2984",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "third_party/NordicSemiconductor/nrfx/drivers/include/nrfx_power_clock.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "15850"
},
{
"name": "C",
"bytes": "940119"
},
{
"name": "C#",
"bytes": "18077"
},
{
"name": "C++",
"bytes": "4306681"
},
{
"name": "Dockerfile",
"bytes": "6256"
},
{
"name": "M4",
"bytes": "63303"
},
{
"name": "Makefile",
"bytes": "133368"
},
{
"name": "Python",
"bytes": "2012919"
},
{
"name": "Ruby",
"bytes": "3397"
},
{
"name": "Shell",
"bytes": "74907"
}
],
"symlink_target": ""
} |
<?php
$dir = dirname (__FILE__);
$dirbasename = basename ($dir);
$wgExtensionCredits['viewer3d'][] = array(
'path' => __FILE__,
'name' => 'Viewer3D',
'author' => 'Viktor Kovacs',
'url' => 'https://www.mediawiki.org/wiki/Extension:Viewer3D',
'description' => 'With this extension you can view 3D models with WebGL.',
'version' => 0.1,
'license-name' => "MIT"
);
$wgAutoloadClasses['Viewer3DHooks'] = $dir.'/Viewer3D.hooks.php';
$wgHooks['ParserFirstCallInit'][] = 'Viewer3DHooks::OnParserFirstCallInit';
$wgResourceModules['ext.Viewer3D'] = array(
'scripts' => array ('three.min.js', 'jsmodeler.js', 'online3dembedder.js', 'Viewer3D.js'),
'localBasePath' => $dir,
'remoteExtPath' => 'Viewer3D'
);
?>
| {
"content_hash": "52d1b3cebf5805cbeea89db8b1effc59",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 91,
"avg_line_length": 29.52,
"alnum_prop": 0.6368563685636857,
"repo_name": "EliasLi/JunctionHackathon",
"id": "e3810147b387a9a9120129961d0ed7d741d1068e",
"size": "738",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/3odel_old/3d/wikiextension/Viewer3D.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "6036"
},
{
"name": "HTML",
"bytes": "36285"
},
{
"name": "JavaScript",
"bytes": "1098661"
},
{
"name": "PHP",
"bytes": "1949"
},
{
"name": "Python",
"bytes": "3550"
}
],
"symlink_target": ""
} |
import { DomSanitizer } from '@angular/platform-browser';
import { ArticleVM } from '../view-models/article-vm.class';
export var ArticleToViewModelResolver = (resolutionContext: any, sanitizer: DomSanitizer): ArticleVM => {
let source = resolutionContext.sourceValue;
let target: ArticleVM = new ArticleVM();
target.title = source.title.text;
target.image = source.teaserImage.assets
? sanitizer.bypassSecurityTrustUrl(source.teaserImage.assets[0].url)
: null;
target.summary = source.summary.text;
return target;
}
| {
"content_hash": "e113120b847f89a28c1126fe201fb1ff",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 105,
"avg_line_length": 38.5,
"alnum_prop": 0.7476808905380334,
"repo_name": "edouardr/angular-kentico-headless",
"id": "a39cbca596cc20c378e474600624666ae3db44c3",
"size": "539",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/resolvers/article-to-view-model-resolver.func.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "15360"
},
{
"name": "HTML",
"bytes": "3219"
},
{
"name": "JavaScript",
"bytes": "1996"
},
{
"name": "TypeScript",
"bytes": "24435"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "ae0734b50586c3e4ea22ff9a7b5ac0a2",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "079763cd4d0c8b35d9ec7f74a586bf181172bbdb",
"size": "195",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Opizia/Opizia bracteata/ Syn. Bouteloua bracteata/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
"use strict";
const TsReader = require("../reader");
const TsDescriptorBase = require("./base");
class TsDescriptorStcReference extends TsDescriptorBase {
constructor(buffer) {
super(buffer);
}
decode() {
const reader = new TsReader(this._buffer);
const objDescriptor = {};
objDescriptor.descriptor_tag = reader.uimsbf(8);
objDescriptor.descriptor_length = reader.uimsbf(8);
reader.next(3); // reserved_future_use
objDescriptor.external_event_flag = reader.bslbf(1);
objDescriptor.STC_reference_mode = reader.uimsbf(4);
if (objDescriptor.external_event_flag === 1) {
objDescriptor.external_event_id = reader.uimsbf(16);
objDescriptor.external_service_id = reader.uimsbf(16);
objDescriptor.external_network_id = reader.uimsbf(16);
}
if (objDescriptor.STC_reference_mode === 0) {
// nothing
} else if (objDescriptor.STC_reference_mode === 1) {
reader.next(7); // reserved_future_use
objDescriptor.NPT_reference = reader.uimsbf(33);
reader.next(7); // reserved_future_use
objDescriptor.STC_reference = reader.uimsbf(33);
} else if (objDescriptor.STC_reference_mode === 3 || objDescriptor.STC_reference_mode === 5 ) {
objDescriptor.time_reference = reader.uimsbf(24);
objDescriptor.time_reference_extention = reader.uimsbf(12);
reader.next(11); // reserved_future_use
objDescriptor.STC_reference = reader.uimsbf(33);
} else {
// reserved
}
return objDescriptor;
}
}
module.exports = TsDescriptorStcReference;
| {
"content_hash": "c64f045e940502dc179bc40740d8ded8",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 103,
"avg_line_length": 35.958333333333336,
"alnum_prop": 0.6135573580533025,
"repo_name": "rndomhack/node-aribts",
"id": "8cf102d9ea884b8ebea8743007f09fc76f412cf4",
"size": "1726",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/descriptor/stc_reference.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "355538"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eclipse</groupId>
<artifactId>maven-eclipse-plugin-test-project-12</artifactId>
<version>12</version>
<packaging>ear</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>test</version>
<configuration>
<workspace>${basedir}/../../eclipse/workspaceDoesNotExist</workspace>
<wtpversion>1.0</wtpversion>
</configuration>
</plugin>
</plugins>
</build>
</project>
| {
"content_hash": "f3bfb6f194bcf8c1e67f247edbee27b0",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 104,
"avg_line_length": 36.592592592592595,
"alnum_prop": 0.6477732793522267,
"repo_name": "dmlloyd/maven-plugins",
"id": "5521cedccb621b8e8eb5a337d1b11fcd9f49c242",
"size": "988",
"binary": false,
"copies": "4",
"ref": "refs/heads/trunk",
"path": "maven-eclipse-plugin/src/test/resources/projects/project-12/pom.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "48000"
},
{
"name": "Java",
"bytes": "8214537"
},
{
"name": "JavaScript",
"bytes": "78"
},
{
"name": "Shell",
"bytes": "196"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Leafl. W. Bot. 9:15. 1959
#### Original name
null
### Remarks
null | {
"content_hash": "6fe813dfbadab35713e2b3e1f90c86b7",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 11.846153846153847,
"alnum_prop": 0.6753246753246753,
"repo_name": "mdoering/backbone",
"id": "2c4106123ffc1353f2f1f012c3424e8788e41874",
"size": "209",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Carex/Carex tahoensis/ Syn. Carex phaeocephala eastwoodiana/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
#ifndef POSITION_TOOL_TIP_H
#define POSITION_TOOL_TIP_H
#include <private/interface/ToolTip.h>
class PositionToolTip : public BToolTip {
public:
PositionToolTip();
virtual ~PositionToolTip();
virtual BView* View() const;
void Update(bigtime_t position, bigtime_t duration);
private:
class PositionView;
PositionView* fView;
};
#endif // POSITION_TOOL_TIP_H
| {
"content_hash": "452d976480cedc983898a17b5e181d02",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 58,
"avg_line_length": 16.5,
"alnum_prop": 0.6994949494949495,
"repo_name": "HaikuArchives/CherryBlossom",
"id": "3d32e17213d41e8582dac03204454a6bed1c4f3a",
"size": "511",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/interface/PositionToolTip.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1012"
},
{
"name": "C++",
"bytes": "182917"
},
{
"name": "Makefile",
"bytes": "5358"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="fr">
<head>
<!-- Generated by javadoc (version 1.7.0_45) on Fri Mar 07 22:28:48 EST 2014 -->
<title>W-Index</title>
<meta name="date" content="2014-03-07">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="W-Index";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-14.html">Prev Letter</a></li>
<li>Next Letter</li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-15.html" target="_top">Frames</a></li>
<li><a href="index-15.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">C</a> <a href="index-3.html">D</a> <a href="index-4.html">E</a> <a href="index-5.html">F</a> <a href="index-6.html">G</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">P</a> <a href="index-11.html">S</a> <a href="index-12.html">T</a> <a href="index-13.html">U</a> <a href="index-14.html">V</a> <a href="index-15.html">W</a> <a name="_W_">
<!-- -->
</a>
<h2 class="title">W</h2>
<dl>
<dt><a href="../world/Wall.html" title="class in world"><span class="strong">Wall</span></a> - Class in <a href="../world/package-summary.html">world</a></dt>
<dd>
<div class="block">A wall in the map that contains a list of vertices in clockwise order.</div>
</dd>
<dt><span class="strong"><a href="../world/Wall.html#Wall(world.Point[])">Wall(Point[])</a></span> - Constructor for class world.<a href="../world/Wall.html" title="class in world">Wall</a></dt>
<dd> </dd>
<dt><a href="../world/package-summary.html">world</a> - package world</dt>
<dd> </dd>
<dt><a href="../world/World.html" title="class in world"><span class="strong">World</span></a> - Class in <a href="../world/package-summary.html">world</a></dt>
<dd>
<div class="block">Provides everything related to the snowball fight: map, teams, snowballs, flag, etc.</div>
</dd>
<dt><span class="strong"><a href="../world/World.html#World(world.Team[], world.Map, world.Flag, java.util.ArrayList)">World(Team[], Map, Flag, ArrayList<Snowball>)</a></span> - Constructor for class world.<a href="../world/World.html" title="class in world">World</a></dt>
<dd> </dd>
<dt><a href="../world/action/package-summary.html">world.action</a> - package world.action</dt>
<dd> </dd>
<dt><span class="strong"><a href="../world/Player.html#wouldHitPlayer(world.Player, world.Point)">wouldHitPlayer(Player, Point)</a></span> - Method in class world.<a href="../world/Player.html" title="class in world">Player</a></dt>
<dd>
<div class="block">Returns whether the player can hit the specified player if he shoots at the specified destination.</div>
</dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">C</a> <a href="index-3.html">D</a> <a href="index-4.html">E</a> <a href="index-5.html">F</a> <a href="index-6.html">G</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">P</a> <a href="index-11.html">S</a> <a href="index-12.html">T</a> <a href="index-13.html">U</a> <a href="index-14.html">V</a> <a href="index-15.html">W</a> </div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-14.html">Prev Letter</a></li>
<li>Next Letter</li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-15.html" target="_top">Frames</a></li>
<li><a href="index-15.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "55762080dcd5cf6e75d7955124fa9699",
"timestamp": "",
"source": "github",
"line_count": 138,
"max_line_length": 560,
"avg_line_length": 43.84782608695652,
"alnum_prop": 0.6331184928111055,
"repo_name": "matpl/ai-csgames2014",
"id": "23287fe263dd959a250ef163b0ee73be57049c03",
"size": "6051",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "AI-Client/doc/index-files/index-15.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
/**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highmaps]]
*/
package com.highmaps.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScript name: <code>series<wordcloud>-states-select-marker-states-hover</code>
*/
@js.annotation.ScalaJSDefined
class SeriesWordcloudStatesSelectMarkerStatesHover extends com.highcharts.HighchartsGenericObject {
/**
* <p>Animation when hovering over the marker.</p>
*/
val animation: js.UndefOr[Boolean | js.Object] = js.undefined
/**
* <p>Enable or disable the point marker.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-marker-states-hover-enabled/">Disabled hover state</a>
*/
val enabled: js.UndefOr[Boolean] = js.undefined
/**
* <p>The number of pixels to increase the radius of the hovered
* point.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-states-hover-linewidthplus/">5 pixels greater radius on hover</a>
<a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-states-hover-linewidthplus/">5 pixels greater radius on hover</a>
* @since 4.0.3
*/
val radiusPlus: js.UndefOr[Double] = js.undefined
/**
* <p>The additional line width for a hovered point.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-states-hover-linewidthplus/">2 pixels wider on hover</a>
<a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-states-hover-linewidthplus/">2 pixels wider on hover</a>
* @since 4.0.3
*/
val lineWidthPlus: js.UndefOr[Double] = js.undefined
/**
* <p>The fill color of the marker in hover state. When
* <code>undefined</code>, the series' or point's fillColor for normal
* state is used.</p>
*/
val fillColor: js.UndefOr[String | js.Object] = js.undefined
/**
* <p>The color of the point marker's outline. When <code>undefined</code>,
* the series' or point's lineColor for normal state is used.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-marker-states-hover-linecolor/">White fill color, black line color</a>
*/
val lineColor: js.UndefOr[String | js.Object] = js.undefined
/**
* <p>The width of the point marker's outline. When <code>undefined</code>,
* the series' or point's lineWidth for normal state is used.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-marker-states-hover-linewidth/">3px line width</a>
*/
val lineWidth: js.UndefOr[Double] = js.undefined
/**
* <p>The radius of the point marker. In hover state, it defaults
* to the normal state's radius + 2 as per the <a href="#plotOptions.series.marker.states.hover.radiusPlus">radiusPlus</a>
* option.</p>
* @example <a href="https://jsfiddle.net/gh/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-marker-states-hover-radius/">10px radius</a>
*/
val radius: js.UndefOr[Double] = js.undefined
}
object SeriesWordcloudStatesSelectMarkerStatesHover {
/**
* @param animation <p>Animation when hovering over the marker.</p>
* @param enabled <p>Enable or disable the point marker.</p>
* @param radiusPlus <p>The number of pixels to increase the radius of the hovered. point.</p>
* @param lineWidthPlus <p>The additional line width for a hovered point.</p>
* @param fillColor <p>The fill color of the marker in hover state. When. <code>undefined</code>, the series' or point's fillColor for normal. state is used.</p>
* @param lineColor <p>The color of the point marker's outline. When <code>undefined</code>,. the series' or point's lineColor for normal state is used.</p>
* @param lineWidth <p>The width of the point marker's outline. When <code>undefined</code>,. the series' or point's lineWidth for normal state is used.</p>
* @param radius <p>The radius of the point marker. In hover state, it defaults. to the normal state's radius + 2 as per the <a href="#plotOptions.series.marker.states.hover.radiusPlus">radiusPlus</a>. option.</p>
*/
def apply(animation: js.UndefOr[Boolean | js.Object] = js.undefined, enabled: js.UndefOr[Boolean] = js.undefined, radiusPlus: js.UndefOr[Double] = js.undefined, lineWidthPlus: js.UndefOr[Double] = js.undefined, fillColor: js.UndefOr[String | js.Object] = js.undefined, lineColor: js.UndefOr[String | js.Object] = js.undefined, lineWidth: js.UndefOr[Double] = js.undefined, radius: js.UndefOr[Double] = js.undefined): SeriesWordcloudStatesSelectMarkerStatesHover = {
val animationOuter: js.UndefOr[Boolean | js.Object] = animation
val enabledOuter: js.UndefOr[Boolean] = enabled
val radiusPlusOuter: js.UndefOr[Double] = radiusPlus
val lineWidthPlusOuter: js.UndefOr[Double] = lineWidthPlus
val fillColorOuter: js.UndefOr[String | js.Object] = fillColor
val lineColorOuter: js.UndefOr[String | js.Object] = lineColor
val lineWidthOuter: js.UndefOr[Double] = lineWidth
val radiusOuter: js.UndefOr[Double] = radius
com.highcharts.HighchartsGenericObject.toCleanObject(new SeriesWordcloudStatesSelectMarkerStatesHover {
override val animation: js.UndefOr[Boolean | js.Object] = animationOuter
override val enabled: js.UndefOr[Boolean] = enabledOuter
override val radiusPlus: js.UndefOr[Double] = radiusPlusOuter
override val lineWidthPlus: js.UndefOr[Double] = lineWidthPlusOuter
override val fillColor: js.UndefOr[String | js.Object] = fillColorOuter
override val lineColor: js.UndefOr[String | js.Object] = lineColorOuter
override val lineWidth: js.UndefOr[Double] = lineWidthOuter
override val radius: js.UndefOr[Double] = radiusOuter
})
}
}
| {
"content_hash": "a9bc3cd57f731c75b3168cbf59740dfc",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 467,
"avg_line_length": 59.205607476635514,
"alnum_prop": 0.7261247040252565,
"repo_name": "Karasiq/scalajs-highcharts",
"id": "4e4f8313217de2f10c66036fa7184fe9ba12394f",
"size": "6335",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/scala/com/highmaps/config/SeriesWordcloudStatesSelectMarkerStatesHover.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Scala",
"bytes": "131509301"
}
],
"symlink_target": ""
} |
namespace chromeos {
// A fake implementation of PowerManagerClient. This remembers the policy passed
// to SetPolicy() and the user of this class can inspect the last set policy by
// get_policy().
class FakePowerManagerClient : public PowerManagerClient {
public:
FakePowerManagerClient();
~FakePowerManagerClient() override;
power_manager::PowerManagementPolicy& policy() { return policy_; }
int num_request_restart_calls() const { return num_request_restart_calls_; }
int num_request_shutdown_calls() const { return num_request_shutdown_calls_; }
int num_set_policy_calls() const { return num_set_policy_calls_; }
int num_set_is_projecting_calls() const {
return num_set_is_projecting_calls_;
}
bool is_projecting() const { return is_projecting_; }
// PowerManagerClient overrides
void Init(dbus::Bus* bus) override;
void AddObserver(Observer* observer) override;
void RemoveObserver(Observer* observer) override;
bool HasObserver(const Observer* observer) const override;
void SetRenderProcessManagerDelegate(
base::WeakPtr<RenderProcessManagerDelegate> delegate) override;
void DecreaseScreenBrightness(bool allow_off) override;
void IncreaseScreenBrightness() override;
void SetScreenBrightnessPercent(double percent, bool gradual) override;
void GetScreenBrightnessPercent(
const GetScreenBrightnessPercentCallback& callback) override;
void DecreaseKeyboardBrightness() override;
void IncreaseKeyboardBrightness() override;
void RequestStatusUpdate() override;
void RequestSuspend() override;
void RequestRestart() override;
void RequestShutdown() override;
void NotifyUserActivity(power_manager::UserActivityType type) override;
void NotifyVideoActivity(bool is_fullscreen) override;
void SetPolicy(const power_manager::PowerManagementPolicy& policy) override;
void SetIsProjecting(bool is_projecting) override;
base::Closure GetSuspendReadinessCallback() override;
int GetNumPendingSuspendReadinessCallbacks() override;
// Emulates the power manager announcing that the system is starting or
// completing a suspend attempt.
void SendSuspendImminent();
void SendSuspendDone();
void SendDarkSuspendImminent();
// Notifies observers that the power button has been pressed or released.
void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
private:
// Callback that will be run by asynchronous suspend delays to report
// readiness.
void HandleSuspendReadiness();
ObserverList<Observer> observers_;
// Last policy passed to SetPolicy().
power_manager::PowerManagementPolicy policy_;
// Number of times that various methods have been called.
int num_request_restart_calls_;
int num_request_shutdown_calls_;
int num_set_policy_calls_;
int num_set_is_projecting_calls_;
// Number of pending suspend readiness callbacks.
int num_pending_suspend_readiness_callbacks_;
// Last projecting state set in SetIsProjecting().
bool is_projecting_;
// Delegate for managing power consumption of Chrome's renderer processes.
base::WeakPtr<RenderProcessManagerDelegate> render_process_manager_delegate_;
DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient);
};
} // namespace chromeos
#endif // CHROMEOS_DBUS_FAKE_POWER_MANAGER_CLIENT_H_
| {
"content_hash": "7ac408a37740426bac2c7cd2aff3b7ce",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 80,
"avg_line_length": 39.166666666666664,
"alnum_prop": 0.7738601823708207,
"repo_name": "guorendong/iridium-browser-ubuntu",
"id": "604b3456019730314607192f74debbf328650170",
"size": "3820",
"binary": false,
"copies": "9",
"ref": "refs/heads/ubuntu/precise",
"path": "chromeos/dbus/fake_power_manager_client.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "AppleScript",
"bytes": "8402"
},
{
"name": "Assembly",
"bytes": "256197"
},
{
"name": "Batchfile",
"bytes": "34966"
},
{
"name": "C",
"bytes": "15445429"
},
{
"name": "C++",
"bytes": "276628399"
},
{
"name": "CMake",
"bytes": "27829"
},
{
"name": "CSS",
"bytes": "867238"
},
{
"name": "Emacs Lisp",
"bytes": "3348"
},
{
"name": "Go",
"bytes": "13628"
},
{
"name": "Groff",
"bytes": "7777"
},
{
"name": "HTML",
"bytes": "20250399"
},
{
"name": "Java",
"bytes": "9950308"
},
{
"name": "JavaScript",
"bytes": "13873772"
},
{
"name": "LLVM",
"bytes": "1169"
},
{
"name": "Logos",
"bytes": "6893"
},
{
"name": "Lua",
"bytes": "16189"
},
{
"name": "Makefile",
"bytes": "179129"
},
{
"name": "Objective-C",
"bytes": "1871766"
},
{
"name": "Objective-C++",
"bytes": "9674498"
},
{
"name": "PHP",
"bytes": "42038"
},
{
"name": "PLpgSQL",
"bytes": "163248"
},
{
"name": "Perl",
"bytes": "63937"
},
{
"name": "Protocol Buffer",
"bytes": "474121"
},
{
"name": "Python",
"bytes": "11646662"
},
{
"name": "Ragel in Ruby Host",
"bytes": "104923"
},
{
"name": "Scheme",
"bytes": "10604"
},
{
"name": "Shell",
"bytes": "1151673"
},
{
"name": "Standard ML",
"bytes": "5034"
},
{
"name": "VimL",
"bytes": "4075"
},
{
"name": "nesC",
"bytes": "18347"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8" ?>
<CodeDoc>
<Class name="AutoHideStripBase">
<ClassDef>
<summary>Implements the basic functionality common to auto-hide tab strip of <see cref="DockPanel"/>.</summary>
</ClassDef>
<Construct name="(DockPanel)">
<summary>Creates a instance of <see cref="AutoHideStripBase"/>.</summary>
<param name="panel">The <see cref="DockPanel"/> to associate with.</param>
</Construct>
<Property name="DockPanel">
<summary>Gets the associated <see cref="DockPanel"/>.</summary>
<value>The associated <see cref="DockPanel"/>.</value>
</Property>
<Property name="PanesTop">
<summary>Gets a collection of <see cref="AutoHidePane"/> objects on the top side.</summary>
<value>A <see cref="AutoHidePaneCollection"/> contains a collection of <see cref="AutoHidePane"/> objects on the top side.</value>
</Property>
<Property name="PanesBottom">
<summary>Gets a collection of <see cref="AutoHidePane"/> objects on the bottom side.</summary>
<value>A <see cref="AutoHidePaneCollection"/> contains a collection of <see cref="AutoHidePane"/> objects on the bottom side.</value>
</Property>
<Property name="PanesLeft">
<summary>Gets a collection of <see cref="AutoHidePane"/> objects on the left side.</summary>
<value>A <see cref="AutoHidePaneCollection"/> contains a collection of <see cref="AutoHidePane"/> objects on the left side.</value>
</Property>
<Property name="PanesRight">
<summary>Gets a collection of <see cref="AutoHidePane"/> objects on the right side.</summary>
<value>A <see cref="AutoHidePaneCollection"/> contains a collection of <see cref="AutoHidePane"/> objects on the right side.</value>
</Property>
<Method name="GetPanes(DockState)">
<summary>Gets a collection of <see cref="AutoHidePane"/> objects for the specified docking state.</summary>
<param name="dockState">Specifies the docking state.</param>
<return>A <see cref="AutoHidePaneCollection"/> contains a collection of <see cref="AutoHidePane"/> ojbects based on the specified docking state.</return>
</Method>
<Property name="RectangleTopLeft">
<summary>Gets the rectangle that represents the top left blank area.</summary>
<value>A <see cref="Rectangle"/> that represents the top left blank area.</value>
</Property>
<Property name="RectangleTopRight">
<summary>Gets the rectangle that represents the top right blank area.</summary>
<value>A <see cref="Rectangle"/> that represents the top right blank area.</value>
</Property>
<Property name="RectangleBottomLeft">
<summary>Gets the rectangle that represents the bottom left blank area.</summary>
<value>A <see cref="Rectangle"/> that represents the bottom left blank area.</value>
</Property>
<Property name="RectangleBottomRight">
<summary>Gets the rectangle that represents the bottom right blank area.</summary>
<value>A <see cref="Rectangle"/> that represents the bottom right blank area.</value>
</Property>
<Method name="GetTabStripRectangle(DockState)">
<summary>Gets the rectangle that represents the tab strip drawing area for the specified docking state.</summary>
<param name="dockState">Specifies the docking state of the tab strip.</param>
<returns>A <see cref="Rectangle"/> that represents the tab strip drawing area for the specified docking state.</returns>
</Method>
<Method name="OnRefreshChanges()">
<summary>Invoked when the underlying data has been changed and needs update of the control.</summary>
<remarks>Derived class should override to update the changes.</remarks>
</Method>
<Method name="MeasureHeight()">
<summary>Measures the height of the tab strip.</summary>
</Method>
</Class>
</CodeDoc> | {
"content_hash": "b1b0a1b96ef10d68be04dd7dcdb62ac2",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 156,
"avg_line_length": 57.246153846153845,
"alnum_prop": 0.7282988443966676,
"repo_name": "cliftonm/intertexti",
"id": "615382ed93380518a549143500274f632d8e223b",
"size": "3721",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DockPanelSuite/WinFormsUI/Docking/CodeDoc/AutoHideStripBase.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "1735204"
},
{
"name": "Inno Setup",
"bytes": "7261"
}
],
"symlink_target": ""
} |
package primefinder;
import java.util.ArrayList;
/**
* starts at 3 and works up to maxPrime checking odd numbers for primeness.
* To check if a number X is prime it checks for a remainder (modulus) when dividing.
* It tries dividing X by all numbers from 3 to X/2, again odd numbers only.
*
*/
public class SimplePG implements PrimeGenerator {
private static ArrayList<Integer> getPrimes(int maxPrime) {
ArrayList<Integer> primeList = new ArrayList<Integer>();
/**
* cycle through checking if a numbers prime.
* To save time, only check odd numbers.
* Since we are only checking odd numbers we only have to consider
* odd multiples.
*/
for (int i=2; i<=maxPrime;i++) {
boolean isPrime = true;
int highestFactorPossible = i/2;
// SInce a number should only divide by 2 and itself.
for(int j=2; j<i; j++) {
if(i%j==0) {
isPrime = false;
break;
}
}
if(isPrime) {
primeList.add(i);
}
}
return primeList;
}
public ArrayList<Integer> getPrimeList(int maxPrime) {
return SimplePG.getPrimes(maxPrime);
}
}
| {
"content_hash": "ed56a63939c319e0136e749ae352cf53",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 85,
"avg_line_length": 28.108695652173914,
"alnum_prop": 0.5661252900232019,
"repo_name": "bicepjai/mypuzzles",
"id": "47a3abda9e6323eb3f826521d17756bfdc5b0c57",
"size": "1293",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "others/primefinder/SimplePG.java",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "109569"
},
{
"name": "C++",
"bytes": "89550"
},
{
"name": "Java",
"bytes": "345418"
},
{
"name": "Jupyter Notebook",
"bytes": "1205322"
},
{
"name": "Python",
"bytes": "105828"
},
{
"name": "Ruby",
"bytes": "13588"
},
{
"name": "Thrift",
"bytes": "11284"
}
],
"symlink_target": ""
} |
package org.parceler.internal;
import javax.tools.SimpleJavaFileObject;
import java.io.ByteArrayOutputStream;
import java.net.URI;
class Output extends SimpleJavaFileObject {
private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Output(String name, Kind kind) {
super(URI.create("memo:///" + name.replace('.', '/') + kind.extension), kind);
}
byte[] toByteArray() {
return this.outputStream.toByteArray();
}
@Override
public ByteArrayOutputStream openOutputStream() {
return this.outputStream;
}
} | {
"content_hash": "8a6144265332179229ecdf3a7580bff4",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 86,
"avg_line_length": 25.434782608695652,
"alnum_prop": 0.6991452991452991,
"repo_name": "0359xiaodong/parceler",
"id": "1227965e4d55894e56a31e791dbace3ba29937dc",
"size": "1181",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "parceler/src/test/java/org/parceler/internal/Output.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<div id="spinner-div"></div>
<form id="edit" class="smart-form" role="form">
<fieldset>
<div class="contenidoBotones">
<div class="row col-xs-10 col-sm-8 col-md-8 col-lg-11"
style="margin: 2rem;">
<div class="">
<section class="col-md-5 padding-5">
<label class="input">
<i class="icon-append fa fa-calendar"></i>
<input required class="col col-6" id="datepicker" type="text"
name="nacimiento" placeholder="Fecha de entrega">
</label>
</section>
<section class="col-md-6 padding-5">
<label class="input">
<i class="icon-append fa fa-paste"></i>
<input required class="col col-6" id="n_guia" type="text"
name="n_guia" placeholder="número de guia">
</label>
</section>
<section class="col-md-3"></section>
<section class="col-md-6">
<label class="select">Proveedor de mensajería
<select id="proveedor" required name="proveedor">
<option value="" >Elije un Proveedor de mensajería</option>
<?php
foreach ($proveedores as $proveedor){
echo "<option value='".$proveedor->id."'>".$proveedor->nombre_empresa."</option>";
}
?>
</select>
</label>
</section>
</div>
</div>
</div>
</fieldset>
<footer>
<input type="submit" class="btn btn-success" value="Embarcar" />
</footer>
</form>
<script src="/template/js/plugin/jquery-form/jquery-form.min.js"></script>
<script src="/template/js/validacion.js"></script>
<script src="/template/js/plugin/fuelux/wizard/wizard.min.js"></script>
<script type="text/javascript">
var fecha = new Date();
$( "#datepicker" ).datepicker({
changeMonth: true,
numberOfMonths: 2,
dateFormat:"yy-mm-dd",
//defaultDate: "1970-01-01",
minDate: fecha.getFullYear() + "-" + (fecha.getMonth() +1) + "-" + fecha.getDate() ,
changeYear: true
});
$( "#edit" ).submit(function( event ) {
event.preventDefault();
enviar();
});
function enviar() {
var fecha=$("#datepicker").val();
var n_guia=$("#n_guia").val();
var proveedor=$("#proveedor").val();
var id_surtido=<?=$surtido?>;
var id_venta=<?=$venta?>;
if(fecha==""){
alert("Especifique una fecha de entrega");
}else if(n_guia==""){
alert("Especifique un número de guia");
}else{
bootbox.dialog({
message: "¿Desea surtir toda la venta ahora?",
title: "Surtir",
className: "",
buttons: {
success: {
label: "Aceptar",
className: "btn-success",
callback: function() {
setiniciarSpinner();
$.ajax({
type: "post",
data: {
surtido:id_surtido,
venta:id_venta,
fecha:fecha,
n_guia:n_guia,
unico:0,
proveedor:proveedor
},
url: "surtir"
}).done(function(msg){
bootbox.dialog({
message: msg,//"Se ha enviado este producto a embarques exitosamente.",
title: "Exito",
className: "",
buttons: {
success: {
label: "Aceptar",
className: "btn-success",
callback: function(){
FinalizarSpinner();
window.location.href="pedidos_pendientes";
}
}
}
})
});
}
},
danger:{
label: "Cancelar",
className: "btn-danger",
callback: function(){
}
}
}
});
}
}
function envio (id_surtido,id_venta,fecha,n_guia,$proveedor){
$.ajax({
type: "post",
data: {
surtido:id_surtido,
venta:id_venta,
fecha:fecha,
n_guia:n_guia,
unico:0,
proveedor:proveedor
},
url: "surtir"
}).done(function(msg){
bootbox.dialog({
message: "Se ha enviado este producto a embarques exitosamente.",
title: "Exito",
className: "",
buttons: {
success: {
label: "Aceptar",
className: "btn-success",
callback: function(){
window.location.href="pedidos_pendientes";
}
}
}
})
});
}
</script> | {
"content_hash": "56693d27f7f19c5b6daf654bf78f7153",
"timestamp": "",
"source": "github",
"line_count": 166,
"max_line_length": 114,
"avg_line_length": 24.8855421686747,
"alnum_prop": 0.5412732994432341,
"repo_name": "networksoft/erp.vitale",
"id": "a92053194b03b149d6ec83a79fc846a274641560",
"size": "4136",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "application/views/website/bo/logistico2/embarque/surtir.php",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "2283"
},
{
"name": "CSS",
"bytes": "905596"
},
{
"name": "HTML",
"bytes": "6340506"
},
{
"name": "JavaScript",
"bytes": "1546366"
},
{
"name": "Makefile",
"bytes": "467"
},
{
"name": "PHP",
"bytes": "27151680"
},
{
"name": "Shell",
"bytes": "1117"
}
],
"symlink_target": ""
} |
Les capes d'informació que mostren les EDAR, estan organitzades per municipis. És a dir, existeixen tants **_shapefiles_** com municipis es gestionen. El primer pas és doncs, fusionar mitjançant QGIS, tots els shapefiles dividits per municipis en una única capa.
Posteriorment, cal reprojectar la capa al del SRS original al SRS 25831:
`EPSG 25831 és el codi que equival a UTM 31N ETRS 89`
El darrer pas consisteix en importar el **_shapefile_** reprojectat, a una base de dades [SpatiaLite](http://www.gaia-gis.it/gaia-sins/).
#### b) Les EBAR en format polígon i punt
Les capes d'informació que mostren les EDAR, estan organitzades per municipis. És a dir, existeixen tants **_shapefiles_** com municipis es gestionen. El primer pas és doncs, fusionar mitjançant QGIS, tots els shapefiles dividits per municipis en una única capa.
Posteriorment, cal reprojectar la capa al del SRS original al SRS 25831:
`EPSG 25831 és el codi que equival a UTM 31N ETRS 89`
El darrer pas consisteix en importar el **_shapefile_** reprojectat, a una base de dades [SpatiaLite](http://www.gaia-gis.it/gaia-sins/).
#### c) Les canonades en format línia
Les capes d'informació que mostren les EDAR, estan organitzades per municipis. És a dir, existeixen tants shapefiles com municipis es gestionen. El primer pas és doncs, fusionar mitjançant QGIS, tots els shapefiles dividits per municipis en una única capa.
Posteriorment, cal reprojectar la capa al del SRS original al SRS 25831:
`EPSG 25831 és el codi que equival a UTM 31N ETRS 89`
El darrer pas consisteix en importar el shapefile reprojectat a una Base de Dades [SpatiaLite](http://www.gaia-gis.it/gaia-sins/).
#### d) Les taules emmagatzemades a la base de dades MS ACCESS
El procés d'importació de les taules contigudes a l'Access a la base de dades del SIG (**SpatiaLite**), ha consistit en la exportació d'aquestes mateixes taules a un format propi de MS Excel, per a continuació, guardar el resultat en format CSV (**_Comma Separated Value_**).
Posteriorment, s'ha importat aquests fitxers directament a SpatiaLite, mitjançant el seu mòdul d'importació d'arxius en format CSV.

*Fig.1 : Aspecte general de la Base de Dades SpatiaLite*
| {
"content_hash": "3af13e682b98fd88d38a0d44634051a5",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 275,
"avg_line_length": 65.67647058823529,
"alnum_prop": 0.7725033587102552,
"repo_name": "lluisvicens/CCB",
"id": "403fe917f945d2c53a697eae55335a19eafaec62",
"size": "2349",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "actuacio_II.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
<?php
class SampleTest extends \PHPUnit\Framework\TestCase
{
public function testTrueAssertsToTrue()
{
$this->assertTrue(true);
}
} | {
"content_hash": "49ec869264cbac7b613cfa0552410b2d",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 52,
"avg_line_length": 16.88888888888889,
"alnum_prop": 0.6710526315789473,
"repo_name": "SinCOS/ddf",
"id": "26f2be4c81b2dbe47e33ebe41565db8d105b1c23",
"size": "152",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "tests/unit/SampleTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "669643"
},
{
"name": "HTML",
"bytes": "50899"
},
{
"name": "JavaScript",
"bytes": "589764"
},
{
"name": "PHP",
"bytes": "54110"
}
],
"symlink_target": ""
} |
package edu.gvsu.bbmobile;
public class BbObj {
public int id;
public String bbHandle;
public BbObj(int i, String hndl){
this.id = i;
this.bbHandle = hndl;
}
}
| {
"content_hash": "9e75a06ae0a6794152d09cb74d8f02a2",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 34,
"avg_line_length": 15.545454545454545,
"alnum_prop": 0.6842105263157895,
"repo_name": "klouddy/gvsubbmobile_bb",
"id": "c1cc83bdc1a3f64d437ba8780d44baf3378be458",
"size": "171",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/edu/gvsu/bbmobile/BbObj.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Groovy",
"bytes": "3364"
},
{
"name": "Java",
"bytes": "261493"
},
{
"name": "Shell",
"bytes": "7484"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:background="#8000">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:text="空气质量"
android:textColor="#fff"
android:textSize="20sp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp">
<RelativeLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<TextView
android:id="@+id/aqi_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#fff"
android:textSize="40sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="AQI 指数"
android:textColor="#fff"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<TextView
android:id="@+id/pm25_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#fff"
android:textSize="40sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="PM2.5 指数"
android:textColor="#fff"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout> | {
"content_hash": "044806b1dbad4ebf8c6e02e72c9b29f3",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 72,
"avg_line_length": 32.93103448275862,
"alnum_prop": 0.5361256544502618,
"repo_name": "NewUnsigned/CoolWeather",
"id": "4facfacd2f94a4c1a7e91feca6b3bd0953f5e2a2",
"size": "2881",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/res/layout/aqi.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "32773"
}
],
"symlink_target": ""
} |
package hudson.cli;
import hudson.remoting.ClassFilter;
import hudson.remoting.ObjectInputStreamEx;
import hudson.remoting.SocketChannelStream;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;
import javax.crypto.KeyAgreement;
import javax.crypto.SecretKey;
import javax.crypto.interfaces.DHPublicKey;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.IvParameterSpec;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.security.AlgorithmParameterGenerator;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PublicKey;
import java.security.Signature;
import java.security.interfaces.DSAPublicKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.X509EncodedKeySpec;
import org.jenkinsci.remoting.util.AnonymousClassWarnings;
/**
* Used by Jenkins core only in deprecated Remoting-based CLI.
*/
public class Connection {
public final InputStream in;
public final OutputStream out;
public final DataInputStream din;
public final DataOutputStream dout;
public Connection(Socket socket) throws IOException {
this(SocketChannelStream.in(socket),SocketChannelStream.out(socket));
}
public Connection(InputStream in, OutputStream out) {
this.in = in;
this.out = out;
this.din = new DataInputStream(in);
this.dout = new DataOutputStream(out);
}
//
//
// Convenience methods
//
//
public void writeUTF(String msg) throws IOException {
dout.writeUTF(msg);
}
public String readUTF() throws IOException {
return din.readUTF();
}
public void writeBoolean(boolean b) throws IOException {
dout.writeBoolean(b);
}
public boolean readBoolean() throws IOException {
return din.readBoolean();
}
/**
* Sends a serializable object.
*/
public void writeObject(Object o) throws IOException {
ObjectOutputStream oos = AnonymousClassWarnings.checkingObjectOutputStream(out);
oos.writeObject(o);
// don't close oss, which will close the underlying stream
// no need to flush either, given the way oos is implemented
}
/**
* Receives an object sent by {@link #writeObject(Object)}
*/
public <T> T readObject() throws IOException, ClassNotFoundException {
ObjectInputStream ois = new ObjectInputStreamEx(in,
getClass().getClassLoader(), ClassFilter.DEFAULT);
return (T)ois.readObject();
}
public void writeKey(Key key) throws IOException {
writeUTF(new String(Base64.encodeBase64(key.getEncoded())));
}
public X509EncodedKeySpec readKey() throws IOException {
byte[] otherHalf = Base64.decodeBase64(readUTF()); // for historical reasons, we don't use readByteArray()
return new X509EncodedKeySpec(otherHalf);
}
public void writeByteArray(byte[] data) throws IOException {
dout.writeInt(data.length);
dout.write(data);
}
public byte[] readByteArray() throws IOException {
int bufSize = din.readInt();
if (bufSize < 0) {
throw new IOException("DataInputStream unexpectedly returned negative integer");
}
byte[] buf = new byte[bufSize];
din.readFully(buf);
return buf;
}
/**
* Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection.
*
* <p>
* DH is also useful as a coin-toss algorithm. Two parties get the same random number without trusting
* each other.
*/
public KeyAgreement diffieHellman(boolean side) throws IOException, GeneralSecurityException {
return diffieHellman(side,512);
}
public KeyAgreement diffieHellman(boolean side, int keySize) throws IOException, GeneralSecurityException {
KeyPair keyPair;
PublicKey otherHalf;
if (side) {
AlgorithmParameterGenerator paramGen = AlgorithmParameterGenerator.getInstance("DH");
paramGen.init(keySize);
KeyPairGenerator dh = KeyPairGenerator.getInstance("DH");
dh.initialize(paramGen.generateParameters().getParameterSpec(DHParameterSpec.class));
keyPair = dh.generateKeyPair();
// send a half and get a half
writeKey(keyPair.getPublic());
otherHalf = KeyFactory.getInstance("DH").generatePublic(readKey());
} else {
otherHalf = KeyFactory.getInstance("DH").generatePublic(readKey());
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("DH");
keyPairGen.initialize(((DHPublicKey) otherHalf).getParams());
keyPair = keyPairGen.generateKeyPair();
// send a half and get a half
writeKey(keyPair.getPublic());
}
KeyAgreement ka = KeyAgreement.getInstance("DH");
ka.init(keyPair.getPrivate());
ka.doPhase(otherHalf, true);
return ka;
}
/**
* Upgrades a connection with transport encryption by the specified symmetric cipher.
*
* @return
* A new {@link Connection} object that includes the transport encryption.
*/
public Connection encryptConnection(SecretKey sessionKey, String algorithm) throws IOException, GeneralSecurityException {
Cipher cout = Cipher.getInstance(algorithm);
cout.init(Cipher.ENCRYPT_MODE, sessionKey, new IvParameterSpec(sessionKey.getEncoded()));
CipherOutputStream o = new CipherOutputStream(out, cout);
Cipher cin = Cipher.getInstance(algorithm);
cin.init(Cipher.DECRYPT_MODE, sessionKey, new IvParameterSpec(sessionKey.getEncoded()));
CipherInputStream i = new CipherInputStream(in, cin);
return new Connection(i,o);
}
/**
* Given a byte array that contains arbitrary number of bytes, digests or expands those bits into the specified
* number of bytes without loss of entropy.
*
* Cryptographic utility code.
*/
public static byte[] fold(byte[] bytes, int size) {
byte[] r = new byte[size];
for (int i=Math.max(bytes.length,size)-1; i>=0; i-- ) {
r[i%r.length] ^= bytes[i%bytes.length];
}
return r;
}
private String detectKeyAlgorithm(KeyPair kp) {
return detectKeyAlgorithm(kp.getPublic());
}
private String detectKeyAlgorithm(PublicKey kp) {
if (kp instanceof RSAPublicKey) return "RSA";
if (kp instanceof DSAPublicKey) return "DSA";
throw new IllegalArgumentException("Unknown public key type: "+kp);
}
/**
* Used in conjunction with {@link #verifyIdentity(byte[])} to prove
* that we actually own the private key of the given key pair.
*/
public void proveIdentity(byte[] sharedSecret, KeyPair key) throws IOException, GeneralSecurityException {
String algorithm = detectKeyAlgorithm(key);
writeUTF(algorithm);
writeKey(key.getPublic());
Signature sig = Signature.getInstance("SHA1with"+algorithm);
sig.initSign(key.getPrivate());
sig.update(key.getPublic().getEncoded());
sig.update(sharedSecret);
writeObject(sig.sign());
}
/**
* Verifies that we are talking to a peer that actually owns the private key corresponding to the public key we get.
*/
public PublicKey verifyIdentity(byte[] sharedSecret) throws IOException, GeneralSecurityException {
try {
String serverKeyAlgorithm = readUTF();
PublicKey spk = KeyFactory.getInstance(serverKeyAlgorithm).generatePublic(readKey());
// verify the identity of the server
Signature sig = Signature.getInstance("SHA1with"+serverKeyAlgorithm);
sig.initVerify(spk);
sig.update(spk.getEncoded());
sig.update(sharedSecret);
sig.verify((byte[]) readObject());
return spk;
} catch (ClassNotFoundException e) {
throw new Error(e); // impossible
}
}
public void close() throws IOException {
in.close();
out.close();
}
}
| {
"content_hash": "fe0934183ce379b0827387ddefea3d4c",
"timestamp": "",
"source": "github",
"line_count": 249,
"max_line_length": 126,
"avg_line_length": 34.47791164658634,
"alnum_prop": 0.6748980780430984,
"repo_name": "aldaris/jenkins",
"id": "eacc567a7e5d822afc9e4d1b20afc5473cbb0b3b",
"size": "9727",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "cli/src/main/java/hudson/cli/Connection.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2091"
},
{
"name": "CSS",
"bytes": "303175"
},
{
"name": "GAP",
"bytes": "6289"
},
{
"name": "Groovy",
"bytes": "60104"
},
{
"name": "HTML",
"bytes": "1030570"
},
{
"name": "Java",
"bytes": "9616842"
},
{
"name": "JavaScript",
"bytes": "357959"
},
{
"name": "Perl",
"bytes": "14402"
},
{
"name": "Ruby",
"bytes": "19375"
},
{
"name": "Shell",
"bytes": "8998"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "655cf4b045bb8d7971e0521e2df41933",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.307692307692308,
"alnum_prop": 0.6940298507462687,
"repo_name": "mdoering/backbone",
"id": "f852814eb1c9ef00b119a050447a3758785b56d3",
"size": "203",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Malpighiales/Phyllanthaceae/Cleistanthus/Cleistanthus oblongifolius/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
from experiments_manager.consumers import send_message
from experiments_manager.helper import MessageStatus
from git_manager.helpers.helper import get_exp_or_package_from_repo_name
from helpers.helper import get_package_or_experiment_without_request
from MOOCworkbench.celery import app
@app.task
def task_write_requirements_file(object_id, object_type):
"""Task to write requirements file to repository"""
exp_or_package = get_package_or_experiment_without_request(object_type, object_id)
language_helper = exp_or_package.language_helper()
language_helper.write_requirements_file()
username = exp_or_package.owner.user.username
send_message(username, MessageStatus.SUCCESS, 'Dependencies updated in GitHub')
@app.task
def task_update_requirements(repository_name):
"""Task to update the requirements for exp/package with repository_name,
task useful for git webhook"""
experiment = get_exp_or_package_from_repo_name(repository_name)
language_helper = experiment.language_helper()
language_helper.update_requirements()
| {
"content_hash": "fe079190dd9d105a9ea227523222dd7e",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 86,
"avg_line_length": 44.458333333333336,
"alnum_prop": 0.7778819119025304,
"repo_name": "MOOCworkbench/MOOCworkbench",
"id": "83a977fd2ecc0f7a4a8c36a8f59b09c1142e51a3",
"size": "1067",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "requirements_manager/tasks.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1942"
},
{
"name": "HTML",
"bytes": "129189"
},
{
"name": "Python",
"bytes": "423140"
},
{
"name": "Shell",
"bytes": "952"
}
],
"symlink_target": ""
} |
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
import ome_files
class TestVersion(object):
def test_upstream_version(self):
v = ome_files.upstream_version_info
for a in "major", "minor", "patch", "extra":
assert hasattr(v, a)
assert len(v) == 4
assert v[:1] == (v.major,)
assert v[:2] == (v.major, v.minor)
assert v[:3] == (v.major, v.minor, v.patch)
assert v[:4] == (v.major, v.minor, v.patch, v.extra)
exp_str = "%d.%d.%d%s" % (v.major, v.minor, v.patch, v.extra)
assert str(v) == exp_str
assert ome_files.upstream_version == exp_str
| {
"content_hash": "d4f8b56f77dca7f173439164eadf99b6",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 69,
"avg_line_length": 32.38095238095238,
"alnum_prop": 0.5661764705882353,
"repo_name": "simleo/ome-files-py",
"id": "57e9054abf3d23cd119f353f376f58e9a3ca031d",
"size": "2064",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "test/test_omefiles.py",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "4536"
},
{
"name": "C++",
"bytes": "21586"
},
{
"name": "Python",
"bytes": "39733"
},
{
"name": "Shell",
"bytes": "352"
}
],
"symlink_target": ""
} |
import java.util.Scanner;
/*
* B. Berland National Library
time limit per test 1 second
memory limit per test 256 megabytes
inputstandard input
outputstandard output
Berland National Library has recently been built in the capital of Berland. In addition, in the library you can take any of the collected works of Berland leaders, the library has a reading room.
Today was the pilot launch of an automated reading room visitors' accounting system! The scanner of the system is installed at the entrance to the reading room. It records the events of the form "reader entered room", "reader left room". Every reader is assigned a registration number during the registration procedure at the library — it's a unique integer from 1 to 10^6. Thus, the system logs events of two forms:
"+ ri" — the reader with registration number ri entered the room;
"- ri" — the reader with registration number ri left the room.
The first launch of the system was a success, it functioned for some period of time, and, at the time of its launch and at the time of its shutdown, the reading room may already have visitors.
Significant funds of the budget of Berland have been spent on the design and installation of the system. Therefore, some of the citizens of the capital now demand to explain the need for this system and the benefits that its implementation will bring. Now, the developers of the system need to urgently come up with reasons for its existence.
Help the system developers to find the minimum possible capacity of the reading room (in visitors) using the log of the system available to you.
Input
The first line contains a positive integer n (1 ≤ n ≤ 100) — the number of records in the system log. Next follow n events from the system journal in the order in which the were made. Each event was written on a single line and looks as "+ ri" or "- ri", where ri is an integer from 1 to 106, the registration number of the visitor (that is, distinct visitors always have distinct registration numbers).
It is guaranteed that the log is not contradictory, that is, for every visitor the types of any of his two consecutive events are distinct. Before starting the system, and after stopping the room may possibly contain visitors.
Output
Print a single integer — the minimum possible capacity of the reading room.
*/
public class Berland_National_Library {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int numberCases = input.nextInt();
input.nextLine();
String[] inputArray = new String[numberCases];
for(int a = 0; a < numberCases; a++){
inputArray[a] = input.nextLine();
}
int[] intInput = new int[numberCases];
for(int a = 0; a < numberCases; a++){
intInput[a] = Integer.parseInt(inputArray[a].substring(2, inputArray[a].length())) * (('-' == inputArray[a].charAt(0)) ? -1:1);
//System.out.println(intInput[a]);
}
//get maximum added capacity.
int max = 0;
int counter = 0;
for(int a = 0; a < numberCases; a++){
if(intInput[a] > 0){
counter++;
}
else{
counter--;
}
if(counter > max){
max = counter;
}
}
//Now we need to calculate the minimum number of people before the device is turned on.
//We need to do this by counting the exits that do not have a corresponding positive before them. Since we only have 100 logs, N^2 is fine.
int startingPeople = 0;
for(int a = 0; a < numberCases; a++){
if(intInput[a] < 0){
boolean occupantBeforeStart = true;
for(int b = 0; b < a; b++){
if(intInput[b] == intInput[a] * -1){
occupantBeforeStart = false;
}
}
if(occupantBeforeStart == true){
startingPeople++;
}
}
}
//Add the numbers
System.out.println(startingPeople + max);
}
}
| {
"content_hash": "f9ca10480403fad9a1eb39d25bac4fe1",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 416,
"avg_line_length": 48.688311688311686,
"alnum_prop": 0.722859429181115,
"repo_name": "PeterASteele/CodeForcesSolutions",
"id": "730a1930f24596a3b6097bb57e037c6262a54cc2",
"size": "3771",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Berland_National_Library.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "192372"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Grabacr07.KanColleViewer.Models.Settings;
using Grabacr07.KanColleWrapper;
using MetroTrilithon.Mvvm;
namespace Grabacr07.KanColleViewer.ViewModels.Catalogs
{
public class ShipCatalogWindowViewModel : WindowViewModel
{
private readonly Subject<Unit> updateSource = new Subject<Unit>();
private readonly Homeport homeport = KanColleClient.Current.Homeport;
public ShipCatalogWindowSettings Settings { get; }
public ShipCatalogSortWorker SortWorker { get; }
public IReadOnlyCollection<ShipTypeViewModel> ShipTypes { get; }
public ShipLevelFilter ShipLevelFilter { get; }
public ShipLockFilter ShipLockFilter { get; }
public ShipSpeedFilter ShipSpeedFilter { get; }
public ShipModernizeFilter ShipModernizeFilter { get; }
public ShipRemodelingFilter ShipRemodelingFilter { get; }
public ShipExpeditionFilter ShipExpeditionFilter { get; }
public ShipSallyAreaFilter ShipSallyAreaFilter { get; }
public bool CheckAllShipTypes
{
get { return this.ShipTypes.All(x => x.IsSelected); }
set
{
foreach (var type in this.ShipTypes) type.Set(value);
this.Update();
}
}
#region Ships 変更通知プロパティ
private IReadOnlyCollection<ShipViewModel> _Ships;
public IReadOnlyCollection<ShipViewModel> Ships
{
get { return this._Ships; }
set
{
if (this._Ships != value)
{
this._Ships = value;
this.RaisePropertyChanged();
}
}
}
#endregion
#region IsOpenFilterSettings 変更通知プロパティ
private bool _IsOpenFilterSettings;
public bool IsOpenFilterSettings
{
get { return this._IsOpenFilterSettings; }
set
{
if (this._IsOpenFilterSettings != value)
{
this._IsOpenFilterSettings = value;
this.RaisePropertyChanged();
}
}
}
#endregion
#region IsOpenSortSettings 変更通知プロパティ
private bool _IsOpenSortSettings;
public bool IsOpenSortSettings
{
get { return this._IsOpenSortSettings; }
set
{
if (this._IsOpenSortSettings != value)
{
this._IsOpenSortSettings = value;
this.RaisePropertyChanged();
}
}
}
#endregion
#region IsReloading 変更通知プロパティ
private bool _IsReloading;
public bool IsReloading
{
get { return this._IsReloading; }
set
{
if (this._IsReloading != value)
{
this._IsReloading = value;
this.RaisePropertyChanged();
}
}
}
#endregion
public ShipCatalogWindowViewModel()
{
this.Title = "所属艦娘一覧";
this.IsOpenFilterSettings = true;
this.Settings = new ShipCatalogWindowSettings();
this.SortWorker = new ShipCatalogSortWorker();
this.ShipTypes = KanColleClient.Current.Master.ShipTypes
.Select(kvp => new ShipTypeViewModel(kvp.Value)
{
IsSelected = true,
SelectionChangedAction = () => this.Update()
})
.ToList();
this.ShipLevelFilter = new ShipLevelFilter(this.Update);
this.ShipLockFilter = new ShipLockFilter(this.Update);
this.ShipSpeedFilter = new ShipSpeedFilter(this.Update);
this.ShipModernizeFilter = new ShipModernizeFilter(this.Update);
this.ShipRemodelingFilter = new ShipRemodelingFilter(this.Update);
this.ShipExpeditionFilter = new ShipExpeditionFilter(this.Update);
this.ShipSallyAreaFilter = new ShipSallyAreaFilter(this.Update);
this.updateSource
.Do(_ => this.IsReloading = true)
// ☟ 連続で艦種選択できるように猶予を設けるつもりだったけど、
// ソートだけしたいケースとかだと遅くてイラ壁なので迷う
.Throttle(TimeSpan.FromMilliseconds(7.0))
.Do(_ => this.UpdateCore())
.Subscribe(_ => this.IsReloading = false)
.AddTo(this);
this.homeport.Organization
.Subscribe(nameof(Organization.Ships), this.Update)
.AddTo(this);
}
public void Update()
{
this.ShipExpeditionFilter.SetFleets(this.homeport.Organization.Fleets);
this.RaisePropertyChanged(nameof(this.CheckAllShipTypes));
this.updateSource.OnNext(Unit.Default);
}
private void UpdateCore()
{
var list = this.homeport.Organization.Ships
.Select(kvp => kvp.Value)
.Where(x => this.ShipTypes.Where(t => t.IsSelected).Any(t => x.Info.ShipType.Id == t.Id))
.Where(this.ShipLevelFilter.Predicate)
.Where(this.ShipLockFilter.Predicate)
.Where(this.ShipSpeedFilter.Predicate)
.Where(this.ShipModernizeFilter.Predicate)
.Where(this.ShipRemodelingFilter.Predicate)
.Where(this.ShipExpeditionFilter.Predicate)
.Where(this.ShipSallyAreaFilter.Predicate);
this.Ships = this.SortWorker.Sort(list)
.Select((x, i) => new ShipViewModel(i + 1, x))
.ToList();
}
public void SetShipType(int[] ids)
{
foreach (var type in this.ShipTypes) type.Set(ids.Any(id => type.Id == id));
this.Update();
}
public void Sort(SortableColumn column)
{
this.SortWorker.SetFirst(column);
this.Update();
}
}
}
| {
"content_hash": "dd8aa4e82114d498b92381d49235e4c0",
"timestamp": "",
"source": "github",
"line_count": 195,
"max_line_length": 93,
"avg_line_length": 26.03076923076923,
"alnum_prop": 0.6832151300236406,
"repo_name": "GIGAFortress/KanColleViewer",
"id": "82784b0ede5b274a8f7eba22ca770077f97cbdaa",
"size": "5274",
"binary": false,
"copies": "5",
"ref": "refs/heads/develop",
"path": "source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "697689"
},
{
"name": "PowerShell",
"bytes": "13179"
}
],
"symlink_target": ""
} |
<?php
namespace Frontend\Bundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class UsuarioControllerTest extends WebTestCase
{
/*
public function testCompleteScenario()
{
// Create a new client to browse the application
$client = static::createClient();
// Create a new entry in the database
$crawler = $client->request('GET', '/usuario/');
$this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /usuario/");
$crawler = $client->click($crawler->selectLink('Create a new entry')->link());
// Fill in the form and submit it
$form = $crawler->selectButton('Create')->form(array(
'frontend_bundle_usuariotype[field_name]' => 'Test',
// ... other fields to fill
));
$client->submit($form);
$crawler = $client->followRedirect();
// Check data in the show view
$this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")');
// Edit the entity
$crawler = $client->click($crawler->selectLink('Edit')->link());
$form = $crawler->selectButton('Edit')->form(array(
'frontend_bundle_usuariotype[field_name]' => 'Foo',
// ... other fields to fill
));
$client->submit($form);
$crawler = $client->followRedirect();
// Check the element contains an attribute with value equals "Foo"
$this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]');
// Delete the entity
$client->submit($crawler->selectButton('Delete')->form());
$crawler = $client->followRedirect();
// Check the entity has been delete on the list
$this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());
}
*/
}
| {
"content_hash": "c586f567c5268a5a0d45f2554fb3f886",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 125,
"avg_line_length": 35.21818181818182,
"alnum_prop": 0.6029943211151265,
"repo_name": "pacordovad/project3",
"id": "9cb0448cafe67d30f998f36c58b0f6433396d3ef",
"size": "1937",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Frontend/Bundle/Tests/Controller/UsuarioControllerTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "54067"
},
{
"name": "JavaScript",
"bytes": "187690"
},
{
"name": "PHP",
"bytes": "4727665"
}
],
"symlink_target": ""
} |
<?php
declare(strict_types=1);
namespace Magmodules\Channable\Controller\Adminhtml\Order;
use Exception;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Backend\Model\View\Result\Redirect;
use Magento\Framework\App\Area;
use Magento\Framework\App\Response\RedirectInterface;
use Magento\Framework\Controller\ResultFactory;
use Magento\Store\Model\App\Emulation;
use Magmodules\Channable\Service\Order\ImportSimulator;
/**
* Adminhtml Simulate controller for Order Grid to simulate Test Order
*/
class Simulate extends Action
{
/**
* Authorization level
*/
public const ADMIN_RESOURCE = 'Magmodules_Channable::order_simulate';
/**
* @var ImportSimulator
*/
private $importSimulator;
/**
* @var RedirectInterface
*/
private $redirect;
/**
* @var Emulation
*/
private $appEmulation;
/**
* Simulate constructor.
* @param Context $context
* @param ImportSimulator $importSimulator
* @param RedirectInterface $redirect
* @param Emulation $appEmulation
*/
public function __construct(
Context $context,
ImportSimulator $importSimulator,
RedirectInterface $redirect,
Emulation $appEmulation
) {
$this->importSimulator = $importSimulator;
$this->redirect = $redirect;
$this->appEmulation = $appEmulation;
parent::__construct($context);
}
/**
* Execute action
*
* @return Redirect
*/
public function execute(): Redirect
{
/** @var Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$storeId = (int)$this->getRequest()->getParam('store_id');
try {
$this->appEmulation->startEnvironmentEmulation($storeId, Area::AREA_FRONTEND, true);
$order = $this->importSimulator->execute(
(int)$this->getRequest()->getParam('store_id'),
$this->getExtraParams()
);
$this->messageManager->addSuccessMessage(__('Test order #%1 created', $order->getIncrementId()));
$resultRedirect->setPath('sales/order/view', ['order_id' => $order->getEntityId()]);
} catch (Exception $exception) {
$this->messageManager->addErrorMessage($exception->getMessage());
$resultRedirect->setUrl($this->redirect->getRefererUrl());
} finally {
$this->appEmulation->stopEnvironmentEmulation();
}
return $resultRedirect;
}
/**
* Process and validate params
*
* @return array
*/
private function getExtraParams(): array
{
$extraParams = [];
foreach (ImportSimulator::PARAMS as $param) {
$extraParams[$param] = $this->getRequest()->getParam($param, null);
}
return $extraParams;
}
}
| {
"content_hash": "3286bc316a5b137122dd8e344bf4228e",
"timestamp": "",
"source": "github",
"line_count": 103,
"max_line_length": 109,
"avg_line_length": 28.368932038834952,
"alnum_prop": 0.6228610540725531,
"repo_name": "magmodules/magento2-channable",
"id": "9699b10ab44a1cb8c461cb4e8d6c552f9f36dd79",
"size": "3021",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Controller/Adminhtml/Order/Simulate.php",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "HTML",
"bytes": "20922"
},
{
"name": "JavaScript",
"bytes": "12167"
},
{
"name": "Less",
"bytes": "24157"
},
{
"name": "PHP",
"bytes": "625894"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "8ab1a2fa50b7b7f68cdd784bd51766c4",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.307692307692308,
"alnum_prop": 0.6940298507462687,
"repo_name": "mdoering/backbone",
"id": "1cb0e0bec27e70f957e312ecbabc8fea877bcf23",
"size": "189",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Carex/Carex phalaroides/Carex phalaroides elongata/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
require "bundler/vendored_thor"
module Bundler
class CLI::Plugin < Thor
desc "install PLUGINS", "Install the plugin from the source"
long_desc <<-D
Install plugins either from the rubygems source provided (with --source option) or from a git source provided with (--git option). If no sources are provided, it uses Gem.sources
D
method_option "source", :type => :string, :default => nil, :banner =>
"URL of the RubyGems source to fetch the plugin from"
method_option "version", :type => :string, :default => nil, :banner =>
"The version of the plugin to fetch"
method_option "git", :type => :string, :default => nil, :banner =>
"URL of the git repo to fetch from"
method_option "branch", :type => :string, :default => nil, :banner =>
"The git branch to checkout"
method_option "ref", :type => :string, :default => nil, :banner =>
"The git revision to check out"
def install(*plugins)
Bundler::Plugin.install(plugins, options)
end
end
end
| {
"content_hash": "1fec34c3f8a28fb027ea44ad7ea364b0",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 184,
"avg_line_length": 46.5,
"alnum_prop": 0.6559139784946236,
"repo_name": "lincoln131/rubyspanishxlsx",
"id": "277822dafcfd36f3cbe82dfcdf4f2728b40ca917",
"size": "1053",
"binary": false,
"copies": "8",
"ref": "refs/heads/master",
"path": "Portable/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/plugin.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "7113"
},
{
"name": "C",
"bytes": "2080185"
},
{
"name": "C++",
"bytes": "8933"
},
{
"name": "CSS",
"bytes": "88084"
},
{
"name": "CoffeeScript",
"bytes": "666"
},
{
"name": "HTML",
"bytes": "4110425"
},
{
"name": "Java",
"bytes": "391956"
},
{
"name": "JavaScript",
"bytes": "409418"
},
{
"name": "Logos",
"bytes": "532"
},
{
"name": "Makefile",
"bytes": "19074"
},
{
"name": "PHP",
"bytes": "857"
},
{
"name": "PowerShell",
"bytes": "2011"
},
{
"name": "REXX",
"bytes": "3862"
},
{
"name": "Ragel",
"bytes": "18040"
},
{
"name": "Roff",
"bytes": "36968"
},
{
"name": "Ruby",
"bytes": "25139758"
},
{
"name": "Shell",
"bytes": "10406"
},
{
"name": "Tcl",
"bytes": "1352923"
},
{
"name": "XSLT",
"bytes": "3736"
},
{
"name": "Yacc",
"bytes": "15727"
},
{
"name": "eC",
"bytes": "2009"
}
],
"symlink_target": ""
} |
<?php
require_once "util.php";
session_start();
unset($_SESSION['quiz']);
unset($_SESSION['title']);
unset($_SESSION['name']);
unset($_SESSION['novalidate']);
if ( !isset($_POST['text']) ) die('Missing input data');
$text = $_POST['text'];
if ( isset($_POST['title']) ) $_SESSION['title'] = $_POST['title'];
if ( isset($_POST['name']) ) $_SESSION['name'] = $_POST['name'];
if ( isset($_POST['bypass']) ) $_SESSION['novalidate'] = 'bypass';
echo("<pre>\n");
require_once("parse.php");
$questions = array();
$errors = array();
parse_gift($text, $questions, $errors);
if ( count($questions) < 1 ) {
print "No questions found.";
exit();
} else {
print "Found ".count($questions)." questions in the GIFT input.\n";
}
if ( count($errors) == 0 ) {
print "Initial parse of GIFT data successful\n";
} else {
print "Errors in the GIFT data\n";
print_r($errors);
}
echo("\nCreating and validating the quiz XML....\n");
flush();
// var_dump($questions);
require_once("make_qti.php");
if ( !isset($DOM) ) die("Conversion not completed");
$_SESSION['quiz'] = $DOM->saveXML();
$_SESSION['uuid'] = $uuid;
?>
Conversion complete...
</pre>
<p>
<a href="viewxml.php" target="_blank">View Quiz XML</a> |
<a href="getzip.php" target="_blank">Download ZIP</a>
<?php
if (isset($_SESSION['content_item_return_url'])){
if ( isset($_POST['title']) ) {
$name = $_POST['title'];
} else{
$name = 'Gift Quiz';
}
$abs_url = str_replace("convert.php", "getzip.php?", curPageURL());
$return_url = htmlspecialchars($_SESSION['content_item_return_url']) .
"?return_type=file&text=". htmlspecialchars($name) . "&url=" .
urlencode(htmlspecialchars($abs_url . session_name() . '='. session_id() ));
?>
| <a href="<?php echo $return_url ?>" target="_parent">Return Zip to LMS</a>
<?php
}
?>
</p>
<p>
To upload to an LMS choose the ZIP format - it makes a small IMS Common Cartridge
with just the quiz in it - and it is what most LMS systems prefer to import (i.e.
they don't want you to upload the XML directly).
</p>
| {
"content_hash": "8050ef058cc0f8641c027979dc9dc6f0",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 86,
"avg_line_length": 27.037974683544302,
"alnum_prop": 0.5903558052434457,
"repo_name": "csev/tsugi-php-mod",
"id": "b043bec0b36c6f89b1a6f18223abb296f02b14eb",
"size": "2136",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "gift/process.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "1305"
},
{
"name": "CSS",
"bytes": "15447"
},
{
"name": "HTML",
"bytes": "44"
},
{
"name": "JavaScript",
"bytes": "3075641"
},
{
"name": "PHP",
"bytes": "509637"
},
{
"name": "Python",
"bytes": "1302"
},
{
"name": "Shell",
"bytes": "312"
}
],
"symlink_target": ""
} |
package barqsoft.footballscores;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.support.annotation.NonNull;
/**
* Created by yehya khaled on 2/25/2015.
*/
public class ScoresProvider extends ContentProvider {
private static ScoresDBHelper mOpenHelper;
private static final int MATCHES = 100;
private static final int MATCHES_WITH_LEAGUE = 101;
private static final int MATCHES_WITH_ID = 102;
private static final int MATCHES_WITH_DATE = 103;
private UriMatcher muriMatcher = buildUriMatcher();
private static final SQLiteQueryBuilder ScoreQuery =
new SQLiteQueryBuilder();
private static final String SCORES_BY_LEAGUE = DatabaseContract.ScoresTable.LEAGUE_COL + " = ?";
private static final String SCORES_BY_DATE =
DatabaseContract.ScoresTable.DATE_COL + " LIKE ?";
private static final String SCORES_BY_ID =
DatabaseContract.ScoresTable.MATCH_ID + " = ?";
static UriMatcher buildUriMatcher() {
final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
final String authority = DatabaseContract.BASE_CONTENT_URI.toString();
matcher.addURI(authority, null, MATCHES);
matcher.addURI(authority, "league", MATCHES_WITH_LEAGUE);
matcher.addURI(authority, "id", MATCHES_WITH_ID);
matcher.addURI(authority, "date", MATCHES_WITH_DATE);
return matcher;
}
private int match_uri(Uri uri) {
String link = uri.toString();
{
if (link.contentEquals(DatabaseContract.BASE_CONTENT_URI.toString())) {
return MATCHES;
} else if (link.contentEquals(DatabaseContract.ScoresTable.buildScoreWithDate().toString())) {
return MATCHES_WITH_DATE;
} else if (link.contentEquals(DatabaseContract.ScoresTable.buildScoreWithId().toString())) {
return MATCHES_WITH_ID;
} else if (link.contentEquals(DatabaseContract.ScoresTable.buildScoreWithLeague().toString())) {
return MATCHES_WITH_LEAGUE;
}
}
return -1;
}
@Override
public boolean onCreate() {
mOpenHelper = new ScoresDBHelper(getContext());
return false;
}
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
return 0;
}
@Override
public String getType(Uri uri) {
final int match = muriMatcher.match(uri);
switch (match) {
case MATCHES:
return DatabaseContract.ScoresTable.CONTENT_TYPE;
case MATCHES_WITH_LEAGUE:
return DatabaseContract.ScoresTable.CONTENT_TYPE;
case MATCHES_WITH_ID:
return DatabaseContract.ScoresTable.CONTENT_ITEM_TYPE;
case MATCHES_WITH_DATE:
return DatabaseContract.ScoresTable.CONTENT_TYPE;
default:
throw new UnsupportedOperationException("Unknown uri :" + uri);
}
}
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
Cursor retCursor;
//Log.v(FetchScoreTask.LOG_TAG,uri.getPathSegments().toString());
int match = match_uri(uri);
//Log.v(FetchScoreTask.LOG_TAG,SCORES_BY_LEAGUE);
//Log.v(FetchScoreTask.LOG_TAG,selectionArgs[0]);
//Log.v(FetchScoreTask.LOG_TAG,String.valueOf(match));
switch (match) {
case MATCHES:
retCursor = mOpenHelper.getReadableDatabase().query(
DatabaseContract.SCORES_TABLE,
projection, null, null, null, null, sortOrder);
break;
case MATCHES_WITH_DATE:
//Log.v(FetchScoreTask.LOG_TAG,selectionArgs[1]);
//Log.v(FetchScoreTask.LOG_TAG,selectionArgs[2]);
retCursor = mOpenHelper.getReadableDatabase().query(
DatabaseContract.SCORES_TABLE,
projection, SCORES_BY_DATE, selectionArgs, null, null, sortOrder);
break;
case MATCHES_WITH_ID:
retCursor = mOpenHelper.getReadableDatabase().query(
DatabaseContract.SCORES_TABLE,
projection, SCORES_BY_ID, selectionArgs, null, null, sortOrder);
break;
case MATCHES_WITH_LEAGUE:
retCursor = mOpenHelper.getReadableDatabase().query(
DatabaseContract.SCORES_TABLE,
projection, SCORES_BY_LEAGUE, selectionArgs, null, null, sortOrder);
break;
default:
throw new UnsupportedOperationException("Unknown Uri" + uri);
}
retCursor.setNotificationUri(getContext().getContentResolver(), uri);
return retCursor;
}
@Override
public Uri insert(Uri uri, ContentValues values) {
return null;
}
@Override
public int bulkInsert(Uri uri,@NonNull ContentValues[] values) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
//db.delete(DatabaseContract.SCORES_TABLE,null,null);
//Log.v(FetchScoreTask.LOG_TAG,String.valueOf(muriMatcher.match(uri)));
switch (match_uri(uri)) {
case MATCHES:
db.beginTransaction();
int returncount = 0;
try {
for (ContentValues value : values) {
long _id = db.insertWithOnConflict(DatabaseContract.SCORES_TABLE, null, value,
SQLiteDatabase.CONFLICT_REPLACE);
if (_id != -1) {
returncount++;
}
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
getContext().getContentResolver().notifyChange(uri, null);
return returncount;
default:
return super.bulkInsert(uri, values);
}
}
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
return 0;
}
}
| {
"content_hash": "bde82830913eaec90a8f7e31bd66c333",
"timestamp": "",
"source": "github",
"line_count": 161,
"max_line_length": 115,
"avg_line_length": 40.32919254658385,
"alnum_prop": 0.6029570306483906,
"repo_name": "gazzumatteo/AndroidNanodegree",
"id": "eb56d3ff83bd6200a35701a75e48ebbfe46ae8db",
"size": "6493",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SuperDuo/Football_Scores-master/app/src/main/java/barqsoft/footballscores/ScoresProvider.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "190601"
}
],
"symlink_target": ""
} |
import { Configuration, buildConfiguration, DEFAULT_POPUP_TIMEOUT_MS, DEFAULT_IFRAME_TIMEOUT_MS } from "../../src/config/Configuration";
import { TEST_CONFIG, TEST_URIS } from "../utils/StringConstants";
import { LogLevel, Constants, AzureCloudInstance } from "@azure/msal-common";
import sinon from "sinon";
import { BrowserCacheLocation } from "../../src/utils/BrowserConstants";
/**
* Test values for the Configuration Options
*/
const TEST_POPUP_TIMEOUT_MS = 30000;
const TEST_OFFSET = 100;
describe("Configuration.ts Class Unit Tests", () => {
const testLoggerCallback = (level: LogLevel, message: string, containsPii: boolean): void => {}
it("buildConfiguration assigns default values", () => {
// @ts-ignore
let emptyConfig: Configuration = buildConfiguration({auth: null}, true);
// Auth config checks
expect(emptyConfig.auth).not.toBeNull();
expect(emptyConfig.auth.clientId).toHaveLength(0);
expect(emptyConfig.auth.authority).toBe(`${Constants.DEFAULT_AUTHORITY}`);
expect(emptyConfig.auth.redirectUri).toBe("");
expect(emptyConfig.auth.postLogoutRedirectUri).toBe("");
expect(emptyConfig.auth.navigateToLoginRequestUrl).toBe(true);
expect(emptyConfig.auth?.azureCloudOptions?.azureCloudInstance).toBe(AzureCloudInstance.None);
expect(emptyConfig.auth?.azureCloudOptions?.tenant).toBe("");
// Cache config checks
expect(emptyConfig.cache).toBeDefined()
expect(emptyConfig.cache?.cacheLocation).toBeDefined();
expect(emptyConfig.cache?.cacheLocation).toBe("sessionStorage");
expect(emptyConfig.cache?.storeAuthStateInCookie).toBeDefined();
expect(emptyConfig.cache?.storeAuthStateInCookie).toBe(false);
expect(emptyConfig.cache?.secureCookies).toBe(false);
// System config checks
expect(emptyConfig.system).toBeDefined();
expect(emptyConfig.system?.loggerOptions).toBeDefined();
expect(emptyConfig.system?.loggerOptions?.loggerCallback).toBeDefined();
expect(emptyConfig.system?.loggerOptions?.piiLoggingEnabled).toBe(false);
expect(emptyConfig.system?.networkClient).toBeDefined();
expect(emptyConfig.system?.windowHashTimeout).toBeDefined();
expect(emptyConfig.system?.windowHashTimeout).toBe(DEFAULT_POPUP_TIMEOUT_MS);
expect(emptyConfig.system?.iframeHashTimeout).toBeDefined();
expect(emptyConfig.system?.iframeHashTimeout).toBe(DEFAULT_IFRAME_TIMEOUT_MS);
expect(emptyConfig.system?.navigateFrameWait).toBe(0);
expect(emptyConfig.system?.tokenRenewalOffsetSeconds).toBe(300);
expect(emptyConfig.system?.asyncPopups).toBe(false);
});
it("sets timeouts with loadFrameTimeout", () => {
const config: Configuration = buildConfiguration({
auth: {
clientId: TEST_CONFIG.MSAL_CLIENT_ID
},
system: {
navigateFrameWait: 1,
loadFrameTimeout: 100
}
}, true);
expect(config.system?.iframeHashTimeout).toBe(100);
expect(config.system?.windowHashTimeout).toBe(100);
expect(config.system?.navigateFrameWait).toBe(1);
});
it("sets timeouts with hash timeouts", () => {
const config: Configuration = buildConfiguration({
auth: {
clientId: TEST_CONFIG.MSAL_CLIENT_ID
},
system: {
iframeHashTimeout: 5000,
windowHashTimeout: 50000
}
}, true);
expect(config.system?.iframeHashTimeout).toBe(5000);
expect(config.system?.windowHashTimeout).toBe(50000);
});
it("sets timeouts with loadFrameTimeout and hash timeouts", () => {
const config: Configuration = buildConfiguration({
auth: {
clientId: TEST_CONFIG.MSAL_CLIENT_ID
},
system: {
navigateFrameWait: 1,
iframeHashTimeout: 6001,
windowHashTimeout: 6002,
loadFrameTimeout: 500
}
}, true);
expect(config.system?.iframeHashTimeout).toBe(6001);
expect(config.system?.windowHashTimeout).toBe(6002);
expect(config.system?.loadFrameTimeout).toBe(500);
expect(config.system?.navigateFrameWait).toBe(1);
});
it("Tests logger", () => {
const consoleErrorSpy = sinon.stub(console, "error");
const consoleInfoSpy = sinon.stub(console, "info");
const consoleDebugSpy = sinon.stub(console, "debug");
const consoleWarnSpy = sinon.stub(console, "warn");
const message = "log message";
let emptyConfig: Configuration = buildConfiguration({
auth: {
clientId: TEST_CONFIG.MSAL_CLIENT_ID
},
system: {
loggerOptions: {
loggerCallback: (level, message, containsPii) => {
if (containsPii) {
return;
}
switch (level) {
case LogLevel.Error:
console.error(message);
return;
case LogLevel.Info:
console.info(message);
return;
case LogLevel.Verbose:
console.debug(message);
return;
case LogLevel.Warning:
console.warn(message);
return;
}
}
}
}
}, true);
if (!emptyConfig || !emptyConfig.system || !emptyConfig.system.loggerOptions || !emptyConfig.system.loggerOptions.loggerCallback) {
throw "config not setup correctly";
}
emptyConfig.system.loggerOptions.loggerCallback(LogLevel.Error, message, true)
expect(consoleErrorSpy.called).toBe(false);
emptyConfig.system.loggerOptions.loggerCallback(LogLevel.Error, message, false)
expect(consoleErrorSpy.calledOnce).toBe(true);
emptyConfig.system.loggerOptions.loggerCallback(LogLevel.Info, message, false)
expect(consoleInfoSpy.calledOnce).toBe(true);
emptyConfig.system.loggerOptions.loggerCallback(LogLevel.Verbose, message, false)
expect(consoleDebugSpy.calledOnce).toBe(true);
emptyConfig.system.loggerOptions.loggerCallback(LogLevel.Warning, message, false)
expect(consoleWarnSpy.calledOnce).toBe(true);
});
let testProtectedResourceMap = new Map<string, Array<string>>();
testProtectedResourceMap.set("testResource1", ["resourceUri1"]);
it("buildConfiguration correctly assigns new values", () => {
let newConfig: Configuration = buildConfiguration({
auth: {
clientId: TEST_CONFIG.MSAL_CLIENT_ID,
authority: TEST_CONFIG.validAuthority,
redirectUri: TEST_URIS.TEST_ALTERNATE_REDIR_URI,
postLogoutRedirectUri: TEST_URIS.TEST_LOGOUT_URI,
navigateToLoginRequestUrl: false
},
cache: {
cacheLocation: BrowserCacheLocation.LocalStorage,
storeAuthStateInCookie: true,
secureCookies: true
},
system: {
windowHashTimeout: TEST_POPUP_TIMEOUT_MS,
tokenRenewalOffsetSeconds: TEST_OFFSET,
loggerOptions: {
loggerCallback: testLoggerCallback,
piiLoggingEnabled: true
},
asyncPopups: true
}
}, true);
// Auth config checks
expect(newConfig.auth).not.toBeNull();
expect(newConfig.auth.clientId).toBe(TEST_CONFIG.MSAL_CLIENT_ID);
expect(newConfig.auth.authority).toBe(TEST_CONFIG.validAuthority);
expect(newConfig.auth.redirectUri).toBe(TEST_URIS.TEST_ALTERNATE_REDIR_URI);
expect(newConfig.auth.postLogoutRedirectUri).toBe(TEST_URIS.TEST_LOGOUT_URI);
expect(newConfig.auth.navigateToLoginRequestUrl).toBe(false);
// Cache config checks
expect(newConfig.cache).not.toBeNull();
expect(newConfig.cache?.cacheLocation).not.toBeNull();
expect(newConfig.cache?.cacheLocation).toBe("localStorage");
expect(newConfig.cache?.storeAuthStateInCookie).not.toBeNull();
expect(newConfig.cache?.storeAuthStateInCookie).toBe(true);
expect(newConfig.cache?.secureCookies).toBe(true);
// System config checks
expect(newConfig.system).not.toBeNull();
expect(newConfig.system?.windowHashTimeout).not.toBeNull();
expect(newConfig.system?.windowHashTimeout).toBe(TEST_POPUP_TIMEOUT_MS);
expect(newConfig.system?.tokenRenewalOffsetSeconds).not.toBeNull();
expect(newConfig.system?.tokenRenewalOffsetSeconds).toBe(TEST_OFFSET);
expect(newConfig.system?.navigateFrameWait).toBe(0);
expect(newConfig.system?.loggerOptions).not.toBeNull();
expect(newConfig.system?.loggerOptions?.loggerCallback).not.toBeNull();
expect(newConfig.system?.loggerOptions?.piiLoggingEnabled).toBe(true);
expect(newConfig.system?.asyncPopups).toBe(true);
});
});
| {
"content_hash": "8ee9a472a98134b868f254409b88bd98",
"timestamp": "",
"source": "github",
"line_count": 202,
"max_line_length": 139,
"avg_line_length": 46.82673267326733,
"alnum_prop": 0.6152870282270854,
"repo_name": "AzureAD/microsoft-authentication-library-for-js",
"id": "44c679b0c857b72da5aec28e30585b273d1f973d",
"size": "9459",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev",
"path": "lib/msal-browser/test/config/Configuration.spec.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "3421"
},
{
"name": "C",
"bytes": "199"
},
{
"name": "C++",
"bytes": "3861"
},
{
"name": "CSS",
"bytes": "345"
},
{
"name": "EJS",
"bytes": "1365"
},
{
"name": "HTML",
"bytes": "6370"
},
{
"name": "Java",
"bytes": "14660"
},
{
"name": "JavaScript",
"bytes": "2524257"
},
{
"name": "Python",
"bytes": "979"
},
{
"name": "Shell",
"bytes": "2665"
},
{
"name": "TypeScript",
"bytes": "3471849"
}
],
"symlink_target": ""
} |
"""A base class for EE Functions."""
# Using lowercase function naming to match the JavaScript names.
# pylint: disable=g-bad-name
import textwrap
from . import computedobject
from . import ee_exception
from . import encodable
from . import serializer
class Function(encodable.EncodableFunction):
"""An abstract base class for functions callable by the EE API.
Subclasses must implement encode_invocation() and getSignature().
"""
# A function used to type-coerce arguments and return values.
_promoter = staticmethod(lambda value, type_name: value)
@staticmethod
def _registerPromoter(promoter):
"""Registers a function used to type-coerce arguments and return values.
Args:
promoter: A function used to type-coerce arguments and return values.
Passed a value as the first parameter and a type name as the second.
Can be used, for example, promote numbers or strings to Images.
Should return the input promoted if the type is recognized,
otherwise the original input.
"""
Function._promoter = staticmethod(promoter)
def getSignature(self):
"""Returns a description of the interface provided by this function.
Returns:
The function's signature, a dictionary containing:
name: string
returns: type name string
args: list of argument dictionaries, each containing:
name: string
type: type name string
optional: boolean
default: an arbitrary primitive or encodable object
"""
raise NotImplementedError(
'Function subclasses must implement getSignature().')
def call(self, *args, **kwargs):
"""Calls the function with the given positional and keyword arguments.
Args:
*args: The positional arguments to pass to the function.
**kwargs: The named arguments to pass to the function.
Returns:
A ComputedObject representing the called function. If the signature
specifies a recognized return type, the returned value will be cast
to that type.
"""
return self.apply(self.nameArgs(args, kwargs))
def apply(self, named_args):
"""Calls the function with a dictionary of named arguments.
Args:
named_args: A dictionary of named arguments to pass to the function.
Returns:
A ComputedObject representing the called function. If the signature
specifies a recognized return type, the returned value will be cast
to that type.
"""
result = computedobject.ComputedObject(self, self.promoteArgs(named_args))
return Function._promoter(result, self.getReturnType())
def promoteArgs(self, args):
"""Promotes arguments to their types based on the function's signature.
Verifies that all required arguments are provided and no unknown arguments
are present.
Args:
args: A dictionary of keyword arguments to the function.
Returns:
A dictionary of promoted arguments.
Raises:
EEException: If unrecognized arguments are passed or required ones are
missing.
"""
specs = self.getSignature()['args']
# Promote all recognized args.
promoted_args = {}
known = set()
for spec in specs:
name = spec['name']
if name in args:
promoted_args[name] = Function._promoter(args[name], spec['type'])
elif not spec.get('optional'):
raise ee_exception.EEException(
'Required argument (%s) missing to function: %s'
% (name, self.name))
known.add(name)
# Check for unknown arguments.
unknown = set(args.keys()).difference(known)
if unknown:
raise ee_exception.EEException(
'Unrecognized arguments %s to function: %s' % (unknown, self.name))
return promoted_args
def nameArgs(self, args, extra_keyword_args=None):
"""Converts a list of positional arguments to a map of keyword arguments.
Uses the function's signature for argument names. Note that this does not
check whether the array contains enough arguments to satisfy the call.
Args:
args: Positional arguments to the function.
extra_keyword_args: Optional named arguments to add.
Returns:
Keyword arguments to the function.
Raises:
EEException: If conflicting arguments or too many of them are supplied.
"""
specs = self.getSignature()['args']
# Handle positional arguments.
if len(specs) < len(args):
raise ee_exception.EEException(
'Too many (%d) arguments to function: %s' % (len(args), self.name))
named_args = dict([(spec['name'], value)
for spec, value in zip(specs, args)])
# Handle keyword arguments.
if extra_keyword_args:
for name in extra_keyword_args:
if name in named_args:
raise ee_exception.EEException(
'Argument %s specified as both positional and '
'keyword to function: %s' % (name, self.name))
named_args[name] = extra_keyword_args[name]
# Unrecognized arguments are checked in promoteArgs().
return named_args
def getReturnType(self):
return self.getSignature()['returns']
def serialize(self, for_cloud_api=True):
return serializer.toJSON(
self, for_cloud_api=for_cloud_api
)
def __str__(self):
"""Returns a user-readable docstring for this function."""
DOCSTRING_WIDTH = 75
signature = self.getSignature()
parts = []
if 'description' in signature:
parts.append(
textwrap.fill(signature['description'], width=DOCSTRING_WIDTH))
args = signature['args']
if args:
parts.append('')
parts.append('Args:')
for arg in args:
name_part = ' ' + arg['name']
if 'description' in arg:
name_part += ': '
arg_header = name_part + arg['description']
else:
arg_header = name_part
arg_doc = textwrap.fill(arg_header,
width=DOCSTRING_WIDTH - len(name_part),
subsequent_indent=' ' * 6)
parts.append(arg_doc)
return '\n'.join(parts)
class SecondOrderFunction(Function):
"""A function that executes the result of a function."""
def __init__(self, function_body, signature):
"""Creates a SecondOrderFunction.
Args:
function_body: The function that returns the function to execute.
signature: The signature of the function to execute, as described in
getSignature().
"""
super().__init__()
self._function_body = function_body
self._signature = signature
def encode_invocation(self, encoder):
return self._function_body.encode(encoder)
def encode_cloud_invocation(self, encoder):
return {'functionReference': encoder(self._function_body)}
def getSignature(self):
return self._signature
| {
"content_hash": "4080f7a77ded85ac03e984aff6b45956",
"timestamp": "",
"source": "github",
"line_count": 214,
"max_line_length": 78,
"avg_line_length": 32.06542056074766,
"alnum_prop": 0.6594287379772661,
"repo_name": "google/earthengine-api",
"id": "e41bc6a9c7e67dd8403654119f6936357a32bb76",
"size": "6884",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "python/ee/function.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "1352"
},
{
"name": "JavaScript",
"bytes": "3544345"
},
{
"name": "Jupyter Notebook",
"bytes": "216509"
},
{
"name": "Python",
"bytes": "698991"
},
{
"name": "Shell",
"bytes": "1447"
},
{
"name": "TypeScript",
"bytes": "42297"
}
],
"symlink_target": ""
} |
The MIT License (MIT)
Copyright (c) 2015 Sidney Bofah
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.
| {
"content_hash": "d35fbae5d37aa131c7c5a221f45fa163",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 77,
"avg_line_length": 51.38095238095238,
"alnum_prop": 0.8035217794253939,
"repo_name": "SidneyS/quicklook-thumbnail",
"id": "d74e48c420e6d57d01fb606d1f0c66fe2a57aa83",
"size": "1079",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "LICENSE.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "5853"
}
],
"symlink_target": ""
} |
<?php
class Group_indexController extends Zend_Controller_Action {
const REDIRECT_URL = '/group/index';
public function init()
{
header('content-type: text/html; charset=utf8');
defined('BASE_URL') || define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());
}
public function indexAction(){
try{
$db = new Group_Model_DbTable_DbClient();
if($this->getRequest()->isPost()){
$formdata=$this->getRequest()->getPost();
$search = array(
'adv_search' => $formdata['adv_search'],
'show_all'=>$formdata['show_all'],
'status'=>$formdata['status'],
'start_date'=> $formdata['start_date'],
'end_date'=>$formdata['end_date'],
);
}
else{
$search = array(
'adv_search' => '',
'status' => -1,
'show_all'=>'',
'start_date'=> date('Y-m-d'),
'end_date'=>date('Y-m-d'));
}
$rs_rows= $db->getAllClients($search);
$glClass = new Application_Model_GlobalClass();
$rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
$list = new Application_Form_Frmtable();
$collumns = array("User Name","Email","Phone","Address","Status");
$link=array(
'module'=>'group','controller'=>'index','action'=>'edit',
);
$this->view->list=$list->getCheckList(3, $collumns, $rs_rows,array('user_name'=>$link,'email'=>$link));
}catch (Exception $e){
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
$frm = new Application_Form_FrmAdvanceSearch();
$frm = $frm->AdvanceSearch();
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_search = $frm;
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmAddClient();
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
$this->view->result=$search;
}
public function addAction(){
if($this->getRequest()->isPost()){
$data = $this->getRequest()->getPost();
$data['old_photo']=null;
$db = new Group_Model_DbTable_DbClient();
try{
if(isset($data['save_new'])){
$id= $db->addClient($data);
Application_Form_FrmMessage::message("ការបញ្ចូលជោគជ័យ !");
}
else if (isset($data['save_close'])){
$id= $db->addClient($data);
Application_Form_FrmMessage::message("ការបញ្ចូលជោគជ័យ !");
Application_Form_FrmMessage::redirectUrl("/group/index");
}
}catch (Exception $e){
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmAddClient();
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
}
public function editAction(){
$db = new Group_Model_DbTable_DbClient();
$id = $this->getRequest()->getParam("id");
if($this->getRequest()->isPost()){
try{
$data = $this->getRequest()->getPost();
$data['id'] = $id;
$db->addClient($data);
Application_Form_FrmMessage::Sucessfull('EDIT_SUCCESS',"/group/index");
}catch (Exception $e){
Application_Form_FrmMessage::message("EDIT_FAILE");
echo $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$row = $db->getClientById($id);
$this->view->row=$row;
$this->view->photo = $row['photo'];
if(empty($row)){
$this->_redirect("/group/client");
}
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmAddClient($row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
}
function deleteAction(){
$id = $this->getRequest()->getParam("id");
$db = new Group_Model_DbTable_DbClient();
if (!empty($id)){
try{
$db->deleteClient($id);
Application_Form_FrmMessage::Sucessfull('DELETE_SUCCESS',"/group/index");
}catch (Exception $e){
Application_Form_FrmMessage::message("DELETE_FAILE");
echo $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}else{
$this->_redirect("/group/index");
}
}
function viewAction(){
$id = $this->getRequest()->getParam("id");
$db = new Group_Model_DbTable_DbClient();
$this->view->client_list = $db->getClientDetailInfo($id);
}
}
| {
"content_hash": "3296a041b5bc718a710bf0066cf531ae",
"timestamp": "",
"source": "github",
"line_count": 135,
"max_line_length": 106,
"avg_line_length": 32.022222222222226,
"alnum_prop": 0.6241036317372195,
"repo_name": "samlanh/cam-adsproject",
"id": "2cf31fd3d48946384c04d4476dcc0eb10565dfe6",
"size": "4395",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/modules/group/controllers/IndexController.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "1172"
},
{
"name": "CSS",
"bytes": "1146875"
},
{
"name": "HTML",
"bytes": "2814308"
},
{
"name": "JavaScript",
"bytes": "1141867"
},
{
"name": "PHP",
"bytes": "1951670"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.