text
stringlengths 27
775k
|
---|
package com.kilchichakov.fiveletters.config
import com.mongodb.ConnectionString
import com.mongodb.MongoClient
import com.mongodb.client.MongoDatabase
import org.litote.kmongo.KMongo
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@Configuration
class MongoConfig {
@Bean
fun mongoClient(@Value("\${MONGO_LOGIN}") login: String,
@Value("\${MONGO_PASSWORD}") password: String,
@Value("\${MONGO_HOST}") host: String,
@Value("\${MONGO_PORT}") port: Int,
@Value("\${MONGO_SRV_MODE}") srvMode: Boolean): MongoClient {
val connectionString = ConnectionString(
if (srvMode) {
"mongodb+srv://$login:$password@$host/admin?retryWrites=true&w=majority"
} else {
"mongodb://$login:$password@$host:$port/admin?retryWrites=true&w=majority"
}
)
return KMongo.createClient(connectionString)
}
@Bean
fun mongoDatabase(client: MongoClient,
@Value("\${MONGO_DB}") dbName: String): MongoDatabase {
return client.getDatabase(dbName)
}
} |
# frozen_string_literal: true
require "spec_helper"
ExecuteSuite = GraphQL::Compatibility::ExecutionSpecification.build_suite(GraphQL::Execution::Execute)
LazyExecuteSuite = GraphQL::Compatibility::LazyExecutionSpecification.build_suite(GraphQL::Execution::Execute)
|
'use strict';
/**
* @ngdoc function
* @name todoListApp.controller:TaskmakerCtrl
* @description
* # TaskmakerCtrl
* Controller of the todoListApp
*/
angular.module('todoListApp')
.controller('TaskmakerCtrl', function ($mdDialog,$scope) {
$scope.name="Nueva Tarea";
$scope.task={
name:"",
desp:"",
done:false
};
$scope.cancel=function(){
$mdDialog.cancel();
};
$scope.create=function(){
var valid=$scope.task.name.trim()!=false && $scope.task.desp.trim()!=false;
if(valid)
$mdDialog.hide($scope.task);
};
});
|
# TextVectorization layer
### `TextVectorization` class
```python
tf.keras.layers.TextVectorization(
max_tokens=None,
standardize="lower_and_strip_punctuation",
split="whitespace",
ngrams=None,
output_mode="int",
output_sequence_length=None,
pad_to_max_tokens=False,
vocabulary=None,
idf_weights=None,
sparse=False,
ragged=False,
**kwargs
)
```
A preprocessing layer which maps text features to integer sequences.
This layer has basic options for managing text in a Keras model. It transforms
a batch of strings (one example = one string) into either a list of token
indices (one example = 1D tensor of integer token indices) or a dense
representation (one example = 1D tensor of float values representing data
about the example's tokens).
The vocabulary for the layer must be either supplied on construction or
learned via `adapt()`. When this layer is adapted, it will analyze the
dataset, determine the frequency of individual string values, and create a
vocabulary from them. This vocabulary can have unlimited size or be capped,
depending on the configuration options for this layer; if there are more
unique values in the input than the maximum vocabulary size, the most frequent
terms will be used to create the vocabulary.
The processing of each example contains the following steps:
1. Standardize each example (usually lowercasing + punctuation stripping)
2. Split each example into substrings (usually words)
3. Recombine substrings into tokens (usually ngrams)
4. Index tokens (associate a unique int value with each token)
5. Transform each example using this index, either into a vector of ints or
a dense float vector.
Some notes on passing callables to customize splitting and normalization for
this layer:
1. Any callable can be passed to this Layer, but if you want to serialize
this object you should only pass functions that are registered Keras
serializables (see `tf.keras.utils.register_keras_serializable` for more
details).
2. When using a custom callable for `standardize`, the data received
by the callable will be exactly as passed to this layer. The callable
should return a tensor of the same shape as the input.
3. When using a custom callable for `split`, the data received by the
callable will have the 1st dimension squeezed out - instead of
`[["string to split"], ["another string to split"]]`, the Callable will
see `["string to split", "another string to split"]`. The callable should
return a Tensor with the first dimension containing the split tokens -
in this example, we should see something like `[["string", "to",
"split"], ["another", "string", "to", "split"]]`. This makes the callable
site natively compatible with `tf.strings.split()`.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
__Arguments__
- __max_tokens__: Maximum size of the vocabulary for this layer. This should only
be specified when adapting a vocabulary or when setting
`pad_to_max_tokens=True`. Note that this vocabulary
contains 1 OOV token, so the effective number of tokens is `(max_tokens -
1 - (1 if output_mode == "int" else 0))`.
- __standardize__: Optional specification for standardization to apply to the
input text. Values can be None (no standardization),
`"lower_and_strip_punctuation"` (lowercase and remove punctuation) or a
Callable. Default is `"lower_and_strip_punctuation"`.
- __split__: Optional specification for splitting the input text. Values can be
None (no splitting), `"whitespace"` (split on ASCII whitespace), or a
Callable. The default is `"whitespace"`.
- __ngrams__: Optional specification for ngrams to create from the possibly-split
input text. Values can be None, an integer or tuple of integers; passing
an integer will create ngrams up to that integer, and passing a tuple of
integers will create ngrams for the specified values in the tuple. Passing
None means that no ngrams will be created.
- __output_mode__: Optional specification for the output of the layer. Values can
be `"int"`, `"multi_hot"`, `"count"` or `"tf_idf"`, configuring the layer
as follows:
- `"int"`: Outputs integer indices, one integer index per split string
token. When `output_mode == "int"`, 0 is reserved for masked
locations; this reduces the vocab size to
`max_tokens - 2` instead of `max_tokens - 1`.
- `"multi_hot"`: Outputs a single int array per batch, of either
vocab_size or max_tokens size, containing 1s in all elements where the
token mapped to that index exists at least once in the batch item.
- `"count"`: Like `"multi_hot"`, but the int array contains a count of
the number of times the token at that index appeared in the
batch item.
- `"tf_idf"`: Like `"multi_hot"`, but the TF-IDF algorithm is applied to
find the value in each token slot.
For `"int"` output, any shape of input and output is supported. For all
other output modes, currently only rank 1 inputs (and rank 2 outputs after
splitting) are supported.
- __output_sequence_length__: Only valid in INT mode. If set, the output will have
its time dimension padded or truncated to exactly `output_sequence_length`
values, resulting in a tensor of shape
`(batch_size, output_sequence_length)` regardless of how many tokens
resulted from the splitting step. Defaults to None.
- __pad_to_max_tokens__: Only valid in `"multi_hot"`, `"count"`, and `"tf_idf"`
modes. If True, the output will have its feature axis padded to
`max_tokens` even if the number of unique tokens in the vocabulary is less
than max_tokens, resulting in a tensor of shape `(batch_size, max_tokens)`
regardless of vocabulary size. Defaults to False.
- __vocabulary__: Optional. Either an array of strings or a string path to a text
file. If passing an array, can pass a tuple, list, 1D numpy array, or 1D
tensor containing the string vocbulary terms. If passing a file path, the
file should contain one line per term in the vocabulary. If this argument
is set, there is no need to `adapt` the layer.
- __idf_weights__: Only valid when `output_mode` is `"tf_idf"`. A tuple, list, 1D
numpy array, or 1D tensor or the same length as the vocabulary, containing
the floating point inverse document frequency weights, which will be
multiplied by per sample term counts for the final `tf_idf` weight. If the
`vocabulary` argument is set, and `output_mode` is `"tf_idf"`, this
argument must be supplied.
- __ragged__: Boolean. Only applicable to `"int"` output mode. If True, returns a
`RaggedTensor` instead of a dense `Tensor`, where each sequence may have a
different length after string splitting. Defaults to False.
- __sparse__: Boolean. Only applicable to `"multi_hot"`, `"count"`, and
`"tf_idf"` output modes. If True, returns a `SparseTensor` instead of a
dense `Tensor`. Defaults to False.
__Example__
This example instantiates a `TextVectorization` layer that lowercases text,
splits on whitespace, strips punctuation, and outputs integer vocab indices.
```python
>>> text_dataset = tf.data.Dataset.from_tensor_slices(["foo", "bar", "baz"])
>>> max_features = 5000 # Maximum vocab size.
>>> max_len = 4 # Sequence length to pad the outputs to.
>>>
>>> # Create the layer.
>>> vectorize_layer = tf.keras.layers.TextVectorization(
... max_tokens=max_features,
... output_mode='int',
... output_sequence_length=max_len)
>>>
>>> # Now that the vocab layer has been created, call `adapt` on the text-only
>>> # dataset to create the vocabulary. You don't have to batch, but for large
>>> # datasets this means we're not keeping spare copies of the dataset.
>>> vectorize_layer.adapt(text_dataset.batch(64))
>>>
>>> # Create the model that uses the vectorize text layer
>>> model = tf.keras.models.Sequential()
>>>
>>> # Start by creating an explicit input layer. It needs to have a shape of
>>> # (1,) (because we need to guarantee that there is exactly one string
>>> # input per batch), and the dtype needs to be 'string'.
>>> model.add(tf.keras.Input(shape=(1,), dtype=tf.string))
>>>
>>> # The first layer in our model is the vectorization layer. After this
>>> # layer, we have a tensor of shape (batch_size, max_len) containing vocab
>>> # indices.
>>> model.add(vectorize_layer)
>>>
>>> # Now, the model can map strings to integers, and you can add an embedding
>>> # layer to map these integers to learned embeddings.
>>> input_data = [["foo qux bar"], ["qux baz"]]
>>> model.predict(input_data)
array([[2, 1, 4, 0],
[1, 3, 0, 0]])
```
__Example__
This example instantiates a `TextVectorization` layer by passing a list
of vocabulary terms to the layer's `__init__()` method.
```python
>>> vocab_data = ["earth", "wind", "and", "fire"]
>>> max_len = 4 # Sequence length to pad the outputs to.
>>>
>>> # Create the layer, passing the vocab directly. You can also pass the
>>> # vocabulary arg a path to a file containing one vocabulary word per
>>> # line.
>>> vectorize_layer = tf.keras.layers.TextVectorization(
... max_tokens=max_features,
... output_mode='int',
... output_sequence_length=max_len,
... vocabulary=vocab_data)
>>>
>>> # Because we've passed the vocabulary directly, we don't need to adapt
>>> # the layer - the vocabulary is already set. The vocabulary contains the
>>> # padding token ('') and OOV token ('[UNK]') as well as the passed tokens.
>>> vectorize_layer.get_vocabulary()
['', '[UNK]', 'earth', 'wind', 'and', 'fire']
```
----
|
import 'package:animated_bottom_nav_bar/Utils/constants.dart';
import 'package:flutter/material.dart';
class AnimatedBottomNavBarItems extends StatelessWidget {
AnimatedBottomNavBarItems({
Key? key,
required this.isSelected,
required this.label,
required this.icon,
this.activeColor = Colors.blue,
required this.needMargin,
required this.index,
this.navBarItemAlignment = NavBarItemAlignment.center,
}) : super(key: key);
final bool isSelected;
final bool needMargin;
final String? label;
final IconData? icon;
final Color? activeColor;
final int index;
final NavBarItemAlignment navBarItemAlignment;
final Map<NavBarItemAlignment, Alignment> _alignmentGetter = {
NavBarItemAlignment.center: Alignment.center,
NavBarItemAlignment.left: Alignment.centerLeft,
NavBarItemAlignment.right: Alignment.centerRight,
};
@override
Widget build(BuildContext context) {
return AnimatedContainer(
height: 60,
width: isSelected ? 130 : 55,
padding: isSelected ? hPad12 : zeroPad,
margin:
needMargin && index == 1 ? const EdgeInsets.only(left: 30) : zeroPad,
duration: const Duration(milliseconds: 250),
decoration: BoxDecoration(
color: isSelected ? activeColor!.withOpacity(0.2) : null,
borderRadius: BorderRadius.circular(15),
),
curve: Curves.linearToEaseOut,
child: Align(
alignment: isSelected
? _alignmentGetter[navBarItemAlignment]!
: Alignment.center,
child: SingleChildScrollView(
physics: const NeverScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
icon,
color: isSelected ? activeColor : Colors.grey[400],
),
if (isSelected) ...[
const SizedBox(
width: 10,
),
DefaultTextStyle.merge(
style: TextStyle(
color: activeColor,
fontWeight: FontWeight.bold,
),
maxLines: 1,
child: Text(label!),
),
]
],
),
),
),
);
}
}
|
require 'rzubr'
require 'strscan'
class Calculator
def initialize() @grammar_table = grammar_table end
def grammar_table
rule = Rzubr::Rule
prec = rule.
left('+', '-').
left('*', '/').
right(:UPLUS, :UMINUS)
lines = rule.name(:lines) \
> rule[:lines, :expr, "\n"] & :parse_lines_expr \
| rule[:lines, "\n"] \
| rule[] \
| rule[:error, "\n"] & :parse_lines_error
expr = rule.name(:expr) \
> rule[:expr, '+', :expr] & :parse_expr_plus \
| rule[:expr, '-', :expr] & :parse_expr_minus \
| rule[:expr, '*', :expr] & :parse_expr_times \
| rule[:expr, '/', :expr] & :parse_expr_divide \
| rule['(', :expr, ')'] & :parse_expr_subexpr \
| rule['+', :expr] % :UPLUS & :parse_expr_positive \
| rule['-', :expr] % :UMINUS & :parse_expr_negative \
| rule[:NUMBER] & :parse_expr_number
g = (prec + lines + expr).start(:lines)
Rzubr::LALR1.new.rule(g)
end
def parse_lines_expr(v) puts v[2] end
def parse_lines_error(yy) puts 'Error'; yy.error_ok end
def parse_expr_plus(v) v[1] + v[3] end
def parse_expr_minus(v) v[1] - v[3] end
def parse_expr_times(v) v[1] * v[3] end
def parse_expr_divide(v) v[1] / v[3] end
def parse_expr_subexpr(v) v[2] end
def parse_expr_positive(v) v[2] end
def parse_expr_negative(v) -v[2] end
def parse_expr_number(v) v[1] end
def next_token(parser, scanner)
if scanner.eos?
parser.next_token(nil, nil)
return
end
scanner.scan(/[ \t]+/)
if scanner.scan(/([-+*\/()])/)
parser.next_token(scanner[1], scanner[1])
elsif scanner.scan(/([0-9]+)/)
parser.next_token(:NUMBER, scanner[1].to_f)
elsif scanner.scan(/\n/)
parser.next_token("\n", "\n")
else
raise 'unexpected character'
end
end
def calc
scanner = StringScanner.new("-9+(-2-1)\n" + "2+3)\n" + "2+3\n")
Rzubr::Parser.new(@grammar_table).parse(self) do |parser|
next_token(parser, scanner)
end
end
end
if __FILE__ == $0
Calculator.new.calc
end
|
# vim: set ts=8 sts=2 sw=2 tw=100 et :
use strict;
use warnings;
no if "$]" >= 5.031009, feature => 'indirect';
no if "$]" >= 5.033001, feature => 'multidimensional';
no if "$]" >= 5.033006, feature => 'bareword_filehandles';
use Test::More 0.88;
use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
use Test::JSON::Schema::Acceptance;
my $accepter = Test::JSON::Schema::Acceptance->new(specification => 'draft2020-12');
ok($accepter->additional_resources->is_dir, 'additional_resources directory exists');
ok($accepter->additional_resources->child('integer.json')->is_file, 'integer.json file exists');
done_testing;
|
require_relative '../bench_init'
context "Configured Monitor" do
source = StreamMonitor::Controls::Source.example
settings = StreamMonitor::Divergence::Settings.build
data = settings.get
monitor = StreamMonitor::Divergence::Monitor.new source
settings.set monitor
test "The frequency_milliseconds is configured" do
assert(!monitor.frequency_milliseconds.nil?)
assert(monitor.frequency_milliseconds == data.frequency_milliseconds)
end
test "The tolerance_milliseconds is configured" do
assert(!monitor.tolerance_milliseconds.nil?)
assert(monitor.tolerance_milliseconds == data.tolerance_milliseconds)
end
end
|
---
layout: post
title: "Go项目依赖下载超时"
subtitle: 'mysql-schema-sync项目里的依赖处理'
author: "陶叔"
header-style: text
tags:
- Go
---
> 依赖管理:go mod tidy
> 问题:dial tcp 172.217.24.17:443: i/o timeout

```
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
```


> https://phantomvk.github.io/2020/03/03/go/
> https://www.jianshu.com/p/760c97ff644c |
#include "client.h"
#include "gl/gl_errors.h"
#include "gl/primitive.h"
#include "input/keyboard.h"
#include "world/chunk_mesh_generation.h"
#include <SFML/Window/Mouse.hpp>
#include <common/debug.h>
#include <common/network/net_command.h>
#include <common/network/net_constants.h>
#include <thread>
#include "client_config.h"
namespace {
int findChunkDrawableIndex(const ChunkPosition &position,
const std::vector<ChunkDrawable> &drawables)
{
for (int i = 0; i < static_cast<int>(drawables.size()); i++) {
if (drawables[i].position == position) {
return i;
}
}
return -1;
}
void deleteChunkRenderable(const ChunkPosition &position,
std::vector<ChunkDrawable> &drawables)
{
auto index = findChunkDrawableIndex(position, drawables);
if (index > -1) {
drawables[index].vao.destroy();
// As the chunk renders need not be a sorted array, "swap and pop"
// can be used
// More efficent (and maybe safer) than normal deletion
std::iter_swap(drawables.begin() + index, drawables.end() - 1);
drawables.pop_back();
}
}
} // namespace
Client::Client()
: NetworkHost("Client")
{
auto luaGuiAPI = m_lua.addTable("GUI");
luaGuiAPI["addImage"] = [&](sol::userdata img) { m_gui.addImage(img); };
m_gui.addUsertypes(luaGuiAPI);
m_lua.lua["update"] = 3;
m_lua.runLuaScript("game/gui.lua");
}
bool Client::init(const ClientConfig &config, float aspect)
{
// OpenGL stuff
m_cube = makeCubeVertexArray(1, 2, 1);
// Basic shader
m_basicShader.program.create("static", "static");
m_basicShader.program.bind();
m_basicShader.modelLocation =
m_basicShader.program.getUniformLocation("modelMatrix");
m_basicShader.projectionViewLocation =
m_basicShader.program.getUniformLocation("projectionViewMatrix");
// Chunk shader
m_chunkShader.program.create("chunk", "chunk");
m_chunkShader.program.bind();
m_chunkShader.projectionViewLocation =
m_chunkShader.program.getUniformLocation("projectionViewMatrix");
// Chunk shader
m_fluidShader.program.create("water", "chunk");
m_fluidShader.program.bind();
m_fluidShader.projectionViewLocation =
m_fluidShader.program.getUniformLocation("projectionViewMatrix");
m_fluidShader.timeLocation =
m_fluidShader.program.getUniformLocation("time");
// Texture for the player model
m_errorSkinTexture.create("skins/error");
m_errorSkinTexture.bind();
m_texturePack = config.texturePack;
// Set up the server connection
auto peer = NetworkHost::createAsClient(config.serverIp);
if (!peer) {
return false;
}
mp_serverPeer = *peer;
// Set player stuff
mp_player = &m_entities[NetworkHost::getPeerId()];
mp_player->position = {CHUNK_SIZE * 2, CHUNK_SIZE * 2 + 1, CHUNK_SIZE * 2};
m_rawPlayerSkin = gl::loadRawImageFile("skins/" + config.skinName);
sendPlayerSkin(m_rawPlayerSkin);
m_projectionMatrix = glm::perspective(3.14f / 2.0f, aspect, 0.01f, 2000.0f);
return true;
}
void Client::handleInput(const sf::Window &window, const Keyboard &keyboard)
{
if (!m_hasReceivedGameData) {
return;
}
static auto lastMousePosition = sf::Mouse::getPosition(window);
if (!m_isMouseLocked && window.hasFocus() &&
sf::Mouse::getPosition(window).y >= 0) {
auto change = sf::Mouse::getPosition(window) - lastMousePosition;
mp_player->rotation.x += static_cast<float>(change.y / 8.0f);
mp_player->rotation.y += static_cast<float>(change.x / 8.0f);
sf::Mouse::setPosition(
{(int)window.getSize().x / 2, (int)window.getSize().y / 2}, window);
lastMousePosition = sf::Mouse::getPosition(window);
}
// Handle keyboard input
float PLAYER_SPEED = 5.0f;
if (keyboard.isKeyDown(sf::Keyboard::LControl)) {
PLAYER_SPEED *= 10;
}
// Handle mouse input
auto &rotation = mp_player->rotation;
auto &velocity = mp_player->velocity;
if (keyboard.isKeyDown(sf::Keyboard::W)) {
velocity += forwardsVector(rotation) * PLAYER_SPEED;
}
else if (keyboard.isKeyDown(sf::Keyboard::S)) {
velocity += backwardsVector(rotation) * PLAYER_SPEED;
}
if (keyboard.isKeyDown(sf::Keyboard::A)) {
velocity += leftVector(rotation) * PLAYER_SPEED;
}
else if (keyboard.isKeyDown(sf::Keyboard::D)) {
velocity += rightVector(rotation) * PLAYER_SPEED;
}
if (keyboard.isKeyDown(sf::Keyboard::Space)) {
velocity.y += PLAYER_SPEED * 2;
}
else if (keyboard.isKeyDown(sf::Keyboard::LShift)) {
velocity.y -= PLAYER_SPEED * 2;
std::cout << mp_player->position << std::endl;
}
if (rotation.x < -80.0f) {
rotation.x = -79.9f;
}
else if (rotation.x > 85.0f) {
rotation.x = 84.9f;
}
}
void Client::onMouseRelease(sf::Mouse::Button button, [[maybe_unused]] int x,
[[maybe_unused]] int y)
{
// Handle block removal/ block placing events
// Create a "ray"
Ray ray(mp_player->position, mp_player->rotation);
// Step the ray until it hits a block/ reaches maximum length
for (; ray.getLength() < 8; ray.step()) {
auto rayBlockPosition = toBlockPosition(ray.getEndpoint());
if (m_chunks.manager.getBlock(rayBlockPosition) > 0) {
BlockUpdate blockUpdate;
blockUpdate.block = button == sf::Mouse::Left ? 0 : 1;
blockUpdate.position = button == sf::Mouse::Left
? rayBlockPosition
: toBlockPosition(ray.getLastPoint());
m_chunks.blockUpdates.push_back(blockUpdate);
sendBlockUpdate(blockUpdate);
break;
}
}
}
void Client::onKeyRelease(sf::Keyboard::Key key)
{
switch (key) {
case sf::Keyboard::L:
m_isMouseLocked = !m_isMouseLocked;
break;
case sf::Keyboard::P:
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
break;
case sf::Keyboard::F:
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
break;
default:
break;
}
}
void Client::update(float dt)
{
NetworkHost::tick();
if (!m_hasReceivedGameData) {
return;
}
mp_player->position += mp_player->velocity * dt;
mp_player->velocity *= 0.99 * dt;
sendPlayerPosition(mp_player->position);
// Update blocks
for (auto &blockUpdate : m_chunks.blockUpdates) {
auto chunkPosition = toChunkPosition(blockUpdate.position);
m_chunks.manager.ensureNeighbours(chunkPosition);
m_chunks.manager.setBlock(blockUpdate.position, blockUpdate.block);
m_chunks.updates.push_back(chunkPosition);
auto p = chunkPosition;
auto localBlockPostion = toLocalBlockPosition(blockUpdate.position);
if (localBlockPostion.x == 0) {
m_chunks.updates.push_back({p.x - 1, p.y, p.z});
}
else if (localBlockPostion.x == CHUNK_SIZE - 1) {
m_chunks.updates.push_back({p.x + 1, p.y, p.z});
}
if (localBlockPostion.y == 0) {
m_chunks.updates.push_back({p.x, p.y - 1, p.z});
}
else if (localBlockPostion.y == CHUNK_SIZE - 1) {
m_chunks.updates.push_back({p.x, p.y + 1, p.z});
}
if (localBlockPostion.z == 0) {
m_chunks.updates.push_back({p.x, p.y, p.z - 1});
}
else if (localBlockPostion.z == CHUNK_SIZE - 1) {
m_chunks.updates.push_back({p.x, p.y, p.z + 1});
}
}
m_chunks.blockUpdates.clear();
auto playerChunk = worldToChunkPosition(mp_player->position);
auto distanceToPlayer = [&playerChunk](const ChunkPosition &chunkPosition) {
return glm::abs(playerChunk.x - chunkPosition.x) +
glm::abs(playerChunk.y - chunkPosition.y) +
glm::abs(playerChunk.z - chunkPosition.z);
};
if (!m_chunks.updates.empty()) {
// Sort chunk updates by distance if the update vector is not
// sorted already
if (!std::is_sorted(m_chunks.updates.begin(), m_chunks.updates.end(),
[&](const auto &a, const auto &b) {
return distanceToPlayer(a) <
distanceToPlayer(b);
})) {
// Remove non-unique elements
std::unordered_set<ChunkPosition, ChunkPositionHash> updates;
for (auto &update : m_chunks.updates) {
updates.insert(update);
}
m_chunks.updates.assign(updates.cbegin(), updates.cend());
// Sort it to find chunk mesh cloest to the player
std::sort(m_chunks.updates.begin(), m_chunks.updates.end(),
[&](const auto &a, const auto &b) {
return distanceToPlayer(a) < distanceToPlayer(b);
});
}
if (m_noMeshingCount != m_chunks.updates.size()) {
m_blockMeshing = false;
}
// Find first "meshable" chunk
int count = 0;
if (!m_blockMeshing) {
m_noMeshingCount = 0;
for (auto itr = m_chunks.updates.cbegin();
itr != m_chunks.updates.cend();) {
if (m_chunks.manager.hasNeighbours(*itr)) {
auto &chunk = m_chunks.manager.getChunk(*itr);
auto buffer = makeChunkMesh(chunk, m_voxelData);
m_chunks.bufferables.push_back(buffer);
deleteChunkRenderable(*itr);
itr = m_chunks.updates.erase(itr);
// Break so that the game still runs while world is
// being built
// TODO: Work out a way to make this concurrent (aka
// run seperate from rest of application)
if (count++ > 3) {
break;
}
}
else {
m_noMeshingCount++;
itr++;
}
}
if (m_noMeshingCount == m_chunks.updates.size()) {
m_blockMeshing = true;
}
}
}
// Call update function on the GUI script
// Note: This part is quite dangerous, if there's no update() or there's an error
// in the script then it will cause a crash
// sol::function p_update = m_lua.lua["update"];
// p_update(dt);
}
void Client::render(int width, int height)
{
// TODO [Hopson] Clean this up
if (!m_hasReceivedGameData) {
return;
}
// Setup matrices
m_basicShader.program.bind();
glm::mat4 playerProjectionView = createProjectionViewMatrix(
mp_player->position, mp_player->rotation, m_projectionMatrix);
gl::loadUniform(m_basicShader.projectionViewLocation, playerProjectionView);
// Update the viewing frustum for frustum culling
m_frustum.update(playerProjectionView);
// Render all the entities
auto drawable = m_cube.getDrawable();
drawable.bind();
for (auto &ent : m_entities) {
if (ent.active && &ent != mp_player) {
if (ent.playerSkin.textureExists()) {
ent.playerSkin.bind();
}
else {
m_errorSkinTexture.bind();
}
glm::mat4 modelMatrix{1.0f};
translateMatrix(modelMatrix,
{ent.position.x, ent.position.y, ent.position.z});
gl::loadUniform(m_basicShader.modelLocation, modelMatrix);
drawable.draw();
}
}
// Render chunks
m_voxelTextures.bind();
// Buffer chunks
for (auto &chunkMesh : m_chunks.bufferables) {
// TODO [Hopson] -> DRY this code
if (chunkMesh.blockMesh.indicesCount > 0) {
m_chunks.drawables.push_back({chunkMesh.blockMesh.position,
chunkMesh.blockMesh.createBuffer()});
}
if (chunkMesh.fluidMesh.indicesCount > 0) {
m_chunks.fluidDrawables.push_back(
{chunkMesh.fluidMesh.position,
chunkMesh.fluidMesh.createBuffer()});
}
}
m_chunks.bufferables.clear();
// TODO [Hopson] -> DRY this code VVVV
// Render solid chunk blocks
m_chunkShader.program.bind();
gl::loadUniform(m_chunkShader.projectionViewLocation, playerProjectionView);
for (const auto &chunk : m_chunks.drawables) {
if (m_frustum.chunkIsInFrustum(chunk.position)) {
chunk.vao.getDrawable().bindAndDraw();
}
}
// Render fluid mesh
m_fluidShader.program.bind();
gl::loadUniform(m_fluidShader.timeLocation,
m_clock.getElapsedTime().asSeconds());
gl::loadUniform(m_fluidShader.projectionViewLocation, playerProjectionView);
glCheck(glEnable(GL_BLEND));
for (const auto &chunk : m_chunks.fluidDrawables) {
if (m_frustum.chunkIsInFrustum(chunk.position)) {
chunk.vao.getDrawable().bindAndDraw();
}
}
glCheck(glDisable(GL_BLEND));
// GUI
m_gui.render(width, height);
}
void Client::endGame()
{
// Destroy all player skins
for (auto &ent : m_entities) {
if (ent.playerSkin.textureExists()) {
ent.playerSkin.destroy();
}
}
m_errorSkinTexture.destroy();
m_cube.destroy();
m_basicShader.program.destroy();
m_chunkShader.program.destroy();
m_fluidShader.program.destroy();
m_voxelTextures.destroy();
for (auto &chunk : m_chunks.drawables) {
chunk.vao.destroy();
}
for (auto &chunk : m_chunks.fluidDrawables) {
chunk.vao.destroy();
}
NetworkHost::disconnectFromPeer(mp_serverPeer);
}
EngineStatus Client::currentStatus() const
{
return m_status;
}
void Client::deleteChunkRenderable(const ChunkPosition &position)
{
::deleteChunkRenderable(position, m_chunks.drawables);
::deleteChunkRenderable(position, m_chunks.fluidDrawables);
}
|
//config.js
/** TWITTER APP CONFIGURATION
* consumer_key
* consumer_secret
* access_token
* access_token_secret
*/
module.exports = {
consumer_key: process.env.twitter_consumer_key,
consumer_secret: process.env.twitter_consumer_secret,
access_token: process.env.twitter_access_token,
access_token_secret: process.env.twitter_access_token_secret
}
|
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Tests that Win32 API prototypes can be successfully loaded (i.e. that
// lookupFunction works for all the APIs generated)
// THIS FILE IS GENERATED AUTOMATICALLY AND SHOULD NOT BE EDITED DIRECTLY.
// ignore_for_file: unused_local_variable
@TestOn('windows')
import 'dart:ffi';
import 'package:ffi/ffi.dart';
import 'package:test/test.dart';
import 'package:win32/win32.dart';
void main() {
final ptr = calloc<COMObject>();
final filedialogcustomize = IFileDialogCustomize(ptr);
test('Can instantiate IFileDialogCustomize.EnableOpenDropDown', () {
expect(filedialogcustomize.EnableOpenDropDown, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddMenu', () {
expect(filedialogcustomize.AddMenu, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddPushButton', () {
expect(filedialogcustomize.AddPushButton, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddComboBox', () {
expect(filedialogcustomize.AddComboBox, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddRadioButtonList', () {
expect(filedialogcustomize.AddRadioButtonList, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddCheckButton', () {
expect(filedialogcustomize.AddCheckButton, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddEditBox', () {
expect(filedialogcustomize.AddEditBox, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddSeparator', () {
expect(filedialogcustomize.AddSeparator, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddText', () {
expect(filedialogcustomize.AddText, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetControlLabel', () {
expect(filedialogcustomize.SetControlLabel, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.GetControlState', () {
expect(filedialogcustomize.GetControlState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetControlState', () {
expect(filedialogcustomize.SetControlState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.GetEditBoxText', () {
expect(filedialogcustomize.GetEditBoxText, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetEditBoxText', () {
expect(filedialogcustomize.SetEditBoxText, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.GetCheckButtonState', () {
expect(filedialogcustomize.GetCheckButtonState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetCheckButtonState', () {
expect(filedialogcustomize.SetCheckButtonState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.AddControlItem', () {
expect(filedialogcustomize.AddControlItem, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.RemoveControlItem', () {
expect(filedialogcustomize.RemoveControlItem, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.RemoveAllControlItems', () {
expect(filedialogcustomize.RemoveAllControlItems, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.GetControlItemState', () {
expect(filedialogcustomize.GetControlItemState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetControlItemState', () {
expect(filedialogcustomize.SetControlItemState, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.GetSelectedControlItem', () {
expect(filedialogcustomize.GetSelectedControlItem, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetSelectedControlItem', () {
expect(filedialogcustomize.SetSelectedControlItem, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.StartVisualGroup', () {
expect(filedialogcustomize.StartVisualGroup, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.EndVisualGroup', () {
expect(filedialogcustomize.EndVisualGroup, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.MakeProminent', () {
expect(filedialogcustomize.MakeProminent, isA<Function>());
});
test('Can instantiate IFileDialogCustomize.SetControlItemText', () {
expect(filedialogcustomize.SetControlItemText, isA<Function>());
});
free(ptr);
}
|
#!/bin/bash
set -e
set -o pipefail
set -u
BASE=/scratch/users/surag/retina/
RUNNAME=20220202_bpnet
JOBSCRIPT=/home/users/surag/kundajelab/retina-models/jobscripts/jobscript.sh
# make a copy of code run
mkdir -p $BASE/models/$RUNNAME/fold0/modisco
cd /home/users/surag/kundajelab/retina-models/src
for x in `ls $BASE/bigwigs`
do
n=$(basename -s ".bw" $x);
mkdir -p $BASE/models/$RUNNAME/fold0/modisco/$n
sbatch --job-name modisco_${n} \
--output $BASE/models/$RUNNAME/fold0/logs/$n.modisco.log.txt \
--error $BASE/models/$RUNNAME/fold0/logs/$n.modisco.err.txt \
--mem 250G \
--gres=gpu:0 \
--time 48:00:00 \
--partition owners,akundaje \
$JOBSCRIPT run_modisco.py \
--scores-prefix $BASE/models/$RUNNAME/fold0/interpret/$n \
--profile-or-counts counts \
--output-dir $BASE/models/$RUNNAME/fold0/modisco/$n \
--max-seqlets 50000
done
|
const moment = require('moment');
const assert = require('assert');
const uuid = require('uuid/v4');
const db = require('./helpers/db');
const { getSpecies, up } = require('../../migrations/20201203162238_migrate_species_from_versions');
describe('getSpecies', () => {
it('returns an empty array if data or project are undefined', () => {
assert.deepEqual(getSpecies(), []);
});
describe('legacy', () => {
it('returns an empty array if no protocols', () => {
assert.deepEqual(getSpecies({}, { schema_version: 0 }), []);
});
it('ignores falsy values', () => {
const data = {
protocols: [
{
species: [
{
foo: 'bar'
},
{
speciesId: '20'
}
]
}
]
};
assert.deepEqual(getSpecies(data, { schema_version: 0 }), ['Mice']);
});
it('returns an empty array if no species added', () => {
const data = {
protocols: [
{
some: 'field'
}
]
};
assert.deepEqual(getSpecies(data, { schema_version: 0 }), []);
});
it('can extract species from legacy style data, ignoring dupes', () => {
const data = {
protocols: [
{
species: [
{
speciesId: '2'
},
{
speciesId: '20'
},
{
speciesId: '2'
}
]
},
{
species: [
{
speciesId: '28',
'other-species-type': 'JABU'
},
{
speciesId: '28',
'other-species-type': 'BABU'
}
]
}
]
};
const expected = [
'Amphibians',
'Mice',
'JABU',
'BABU'
];
assert.deepEqual(getSpecies(data, { schema_version: 0 }), expected);
});
});
describe('schema version 1', () => {
it('returns an empty array if no species', () => {
const data = {
some: 'fields'
};
assert.deepEqual(getSpecies(data, { schema_version: 1 }), []);
});
it('can extract species from data ignoring dupes', () => {
const data = {
species: ['mice', 'rats', 'mice'],
'species-other': ['JABU', 'BABU', 'JABU'],
'species-other-amphibians': ['FROGGY'],
'species-other-birds': ['Phoenix'],
'species-other-camelids': ['Humpback'],
'species-other-dogs': ['Pug'],
'species-other-domestic-fowl': ['Fried chicken'],
'species-other-equidae': ['Zebra'],
'species-other-fish': ['Blobfish'],
'species-other-nhps': ['Bush baby'],
'species-other-reptiles': ['Bastard lizard'],
'species-other-rodents': ['Kangaroo']
};
const expected = [
'Mice',
'Rats',
'JABU',
'BABU',
'FROGGY',
'Phoenix',
'Humpback',
'Pug',
'Fried chicken',
'Zebra',
'Blobfish',
'Bush baby',
'Bastard lizard',
'Kangaroo'
];
assert.deepEqual(getSpecies(data, { schema_version: 1 }), expected);
});
});
});
describe('up', () => {
const ids = {
project: {
activeWithSpecies: uuid(),
activeNoSpecies: uuid(),
activeMultipleVersions: uuid(),
draft: uuid(),
legacyWithSpecies: uuid(),
legacyNoSpecies: uuid(),
legacyWithFalsySpecies: uuid()
}
};
const licenceHolder = {
id: uuid(),
first_name: 'Licence',
last_name: 'Holder',
email: '[email protected]'
};
const establishment = {
id: 100,
name: 'An establishment',
email: '[email protected]',
country: 'england',
address: '123 Somwhere street'
};
const projects = [
{
id: ids.project.activeWithSpecies,
title: 'Test project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 1
},
{
id: ids.project.activeNoSpecies,
title: 'Test project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 1
},
{
id: ids.project.activeMultipleVersions,
title: 'Legacy Project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 1
},
{
id: ids.project.draft,
title: 'Test project',
licence_holder_id: licenceHolder.id,
status: 'inactive',
schema_version: 1
},
{
id: ids.project.legacyWithSpecies,
title: 'Legacy Project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 0
},
{
id: ids.project.legacyWithFalsySpecies,
title: 'Legacy Project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 0
},
{
id: ids.project.legacyNoSpecies,
title: 'Legacy Project',
licence_holder_id: licenceHolder.id,
status: 'active',
schema_version: 0
}
];
const versions = [
{
project_id: ids.project.activeWithSpecies,
status: 'granted',
data: {
species: ['mice', 'rats'],
'species-other': ['JABU', 'BABU', 'JABU'],
'species-other-amphibians': ['FROGGY'],
'species-other-birds': ['Phoenix'],
'species-other-camelids': ['Humpback'],
'species-other-dogs': ['Pug'],
'species-other-domestic-fowl': ['Fried chicken'],
'species-other-equidae': ['Zebra'],
'species-other-fish': ['Blobfish'],
'species-other-nhps': ['Bush baby'],
'species-other-reptiles': ['Bastard lizard'],
'species-other-rodents': ['Kangaroo']
}
},
{
project_id: ids.project.activeNoSpecies,
status: 'granted',
data: {
foo: 'bar'
}
},
{
project_id: ids.project.activeMultipleVersions,
status: 'granted',
data: {
species: ['mice']
},
created_at: moment().subtract(2, 'weeks').toISOString()
},
{
project_id: ids.project.activeMultipleVersions,
status: 'granted',
data: {
species: ['mice', 'rats']
},
created_at: moment().subtract(1, 'week').toISOString()
},
{
project_id: ids.project.activeMultipleVersions,
status: 'draft',
data: {
species: ['mice', 'rats', 'cats']
},
created_at: moment().toISOString()
},
{
project_id: ids.project.draft,
status: 'submitted',
data: {
species: ['mice', 'rats', 'cats']
}
},
{
project_id: ids.project.legacyWithSpecies,
status: 'granted',
data: {
protocols: [
{
species: [
{
speciesId: '2'
},
{
speciesId: '20'
}
]
},
{
species: [
{
speciesId: '28',
'other-species-type': 'JABU'
},
{
speciesId: '28',
'other-species-type': 'BABU'
}
]
}
]
}
},
{
project_id: ids.project.legacyWithFalsySpecies,
status: 'granted',
data: {
protocols: [
{
species: [
{
foo: 'bar'
},
{
speciesId: '20'
}
]
}
]
}
},
{
project_id: ids.project.legacyNoSpecies,
status: 'granted',
data: {
foo: 'bar'
}
}
];
before(() => {
this.knex = db.init();
});
beforeEach(() => {
return Promise.resolve()
.then(() => db.clean(this.knex))
.then(() => this.knex('establishments').insert(establishment))
.then(() => this.knex('profiles').insert(licenceHolder))
.then(() => this.knex('projects').insert(projects))
.then(() => this.knex('project_versions').insert(versions));
});
afterEach(() => {
return db.clean(this.knex);
});
after(() => {
return this.knex.destroy();
});
it('adds species to project model', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.activeWithSpecies).first())
.then(project => {
const expected = [
'Mice',
'Rats',
'JABU',
'BABU',
'FROGGY',
'Phoenix',
'Humpback',
'Pug',
'Fried chicken',
'Zebra',
'Blobfish',
'Bush baby',
'Bastard lizard',
'Kangaroo'
];
assert.deepEqual(project.species, expected);
});
});
it('skips projects without species', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.activeNoSpecies).first())
.then(project => {
assert.deepEqual(project.species, null);
});
});
it('gets species from latest granted version for active project', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.activeMultipleVersions).first())
.then(project => {
assert.deepEqual(project.species, ['Mice', 'Rats']);
});
});
it('gets species from latest submitted version for draft project', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.draft).first())
.then(project => {
assert.deepEqual(project.species, ['Mice', 'Rats', 'Cats']);
});
});
it('adds species from protocols to legacy projects', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.legacyWithSpecies).first())
.then(project => {
const expected = [
'Amphibians',
'Mice',
'JABU',
'BABU'
];
assert.deepEqual(project.species, expected);
});
});
it('adds species from protocols to legacy projects', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.legacyWithFalsySpecies).first())
.then(project => {
const expected = ['Mice'];
assert.deepEqual(project.species, expected);
});
});
it('ignores legacy projects without species', () => {
return Promise.resolve()
.then(() => up(this.knex))
.then(() => this.knex('projects').where('id', ids.project.legacyNoSpecies).first())
.then(project => {
assert.deepEqual(project.species, null);
});
});
});
|
require "date"
require "active_record"
require "i18n"
require "i18n_alchemy/date_parser"
require "i18n_alchemy/time_parser"
require "i18n_alchemy/numeric_parser"
require "i18n_alchemy/attribute"
require "i18n_alchemy/association_parser"
require "i18n_alchemy/proxy"
module I18n
module Alchemy
def localized(attributes=nil, *args)
I18n::Alchemy::Proxy.new(self, attributes, *args)
end
end
end
|
package org.batfish.question.nodeproperties;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multiset;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.batfish.common.Answerer;
import org.batfish.common.plugin.IBatfish;
import org.batfish.datamodel.answers.Schema;
import org.batfish.datamodel.pojo.Node;
import org.batfish.datamodel.questions.DisplayHints;
import org.batfish.datamodel.questions.NodePropertySpecifier;
import org.batfish.datamodel.questions.PropertySpecifier;
import org.batfish.datamodel.questions.Question;
import org.batfish.datamodel.table.ColumnMetadata;
import org.batfish.datamodel.table.Row;
import org.batfish.datamodel.table.Row.RowBuilder;
import org.batfish.datamodel.table.TableAnswerElement;
import org.batfish.datamodel.table.TableMetadata;
import org.batfish.specifier.NodeSpecifier;
import org.batfish.specifier.SpecifierContext;
public class NodePropertiesAnswerer extends Answerer {
public static final String COL_NODE = "Node";
public NodePropertiesAnswerer(Question question, IBatfish batfish) {
super(question, batfish);
}
/**
* Creates {@link ColumnMetadata}s that the answer should have based on the {@code
* propertySpecifier}.
*
* @param propertySpecifier The {@link NodePropertySpecifier} that describes the set of properties
* @return The {@link List} of {@link ColumnMetadata}s
*/
public static List<ColumnMetadata> createColumnMetadata(NodePropertySpecifier propertySpecifier) {
return new ImmutableList.Builder<ColumnMetadata>()
.add(new ColumnMetadata(COL_NODE, Schema.NODE, "Node", true, false))
.addAll(
propertySpecifier.getMatchingProperties().stream()
.map(
prop ->
new ColumnMetadata(
getColumnName(prop),
NodePropertySpecifier.JAVA_MAP.get(prop).getSchema(),
"Property " + prop,
false,
true))
.collect(Collectors.toList()))
.build();
}
static TableMetadata createTableMetadata(@Nonnull NodePropertiesQuestion question) {
String textDesc = String.format("Properties of node ${%s}.", COL_NODE);
DisplayHints dhints = question.getDisplayHints();
if (dhints != null && dhints.getTextDesc() != null) {
textDesc = dhints.getTextDesc();
}
return new TableMetadata(createColumnMetadata(question.getProperties()), textDesc);
}
@Override
public TableAnswerElement answer() {
NodePropertiesQuestion question = (NodePropertiesQuestion) _question;
TableMetadata tableMetadata = createTableMetadata(question);
Multiset<Row> propertyRows =
getProperties(
question.getProperties(),
_batfish.specifierContext(),
question.getNodeSpecifier(),
tableMetadata.toColumnMap());
TableAnswerElement answer = new TableAnswerElement(tableMetadata);
answer.postProcessAnswer(question, propertyRows);
return answer;
}
/**
* Gets properties of nodes.
*
* @param propertySpecifier Specifies which properties to get
* @param ctxt Specifier context to use in extractions
* @param nodeSpecifier Specifies the set of nodes to focus on
* @param columns a map from column name to {@link ColumnMetadata}
* @return A multiset of {@link Row}s where each row corresponds to a node and columns correspond
* to property values.
*/
public static Multiset<Row> getProperties(
NodePropertySpecifier propertySpecifier,
SpecifierContext ctxt,
NodeSpecifier nodeSpecifier,
Map<String, ColumnMetadata> columns) {
Multiset<Row> rows = HashMultiset.create();
for (String nodeName : nodeSpecifier.resolve(ctxt)) {
RowBuilder row = Row.builder(columns).put(COL_NODE, new Node(nodeName));
for (String property : propertySpecifier.getMatchingProperties()) {
PropertySpecifier.fillProperty(
NodePropertySpecifier.JAVA_MAP.get(property),
ctxt.getConfigs().get(nodeName),
property,
row);
}
rows.add(row.build());
}
return rows;
}
/** Returns the name of the column that contains the value of property {@code property} */
public static String getColumnName(String property) {
return property;
}
}
|
use crate::bron_kerbosch::types::*;
use std::sync::Arc;
/// Generic function type, all algorithms must follow this prototype
pub type Algorithm<N = Node> = fn(Arc<Graph>, &mut Vec<Node>, Set<N>, Set<N>, Options) -> Report;
/// A Generator is a function that returns a list of candidates,
/// useful to have a generic implementation of an algorithm
pub type Generator<N = Node> = fn(Arc<Graph>, &Set<N>, &Set<N>) -> Vec<Node>;
|
#!/bin/sh
#execute
currdir=$(dirname $0)
az_switch=""
if [[ $1 == "az" ]];then
az_switch="az"
fi
echo "execute: sh ${currdir}/build_mongodb_mock.sh ${az_switch}"
sh ${currdir}/build_mongodb_mock.sh "${az_switch}"
|
class ViewProcessorMapper implements IViewProcessorMapper, IViewProcessorUnmapper
{
//-----------------------------------
//
// Private Properties
//
//-----------------------------------
final Map _mappings = new Map();
IViewProcessorViewHandler _handler;
ITypeFilter _matcher;
ILogger _logger;
//-----------------------------------
//
// Constructor
//
//-----------------------------------
ViewProcessorMapper(this._matcher, this._handler, [this._logger = null]);
//-----------------------------------
//
// Public Methods
//
//-----------------------------------
IViewProcessorMappingConfig toProcess(dynamic processClassOrInstance)
{
final IViewProcessorMapping mapping = _mappings[processClassOrInstance];
if (mapping == null)
return _createMapping(processClassOrInstance);
else
return _overwriteMapping(mapping, processClassOrInstance);
}
IViewProcessorMappingConfig toInjection()
{
return toProcess(ViewInjectionProcessor);
}
IViewProcessorMappingConfig toNoProcess()
{
return toProcess(NullProcessor);
}
void fromProcess(dynamic processorClassOrInstance)
{
final IViewProcessorMapping mapping = _mappings[processorClassOrInstance];
if (mapping != null)
_deleteMapping(mapping);
}
void fromAll()
{
_mappings.forEach( (processor, mapping) {
fromProcess(processor);
});
}
void fromNoProcess()
{
fromProcess(NullProcessor);
}
void fromInjection()
{
fromProcess(ViewInjectionProcessor);
}
//-----------------------------------
//
// Private Methods
//
//-----------------------------------
ViewProcessorMapping _createMapping(dynamic processor)
{
final ViewProcessorMapping mapping = new ViewProcessorMapping(_matcher, processor);
_handler.addMapping(mapping);
_mappings[processor] = mapping;
if (_logger != null)
_logger.debug('{0} mapped to {1}', [_matcher, mapping]);
return mapping;
}
void _deleteMapping(IViewProcessorMapping mapping)
{
_handler.removeMapping(mapping);
_mappings.remove(mapping.processor);
if (_logger != null)
_logger.debug('{0} unmapped from {1}', [_matcher, mapping]);
}
IViewProcessorMappingConfig _overwriteMapping(IViewProcessorMapping mapping, dynamic processClassOrInstance)
{
if (_logger != null)
_logger.warn('{0} is already mapped to {1}.\n' +
'If you have overridden this mapping intentionally you can use "unmap()" ' +
'prior to your replacement mapping in order to avoid seeing this message.\n',
[_matcher, mapping]);
_deleteMapping(mapping);
return _createMapping(processClassOrInstance);
}
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.openide.options;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.util.*;
/** Extends the functionality of <CODE>SystemOption</CODE>
* by providing support for veto listeners.
*
* @author Jaroslav Tulach
* @version 0.11 Dec 6, 1997
*/
public abstract class VetoSystemOption extends SystemOption {
/** generated Serialized Version UID */
static final long serialVersionUID = -614731095908156413L;
/** vetoable listener property */
private static final String PROP_VETO_SUPPORT = "vetoSupport"; // NOI18N
/** Default constructor. */
public VetoSystemOption() {
}
/** Lazy getter for veto hashtable.
* @return the hashtable
*/
private HashSet getVeto() {
HashSet set = (HashSet) getProperty(PROP_VETO_SUPPORT);
if (set == null) {
set = new HashSet();
putProperty(PROP_VETO_SUPPORT, set);
}
return set;
}
/** Add a new veto listener to all instances of this exact class.
* @param list the listener to add
*/
public final void addVetoableChangeListener(VetoableChangeListener list) {
synchronized (getLock()) {
getVeto().add(list);
}
}
/** Remove a veto listener from all instances of this exact class.
* @param list the listener to remove
*/
public final void removeVetoableChangeListener(VetoableChangeListener list) {
synchronized (getLock()) {
getVeto().remove(list);
}
}
/** Fire a property change event.
* @param name the name of the property
* @param oldValue the old value
* @param newValue the new value
* @exception PropertyVetoException if the change is vetoed
*/
public final void fireVetoableChange(String name, Object oldValue, Object newValue)
throws PropertyVetoException {
PropertyChangeEvent ev = new PropertyChangeEvent(this, name, oldValue, newValue);
Iterator en;
synchronized (getLock()) {
en = ((HashSet) getVeto().clone()).iterator();
}
while (en.hasNext()) {
((VetoableChangeListener) en.next()).vetoableChange(ev);
}
}
}
|
#!/bin/sh
function migrate() {
echo applying migrations - django_peeringdb
# always fake, since peeeringdb_server does not use concrete models
manage migrate django_peeringdb --fake
echo applying all migrations
manage migrate
}
cd /srv/www.peeringdb.com
case "$1" in
"uwsgi" )
echo starting uwsgi
if [[ "$PDB_NO_MIGRATE" == "" ]]; then
migrate
fi
exec venv/bin/uwsgi --ini etc/django-uwsgi.ini
;;
"migrate" )
migrate
;;
"inetd" )
inetd -f -e -q 1024
;;
"in.whois" )
exec ./in.whoisd
;;
"run_tests" )
source venv/bin/activate
export DJANGO_SETTINGS_MODULE=mainsite.settings
export DATABASE_USER=root
export DATABASE_PASSWORD=""
export RELEASE_ENV=run_tests
pytest -v -rA --cov-report term-missing --cov=peeringdb_server --durations=0 tests/
;;
"whois" )
line=$(head -1 | tr -cd '[:alnum:]._-')
exec manage pdb_whois "$line"
;;
"/bin/sh" )
echo dropping to shell
exec /bin/sh
;;
"makemessages" | "compilemessages" )
cd /mnt
exec django-admin $@
;;
* )
exec manage $@
;;
esac
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package io.github.oasis.elements.milestones;
import io.github.oasis.core.elements.AbstractDef;
import io.github.oasis.core.elements.AbstractElementParser;
import io.github.oasis.core.elements.Scripting;
import io.github.oasis.core.elements.spec.BaseSpecification;
import io.github.oasis.core.events.BasePointEvent;
import io.github.oasis.core.external.messages.EngineMessage;
import io.github.oasis.core.utils.Texts;
import io.github.oasis.elements.milestones.spec.ValueExtractorDef;
import java.math.BigDecimal;
import java.util.stream.Collectors;
import static io.github.oasis.core.VariableNames.CONTEXT_VAR;
import static io.github.oasis.core.VariableNames.RULE_VAR;
/**
* @author Isuru Weerarathna
*/
public class MilestoneParser extends AbstractElementParser {
@Override
public MilestoneDef parse(EngineMessage persistedObj) {
MilestoneDef def = loadFrom(persistedObj, MilestoneDef.class);
def.validate();
return def;
}
@Override
public MilestoneRule convert(AbstractDef<? extends BaseSpecification> definition) {
if (definition instanceof MilestoneDef) {
return toRule((MilestoneDef) definition);
}
throw new IllegalArgumentException("Unknown definition type! " + definition);
}
private MilestoneRule toRule(MilestoneDef def) {
def.validate();
MilestoneRule rule = new MilestoneRule(def.getId());
AbstractDef.defToRule(def, rule);
ValueExtractorDef valueExtractor = def.getSpec().getValueExtractor();
if (valueExtractor != null) {
if (Texts.isNotEmpty(valueExtractor.getExpression())) {
rule.setValueExtractor(Scripting.create(valueExtractor.getExpression(), RULE_VAR, CONTEXT_VAR));
} else if (valueExtractor.getAmount() != null) {
rule.setValueExtractor((event, input, otherInput) -> valueExtractor.getAmount());
} else {
rule.setValueExtractor((event, input, otherInput) -> BigDecimal.ONE);
}
} else if (def.isPointBased()) {
rule.setValueExtractor((event, input, otherInput) -> {
if (event instanceof BasePointEvent) {
return ((BasePointEvent) event).getPoints();
}
return BigDecimal.ZERO;
});
}
rule.setLevels(def.getSpec().getLevels().stream()
.map(l -> new MilestoneRule.Level(l.getLevel(), l.getMilestone()))
.collect(Collectors.toList()));
return rule;
}
}
|
// ***********************************************************************
// Copyright (c) 2016-2018 Charlie Poole
//
// 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.
// ***********************************************************************
using System.Collections.Generic;
using System.Windows.Forms;
namespace TestCentric.Gui.Presenters
{
using Model;
using Views;
/// <summary>
/// TreeViewAdapter provides a higher-level interface to
/// a TreeView control used to display tests.
/// </summary>
public class StatusBarPresenter
{
private IStatusBarView _view;
private ITestModel _model;
// Counters are maintained presenter for display by the view.
private int _testsRun;
private int _passedCount;
private int _failedCount;
private int _warningCount;
private int _inconclusiveCount;
private Dictionary<string, TreeNode> _nodeIndex = new Dictionary<string, TreeNode>();
public StatusBarPresenter(IStatusBarView view, ITestModel model)
{
_view = view;
_model = model;
WireUpEvents();
}
private void WireUpEvents()
{
_model.Events.TestLoaded += (ea) =>
{
ClearCounters();
_view.Initialize(ea.Test.TestCount);
_view.DisplayText(ea.Test.TestCount > 0 ? "Ready" : "");
};
_model.Events.TestReloaded += (ea) =>
{
ClearCounters();
_view.Initialize(ea.Test.TestCount);
_view.DisplayText("Reloaded");
};
_model.Events.TestUnloaded += (ea) =>
{
ClearCounters();
_view.Initialize(0);
_view.DisplayText("Unloaded");
};
_model.Events.RunStarting += (ea) =>
{
ClearCounters();
_view.Initialize(ea.TestCount);
_view.DisplayTestsRun(0);
_view.DisplayPassed(0);
_view.DisplayFailed(0);
_view.DisplayWarnings(0);
_view.DisplayInconclusive(0);
_view.DisplayTime(0.0);
};
_model.Events.RunFinished += (ea) =>
{
_view.DisplayText("Completed");
_view.DisplayTime(ea.Result.Duration);
};
_model.Events.TestStarting += (ea) =>
{
_view.DisplayText(ea.Test.FullName);
};
_model.Events.TestFinished += (ea) =>
{
_view.DisplayTestsRun(++_testsRun);
switch (ea.Result.Outcome.Status)
{
case TestStatus.Passed:
_view.DisplayPassed(++_passedCount);
break;
case TestStatus.Failed:
_view.DisplayFailed(++_failedCount);
break;
case TestStatus.Warning:
_view.DisplayWarnings(++_warningCount);
break;
case TestStatus.Inconclusive:
_view.DisplayInconclusive(++_inconclusiveCount);
break;
}
};
}
private void ClearCounters()
{
_testsRun = _passedCount = _failedCount = _warningCount = _inconclusiveCount = 0;
}
}
}
|
package handler
import (
"fmt"
"strconv"
"github.com/EdlanioJ/kbu-store/app/domain"
"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
"github.com/opentracing/opentracing-go"
log "github.com/sirupsen/logrus"
)
type storeHandler struct {
storeUsecase domain.StoreUsecase
validate *validator.Validate
}
func NewStoreHandler(usecase domain.StoreUsecase, validate *validator.Validate) *storeHandler {
return &storeHandler{
storeUsecase: usecase,
validate: validate,
}
}
// @Summary Create store
// @Description Create new store
// @Tags stores
// @Accept json
// @Produce json
// @Param category body domain.CreateStoreRequest true "Create store"
// @Success 201 {string} string "Created"
// @Failure 400 {array} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 422 {object} ErrorResponse
// @Router /stores [post]
func (h *storeHandler) Store(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Store")
defer span.Finish()
createRequests.Inc()
cr := new(domain.CreateStoreRequest)
if err := c.BodyParser(cr); err != nil {
log.
WithContext(ctx).
Errorf("c.BodyParser: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
if err := h.validate.StructCtx(ctx, cr); err != nil {
log.
WithContext(ctx).
Errorf("validate.StructCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err := h.storeUsecase.Store(ctx, cr)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Store: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusCreated)
}
// @Summary Index store
// @Description Get list of stores
// @Tags stores
// @Accept json
// @Produce json
// @Param page query int false "Page" default(1)
// @Param limit query int false "Limit" default(10)
// @Param sort query string false "Sort" default(created_at DESC)
// @Success 200 {array} domain.Store
// @Failure 500 {object} ErrorResponse
// @Router /stores [get]
func (h *storeHandler) Index(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Index")
defer span.Finish()
indexRequests.Inc()
sort := c.Query("sort")
page, _ := strconv.Atoi(c.Query("page"))
limit, _ := strconv.Atoi(c.Query("limit"))
list, total, err := h.storeUsecase.Index(ctx, sort, limit, page)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Index: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
c.Response().Header.Add("X-total", fmt.Sprint(total))
successRequests.Inc()
return c.JSON(list)
}
// @Summary Get stores
// @Description Get a stores by id
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Success 200 {object} domain.Store
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id} [get]
func (h *storeHandler) Get(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Get")
defer span.Finish()
getRequests.Inc()
id := c.Params("id")
err := h.validate.VarCtx(ctx, id, "uuid4")
if err != nil {
log.
WithContext(ctx).
Errorf("validate.VarCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
res, err := h.storeUsecase.Get(ctx, id)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Get: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.JSON(res)
}
// @Summary Activate stores
// @Description Activate a stores
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Success 204
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id}/activate [patch]
func (h *storeHandler) Activate(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Activate")
defer span.Finish()
ativateRequests.Inc()
id := c.Params("id")
err := h.validate.VarCtx(ctx, id, "uuid4")
if err != nil {
log.
WithContext(ctx).
Errorf("validate.VarCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err = h.storeUsecase.Active(ctx, id)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Active: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusNoContent)
}
// @Summary Block stores
// @Description Block a stores
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Success 204
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id}/block [patch]
func (h *storeHandler) Block(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Block")
defer span.Finish()
blockRequests.Inc()
id := c.Params("id")
err := h.validate.VarCtx(ctx, id, "uuid4")
if err != nil {
log.
WithContext(ctx).
Errorf("validate.VarCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err = h.storeUsecase.Block(ctx, id)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Block: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusNoContent)
}
// @Summary Disable stores
// @Description Disable a stores
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Success 204
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id}/disable [patch]
func (h *storeHandler) Disable(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Disable")
defer span.Finish()
disableRequests.Inc()
id := c.Params("id")
err := h.validate.VarCtx(ctx, id, "uuid4")
if err != nil {
log.
WithContext(ctx).
Errorf("validate.VarCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err = h.storeUsecase.Disable(ctx, id)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Disable: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusNoContent)
}
// @Summary Delete stores
// @Description Delete one stores
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Success 204
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id} [delete]
func (h *storeHandler) Delete(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Delete")
defer span.Finish()
deleteRequests.Inc()
id := c.Params("id")
err := h.validate.VarCtx(ctx, id, "uuid4")
if err != nil {
log.
WithContext(ctx).
Errorf("validate.VarCtx %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err = h.storeUsecase.Delete(ctx, id)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Delete: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusNoContent)
}
// @Summary Update store
// @Description Uptate a stores
// @Tags stores
// @Accept json
// @Produce json
// @Param id path string true "store ID"
// @Param category body domain.UpdateStoreRequest true "Create store"
// @Success 204
// @Failure 500 {object} ErrorResponse
// @Failure 400 {array} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 422 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Router /stores/{id} [patch]
func (h *storeHandler) Update(c *fiber.Ctx) error {
span, ctx := opentracing.StartSpanFromContext(c.Context(), "StoreHandler.Update")
defer span.Finish()
updateRequests.Inc()
ur := new(domain.UpdateStoreRequest)
id := c.Params("id")
if err := c.BodyParser(ur); err != nil {
log.
WithContext(ctx).
Errorf("c.BodyParser: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
ur.ID = id
if err := h.validate.StructCtx(ctx, ur); err != nil {
log.
WithContext(ctx).
Errorf("validate.StructCtx: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
err := h.storeUsecase.Update(ctx, ur)
if err != nil {
log.
WithContext(ctx).
Errorf("storeUsecase.Update: %v", err)
errorRequests.Inc()
return errorHandler(c, err)
}
successRequests.Inc()
return c.SendStatus(fiber.StatusNoContent)
}
|
from django.db import models
from lobby.models import Player
# class Thread(models.Model):
# start_time = models.DateTimeField()
# duration = models.DurationField()
# # player_list
class ChatMessages(models.Model):
# thread = models.ForeignKey(Thread, on_delete=models.CASCADE)
username = models.ForeignKey(Player, on_delete=models.CASCADE)
message = models.TextField()
|
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.actor.mailbox
import com.typesafe.config.Config
import akka.util.Duration
import java.util.concurrent.TimeUnit.MILLISECONDS
import akka.actor.ActorSystem
class MongoBasedMailboxSettings(val systemSettings: ActorSystem.Settings, val userConfig: Config)
extends DurableMailboxSettings {
def name = "mongodb"
val config = initialize
import config._
val MongoURI = getString("uri")
val WriteTimeout = Duration(config.getMilliseconds("timeout.write"), MILLISECONDS)
val ReadTimeout = Duration(config.getMilliseconds("timeout.read"), MILLISECONDS)
} |
---
ms.openlocfilehash: dff2178ac4279f130f7e3e2e11239541f8c00604576f172f19f723950915d1f6
ms.sourcegitcommit: 7f8d1e7a16af769adb43d1877c28fdce53975db8
ms.translationtype: HT
ms.contentlocale: de-DE
ms.lasthandoff: 08/06/2021
ms.locfileid: "6993780"
---
Microsoft Project |
<?php
namespace Shoperti\PayMe\Gateways\PaypalPlus;
use Shoperti\PayMe\Gateways\PaypalExpress\Events as PaypalExpressEvents;
/**
* This is the PaypalPlus events class.
*
* @author Arturo Rodríguez <[email protected]>
*/
class Events extends PaypalExpressEvents
{
}
|
mkdir -p $HOME/.docker;
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json;
echo $'{\n "experimental": "enabled"\n}' | sudo tee $HOME/.docker/config.json;
sudo service docker restart; |
import { IsNotEmpty, IsNumber, IsString, MaxLength } from 'class-validator';
/*
Camada responsável por formatar os dados recebidos no Controller e Services
Nessa podemos setar os tipos de dados que queremos receber
*/
export class CreateProductDto {
//Esses decorators vem da lib class-validator and class-transformer
@MaxLength(255)
@IsString()
@IsNotEmpty()
name: string;
@IsNumber()
@IsNotEmpty()
price: number;
}
|
# Useful tools for GNURadio programming
## matlab/
Matlab codes for read and write samples
* Correlation.m: cross-correlation program, with different kind of preambles
## python/
Python codes for tx/rx samples. It should be used with the grforwarder project, which supports timestamp mechanism.
* raw_msgqtx.py: transmitting modulated raw symbols
* uhd_interface.py: modified version for supporting timestamp
* uhd_rx_cfile.py: rx sampling program
## examples/
Python codes from gr-digital. We run examples here instead of in gr-digital to escape update changes :-(
|
@extends('layouts.front-master')
@section('title', 'Уникальная Калмыкия')
@section('sidebar')
@include('front.menu')
@stop
@section('content')
<header>
@include('front.slideshow')
</header>
<div class="box">
<div class="row">
<?php
foreach ($Articles as $Article){
echo '<div class="12u(mobilep)">
<p><span class="shadow"><a href="/article/'.$Article->id.'">'.$Article->title.' '.'</a> |
<a href="/category/'.$Article->category->id.'">'.$Article->category->name.' '.'</a></span>
| '.$Article->hits.' просмотров | '.date("d.m.Y г.", strtotime($Article->created_at)).'</p>
<p>'.$Article->intro.'</p>';
if($Article->comments->count() == 0){
echo '<p>Станьте первым комментатором!';
}else{
echo '<p><a href="/article/'.$Article->id.'#comments">'
.$Article->comments->count().' комментарий</a>';
}
echo ' | <a class="button alt small" href="/article/'.$Article->id.'">Подробнее...</a></p>
<hr></div>';
}
?>
</div>
</div>
@stop
@section('scripts')
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("slideshow-dot");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex> slides.length) {slideIndex = 1}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" slideshow-active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " slideshow-active";
setTimeout(showSlides, 2000); // Change image every 2 seconds
}
</script>
@stop
|
<?php
/**
* Copyright 2017 Alexandru Guzinschi <[email protected]>
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Vimishor\Cnp\Test;
use Vimishor\Cnp\Gender;
/**
* @author Alexandru Guzinschi <[email protected]>
*/
class GenderTest extends TestCase
{
/**
* @param string|int $value
* @return void
*
* @dataProvider validGenderProvider
*/
public function testInstantiateSuccess($value)
{
$gender = new Gender($value);
$this->assertInstanceOf(Gender::class, $gender);
}
/**
* @param string|int $value
*
* @dataProvider invalidGenderProvider
* @expectedException \InvalidArgumentException
*/
public function testInstantiateError($value)
{
new Gender($value);
}
/**
* @param string|int $value
*
* @dataProvider validGenderProvider
*/
public function testIsMale($value)
{
$female = [2, 4, 6, 8];
$gender = new Gender($value);
if (in_array((int)$gender->__toString(), $female, false)) {
$this->assertFalse($gender->isMale());
} else {
$this->assertTrue($gender->isMale());
}
}
/**
* @param string|int $value
*
* @dataProvider validGenderProvider
*/
public function testEqualityByValue($value)
{
$gender1 = new Gender($value);
$gender2 = new Gender($value);
$this->assertTrue($gender1->equals($gender2));
$this->assertNotSame($gender1, $gender2);
}
public function validGenderProvider()
{
return [
[1], [02], ['02'], ['07'], ['05'], [8]
];
}
public function invalidGenderProvider()
{
return [
[new \stdClass()], ['0,1'], ['32,43'], ['21.4'], ['string'], ['60'], [60], [9], [[1]], [[02]]
];
}
}
|
#!/bin/bash
# Install Python Dependencies
pip3 install --user -r requirements.txt
# Download required additional labels
wget -N https://ait.ethz.ch/projects/2019/faze/downloads/preprocessing/MPIIFaceGaze_supplementary.h5
wget -N https://ait.ethz.ch/projects/2019/faze/downloads/preprocessing/GazeCapture_supplementary.h5
# Download eos files for pre-processing for ST-ED
mkdir -p ./eos/
cd ./eos/
wget -N https://github.com/patrikhuber/eos/raw/master/share/sfm_shape_3448.bin
|
package com.sankoudai.java.apix.guava;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.util.List;
import java.util.NoSuchElementException;
import static org.junit.Assert.assertEquals;
public class TestIterables{
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void testGetLast() {
List<String> strings = Lists.newArrayList("one", "two", "three");
assertEquals("three", Iterables.getLast(strings));
List<String> emptyList = Lists.newArrayList();
assertEquals(Iterables.getLast(emptyList, null), null);
thrown.expect(NoSuchElementException.class);
Iterables.getLast(emptyList);
}
}
|
-- add new object
-- update object
-- remove object
import UseCases.Client
import Storage.Memory2
import Domain.Model
{-
func :: m a -> m b
void $ func a === func a >> pure ()
-}
import qualified Command.Command as Cmd
import Command.Result
helpMessage :: String
helpMessage = "TagMe.\n\
\Tool for labudubadubdubz.\n\
\\n\
\Commands:\n\
\ - create\n\
\ - add\n\
\ - quit\n\
\ - show\n\
\ - help"
prompt :: String
prompt = "[tagme]:"
{-| System (programm) state.
Contains storages, results, and can contain many other parts of state, like redux store.
-}
data System = System {
objects :: MemoryObjectsStorage
, tasks :: MemoryTasksStorage
, getResult :: Maybe Result
}
{-| Inifinitively ask user for command, and execute it.
Operates on system state, so for first time it's needs
some initial state to run.
-}
mainProc :: IO System -> IO ()
mainProc sys = do
putStr prompt
cmdLine <- getLine
case Cmd.parseCommand cmdLine of
Left s -> showResponse s
Right [email protected] -> runCommand cmd sys >> pure ()
Right cmd -> runCommand cmd sys >>= (mainProc . pure)
-- show String if it's not empty
showResponse :: String -> IO ()
showResponse s = if null s then return () else putStrLn s
-- | Show result of command execution
displayResult :: Maybe Result -> IO ()
displayResult Nothing = putStrLn "Done"
displayResult (Just r) = print r
{-| Apply command to system state and return new system state
-}
applyCommand :: Cmd.Command -> System -> System
applyCommand (Cmd.CreateTask tn) ss = System objs nts res where
(_id, nts) = taskSave (tasks ss) (Task tn "")
res = Just $ TaskCreated _id
objs = objects ss
applyCommand Cmd.ShowTasks (System os ts _) = System os ts result where
result = Just . ShowTasks $ storeItems ts
applyCommand (Cmd.Load _ _) s = s
applyCommand (Cmd.Add _ _) s = s
applyCommand (Cmd.Start _) s = s
applyCommand Cmd.Set s = s
applyCommand Cmd.Finish s = s
applyCommand Cmd.ListObjects s = s
applyCommand Cmd.Help s = s
applyCommand Cmd.Quit s = s
{-| evaluate command and show command result.
I think, it's needed 'couze i don't konw how to work with state monad
-}
runCommand :: Cmd.Command -> IO System -> IO System
runCommand Cmd.Help ss' = putStrLn helpMessage >> ss'
runCommand Cmd.Quit ss' = putStrLn "Bye." >> ss'
-- runCommand cmd ss' = fmap (applyCommand cmd) ss' >>= (\ss -> (displayResult . result) ss >> pure ss)
runCommand cmd ss' = do
system <- fmap (applyCommand cmd) ss'
displayResult $ getResult system
pure system
main :: IO ()
main = do
putStrLn helpMessage
mainProc $ pure $ System emptyObjectsStore emptyTasksStore Nothing |
############################ Possible improvements #############################
### - Better search feature (window and feature)
### - Better font selector (window and feature)
### - Search and replace feature
################################################################################
# Tk
require "tk"
require "tkextlib/tile"
# Root window
$root = TkRoot.new {
title "Notepad is the standard text editor"
minsize(600, 400)
}
# Content
$content = Tk::Tile::Frame.new($root) {
padding "0 0 0 0"
}.grid(:sticky => "nsew")
# Configuring grid
NUM_COLUMNS = 2
NUM_ROWS = 2
require_relative "config"
# Menu bar
$menubar = TkMenu.new($root)
$root["menu"] = $menubar
# Menus
require_relative "file_menu"
require_relative "edit_menu"
require_relative "format_menu"
require_relative "display_menu"
require_relative "help_menu"
# Scroll bars
$vertical = Tk::Tile::Scrollbar.new($content) {
orient "vertical"
command proc{|*args| $pad.yview(*args)}
}.grid( :column => 2, :row => 1, :sticky => "ns")
$horizontal = Tk::Tile::Scrollbar.new($content) {
orient "horizontal"
command proc{|*args| $pad.xview(*args)}
}.grid( :column => 1, :row => 2, :sticky => "we")
# Pad
$pad_font = TkFont.new(:family => "Consolas", :size => 11, :weight => "normal", :slant => "roman")
$pad = TkText.new($content) {
width 40
heigh 10
font $pad_font
undo "true"
padx 5
pady 2
autoseparators "true"
yscrollcommand proc{|*args| $vertical.set(*args)}
xscrollcommand proc{|*args| $horizontal.set(*args)}
wrap "none"
}.grid( :column => 1, :row => 1, :sticky => "nsew")
# Sizegrip
$sizegrip = Tk::Tile::SizeGrip.new($content).grid(:column => 2, :row => 2, :sticky => "se")
# Name of the opened file
$current_file = ""
# Menu features
require_relative "file_features"
require_relative "edit_features"
require_relative "format_features"
require_relative "display_features"
require_relative "help_features"
# Keyboard bidings
require_relative "keyboard_shortcuts"
# Start!
Tk.mainloop
|
<?php
declare(strict_types=1);
/**
* This file is part of Narrowspark Framework.
*
* (c) Daniel Bannert <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Viserio\Component\Foundation\Bootstrap;
use Viserio\Contract\Foundation\BootstrapState as BootstrapStateContract;
use Viserio\Contract\Foundation\Kernel as KernelContract;
class ShellVerbosityBootstrap implements BootstrapStateContract
{
/**
* {@inheritdoc}
*/
public static function getPriority(): int
{
return 32;
}
/**
* {@inheritdoc}
*/
public static function getType(): string
{
return BootstrapStateContract::TYPE_AFTER;
}
/**
* {@inheritdoc}
*/
public static function getBootstrapper(): string
{
return LoadServiceProviderBootstrap::class;
}
/**
* {@inheritdoc}
*/
public static function isSupported(KernelContract $kernel): bool
{
return true;
}
/**
* {@inheritdoc}
*/
public static function bootstrap(KernelContract $kernel): void
{
if (! isset($_SERVER['SHELL_VERBOSITY']) && ! isset($_ENV['SHELL_VERBOSITY']) && $kernel->isDebug()) {
\putenv('SHELL_VERBOSITY=3');
$_ENV['SHELL_VERBOSITY'] = 3;
$_SERVER['SHELL_VERBOSITY'] = 3;
}
}
}
|
fn main() {
let <tspan data-hash="1">six</tspan> = <tspan class="fn" data-hash="0" hash="3">plus_one</tspan>(5);
}
fn <tspan class="fn" data-hash="0" hash="3">plus_one</tspan>(<tspan data-hash="2">x</tspan>: i32) -> i32 {
<tspan data-hash="2">x</tspan> + 1
} |
package controllers
import org.scalatestplus.play.{OneAppPerTest, PlaySpec}
import play.api.test.FakeRequest
import play.api.test.Helpers._
import utils.TimeTestSpec
class RootControllerSuite extends PlaySpec with OneAppPerTest with TimeTestSpec {
"index action" should {
"render index page" in withFixture {
finishMaintenance()
val index = route(app, FakeRequest(GET, "/")).get
status(index) mustBe OK
contentType(index) mustBe Some("text/html")
contentAsString(index) must include ("Your new application is ready.")
}
"render maintenance page when maintenance" in withFixture {
startMaintenance()
val index = route(app, FakeRequest(GET, "/")).get
status(index) mustBe OK
contentType(index) mustBe Some("text/html")
contentAsString(index) must include ("Under maintenance.")
}
}
"api action" should {
"return OK" in withFixture {
finishMaintenance()
route(app, FakeRequest(GET, "/api")).map(status) mustBe Some(OK)
}
"return ServiceUnavailable when maintenance" in withFixture {
startMaintenance()
route(app, FakeRequest(GET, "/api")).map(status) mustBe Some(SERVICE_UNAVAILABLE)
}
}
}
|
import NaverStrategy from "./naver";
export default NaverStrategy;
export { NaverStrategy };
|
use icc::IntCodeComputer;
use std::collections::VecDeque;
#[aoc(day23, part1)]
pub fn solution_23a(input: &str) -> i64 {
let v: Vec<i64> = input
.trim()
.split(',')
.map(|o| o.parse::<i64>().unwrap())
.collect();
let mut comps: Vec<IntCodeComputer> = vec![IntCodeComputer::new(v, true); 50];
let mut outputq: Vec<VecDeque<i64>> = vec![VecDeque::new(); 50];
for (i, c) in comps.iter_mut().enumerate() {
c.program.resize(1024 * 1024, 0);
c.inputq.push_back(i as i64);
c.execute_one();
c.inputq.push_back(-1);
assert_eq!(c.previous_operation, 3);
}
let y_value_to_addr_255 = 'outer: loop {
for i in 0..comps.len() {
comps[i].execute_one();
if comps[i].previous_operation == 4 {
outputq[i].push_back(comps[i].consume_output().parse::<i64>().unwrap());
if outputq[i].len() >= 3 {
// produce to input queues from this NIC
let addr = outputq[i].pop_front().unwrap();
let x = outputq[i].pop_front().unwrap();
let y = outputq[i].pop_front().unwrap();
//println!("Packet ({},{}) to {} from {}", x, y, addr, i);
if addr == 255 {
//y_value_to_addr_255 = Some(y);
break 'outer Some(y);
}
comps[addr as usize].inputq.push_back(x);
comps[addr as usize].inputq.push_back(y);
}
}
}
};
y_value_to_addr_255.unwrap()
}
pub struct NAT {
pub x: Option<i64>,
pub y: Option<i64>,
}
#[aoc(day23, part2)]
pub fn solution_23b(input: &str) -> i64 {
let v: Vec<i64> = input
.trim()
.split(',')
.map(|o| o.parse::<i64>().unwrap())
.collect();
let mut nat = NAT { x: None, y: None };
let mut last_nat_to_0_y: Option<i64> = None;
let mut comps: Vec<IntCodeComputer> = vec![IntCodeComputer::new(v, true); 50];
let mut idle: Vec<bool> = vec![false; 50];
for (i, c) in comps.iter_mut().enumerate() {
c.program.resize(1024 * 1024, 0);
c.inputq.push_back(i as i64);
c.execute_one();
assert_eq!(c.previous_operation, 3);
}
'outer: loop {
for i in 0..comps.len() {
loop {
let mut input_or_output = false;
comps[i].execute_n_breaking(1000);
if !comps[i].output.is_empty() {
idle[i] = false;
assert_eq!(4, comps[i].previous_operation);
input_or_output = true;
let addr = comps[i].consume_output().parse::<i64>().unwrap();
comps[i].execute();
assert_eq!(4, comps[i].previous_operation);
let x = comps[i].consume_output().parse::<i64>().unwrap();
comps[i].execute();
assert_eq!(4, comps[i].previous_operation);
let y = comps[i].consume_output().parse::<i64>().unwrap();
//println!("Packet ({},{}) to {} from {}", x, y, addr, i);
if addr == 255 {
nat.x = Some(x);
nat.y = Some(y);
//println!("NAT ({},{})", x, y);
} else {
comps[addr as usize].inputq.push_back(x);
comps[addr as usize].inputq.push_back(y);
}
}
// consume this NIC's input queue
if !comps[i].inputq.is_empty() {
input_or_output = true;
}
if !input_or_output {
idle[i] = true;
break;
}
}
}
// Are all input and output queues empty?
if comps.iter().all(|c| c.inputq.is_empty()) && idle.iter().all(|&i| i) {
assert!(nat.x.is_some());
assert!(nat.y.is_some());
comps[0].inputq.push_back(nat.x.unwrap());
comps[0].inputq.push_back(nat.y.unwrap());
idle.iter_mut().for_each(|i| *i = false);
if last_nat_to_0_y.is_some() && last_nat_to_0_y == nat.y {
break 'outer;
}
last_nat_to_0_y = nat.y;
}
}
nat.y.unwrap()
}
#[cfg(test)]
mod tests {
use day23::solution_23a;
use day23::solution_23b;
use std::fs;
const ANSWER_23A: i64 = 22659;
const ANSWER_23B: i64 = 17429;
#[test]
fn t23a() {
assert_eq!(
ANSWER_23A,
solution_23a(&fs::read_to_string("input/2019/day23.txt").unwrap().trim())
);
}
#[test]
fn t23b() {
assert_eq!(
ANSWER_23B,
solution_23b(&fs::read_to_string("input/2019/day23.txt").unwrap().trim())
);
}
}
|
import 'dart:convert';
import 'dart:typed_data';
import 'package:crypton/crypton.dart';
import 'package:pointycastle/export.dart' as pointy;
/// [PublicKey] using EC Algorithm
class ECPublicKey implements PublicKey {
final pointy.ECPublicKey _publicKey;
static final pointy.ECDomainParameters curve = pointy.ECCurve_secp256k1();
/// Create an [ECPublicKey] for the given coordinates.
ECPublicKey(BigInt x, BigInt y)
: _publicKey =
pointy.ECPublicKey(ECPoint(x, y, true).asPointyCastle, curve);
/// Create an [ECPublicKey] from the given String.
ECPublicKey.fromString(String publicKeyString)
: _publicKey = pointy.ECPublicKey(
curve.curve.decodePoint(base64Decode(publicKeyString)), curve);
/// Verify the signature of a SHA256-hashed message signed with the associated [ECPrivateKey]
@Deprecated('For SHA256 signature verification use verifySHA256Signature')
@override
bool verifySignature(String message, String signature) =>
verifySHA256Signature(utf8.encode(message) as Uint8List,
utf8.encode(signature) as Uint8List);
/// Verify the signature of a SHA256-hashed message signed with the associated [ECPrivateKey]
@override
bool verifySHA256Signature(Uint8List message, Uint8List signature) =>
_verifySignature(message, signature, 'SHA-256/DET-ECDSA');
/// Verify the signature of a SHA512-hashed message signed with the associated [ECPrivateKey]
@override
bool verifySHA512Signature(Uint8List message, Uint8List signature) =>
_verifySignature(message, signature, 'SHA-512/DET-ECDSA');
bool _verifySignature(
Uint8List message, Uint8List signatureString, String algorithm) {
final sigLength = (signatureString.length / 2).round();
final r = BigInt.parse(
utf8.decode(signatureString.sublist(0, sigLength)),
radix: 16,
);
final s = BigInt.parse(
utf8.decode(signatureString.sublist(sigLength)),
radix: 16,
);
final signature = pointy.ECSignature(r, s);
final signer = pointy.Signer(algorithm);
signer.init(false, pointy.PublicKeyParameter(_publicKey));
return signer.verifySignature(message, signature);
}
/// Get [ECPoint] Q, which is the Public Point
ECPoint get Q => ECPoint(_publicKey.Q!.x!.toBigInteger()!,
_publicKey.Q!.y!.toBigInteger()!, _publicKey.Q!.isCompressed);
/// Export a [ECPublicKey] as Pointy Castle ECPublicKey
@override
pointy.ECPublicKey get asPointyCastle => _publicKey;
/// Export a [ECPublicKey] as String which can be reversed using [ECPublicKey.fromString].
@override
String toString() => base64Encode(_publicKey.Q!.getEncoded());
}
|
extern crate rustc_version;
use rustc_version::{version_meta, Version};
fn main() {
let version = version_meta().unwrap();
if version.semver >= Version::new(1, 10, 0) {
println!("cargo:rustc-cfg=feature=\"since_1_10_0\""); // extended_compare_and_swap
}
if version.semver >= Version::new(1, 15, 0) {
println!("cargo:rustc-cfg=feature=\"since_1_15_0\""); // atomic_access
}
if version.semver >= Version::new(1, 27, 0) {
println!("cargo:rustc-cfg=feature=\"since_1_27_0\""); // atomic_nand
}
if version.semver >= Version::new(1, 34, 0) {
println!("cargo:rustc-cfg=feature=\"since_1_34_0\""); // integer_atomics
}
if version.semver >= Version::new(1, 45, 0) {
println!("cargo:rustc-cfg=feature=\"since_1_45_0\""); // update, min, max
}
}
|
#!/usr/bin/env bash
echo "Authenticating to google cloud"
gcloud auth login
|
SUBROUTINE GIPROC ( mproc, mbchan, iret )
C************************************************************************
C* GIPROC *
C* *
C* This subroutine is called by subprocesses to create a communications *
C* channel between the subprocess and the calling process. The *
C* subprocess is created using GSPROC. *
C* *
C* GIPROC ( MPROC, MBCHAN, IRET ) *
C* *
C* Input parameters: *
C* MPROC INTEGER Subprocess type *
C* 0 = gplt *
C* 1 = device driver *
C* *
C* Output parameters: *
C* MBCHAN INTEGER Message queue number *
C* IRET INTEGER Return code *
C** *
C* Log: *
C* G. Chatters/RDS 4/82 *
C* M. desJardins/GSFC 4/85 *
C* M. desJardins/NMC 1/92 Make VMS & UNIX calls identical *
C************************************************************************
INTEGER ciproc
C------------------------------------------------------------------------
C* Call the C subroutine.
C
ier = ciproc ( mproc, mbchan, iret )
C*
RETURN
END
|
using System.Linq;
using static SudokuLib.Helpers.SudokuConstants;
using static SudokuLib.Helpers.SudokuHelper;
namespace SudokuLib.Core
{
public class Validator
{
public static bool IsValid(int[,] sudokuBoard, (int row, int column) cellPosition)
{
var (row, column) = cellPosition;
int value = sudokuBoard[column, row];
if (value == EmptyCellValue) return true;
bool isUniqueInColumn = GetVerticalNeighbours(column)
.Select(((int r, int c) cell) => sudokuBoard[cell.c, cell.r]).Count(v => v == value) == 1;
bool isUniqueInRow = GetHorizontalNeighbours(row)
.Select(((int r, int c) cell) => sudokuBoard[cell.c, cell.r]).Count(v => v == value) == 1;
bool isUniqueInSquare = GetWithinSquareNeighbours(row, column)
.Select(((int r, int c) cell) => sudokuBoard[cell.c, cell.r]).Count(v => v == value) == 1;
return isUniqueInColumn && isUniqueInRow && isUniqueInSquare;
}
public static bool IsValidBoard(int[,] sudokuBoard)
{
if (HasIncorrectDimensions(sudokuBoard)) return false;
for (int y = 0; y < SudokuSize; y++)
for (int x = 0; x < SudokuSize; x++)
if (!IsValid(sudokuBoard, (y, x)))
return false;
return true;
}
}
} |
/*
* Copyright 2017 TimWSpence
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.github.timwspence.cats.stm
import cats.{Contravariant, Functor, Invariant}
import cats.effect.IO
class TDeferredSpec extends BaseSpec {
stmTest("complete unblocks getters") { stm =>
import stm._
for {
d <- stm.commit(TDeferred[Int])
v <- stm.commit(TVar.of(0))
v1 <- stm.commit(TVar.of(0))
v2 <- stm.commit(TVar.of(0))
f1 <- stm.commit(d.get.flatMap(v1.set)).start
f2 <- stm.commit(d.get.flatMap(v2.set)).start
_ <- assertIO(
stm.commit(d.complete(42).flatTap(_ => v.modify(_ + 1))),
true
)
_ <- assertIO(stm.commit(v.get), 1)
_ <- f1.joinWithNever
_ <- assertIO(stm.commit(v1.get), 42)
_ <- f2.joinWithNever
_ <- assertIO(stm.commit(v2.get), 42)
} yield ()
}
stmTest("can only be completed once") { stm =>
import stm._
for {
d <- stm.commit(TDeferred[Int])
f <- stm.commit(d.get).start
c12 <- IO.both(stm.commit(d.complete(42)), stm.commit(d.complete(33)))
(c1, c2) = c12
_ <- IO(assert(c1 ^ c2))
_ <- assertIO(f.joinWithNever, if (c1) 42 else 33)
} yield ()
}
stmTest("imap") { stm =>
import stm._
for {
d <- stm.commit(TDeferred[Int])
dd = d.imap[String](_.toString)(_.toInt)
f <- stm.commit(d.get).start
ff <- stm.commit(dd.get).start
_ <- assertIO(stm.commit(dd.complete("42")), true)
_ <- assertIO(f.joinWithNever, 42)
_ <- assertIO(ff.joinWithNever, "42")
} yield ()
}
stmTest("map/contramap") { stm =>
import stm._
for {
d <- stm.commit(TDeferred[Int])
dSource = d.map[String](_.toString)
dSink = d.contramap[String](_.toInt)
f <- stm.commit(dSource.get).start
_ <- assertIO(stm.commit(dSink.complete("42")), true)
_ <- assertIO(f.joinWithNever, "42")
} yield ()
}
test("instances") {
STM.runtime[IO].map { stm =>
import stm._
Invariant[TDeferred]
Contravariant[TDeferredSink]
Functor[TDeferredSource]
}
}
}
|
package com.base.component.ui.horizontalrecycler
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.base.component.R
import com.base.component.constant.RecyclerviewAdapterConstant
import com.base.core.extensions.setup
import com.base.core.ui.recyclerview.*
import com.bekawestberg.loopinglayout.library.LoopingLayoutManager
import javax.inject.Inject
class HorizontalRecyclerViewHolder(var view: View) : ViewHolder<HorizontalRecyclerDTO>(view) {
private var rcView: RecyclerView = view.findViewById(R.id.horizontal_recyclerview)
private val layoutManager =
LinearLayoutManager(view.context, LinearLayoutManager.HORIZONTAL, false)
private var loopingLayoutManager: RecyclerView.LayoutManager =
LoopingLayoutManager(view.context, LoopingLayoutManager.HORIZONTAL, false)
private var firstVisiblePosition = 0
override fun bind(item: HorizontalRecyclerDTO) {
val adapter = RecyclerViewAdapter(
itemComparator = DefaultDisplayItemComperator(),
viewBinderFactoryMap = RecyclerviewAdapterConstant().binderFactoryMap,
viewHolderFactoryMap = RecyclerviewAdapterConstant().holderFactoryMap
)
adapter.itemClickListener = { _item, _position ->
itemClickListener?.invoke(_item, _position)
}
if (item.isCircleLooping) {
rcView.layoutManager = loopingLayoutManager
rcView.adapter = adapter
} else {
rcView.setup(adapter, layoutManager)
}
adapter.updateAllItems(item.list)
}
override fun onAttachAdapter() {
if (firstVisiblePosition >= 0) {
//todo loopingmanager set
// layoutManager.scrollToPositionWithOffset(firstVisiblePosition, 0)
}
}
override fun onDetachAdapter() {
//todo loopingmanager set
// firstVisiblePosition = layoutManager.findFirstVisibleItemPosition()
}
class HolderFactory @Inject constructor() : ViewHolderFactory {
override fun createViewHolder(parent: ViewGroup): RecyclerView.ViewHolder =
HorizontalRecyclerViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.item_horizontal_recycler,
parent,
false
)
)
}
class BinderFactory @Inject constructor() : ViewHolderBinder {
override fun bind(holder: RecyclerView.ViewHolder, item: DisplayItem) {
(holder as HorizontalRecyclerViewHolder).bind(item as HorizontalRecyclerDTO)
}
}
}
|
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import '/models/admin_model.dart';
import '/utils/theme_helper.dart';
import '/widgets/loading_indicator.dart';
import 'admins_ui.dart';
class AdminScreen extends StatelessWidget {
AdminScreen({Key? key}) : super(key: key);
final Stream<QuerySnapshot<Map<String, dynamic>>> stream =
FirebaseFirestore.instance.collection('administration_list').snapshots();
@override
Widget build(BuildContext context) {
ThemeHelper.colorStatusBar(context: context, haveAppbar: true);
return Scaffold(
appBar: AppBar(title: const Text('Администрация')),
body: StreamBuilder<QuerySnapshot<Map<String, dynamic>>>(
stream: stream,
builder: (BuildContext context,
AsyncSnapshot<QuerySnapshot<Map<String, dynamic>>> snapshot) {
if (!snapshot.hasData) return const LoadingIndicator();
return SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: snapshot.data!.docs.map((document) {
return AdminCard(
admin: AdminModel.fromMap(document.data(), document.id),
);
}).toList(),
),
);
},
),
);
}
}
|
(RECTIFY
(208307 5248 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(132513 4850 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(72285 1746
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(65173 909
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(60567 892 (:DEFINITION TRUE-LIST-LISTP))
(58518 4250
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(45204 1097 (:DEFINITION LEN))
(44023 9049 (:REWRITE DEFAULT-CAR))
(35797 2330 (:REWRITE PSEUDO-TERMP-OPENER))
(28255 1914
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(26700 3662
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(24596 1214
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(24123 2494
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(22828 22828
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(22540 9290 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(22065 11751 (:REWRITE DEFAULT-CDR))
(21579 1579
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(14758 14758 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(13893 666
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(13612 1663
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(12029 666
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(11823 2283
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(11513 3072
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(11121 11121
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(9017 9017
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(8976 3037
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(8784 2286
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(8254 688
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(8238 1510 (:REWRITE O-P-O-INFP-CAR))
(7520 1773
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(6937 6937
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(6074 6074
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(5696 674
(:REWRITE TYPE-TO-TYPES-ALIST-P-OF-CDR-WHEN-TYPE-TO-TYPES-ALIST-P))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(5283 5283
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(5238 5238
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(5238 5238
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(4988
4988
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(4879
4879
(:REWRITE RETURNS->REPLACE-THM$INLINE-OF-RETURNS-FIX-X-NORMALIZE-CONST))
(4250 4250 (:REWRITE FN-CHECK-DEF-FORMALS))
(4002 4002 (:TYPE-PRESCRIPTION TRUE-LISTP))
(3816 3816
(:TYPE-PRESCRIPTION SET::SETP-TYPE))
(3816 1908 (:REWRITE SET::NONEMPTY-MEANS-SET))
(3748 1490 (:REWRITE O-P-DEF-O-FINP-1))
(3520
3520
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(3068 3068
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(3068 3068
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(2330 1165 (:REWRITE DEFAULT-+-2))
(2308 2308
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(2283 2283
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(2283 2283
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(2283 2283
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(2283 2283
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(2283 2283
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(2192 2192
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(2036
2036
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(1936
1936
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(1908 1908
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(1908 1908 (:REWRITE SET::IN-SET))
(1814 1814 (:TYPE-PRESCRIPTION O-FINP))
(1623 785 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(1365 65
(:REWRITE PSEUDO-TERMP-OF-CDAR-WHEN-PSEUDO-TERM-ALISTP))
(1332 1332
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(1332 1332
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(1332
1332
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(1332 1332
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(1332 1332
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(1332 1332
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(1174 1174
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(1174 1174
(:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(1165 1165 (:REWRITE DEFAULT-+-1))
(1096 1096
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(990
990
(:REWRITE
CDR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-TRUE-LIST-LIST-EQUIV))
(975 130
(:REWRITE PSEUDO-TERM-ALISTP-OF-CDR-WHEN-PSEUDO-TERM-ALISTP))
(390 390
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(368 4 (:DEFINITION PAIRLIS$))
(299 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(294 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(254 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(254 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(254 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(254 14
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(215 15
(:REWRITE ARG-CHECK-P-OF-CDR-WHEN-ARG-CHECK-P))
(210 15
(:REWRITE ALIST-ARRAY-MAP-P-OF-CDR-WHEN-ALIST-ARRAY-MAP-P))
(195 195
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(191 191 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(170 15
(:REWRITE SYMBOL-SYMBOL-ALISTP-OF-CDR-WHEN-SYMBOL-SYMBOL-ALISTP))
(170
15
(:REWRITE
FUNCTION-DESCRIPTION-ALIST-P-OF-CDR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(170 15
(:REWRITE ALIST-INFO-P-OF-CDR-WHEN-ALIST-INFO-P))
(75 75
(:REWRITE RETURNS->FORMALS$INLINE-OF-RETURNS-FIX-X-NORMALIZE-CONST))
(64
2
(:REWRITE
PSEUDO-TERM-ALISTP-OF-PAIRLIS$-OF-PSEUDO-TERM-LISTP-AND-SYMBOL-LISTP))
(58 58
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(58 58
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(58 58
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(58 58
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(58 58
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(29 29
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(29 29
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(29 29
(:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(29 29
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(29 29
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP))
(24 24
(:REWRITE RETURNS-P-WHEN-MEMBER-EQUAL-OF-RETURNS-LIST-P))
(6 2
(:REWRITE STATE-P-IMPLIES-AND-FORWARD-TO-STATE-P1)))
(SYMBOLP-OF-RECTIFY)
(NOT-QUOTE-OF-RECTIFY
(25486 25 (:DEFINITION PSEUDO-TERMP))
(19895 141
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(12660 678 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(11583 364 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(7798 277 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(4409 122
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(3992 262
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(3756 70 (:DEFINITION LENGTH))
(3734 62
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(3509 678 (:REWRITE DEFAULT-CAR))
(3393 61 (:DEFINITION TRUE-LIST-LISTP))
(3375 80 (:DEFINITION LEN))
(2751 194 (:REWRITE PSEUDO-TERMP-OPENER))
(2523 84 (:DEFINITION TRUE-LISTP))
(2410 141
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(2312 85
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(2205 41
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(1991 1991
(:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(1866 242
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(1738 888 (:REWRITE DEFAULT-CDR))
(1614 1614
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(1570 140
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(1568 81 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(1567 675 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(1429 82
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(1348 27 (:REWRITE PSEUDO-TERMP-CAR))
(1173 107
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(1030 121
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(960 960 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(913 230
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(739 163
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(727 142
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(726 726
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(723 163
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(696 180
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(670 670
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(579 41
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(570 43
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(548 91 (:REWRITE O-P-O-INFP-CAR))
(509 509 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(490 490
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(475 4 (:DEFINITION PSEUDO-TERM-LISTP))
(460 460
(:TYPE-PRESCRIPTION PSEUDO-LAMBDA-LISTP))
(460 460
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(443 51
(:REWRITE TYPE-TO-TYPES-ALIST-P-OF-CDR-WHEN-TYPE-TO-TYPES-ALIST-P))
(418 418 (:TYPE-PRESCRIPTION LEN))
(408 97
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(369 79
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(364 364
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(362 362
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(362 362
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(347
347
(:REWRITE RETURNS->REPLACE-THM$INLINE-OF-RETURNS-FIX-X-NORMALIZE-CONST))
(292 292
(:TYPE-PRESCRIPTION TRUE-LIST-LISTP))
(280
280
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(275 91 (:REWRITE O-P-DEF-O-FINP-1))
(268 57
(:REWRITE SYMBOL-LISTP-OF-FORMALS-OF-PSEUDO-LAMBDAP))
(265 265
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(265 265
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(262 262 (:REWRITE FN-CHECK-DEF-FORMALS))
(234 234 (:TYPE-PRESCRIPTION SET::SETP-TYPE))
(234 117 (:REWRITE SET::NONEMPTY-MEANS-SET))
(228 228
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(228 69
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(212 212 (:TYPE-PRESCRIPTION TRUE-LISTP))
(190 190
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(187 187
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(184 2 (:DEFINITION PAIRLIS$))
(182 182 (:TYPE-PRESCRIPTION O-P))
(174 87 (:REWRITE DEFAULT-+-2))
(172 172
(:REWRITE PSEUDO-TERMP-OF-RETURNS->REPLACE-THM))
(170 170
(:TYPE-PRESCRIPTION TYPE-TO-TYPES-ALIST-P))
(170 170
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(142 142
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(142 142
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(142 142
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(142 142
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(142 142
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(142
142
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(141 51 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(126 6
(:REWRITE PSEUDO-TERMP-OF-CDAR-WHEN-PSEUDO-TERM-ALISTP))
(124 124 (:TYPE-PRESCRIPTION O-FINP))
(117 117
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(117 117 (:REWRITE SET::IN-SET))
(101 20
(:REWRITE EQUAL-LEN-OF-PSEUDO-LAMBDA-FORMALS-AND-ACTUALS))
(101 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(100 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(92 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(92 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(92 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(92 6
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(90 12
(:REWRITE PSEUDO-TERM-ALISTP-OF-CDR-WHEN-PSEUDO-TERM-ALISTP))
(87 87 (:REWRITE DEFAULT-+-1))
(85 85
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(82 82
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(82 82
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(82 82
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(82 82
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(82 82
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(82 82
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(82 82
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(82 82 (:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(80
80
(:REWRITE
CDR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-TRUE-LIST-LIST-EQUIV))
(65 6
(:REWRITE ARG-CHECK-P-OF-CDR-WHEN-ARG-CHECK-P))
(64 6
(:REWRITE ALIST-ARRAY-MAP-P-OF-CDR-WHEN-ALIST-ARRAY-MAP-P))
(56 6
(:REWRITE SYMBOL-SYMBOL-ALISTP-OF-CDR-WHEN-SYMBOL-SYMBOL-ALISTP))
(56
6
(:REWRITE
FUNCTION-DESCRIPTION-ALIST-P-OF-CDR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(56 6
(:REWRITE ALIST-INFO-P-OF-CDR-WHEN-ALIST-INFO-P))
(36 36
(:TYPE-PRESCRIPTION PSEUDO-TERM-ALISTP))
(36 36
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(24 24
(:TYPE-PRESCRIPTION SYMBOL-SYMBOL-ALISTP))
(24 24
(:TYPE-PRESCRIPTION FUNCTION-DESCRIPTION-ALIST-P))
(24 24 (:TYPE-PRESCRIPTION ARG-CHECK-P))
(24 24 (:TYPE-PRESCRIPTION ALIST-INFO-P))
(24 24
(:TYPE-PRESCRIPTION ALIST-ARRAY-MAP-P))
(24 24
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(24 24
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(24 24
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(24 24
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(24 24
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(18 18
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(16 16 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(12 12
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(12 12
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(12 12
(:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(12 12
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(12 12
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP))
(11 11
(:REWRITE RETURNS->FORMALS$INLINE-OF-RETURNS-FIX-X-NORMALIZE-CONST))
(10 10
(:REWRITE SYMBOL-LISTP-OF-RETURNS->FORMALS))
(4 2 (:DEFINITION EQ))
(2 2
(:REWRITE RETURNS-P-WHEN-MEMBER-EQUAL-OF-RETURNS-LIST-P)))
(RECTIFY-LIST
(44062 590 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(14982 128
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(14796 64 (:DEFINITION TRUE-LIST-LISTP))
(8324 719 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(7331 557
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(6579 178
(:REWRITE RETURNS-LIST-P-WHEN-NOT-CONSP))
(5629 232
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(5618 150 (:REWRITE PSEUDO-TERMP-OPENER))
(5238 404
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(4929 741 (:REWRITE DEFAULT-CAR))
(3230 3230
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(3152 128
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(2923 588
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(2519 486
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(2442 998 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(2344 31
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(2293 146
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(2185 778 (:REWRITE DEFAULT-CDR))
(1869 319
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(1780 318
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(1456 1456 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(1356 1356
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(1221 139
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(1176 1176
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(1146 202 (:REWRITE O-P-O-INFP-CAR))
(960 960
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(839 839
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(733 733
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(719 719
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(719 719
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(604 232
(:REWRITE CONSP-OF-RETURNS-LIST-FIX))
(572 572 (:TYPE-PRESCRIPTION TRUE-LISTP))
(556 194 (:REWRITE O-P-DEF-O-FINP-1))
(537 73
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(508 508 (:TYPE-PRESCRIPTION SET::SETP-TYPE))
(508 254 (:REWRITE SET::NONEMPTY-MEANS-SET))
(404 404 (:REWRITE FN-CHECK-DEF-FORMALS))
(382 102
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(363 72
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(357 144
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(333 140 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(318 318
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(318 318
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(318 318
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(318 318
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(318 318
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(278
278
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(262 230
(:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(254 254
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(254 254 (:REWRITE SET::IN-SET))
(230 230
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(225 18 (:REWRITE O<=-O-FINP-DEF))
(220 94
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(218 218 (:TYPE-PRESCRIPTION O-FINP))
(196 73
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(162 27
(:REWRITE RETURNS-LIST-P-OF-CDR-WHEN-RETURNS-LIST-P))
(154 154
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(154 154
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(146 146
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(146 146
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(146 146
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(146 146
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(146 146
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(146 146
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(146 75 (:REWRITE DEFAULT-+-2))
(140
140
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(137 137
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(106 106
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(91 43
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(87 16 (:REWRITE O-FIRST-EXPT-<))
(86 86
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(75 75 (:REWRITE DEFAULT-+-1))
(67 34 (:REWRITE DEFAULT-<-1))
(55 55 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(55 34 (:REWRITE DEFAULT-<-2))
(55 29 (:REWRITE O-FIRST-EXPT-DEF-O-FINP))
(46 18 (:REWRITE AC-<))
(36
36
(:REWRITE
CDR-OF-RETURNS-LIST-FIX-X-NORMALIZE-CONST-UNDER-RETURNS-LIST-EQUIV))
(35 18 (:REWRITE O-INFP-O-FINP-O<=))
(26 16 (:REWRITE O-FIRST-COEFF-<))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(24 4
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(20 20
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(18 18
(:REWRITE |a < b & b < c => a < c|))
(15 3 (:REWRITE RETURNS-FIX-WHEN-RETURNS-P))
(8 8
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(8 8
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(8 8
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(8 8
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(8 8
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(6 6 (:TYPE-PRESCRIPTION RETURNS-P))
(6 2
(:REWRITE STATE-P-IMPLIES-AND-FORWARD-TO-STATE-P1))
(4 4
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(4 4
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(4 4 (:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(4 4
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(4 4
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP))
(2 2 (:REWRITE SUBSETP-TRANS2))
(2 2 (:REWRITE SUBSETP-TRANS)))
(SYMBOLP-OF-RECTIFY-LIST
(126 12
(:REWRITE RETURNS-LIST-FIX-WHEN-RETURNS-LIST-P))
(67 12
(:REWRITE RETURNS-LIST-P-WHEN-NOT-CONSP))
(55 11 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(45 9 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(40 40 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(40 40
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(33 11 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(27 9 (:REWRITE DEFAULT-CAR))
(24 24
(:REWRITE RETURNS-LIST-P-WHEN-SUBSETP-EQUAL))
(23 23 (:TYPE-PRESCRIPTION RETURNS-LIST-P))
(22 22 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(11 11
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(11 11
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(11 11
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(11 11
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(10 10 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(7 7 (:REWRITE CONSP-OF-RETURNS-LIST-FIX))
(7 4 (:REWRITE DEFAULT-CDR)))
(NOT-QUOTE-OF-RECTIFY-LIST
(138 14
(:REWRITE RETURNS-LIST-FIX-WHEN-RETURNS-LIST-P))
(70 14 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(69 14
(:REWRITE RETURNS-LIST-P-WHEN-NOT-CONSP))
(55 11 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(50 50 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(50 50
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(42 14 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(36 36 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(35 11 (:REWRITE DEFAULT-CAR))
(28 28 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(28 28
(:REWRITE RETURNS-LIST-P-WHEN-SUBSETP-EQUAL))
(14 14
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(14 14
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(14 14
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(9 9 (:REWRITE CONSP-OF-RETURNS-LIST-FIX))
(7 4 (:REWRITE DEFAULT-CDR)))
(LAMBDA-RECTIFY
(108 36 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(100 20 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(74 20 (:REWRITE CASES-OF-TYPED-TERM->KIND))
(72 72 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(56 14
(:REWRITE TYPED-TERM-P-WHEN-MAYBE-TYPED-TERM-P))
(51 51
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(40 40 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(40 40
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(38 38 (:REWRITE DEFAULT-CDR))
(35 7
(:REWRITE MAYBE-TYPED-TERM-P-WHEN-TYPED-TERM-P))
(21 21
(:TYPE-PRESCRIPTION MAYBE-TYPED-TERM-P))
(21
21
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(20 20 (:REWRITE DEFAULT-CAR))
(5 1 (:REWRITE ACL2-COUNT-WHEN-MEMBER))
(3 3 (:REWRITE NAT-LISTP-WHEN-NOT-CONSP))
(3 1 (:REWRITE DEFAULT-<-2))
(3 1 (:REWRITE DEFAULT-<-1))
(1 1 (:TYPE-PRESCRIPTION MEMBER-EQUAL))
(1 1 (:REWRITE SUBSETP-MEMBER . 2))
(1 1 (:REWRITE SUBSETP-MEMBER . 1))
(1 1 (:REWRITE MEMBER-SELF))
(1 1
(:REWRITE GOOD-TYPED-VARIABLE-P-OF-GOOD-TERM))
(1 1
(:REWRITE GOOD-TYPED-QUOTE-P-OF-GOOD-TERM)))
(TERM-RECTIFY-FLAG
(237 1 (:DEFINITION NAT-LISTP))
(168 36 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(138 46 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(128 2 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(116 1 (:DEFINITION NATP))
(114 2 (:DEFINITION PSEUDO-TERMP))
(113 2
(:REWRITE INTEGERP-OF-CAR-WHEN-INTEGER-LISTP))
(109 1 (:DEFINITION INTEGER-LISTP))
(106 9 (:REWRITE NAT-LISTP-WHEN-NOT-CONSP))
(99 2
(:REWRITE INTEGER-LISTP-WHEN-NOT-CONSP))
(92 92 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(87 87
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(74 74 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(74 74
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(72 18
(:REWRITE TYPED-TERM-P-WHEN-MAYBE-TYPED-TERM-P))
(54 54 (:REWRITE DEFAULT-CDR))
(45 9
(:REWRITE MAYBE-TYPED-TERM-P-WHEN-TYPED-TERM-P))
(44 4
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(36 36 (:REWRITE DEFAULT-CAR))
(27 27
(:TYPE-PRESCRIPTION MAYBE-TYPED-TERM-P))
(25
25
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(22 2 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(20 2
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(15 3 (:REWRITE ACL2-COUNT-WHEN-MEMBER))
(12 12 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(12 12
(:TYPE-PRESCRIPTION PSEUDO-TERM-LISTP))
(10 10 (:TYPE-PRESCRIPTION PSEUDO-TERMP))
(10 4 (:REWRITE DEFAULT-<-2))
(10 4 (:REWRITE DEFAULT-<-1))
(10 2 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(10 2
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(10 1
(:REWRITE NAT-LISTP-OF-CDR-WHEN-NAT-LISTP))
(7 7 (:TYPE-PRESCRIPTION INTEGER-LISTP))
(6 6
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(6 6 (:REWRITE FN-CHECK-DEF-FORMALS))
(5 1 (:REWRITE NATP-OF-CAR-WHEN-NAT-LISTP))
(4 4
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(4
4
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(4 4 (:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(4 4
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(4 4
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(4 2
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(4 2
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(4 2
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(4 2 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(3 3 (:TYPE-PRESCRIPTION MEMBER-EQUAL))
(3 3 (:REWRITE SUBSETP-MEMBER . 2))
(3 3 (:REWRITE SUBSETP-MEMBER . 1))
(3 3 (:REWRITE MEMBER-SELF))
(2 2 (:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(2 2 (:REWRITE PSEUDO-TERMP-OPENER))
(2 2
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(2 2
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(2 2
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(2 1
(:REWRITE INTEGER-LISTP-OF-CDR-WHEN-INTEGER-LISTP)))
(FLAG::FLAG-EQUIV-LEMMA)
(TERM-RECTIFY-FLAG-EQUIVALENCES)
(FLAG-LEMMA-FOR-RETURN-TYPE-OF-LAMBDA-RECTIFY.NEW-TT
(27926 36 (:DEFINITION PSEUDO-TERMP))
(18158 694 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(16534 180
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(14536 36
(:REWRITE NIL-OF-ASSOC-EQUAL-OF-PSEUDO-TERM-ALISTP))
(14284 274 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(14142 54
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(4870 238
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(4520 72 (:DEFINITION TRUE-LISTP))
(3976 108 (:DEFINITION LENGTH))
(3926 72
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(3890 684 (:REWRITE DEFAULT-CAR))
(3714 36 (:DEFINITION TRUE-LIST-LISTP))
(3472 108 (:DEFINITION LEN))
(2818 42 (:REWRITE PSEUDO-TERMP-CAR))
(2740 418
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(2396 38
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(2336 78 (:REWRITE PSEUDO-TERMP-OPENER))
(2282 446 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(2186 2186
(:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(1910 742 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(1686 158 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(1672 1672
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(1476 180
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(1436 1436 (:TYPE-PRESCRIPTION PSEUDO-TERMP))
(1280 610 (:REWRITE DEFAULT-CDR))
(1264 154
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(1168 1168 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(888 144
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(858 238
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(800 800 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(792 162 (:REWRITE O-P-O-INFP-CAR))
(764 764
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(716 716
(:TYPE-PRESCRIPTION PSEUDO-TERM-LISTP))
(702 72
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(666 6 (:DEFINITION PSEUDO-TERM-LISTP))
(648 648 (:TYPE-PRESCRIPTION LEN))
(608 72
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(602 602
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(562 562
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(496 72
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(490 232
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(452 452
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(452 452
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(452 452
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(452 452
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(450 450
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(434 434
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(434 434
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(418 418 (:REWRITE FN-CHECK-DEF-FORMALS))
(370 80
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(360 360
(:TYPE-PRESCRIPTION PSEUDO-LAMBDA-LISTP))
(360 360
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(316 158
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(316 158
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(316 158 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(308
308
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(306 162 (:REWRITE O-P-DEF-O-FINP-1))
(304 36
(:REWRITE SYMBOL-LISTP-OF-FORMALS-OF-PSEUDO-LAMBDAP))
(304 36
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(288 288 (:TYPE-PRESCRIPTION TRUE-LISTP))
(238 238
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(238 238
(:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(216 216 (:TYPE-PRESCRIPTION SET::SETP-TYPE))
(216 108 (:REWRITE SET::NONEMPTY-MEANS-SET))
(216 108 (:REWRITE DEFAULT-+-2))
(180 180
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(180 18
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(164
164
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(162
162
(:REWRITE
TYPE-OPTIONS->FUNCTIONS$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(144 144 (:TYPE-PRESCRIPTION O-FINP))
(144 144
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(144 144
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(144 144
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(144 144
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(144 144
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(144 144
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(144 144
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(144 144
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(144 144
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(144 144
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(144 144
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(144 72
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(144 18
(:REWRITE PSEUDO-TERM-ALISTP-OF-CDR-WHEN-PSEUDO-TERM-ALISTP))
(108 108
(:TYPE-PRESCRIPTION PSEUDO-TERM-ALISTP))
(108 108
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(108 108
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(108 108 (:REWRITE SET::IN-SET))
(108 108 (:REWRITE DEFAULT-+-1))
(84 84
(:TYPE-PRESCRIPTION TYPE-TO-TYPES-ALIST-P))
(84 84
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(84 84
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(78 78
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(78 78
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(74 74
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(72 36
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(72 36
(:REWRITE EQUAL-LEN-OF-PSEUDO-LAMBDA-FORMALS-AND-ACTUALS))
(72 36
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(66 2
(:REWRITE ASSOC-EQUAL-OF-ALIST-INFO-P))
(54 42
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(50 2
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(46 46 (:REWRITE IMPLIES-OF-IF-KIND))
(44 44
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(42 42 (:REWRITE IMPLIES-OF-LAMBDA-KIND))
(36 36
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(36 36
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(36 36
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(36 36 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(32 32 (:REWRITE IMPLIES-OF-FNCALL-KIND))
(26 26
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(22
22
(:REWRITE
TYPED-TERM-LIST->PATH-COND$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(14 14
(:REWRITE CAR-OF-BOOLEAN-LIST-FIX-X-NORMALIZE-CONST-UNDER-IFF))
(10 2
(:REWRITE ARG-DECL-P-OF-ASSOC-EQUAL-FROM-FUNCTION-DESCRIPTION-ALIST-P))
(8 8
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(6 6
(:REWRITE
TYPED-TERM-LIST-OF-PSEUDO-TERM-LIST-FIX-TERM-LST-NORMALIZE-CONST))
(6 6
(:REWRITE TYPED-TERM-LIST-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(6 6
(:REWRITE TYPED-TERM-LIST-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(6
6
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(4 4 (:TYPE-PRESCRIPTION ALIST-INFO-P))
(4
4
(:REWRITE
TYPED-TERM-LIST->JUDGEMENTS$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(4
4
(:REWRITE
TYPE-OPTIONS->SUPERTYPE$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(4 4
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(2 2
(:TYPE-PRESCRIPTION FUNCTION-DESCRIPTION-ALIST-P))
(2 2
(:REWRITE PSEUDO-TERMP-OF-TYPED-TERM->TERM))
(2 2
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-OF-TYPE-OPTIONS->FUNCTIONS)))
(RETURN-TYPE-OF-LAMBDA-RECTIFY.NEW-TT)
(RETURN-TYPE-OF-IF-RECTIFY.NEW-TT)
(RETURN-TYPE-OF-FNCALL-RECTIFY.NEW-TT)
(RETURN-TYPE-OF-TERM-RECTIFY.NEW-TT)
(RETURN-TYPE-OF-TERM-LIST-RECTIFY.NEW-TTL)
(TERM-LIST-RECTIFY-MAINTAINS-LEN-NIL
(72 2 (:DEFINITION LEN))
(12 6 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(10 2 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(6 6 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(4 4
(:TYPE-PRESCRIPTION TYPED-TERM-LIST->TERM-LST$INLINE))
(4 4 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(4 4
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(4 2 (:REWRITE DEFAULT-+-2))
(2
2
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(2 2
(:REWRITE LEN-OF-TYPED-TERM-LIST->CDR))
(2 2
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(2 2
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(2 2
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(2 2 (:REWRITE DEFAULT-CDR))
(2 2 (:REWRITE DEFAULT-+-1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(2 2
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(2 2
(:REWRITE CONSP-OF-TERM-LST-OF-TYPED-TERM-LIST-CONSP)))
(TERM-LIST-RECTIFY-MAINTAINS-LEN
(94 42 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(85 14
(:REWRITE CONSP-OF-TERM-LST-OF-TYPED-TERM-LIST-CONSP))
(70 14 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(52 52 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(38 19 (:REWRITE DEFAULT-+-2))
(36 4
(:REWRITE TERM-LIST-RECTIFY-MAINTAINS-LEN-NIL))
(28 28 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(28 28
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(19 19 (:REWRITE DEFAULT-+-1))
(17
17
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(14 14
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(14 14
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(14 14
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(14 14 (:REWRITE DEFAULT-CDR))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(14 14
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(11
11
(:REWRITE
TYPED-TERM-LIST->PATH-COND$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(11 11
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(6 6
(:TYPE-PRESCRIPTION TYPED-TERM-LIST->CONS)))
(IF-RECTIFY-MAINTAINS-PATH-COND
(9 3 (:REWRITE CASES-OF-TYPED-TERM->KIND))
(4 4
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(3 3
(:REWRITE GOOD-TYPED-FNCALL-P-OF-GOOD-TERM))
(2 2
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(1 1
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST)))
(LAMBDA-RECTIFY-MAINTAINS-PATH-COND
(478 9 (:REWRITE DEFAULT-CAR))
(449 2 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(378 3 (:REWRITE PSEUDO-TERMP-OPENER))
(333 3 (:DEFINITION PSEUDO-TERM-LISTP))
(169 3 (:REWRITE PSEUDO-TERMP-CAR))
(161 11
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(92 5
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(91 7 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(56 11
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(40 14 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(34 34
(:TYPE-PRESCRIPTION PSEUDO-TERM-LISTP))
(33 7 (:REWRITE DEFAULT-CDR))
(29 8
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(25 4
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(22 22 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(22 22 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(21 21 (:REWRITE IMPLIES-OF-LAMBDA-KIND))
(18 6 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(15 9 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(14 14 (:REWRITE IMPLIES-OF-IF-KIND))
(14 7
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(14 7
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(14 7 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(11 11
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(11 11 (:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(11 11
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(11 11
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(11 11 (:REWRITE FN-CHECK-DEF-FORMALS))
(10
10
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(9 9
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(9 3
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(9 3 (:REWRITE CASES-OF-TYPED-TERM->KIND))
(8 8
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(8 8
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(7 7
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(7 7 (:REWRITE IMPLIES-OF-FNCALL-KIND))
(7 1
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(6 6
(:TYPE-PRESCRIPTION TYPE-TO-TYPES-ALIST-P))
(6 6 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(6 6
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(6 6
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(6 2
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(3 3
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(3 3
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(3 3
(:REWRITE GOOD-TYPED-IF-P-OF-GOOD-TERM))
(3 3
(:REWRITE GOOD-TYPED-FNCALL-P-OF-GOOD-TERM))
(2 2
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(1
1
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(1 1
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(1 1 (:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(1 1
(:REWRITE PSEUDO-TERMP-OF-TYPED-TERM->TERM))
(1 1
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV)))
(FNCALL-RECTIFY-MAINTAINS-PATH-COND
(7037 4 (:DEFINITION ASSOC-EQUAL))
(6220 8 (:DEFINITION PSEUDO-TERMP))
(4024 152 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(3680 40
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(3202 8
(:REWRITE NIL-OF-ASSOC-EQUAL-OF-PSEUDO-TERM-ALISTP))
(3121 11
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(2984 60 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(1016 48
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(1008 16 (:DEFINITION TRUE-LISTP))
(884 24 (:DEFINITION LENGTH))
(876 16
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(828 8 (:DEFINITION TRUE-LIST-LISTP))
(772 24 (:DEFINITION LEN))
(655 152 (:REWRITE DEFAULT-CAR))
(584 88
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(552 8 (:REWRITE PSEUDO-TERMP-CAR))
(532 8
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(501 97 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(474 474 (:TYPE-PRESCRIPTION PSEUDO-LAMBDAP))
(423 163 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(366 366
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(353 135 (:REWRITE DEFAULT-CDR))
(352 16 (:REWRITE PSEUDO-TERMP-OPENER))
(336 32 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(332 40
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(260 260 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(240 32
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(200 32
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(188 52
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(176 36 (:REWRITE O-P-O-INFP-CAR))
(167 167
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(156 16
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(144 144
(:TYPE-PRESCRIPTION PSEUDO-TERM-LISTP))
(136 16
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(131 131
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(123 123
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(112 16
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(99 99
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(99 99
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(99 99
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(99 99
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(97 97
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(96 48
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(88 88 (:REWRITE FN-CHECK-DEF-FORMALS))
(80 80
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(72 16
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(72 2
(:REWRITE ASSOC-EQUAL-OF-ALIST-INFO-P))
(68 36 (:REWRITE O-P-DEF-O-FINP-1))
(68 8
(:REWRITE SYMBOL-LISTP-OF-FORMALS-OF-PSEUDO-LAMBDAP))
(68 8
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(64 64 (:TYPE-PRESCRIPTION TRUE-LISTP))
(64
64
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(64 32
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(64 32
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(64 32 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(56 2
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(48 48 (:TYPE-PRESCRIPTION SET::SETP-TYPE))
(48 48
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(48 48 (:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(48 24 (:REWRITE SET::NONEMPTY-MEANS-SET))
(48 24 (:REWRITE DEFAULT-+-2))
(40 40
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(40 4
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(36
36
(:REWRITE
TYPE-OPTIONS->FUNCTIONS$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(36 36
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(32 32 (:TYPE-PRESCRIPTION O-FINP))
(32 32
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(32 32
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(32 32
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(32 32
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(32 32
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(32 32
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(32 32
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(32 32
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(32 32
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(32 32
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(32 32
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(32 16
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(32 4
(:REWRITE PSEUDO-TERM-ALISTP-OF-CDR-WHEN-PSEUDO-TERM-ALISTP))
(24 24 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(24 24 (:REWRITE SET::IN-SET))
(24 24 (:REWRITE DEFAULT-+-1))
(22 22
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(16 16
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(16 16
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(16 16
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(16 16
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(16 16
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(16 8
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(16 8
(:REWRITE EQUAL-LEN-OF-PSEUDO-LAMBDA-FORMALS-AND-ACTUALS))
(16 8
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(10 10
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(10 2
(:REWRITE ARG-DECL-P-OF-ASSOC-EQUAL-FROM-FUNCTION-DESCRIPTION-ALIST-P))
(9
9
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(8 8
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(8 8 (:REWRITE IMPLIES-OF-IF-KIND))
(8 8 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(7
7
(:REWRITE
TYPED-TERM-LIST->JUDGEMENTS$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(5 5
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(4 4
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(3
3
(:REWRITE
TYPED-TERM-LIST->PATH-COND$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(3
3
(:REWRITE
TYPE-OPTIONS->SUPERTYPE$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(3 3 (:REWRITE IMPLIES-OF-FNCALL-KIND))
(2 2
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(2 2
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(2 2
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(2 2
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(2 2
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-OF-TYPE-OPTIONS->FUNCTIONS))
(1 1
(:REWRITE CAR-OF-BOOLEAN-LIST-FIX-X-NORMALIZE-CONST-UNDER-IFF)))
(TERM-RECTIFY-MAINTAINS-PATH-COND
(28 2
(:REWRITE GOOD-TYPED-VARIABLE-P-OF-GOOD-TERM))
(14 2
(:REWRITE GOOD-TYPED-QUOTE-P-OF-GOOD-TERM))
(8 8
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST)))
(TERM-LIST-RECTIFY-MAINTAINS-PATH-COND
(10
10
(:REWRITE
TYPED-TERM-LIST->PATH-COND$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST)))
(TERM-RECTIFY
(6716 68
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(5472 13 (:DEFINITION ASSOC-EQUAL))
(5251 97 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(3485 79
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(3165 324 (:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(3034 2 (:DEFINITION ALISTP))
(2863 319 (:REWRITE DEFAULT-CAR))
(2679 26
(:REWRITE NIL-OF-ASSOC-EQUAL-OF-PSEUDO-TERM-ALISTP))
(2434 35
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(2369 48
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(2297 68
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(1934 6
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(1490 21
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(1404 11
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(1331 14 (:REWRITE PSEUDO-TERMP-CAR))
(1290 23 (:DEFINITION TRUE-LISTP))
(1173 4
(:REWRITE ALISTP-WHEN-HONS-DUPLICITY-ALIST-P))
(1171 11 (:DEFINITION TRUE-LIST-LISTP))
(1163 3
(:REWRITE HONS-DUPLICITY-ALIST-P-WHEN-NOT-CONSP))
(932 154
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(687 273 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(654 654
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(538 48 (:REWRITE PSEUDO-TERMP-LIST-CDR))
(536 3 (:DEFINITION PSEUDO-TERM-LISTP))
(514 12
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(511 43
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(485 222 (:REWRITE DEFAULT-CDR))
(414 414 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(376 24
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(298 73
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(285 285
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(282 282
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(273 1
(:REWRITE TYPE-TO-TYPES-ALIST-P-OF-CDR-WHEN-TYPE-TO-TYPES-ALIST-P))
(250 46
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(242 51 (:REWRITE O-P-O-INFP-CAR))
(231 231
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(231 23
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(180 24
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(177 177
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(177 177
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(177 177
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(177 177
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(175 175
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(158 158
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(158 158
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(148 148 (:REWRITE FN-CHECK-DEF-FORMALS))
(129 60
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(120 120
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(104 13
(:REWRITE PSEUDO-TERM-ALISTP-OF-CDR-WHEN-PSEUDO-TERM-ALISTP))
(103 48
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(103 48
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(103 48 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(96
96
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(92 92 (:TYPE-PRESCRIPTION TRUE-LISTP))
(89 51 (:REWRITE O-P-DEF-O-FINP-1))
(86 86
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(86 86
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(86 86
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(86 86
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(86 86
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(86 86
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(86 43
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(82 17
(:REWRITE GOOD-TYPED-VARIABLE-P-OF-GOOD-TERM))
(79 10
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(78 2
(:REWRITE ASSOC-EQUAL-OF-ALIST-INFO-P))
(73 73
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(73 73 (:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(72 72 (:TYPE-PRESCRIPTION SET::SETP-TYPE))
(72 36 (:REWRITE SET::NONEMPTY-MEANS-SET))
(70 70
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(69 69
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(63 63 (:REWRITE IMPLIES-OF-IF-KIND))
(63 3
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(62 62
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(62 62
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(62 31 (:REWRITE DEFAULT-+-2))
(56 56
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(56 56
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(53
53
(:REWRITE
TYPE-OPTIONS->FUNCTIONS$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(47 17
(:REWRITE GOOD-TYPED-QUOTE-P-OF-GOOD-TERM))
(46 46
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(46 46
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(46 46
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(46 46
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(46 46
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(43
43
(:REWRITE
TYPED-TERM-LIST->TERM-LST$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(38 38 (:TYPE-PRESCRIPTION O-FINP))
(38 14
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(37
37
(:REWRITE
TYPED-TERM-LIST->JUDGEMENTS$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(36 36 (:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(36 36 (:REWRITE SET::IN-SET))
(35 5
(:REWRITE CONSP-OF-TERM-LST-OF-TYPED-TERM-LIST-CONSP))
(31 31 (:REWRITE DEFAULT-+-1))
(30 30
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(30 10
(:REWRITE STATE-P-IMPLIES-AND-FORWARD-TO-STATE-P1))
(28 28
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(28 1 (:DEFINITION ATOM))
(25 5
(:REWRITE LEN-OF-TYPED-TERM-LIST->CDR))
(21 15
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(17
17
(:REWRITE
TYPED-TERM-LIST->PATH-COND$INLINE-OF-TYPED-TERM-LIST-FIX-X-NORMALIZE-CONST))
(13
13
(:REWRITE
TYPE-OPTIONS->SUPERTYPE$INLINE-OF-TYPE-OPTIONS-FIX-X-NORMALIZE-CONST))
(12 4
(:REWRITE PSEUDO-TERMP-OF-CONS-WHEN-PSEUDO-LAMBDAP))
(10 2
(:REWRITE PSEUDO-TERMFNP-WHEN-PSEUDO-LAMBDAP))
(9 6 (:REWRITE SYMBOL-LISTP-OF-CONS))
(8 8 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(6 6
(:TYPE-PRESCRIPTION HONS-DUPLICITY-ALIST-P))
(6 6
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(6 1
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(4 4
(:REWRITE PSEUDO-TERMFNP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERMFN-LISTP))
(3 3
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(3 3
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(3 3
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(3 3
(:REWRITE
TYPED-TERM->PATH-COND$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(3 3
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(3 2
(:REWRITE PSEUDO-TERMFNP-WHEN-SYMBOLP))
(2 2
(:REWRITE SYMBOLP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P))
(2 2
(:REWRITE SYMBOLP-OF-CDR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(2 2
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(2 2
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(2 2
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(2 2
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(2 2
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(1 1
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(1 1
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(1
1
(:REWRITE
CDR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-TRUE-LIST-LIST-EQUIV))
(1 1 (:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(1 1
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP)))
(TERM-RECTIFY-FN
(100014 79 (:DEFINITION PSEUDO-TERMP))
(32000 302
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(31863 1162
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(31345 441 (:DEFINITION TRUE-LISTP))
(31333 168 (:DEFINITION TRUE-LIST-LISTP))
(29882 784 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(28841 1320
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(21956 3661
(:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(20281 1028 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(19118 1320
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(17973 919
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(15258 695
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(14175 655 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(13472 1015
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(10277 925
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(9973 3661 (:REWRITE DEFAULT-CAR))
(8101 158
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(7458 155 (:DEFINITION LENGTH))
(7169 239 (:DEFINITION LEN))
(6055 581
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(5774 5774
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(5341 203
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(5169 2936 (:REWRITE DEFAULT-CDR))
(4657 2003
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(4399 502
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(4368 467
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(4327 1757 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(4070 805
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(4006 4006
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(3764 258
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(2904 119
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(2678 2678 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(1986 1986
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(1960 1960
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(1892 429 (:REWRITE O-P-O-INFP-CAR))
(1869 127
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(1663 344
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(1389 60
(:REWRITE EQUAL-LEN-OF-PSEUDO-LAMBDA-FORMALS-AND-ACTUALS))
(1329 1329
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(1306 1306
(:TYPE-PRESCRIPTION SET::SETP-TYPE))
(1306 653 (:REWRITE SET::NONEMPTY-MEANS-SET))
(1195 1195 (:TYPE-PRESCRIPTION TRUE-LISTP))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(1028 1028
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(1015 1015 (:REWRITE FN-CHECK-DEF-FORMALS))
(1004
1004
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(964 128
(:REWRITE SYMBOL-LISTP-OF-FORMALS-OF-PSEUDO-LAMBDAP))
(956 956
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(924 127
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(893 893
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(893 893
(:REWRITE PSEUDO-TERM-LISTP-OF-ATOM))
(815 815 (:TYPE-PRESCRIPTION LEN))
(805 805
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(805 805
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(805 805
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(805 805
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(805 805
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(805 805
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(805 805
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(791
791
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(726 81
(:REWRITE TYPE-TO-TYPES-ALIST-P-OF-CDR-WHEN-TYPE-TO-TYPES-ALIST-P))
(656 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(653 653
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(653 653 (:REWRITE SET::IN-SET))
(641 411 (:REWRITE O-P-DEF-O-FINP-1))
(624 624
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(608 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(608 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(608 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(608 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(608 36
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(498 498
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(450 48
(:REWRITE ARG-CHECK-P-OF-CDR-WHEN-ARG-CHECK-P))
(422 225 (:REWRITE DEFAULT-+-2))
(402 48
(:REWRITE SYMBOL-SYMBOL-ALISTP-OF-CDR-WHEN-SYMBOL-SYMBOL-ALISTP))
(402
48
(:REWRITE
FUNCTION-DESCRIPTION-ALIST-P-OF-CDR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(402 48
(:REWRITE ALIST-INFO-P-OF-CDR-WHEN-ALIST-INFO-P))
(402 48
(:REWRITE ALIST-ARRAY-MAP-P-OF-CDR-WHEN-ALIST-ARRAY-MAP-P))
(312 312
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(310 310
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(254 254
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(254 254
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(254 254
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(254 254
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(254 254
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(254 254
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(230 230 (:TYPE-PRESCRIPTION O-FINP))
(225 225 (:REWRITE DEFAULT-+-1))
(181
181
(:REWRITE
CDR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-TRUE-LIST-LIST-EQUIV))
(164 164
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(164 164
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(164 164
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(164 164
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(164 164
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(82 82
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(82 82
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(82 82
(:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(82 82
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(82 82
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP))
(51 11
(:REWRITE PSEUDO-TERMP-OF-CDAR-WHEN-PSEUDO-TERM-ALISTP))
(47 6 (:REWRITE CASES-OF-TYPED-TERM->KIND))
(39 13 (:REWRITE FOLD-CONSTS-IN-+))
(37 37 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(31 31
(:TYPE-PRESCRIPTION TYPED-TERM->KIND))
(31 3
(:REWRITE GOOD-TYPED-VARIABLE-P-OF-GOOD-TERM))
(24 3
(:REWRITE GOOD-TYPED-FNCALL-P-OF-GOOD-TERM))
(19 3
(:REWRITE GOOD-TYPED-QUOTE-P-OF-GOOD-TERM))
(19 3
(:REWRITE GOOD-TYPED-LAMBDA-P-OF-GOOD-TERM))
(19 3
(:REWRITE GOOD-TYPED-IF-P-OF-GOOD-TERM))
(16 16
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(12 4
(:REWRITE STATE-P-IMPLIES-AND-FORWARD-TO-STATE-P1))
(8 8
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(6 6
(:TYPE-PRESCRIPTION STR::TRUE-LISTP-OF-EXPLODE))
(6 4 (:REWRITE STR::CONSP-OF-EXPLODE))
(2 2
(:REWRITE STR::EXPLODE-WHEN-NOT-STRINGP))
(2 1
(:REWRITE STR::COERCE-TO-LIST-REMOVAL))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(1 1
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST)))
(PSEUDO-TERM-LIST-LISTP-OF-TERM-RECTIFY-FN
(268670 153 (:DEFINITION PSEUDO-TERMP))
(103838 2410
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-OF-PSEUDO-TERMP))
(97142 769
(:REWRITE TRUE-LISTP-OF-CAR-WHEN-TRUE-LIST-LISTP))
(96279 1049 (:DEFINITION TRUE-LISTP))
(95217 432 (:DEFINITION TRUE-LIST-LISTP))
(79054 549
(:REWRITE PSEUDO-TERMP-CADR-FROM-PSEUDO-TERM-LISTP))
(64184 3919
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-TERMP))
(60899 1733 (:REWRITE CONSP-OF-IS-CONJUNCT?))
(60591 3919
(:REWRITE PSEUDO-LAMBDAP-OF-CAR-WHEN-PSEUDO-LAMBDA-LISTP))
(60214 2861 (:REWRITE CONSP-OF-PSEUDO-LAMBDAP))
(52050 9394
(:REWRITE LAMBDA-OF-PSEUDO-LAMBDAP))
(37338 1792
(:REWRITE PSEUDO-TERM-LISTP-OF-SYMBOL-LISTP))
(36905 1263 (:REWRITE PSEUDO-TERM-LISTP-CDR))
(35868 1286
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP-IF))
(35868 1286
(:REWRITE PSEUDO-TERM-LISTP-OF-CDR-PSEUDO-TERMP))
(33655 2663
(:REWRITE PSEUDO-LAMBDA-LISTP-OF-CDR-WHEN-PSEUDO-LAMBDA-LISTP))
(28623 2268
(:REWRITE SYMBOL-LISTP-WHEN-NOT-CONSP))
(27981 9390 (:REWRITE DEFAULT-CAR))
(24833 6798 (:REWRITE DEFAULT-CDR))
(24211 443
(:REWRITE TRUE-LIST-LISTP-OF-CDR-WHEN-TRUE-LIST-LISTP))
(18645 348 (:DEFINITION LENGTH))
(17237 478 (:DEFINITION LEN))
(16511 5844
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-NOT-CONSP))
(16098 16098
(:REWRITE PSEUDO-LAMBDAP-WHEN-MEMBER-EQUAL-OF-PSEUDO-LAMBDA-LISTP))
(15537 1317
(:REWRITE CONSP-OF-CDR-OF-PSEUDO-LAMBDAP))
(12642 1124
(:REWRITE TRUE-LISTP-OF-CDR-OF-PSEUDO-LAMBDAP))
(11688 11688
(:REWRITE PSEUDO-LAMBDA-LISTP-WHEN-SUBSETP-EQUAL))
(11449 1032
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-SYMBOL-LISTP))
(11186 4616 (:REWRITE IMPLIES-OF-IS-CONJUNCT?))
(11040 416
(:REWRITE CONSP-OF-CDDR-OF-PSEUDO-LAMBDAP))
(9707 1947
(:REWRITE SET::SETS-ARE-TRUE-LISTS-CHEAP))
(8719 659
(:REWRITE TRUE-LIST-LISTP-WHEN-NOT-CONSP))
(6760 6760 (:TYPE-PRESCRIPTION IS-CONJUNCT?))
(6645 395
(:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP))
(5547 1304 (:REWRITE O-P-O-INFP-CAR))
(5432 5432
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-OF-TERM))
(5145 5145
(:REWRITE IMPLIES-OF-IS-CONJUNCT-LIST?))
(4853 328
(:REWRITE PSEUDO-TERMP-OF-BODY-OF-PSEUDO-LAMBDAP))
(4081 742
(:REWRITE SYMBOL-LISTP-OF-CDAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(3807 3807
(:REWRITE IMPLIES-OF-TYPE-PREDICATE-P))
(3362 327
(:REWRITE SYMBOL-LISTP-OF-FORMALS-OF-PSEUDO-LAMBDAP))
(3257 395
(:REWRITE SYMBOLP-OF-FN-CALL-OF-PSEUDO-TERMP))
(3186 3186 (:TYPE-PRESCRIPTION TRUE-LISTP))
(3098 3098
(:TYPE-PRESCRIPTION SET::SETP-TYPE))
(3098 1549 (:REWRITE SET::NONEMPTY-MEANS-SET))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P
. 1))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 2))
(2863 2863
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P
. 1))
(2861 2861
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 2))
(2861 2861
(:REWRITE CONSP-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP
. 1))
(2412 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ARG-CHECK-P))
(2406
2406
(:REWRITE PSEUDO-TERMP-OF-CAR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(2263 2263 (:REWRITE FN-CHECK-DEF-FORMALS))
(2255 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-TYPE-TO-TYPES-ALIST-P))
(2255 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(2255 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(2255 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-INFO-P))
(2255 152
(:REWRITE SYMBOLP-OF-CAAR-WHEN-ALIST-ARRAY-MAP-P))
(2197 143
(:REWRITE EQUAL-LEN-OF-PSEUDO-LAMBDA-FORMALS-AND-ACTUALS))
(2196 246
(:REWRITE TYPE-TO-TYPES-ALIST-P-OF-CDR-WHEN-TYPE-TO-TYPES-ALIST-P))
(2174 2174
(:REWRITE PSEUDO-TERMP-OF-SINGLE-VAR-FNCALL-OF-TERM))
(2174 2174
(:REWRITE PSEUDO-TERMP-OF-JUDGEMENT-OF-TERM))
(2064
2064
(:REWRITE SYMBOL-LISTP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(2006
2006
(:REWRITE CAR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-LIST-EQUIV))
(1947 1947
(:REWRITE TRUE-LISTP-WHEN-THEOREM-SYMBOL-LISTP))
(1947 1947
(:REWRITE TRUE-LISTP-WHEN-TERMFN-LISTP))
(1947 1947
(:REWRITE TRUE-LISTP-WHEN-MACRO-SYMBOL-LISTP))
(1947 1947
(:REWRITE TRUE-LISTP-WHEN-LAMBDA-LISTP))
(1947 1947
(:REWRITE TRUE-LISTP-WHEN-FUNCTION-SYMBOL-LISTP))
(1841 1201 (:REWRITE O-P-DEF-O-FINP-1))
(1821 1821 (:TYPE-PRESCRIPTION LEN))
(1776 1776
(:REWRITE TERM-LISTP-IMPLIES-PSEUDO-TERM-LISTP))
(1724 1724
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-SUBSETP-EQUAL))
(1555 1555
(:REWRITE TERMP-IMPLIES-PSEUDO-TERMP))
(1555 167
(:REWRITE ARG-CHECK-P-OF-CDR-WHEN-ARG-CHECK-P))
(1549 1549
(:TYPE-PRESCRIPTION SET::EMPTY-TYPE))
(1549 1549 (:REWRITE SET::IN-SET))
(1388 167
(:REWRITE SYMBOL-SYMBOL-ALISTP-OF-CDR-WHEN-SYMBOL-SYMBOL-ALISTP))
(1388
167
(:REWRITE
FUNCTION-DESCRIPTION-ALIST-P-OF-CDR-WHEN-FUNCTION-DESCRIPTION-ALIST-P))
(1388 167
(:REWRITE ALIST-INFO-P-OF-CDR-WHEN-ALIST-INFO-P))
(1388 167
(:REWRITE ALIST-ARRAY-MAP-P-OF-CDR-WHEN-ALIST-ARRAY-MAP-P))
(1024
1024
(:REWRITE PSEUDO-TERMP-OF-CDR-WHEN-MEMBER-EQUAL-OF-PSEUDO-TERM-ALISTP))
(1002 862
(:REWRITE TYPE-TO-TYPES-ALIST-P-WHEN-NOT-CONSP))
(866 461 (:REWRITE DEFAULT-+-2))
(790 790
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-TYPE-TO-TYPES-ALIST-P))
(790 790
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(790 790
(:REWRITE
SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-FUNCTION-DESCRIPTION-ALIST-P))
(790 790
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ARG-CHECK-P))
(790 790
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-INFO-P))
(790 790
(:REWRITE SYMBOLP-OF-CAR-WHEN-MEMBER-EQUAL-OF-ALIST-ARRAY-MAP-P))
(634 634 (:TYPE-PRESCRIPTION O-FINP))
(620 620
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-SUBSETP-EQUAL))
(616 616
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-SUBSETP-EQUAL))
(616 616
(:REWRITE ARG-CHECK-P-WHEN-SUBSETP-EQUAL))
(616 616
(:REWRITE ALIST-INFO-P-WHEN-SUBSETP-EQUAL))
(616 616
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-SUBSETP-EQUAL))
(461 461 (:REWRITE DEFAULT-+-1))
(424
424
(:REWRITE
CDR-OF-TRUE-LIST-LIST-FIX-X-NORMALIZE-CONST-UNDER-TRUE-LIST-LIST-EQUIV))
(352 310
(:REWRITE SYMBOL-SYMBOL-ALISTP-WHEN-NOT-CONSP))
(308 308
(:REWRITE FUNCTION-DESCRIPTION-ALIST-P-WHEN-NOT-CONSP))
(308 308
(:REWRITE ARG-CHECK-P-WHEN-NOT-CONSP))
(308 308
(:REWRITE ALIST-INFO-P-WHEN-NOT-CONSP))
(308 308
(:REWRITE ALIST-ARRAY-MAP-P-WHEN-NOT-CONSP))
(188 24 (:REWRITE CASES-OF-TYPED-TERM->KIND))
(142 30
(:REWRITE PSEUDO-TERMP-OF-CDAR-WHEN-PSEUDO-TERM-ALISTP))
(129 129 (:TYPE-PRESCRIPTION TYPED-TERM))
(116 4
(:REWRITE GOOD-TYPED-VARIABLE-P-OF-GOOD-TERM))
(108 108 (:REWRITE FN-CHECK-DEF-NOT-QUOTE))
(88 4
(:REWRITE GOOD-TYPED-FNCALL-P-OF-GOOD-TERM))
(78 26 (:REWRITE FOLD-CONSTS-IN-+))
(68 4
(:REWRITE GOOD-TYPED-QUOTE-P-OF-GOOD-TERM))
(68 4
(:REWRITE GOOD-TYPED-LAMBDA-P-OF-GOOD-TERM))
(68 4
(:REWRITE GOOD-TYPED-IF-P-OF-GOOD-TERM))
(66 2
(:REWRITE SYMBOLP-OF-CDAR-WHEN-TYPE-TUPLE-TO-THM-ALIST-P))
(64 44
(:REWRITE TYPED-TERM-P-WHEN-MAYBE-TYPED-TERM-P))
(56 14
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-NOT-CONSP))
(56 2
(:REWRITE TYPE-TUPLE-TO-THM-ALIST-P-WHEN-NOT-CONSP))
(54 2
(:REWRITE SYMBOLP-OF-CDAR-WHEN-SYMBOL-SYMBOL-ALISTP))
(48 48 (:TYPE-PRESCRIPTION TYPED-TERM-P))
(44 44
(:REWRITE TYPED-TERM-P-OF-TYPED-TERM))
(37 37 (:TYPE-PRESCRIPTION TERM-RECTIFY))
(28 28
(:REWRITE PSEUDO-TERM-ALISTP-WHEN-SUBSETP-EQUAL))
(14 14
(:TYPE-PRESCRIPTION STR::TRUE-LISTP-OF-EXPLODE))
(14 9 (:REWRITE STR::CONSP-OF-EXPLODE))
(12 4
(:REWRITE MAYBE-TYPED-TERM-P-WHEN-TYPED-TERM-P))
(8 8
(:TYPE-PRESCRIPTION MAYBE-TYPED-TERM-P))
(8 8
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-TERM-NORMALIZE-CONST))
(8 8
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-PATH-COND-NORMALIZE-CONST))
(8 8
(:REWRITE TYPED-TERM-OF-PSEUDO-TERM-FIX-JUDGEMENTS-NORMALIZE-CONST))
(8 4 (:DEFINITION EQ))
(6 3
(:REWRITE STR::COERCE-TO-LIST-REMOVAL))
(5 5
(:REWRITE STR::EXPLODE-WHEN-NOT-STRINGP))
(5 4 (:REWRITE SYMBOL-LISTP-OF-CONS))
(4 4
(:REWRITE TYPED-TERM->TERM$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(4 4
(:REWRITE
TYPED-TERM->JUDGEMENTS$INLINE-OF-TYPED-TERM-FIX-X-NORMALIZE-CONST))
(4 4
(:REWRITE TYPE-TUPLE-TO-THM-ALIST-P-WHEN-SUBSETP-EQUAL))
(4 4
(:REWRITE SYMBOLP-OF-CDR-WHEN-MEMBER-EQUAL-OF-TYPE-TUPLE-TO-THM-ALIST-P))
(4 4
(:REWRITE SYMBOLP-OF-CDR-WHEN-MEMBER-EQUAL-OF-SYMBOL-SYMBOL-ALISTP))
(4 4
(:REWRITE CAR-OF-BOOLEAN-LIST-FIX-X-NORMALIZE-CONST-UNDER-IFF)))
(TERM-RECTIFY-CP)
|
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Post;
use App\Tag;
use App\Category;
use App\User;
use DB;
use Illuminate\Support\Facades\Storage;
use App\Http\Requests\PostStoreRequest;
use App\Http\Requests\PostUpdateRequest;
class PostController extends Controller
{
public function __construct(){
$this->middleware('auth');
}
public function index(){
$posts = Post::orderBy('id','DESC')
->where('user_id', auth()->user()->id)
->paginate(7);
return view('admin.posts.index', compact('posts'));
}
public function todos(){
$posts = Post::orderBy('id','DESC')->paginate(7);
return view('admin.posts.index', compact('posts'));
}
public function create(){
$tags=Tag::orderBy('name','ASC')->get();
$idDepto=User::where('id','=',auth()->user()->id)->pluck('idDepto');
$departamento=Category::find($idDepto);
return view('admin.posts.create',compact('tags','departamento'));
}
public function store(PostStoreRequest $request){
$post = Post::create($request->all());
//imagen
if($request->file('file')){
$path =Storage::disk('public')->put('image', $request->file('file'));
$post->fill(['file'=> asset($path)])->save();
}
$post->tags()->sync($request->get('tags'));
return redirect()->route('posts.edit', $post->id)->with('info', 'Entrada creada con exito');
}
public function show($id){
$post =Post::find($id);
return view('admin.posts.show',compact('post'));
}
public function edit($id){
$tags=Tag::orderBy('name','ASC')->get();
$idDepto=User::where('id','=',auth()->user()->id)->pluck('idDepto');
$departamento=Category::find($idDepto);
$post =Post::find($id);
return view('admin.posts.edit',compact('post','tags','departamento'));
}
public function update(PostUpdateRequest $request,$id){
$post =Post::find($id);
$post->fill($request->all())->save();
if($request->file('file')){
$path =Storage::disk('public')->put('image',$request->file('file'));
$post->fill(['file'=> asset($path)])->save();
}
$post->tags()->sync($request->get('tags'));
return redirect()->route('posts.edit', $post->id)->with('info', 'Entrada actualizada con exito');
}
public function destroy($id){
$post =Post::find($id)->delete();
return back()->with('info' , 'eliminado correctamente');
}
//funciones del slider interno
public function mover_a_slider($id){
$slider =Post::find($id);
$slider->slider='1';
$slider->save();
return back()->with('info' , 'Post agregado a slider');
}
public function quitar_a_slider($id){
$slider =Post::find($id);
$slider->slider='0';
$slider->save();
return back()->with('info' , 'Post quitado de slider');
}
public function mostrar_slider(){
$posts = Post::orderBy('id','DESC')
->where('slider','1')
->paginate(6);
return view('admin.slider.index',compact('posts'));
}
//funcion de borrado logico
public function indexBorrados(){
$posts=DB::table('posts')->whereNotNull('deleted_at')->get();
return view('admin.posts.restablecer', compact('posts'));
}
public function RestablecerPost($id){
$posts=Post::withTrashed()->find($id)->restore();
return back()->with('info' , 'restablecido correctamente');
}
// funciones del slider publico
public function mover_a_slider_publico($id){
$slider =Post::find($id);
$slider->publico='SI';
$slider->save();
return back()->with('info' , 'Post agregado a slider publico');
}
public function quitar_a_slider_publico($id){
$slider =Post::find($id);
$slider->publico='NO';
$slider->save();
return back()->with('info' , 'Post quitado de slider publico');
}
public function mostrar_slider_publico(){
$posts = Post::orderBy('id','DESC')
->where('publico','SI')
->paginate(6);
return view('admin.slider.slider_publico',compact('posts'));
}
} |
import {TParser} from "../TParser";
import {parse} from "../parse";
import {Stream} from "../Stream";
import {ParseResult} from "../ParseResult";
import {ParseError} from "../ParseError";
import {oneOf} from "./oneOf";
// try to parse p1, then p2 if p1 fails.
export function either(p1: TParser, p2?: TParser) {
return oneOf([p1, p2], "");
} |
/*
-- Query: SELECT * FROM movies2017.movies_company
LIMIT 0, 1000
-- Date: 2018-03-31 00:22
*/
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (1,100);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (1,101);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (1,102);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (2,103);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (2,104);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (3,105);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (3,106);
INSERT INTO `movies_company` (`Movies_idMovies`,`Company_idCompany`) VALUES (3,107);
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('4', '108');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('4', '109');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('4', '110');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('5', '111');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('5', '112');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('5', '105');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('6', '113');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('6', '114');
INSERT INTO `movies2017`.`movies_company` (`Movies_idMovies`, `Company_idCompany`) VALUES ('6', '115');
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bxf;
using System.Windows;
using System.Windows.Controls;
using System.Collections.ObjectModel;
using Microsoft.Phone.Controls;
namespace WpUI
{
public class MainWindowPresenter : DependencyObject
{
public MainWindowPresenter()
{
var presenter = (IPresenter)Shell.Instance;
presenter.OnShowError += (message, title) =>
{
MessageBox.Show(message, title, MessageBoxButton.OK);
};
presenter.OnShowStatus += (status) =>
{
};
presenter.OnShowView += (view, region) =>
{
PivotItem panel = GetPanel(int.Parse(region));
var vm = view.Model as IViewModel;
if (vm != null)
panel.Header = vm.Header;
else
panel.Header = string.Empty;
panel.Content = view.ViewInstance;
};
if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
{
try
{
Shell.Instance.ShowView(
typeof(OrderEdit).AssemblyQualifiedName,
"orderVmViewSource",
new OrderVm(),
"1");
}
catch (Exception ex)
{
Shell.Instance.ShowError(ex.Message, "Startup error");
}
}
}
private PivotItem GetPanel(int id)
{
while (Panels.Count < id) Panels.Add(new PivotItem());
return Panels[id - 1];
}
public static readonly DependencyProperty PanelsProperty =
DependencyProperty.Register("Panels", typeof(ObservableCollection<PivotItem>), typeof(MainWindowPresenter),
new PropertyMetadata(new ObservableCollection<PivotItem>()));
public ObservableCollection<PivotItem> Panels
{
get { return (ObservableCollection<PivotItem>)GetValue(PanelsProperty); }
set { SetValue(PanelsProperty, value); }
}
}
}
|
import { NativeModules } from 'react-native';
import type {
PaymentMethodCreateParams,
ApplePay,
PaymentSheet,
ConfirmSetupIntent,
InitialiseParams,
CreatePaymentMethodResult,
RetrievePaymentIntentResult,
RetrieveSetupIntentResult,
ConfirmPaymentResult,
HandleNextActionResult,
ConfirmSetupIntentResult,
CreateTokenForCVCUpdateResult,
InitPaymentSheetResult,
PresentPaymentSheetResult,
ConfirmPaymentSheetPaymentResult,
ApplePayResult,
CreateTokenResult,
GooglePayInitResult,
PayWithGooglePayResult,
CreateGooglePayPaymentMethodResult,
GooglePay,
OpenApplePaySetupResult,
CreateTokenParams,
VerifyMicrodepositsParams,
CollectBankAccountParams,
} from './types';
type NativeStripeSdkType = {
initialise(params: InitialiseParams): Promise<void>;
createPaymentMethod(
data: PaymentMethodCreateParams.Params,
options: PaymentMethodCreateParams.Options
): Promise<CreatePaymentMethodResult>;
handleNextAction(
paymentIntentClientSecret: string
): Promise<HandleNextActionResult>;
confirmPayment(
paymentIntentClientSecret: string,
data: PaymentMethodCreateParams.Params,
options: PaymentMethodCreateParams.Options
): Promise<ConfirmPaymentResult>;
isApplePaySupported(): Promise<boolean>;
presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;
confirmApplePayPayment(clientSecret: string): Promise<void>;
updateApplePaySummaryItems(
summaryItems: ApplePay.CartSummaryItem[],
errorAddressFields: Array<{
field: ApplePay.AddressFields;
message?: string;
}>
): Promise<void>;
confirmSetupIntent(
paymentIntentClientSecret: string,
data: ConfirmSetupIntent.Params,
options: ConfirmSetupIntent.Options
): Promise<ConfirmSetupIntentResult>;
retrievePaymentIntent(
clientSecret: string
): Promise<RetrievePaymentIntentResult>;
retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;
initPaymentSheet(
params: PaymentSheet.SetupParams
): Promise<InitPaymentSheetResult>;
presentPaymentSheet(): Promise<PresentPaymentSheetResult>;
confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;
createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;
handleURLCallback(url: string): Promise<boolean>;
createToken(params: CreateTokenParams): Promise<CreateTokenResult>;
isGooglePaySupported(
params: GooglePay.IsGooglePaySupportedParams
): Promise<boolean>;
initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;
presentGooglePay(
params: GooglePay.PresentGooglePayParams
): Promise<PayWithGooglePayResult>;
createGooglePayPaymentMethod(
params: GooglePay.CreatePaymentMethodParams
): Promise<CreateGooglePayPaymentMethodResult>;
openApplePaySetup(): Promise<OpenApplePaySetupResult>;
verifyMicrodeposits(
type: 'payment' | 'setup',
clientSecret: string,
params: VerifyMicrodepositsParams
): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;
collectBankAccount(
type: 'payment' | 'setup',
clientSecret: string,
params: CollectBankAccountParams
): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;
};
const { StripeSdk } = NativeModules;
export default StripeSdk as NativeStripeSdkType;
|
require 'db_spec_helper'
module Bosh::Director
describe 'Add Multi-Runtime-Config Support' do
let(:db) { DBSpecHelper.db }
let(:migration_file) { '20170510154449_add_multi_runtime_config_support.rb' }
before do
DBSpecHelper.migrate_all_before(migration_file)
db[:runtime_configs] << {id: 100, properties: 'version_1', created_at: Time.now}
db[:runtime_configs] << {id: 200, properties: 'version_2', created_at: Time.now}
db[:runtime_configs] << {id: 300, properties: 'version_3', created_at: Time.now}
db[:deployments] << {id: 1, name: 'deployment_1', runtime_config_id: 100}
db[:deployments] << {id: 2, name: 'deployment_2', runtime_config_id: 100}
db[:deployments] << {id: 3, name: 'deployment_3', runtime_config_id: 200}
db[:deployments] << {id: 4, name: 'deployment_4'}
end
it 'should migrate existing deployment records to reflect many-to-many relationship between deployments & runtime config' do
DBSpecHelper.migrate(migration_file)
expect(db[:deployments_runtime_configs].all).to contain_exactly(
{:deployment_id=>1, :runtime_config_id=>100},
{:deployment_id=>2, :runtime_config_id=>100},
{:deployment_id=>3, :runtime_config_id=>200}
)
end
it 'removes runtime config foreign key column and reference in the deployment table' do
DBSpecHelper.migrate(migration_file)
expect(db[:deployments].all.count).to eq(4)
db[:deployments].all.each do |deployment|
expect(deployment.key?(:runtime_config_id)).to be_falsey
end
end
end
end
|
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package solvers
package unrolling
import purescala.Common._
import purescala.Expressions._
import purescala.Definitions._
import purescala.Extractors._
import purescala.ExprOps._
import purescala.Types._
import utils._
import scala.collection.mutable.{Map => MutableMap, Set => MutableSet}
trait TemplateEncoder[T] {
def encodeId(id: Identifier): T
def encodeExpr(bindings: Map[Identifier, T])(e: Expr): T
def substitute(map: Map[T, T]): T => T
// Encodings needed for unrollingbank
def mkNot(v: T): T
def mkOr(ts: T*): T
def mkAnd(ts: T*): T
def mkEquals(l: T, r: T): T
def mkImplies(l: T, r: T): T
def extractNot(v: T): Option[T]
}
|
---
title: Dendrogram
order: 1
---
The leaves will be aligned on the same level. This algorithm does not consider the node size, which means all the nodes will be regarded as unit size with 1px. <br /> <img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*zX7tSLqBvwcAAAAAAAAAAABkARQnAQ' alt='dendrogram' width='300'/>
## Usage
Dendrogram is an appropriate layout method for tree data structure. Please use it with TreeGraph. As the demo below, you can deploy it in `layout` while instantiating Graph.
You can set different configurations for different nodes if the parameter is Function type. Please refer to the ducuments for more information.
|
scalaVersion := "2.10.2"
libraryDependencies ++= Seq("commons-io" % "commons-io" % "2.4")
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
} |
import { Injectable } from "@angular/core";
import {
HttpClient,
HttpHeaders,
HttpResponse,
HttpEvent
} from "@angular/common/http";
import { Order } from "./model/order";
import { DeliveryOption } from "./model/deliveryOption";
import { Observable } from "rxjs";
import { config } from "src/environments/config";
@Injectable({
providedIn: "root"
})
export class OrderService {
readonly POST_ORDER_URL = `http://${config.backend.hostname}:${config.backend.port}/api/order`;
readonly GET_DELIV_IRL = `http://${config.backend.hostname}:${config.backend.port}/api/delivery/option/all`;
readonly httpOptions: { headers: HttpHeaders; observe } = {
headers: new HttpHeaders({
"Content-Type": "application/json"
}),
observe: "response"
};
constructor(private http: HttpClient) {
this.fetchDeliveryOptions();
}
/** Send the order via the POST method to the backend server */
sendOrder(order: Order): Observable<any> {
return this.http.post(this.POST_ORDER_URL, order, this.httpOptions);
}
/** Fetch list of delivery Option */
fetchDeliveryOptions(): Observable<DeliveryOption[]> {
return this.http.get<DeliveryOption[]>(this.GET_DELIV_IRL);
}
}
|
import pandas as pd
import numpy as np
import tensorflow as tf
import normal
import com
#reading the smaple data
df = pd.read_csv('trail.csv')
print(df.head())
print(np.mean(df))
x_value = df['Value'].values
#input and output array
input = []
output =[]
for i in range(0,len(x_value)):
input.append(normal.norms(x_value[i]))
for j in range(0,len(x_value)):
output.append(normal.fun(x_value[j]))
input = np.array(input)
output = np.array(output)
#randamization
num = len(x_value)
ran = np.arange(num)
np.random.shuffle(ran)
input = input[ran]
output = output[ran]
#splitting the data for train and split
TRAIN_SPLIT = int(0.6*num)
TEST_SPLIT = int(0.2*num+TRAIN_SPLIT)
x_train,x_validation,x_test = np.split(input,[TRAIN_SPLIT,TEST_SPLIT])
y_train,y_validation,y_test = np.split(output,[TRAIN_SPLIT,TEST_SPLIT])
#model
model = tf.keras.Sequential()
model.add(tf.keras.layers.Dense(50,activation='relu'))
model.add(tf.keras.layers.Dense(16,activation='relu'))
model.add(tf.keras.layers.Dense(len(output),activation='softmax'))
model.compile(optimizer='rmsprop',loss='mse',metrics=['mae'])
history = model.fit(x_train,y_train,epochs=10,batch_size=1,validation_data=(x_validation,y_validation))
#prediction
pr =[]
while(1):
pr.append(com.Com())
prediction = model.predict(pr)
print('prediction')
print(np.round(prediction,decimals=5))
print('Acutal',normal.fun(com.Com()))
|
import paramiko
from time import sleep
import json
import config
import ssh
import mister
import cores
import logger
import discord
SETTINGS = config.get_config()
maps = cores.read_file_map()
RECENTS_FOLDER = '/media/{}/config/'.format(SETTINGS['core_storage'])
last_game = None
last_core = None
def replace_text(core, game, displayname, text):
return text.replace("{core}", core).replace("{game}", game).replace("{displayname}", displayname)
while True:
try:
core = mister.get_running_core()
map_core = cores.get_map(core)
game = mister.get_last_game(core)
displayname = core
state_text = SETTINGS['state_text']
details_text = SETTINGS['details_text']
small_text = SETTINGS['small_text']
small_image = SETTINGS['small_image']
large_image = SETTINGS['large_image']
large_text = SETTINGS['large_text']
buttons = None
if "buttons" in SETTINGS:
if SETTINGS['buttons'] != "":
buttons = SETTINGS['buttons']
if "buttons" in map_core:
if map_core["buttons"] != "":
buttons = map_core["buttons"]
if "state_text" in map_core:
state_text = map_core["details_text"]
if "details_text" in map_core:
details_text = map_core["details_text"]
if "display_name" in map_core:
displayname = map_core["display_name"]
if "small_text" in map_core:
if map_core["small_text"] != "":
small_text = map_core["small_text"]
if "small_image" in map_core:
if map_core["small_image"] != "":
small_image = map_core["small_image"]
if "large_text" in map_core:
if map_core["large_text"] != "":
large_text = map_core["large_text"]
if "large_image" in map_core:
if map_core["large_image"] != "":
large_image = map_core["large_image"]
state_text = replace_text(core,game,displayname,state_text)
details_text = replace_text(core,game,displayname,details_text)
if game != "" and game != last_game:
discord.update_activity(details_text,state_text,large_image,large_text,small_image,small_text,buttons)
if core != last_core:
discord.update_activity(details_text,state_text,large_image,large_text,small_image,small_text,buttons)
last_core = core
last_game = game
except Exception as e:
logger.error(repr(e))
sleep(int(SETTINGS["refresh_rate"]))
client.close()
|
package de.maibornwolff.codecharta.importer.crococosmo
import de.maibornwolff.codecharta.importer.crococosmo.CrococosmoImporter.Companion.main
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.io.File
class CrococosmoImporterTest {
@Test
fun `should create json uncompressed file`() {
main(
arrayOf(
"src/test/resources/test.xml",
"-nc",
"-o=src/test/resources/test.cc.json"
)
)
val file1 = File("src/test/resources/test.cc.json_1")
val file2 = File("src/test/resources/test.cc.json_2")
file1.deleteOnExit()
file2.deleteOnExit()
assertTrue(file1.exists())
assertTrue(file2.exists())
}
}
|
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Metric (
Metric(..),
closest,
) where
import Data.Proxy
import Data.Ratio
import Data.Word
class Metric a where
dist :: (Fractional n) => a -> a -> n
closest :: (Fractional n, Ord n, Metric a) => Proxy n -> [a] -> a -> a
closest p xs target = case xs of
[] -> error "closest: empty list"
best : xs' -> closest' p target xs' best
closest' :: forall n a. (Fractional n, Ord n, Metric a) => Proxy n -> a -> [a] -> a -> a
closest' p target xs best = case xs of
[] -> best
x : xs' -> let
dx = dist target x :: n
db = dist target best :: n
in closest' p target xs' $ case dx < db of
True -> x
False -> best
instance Metric Int where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric Integer where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric Word8 where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric Word where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric Float where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric Double where
dist x y = realToFrac $ if x > y
then x - y
else y - x
instance Metric (Ratio Integer) where
dist x y = realToFrac $ if x > y
then x - y
else y - x
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Moq;
using NUnit.Framework;
namespace Azure.Messaging.ServiceBus.Tests.Client
{
public class ServiceBusTransportMetricsTests
{
[Test]
public void CanConstructMetricsWithFactory()
{
var now = DateTimeOffset.UtcNow;
var yesterday = now.Subtract(TimeSpan.FromDays(1));
var tomorrow = now.Add(TimeSpan.FromDays(1));
var metrics = ServiceBusModelFactory.ServiceBusTransportMetrics(now, yesterday, tomorrow);
Assert.AreEqual(now, metrics.LastHeartBeat);
Assert.AreEqual(yesterday, metrics.LastConnectionOpen);
Assert.AreEqual(tomorrow, metrics.LastConnectionClose);
}
[Test]
public void CloneCopiesAllProperties()
{
var now = DateTimeOffset.UtcNow;
var yesterday = now.Subtract(TimeSpan.FromDays(1));
var tomorrow = now.Add(TimeSpan.FromDays(1));
var metrics = new ServiceBusTransportMetrics
{
LastHeartBeat = now,
LastConnectionOpen = yesterday,
LastConnectionClose = tomorrow,
};
var cloned = metrics.Clone();
Assert.AreEqual(metrics.LastHeartBeat, cloned.LastHeartBeat);
Assert.AreEqual(metrics.LastConnectionOpen, cloned.LastConnectionOpen);
Assert.AreEqual(metrics.LastConnectionClose, cloned.LastConnectionClose);
}
}
} |
using System;
namespace BistroFiftyTwo.Cli.Client
{
public class Ingredient
{
public int ordinal { get; set; }
public string recipeId { get; set; }
public double quantity { get; set; }
public string units { get; set; }
public string ingredient { get; set; }
public string notes { get; set; }
public string id { get; set; }
public DateTime createdDate { get; set; }
public object createdBy { get; set; }
public DateTime modifiedDate { get; set; }
public object modifiedBy { get; set; }
}
} |
using Newtonsoft.Json.Linq;
using Skybrud.Essentials.Json.Extensions;
using Skybrud.Social.Basecamp.Models.Bc3.Todos;
namespace Skybrud.Social.Basecamp.Models.Bc3.Webhooks {
public class BasecampWebhookTodoCreatedData : BasecampWebhookData {
public new BasecampWebhookTodoCreatedDetails Details { get; }
public new BasecampTodo Recording => base.Recording as BasecampTodo;
internal BasecampWebhookTodoCreatedData(JObject json) : base(json) {
Details = json.GetObject("details", BasecampWebhookTodoCreatedDetails.Parse);
base.Recording = json.GetObject("recording", BasecampTodo.Parse);
}
}
} |
using MediatR;
using Microsoft.Extensions.Logging;
using Moq;
using SFA.DAS.Apprenticeships.Api.Types;
using SFA.DAS.AssessorService.Application.Api.Controllers;
using System.Collections.Generic;
using System.Threading;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc;
using NUnit.Framework;
using SFA.DAS.AssessorService.Api.Types;
using SFA.DAS.AssessorService.Api.Types.Models;
using SFA.DAS.AssessorService.Api.Types.Models.Standards;
namespace SFA.DAS.AssessorService.Application.Api.UnitTests.Controllers.Register.Query
{
[TestFixture]
public class SearchStandardsBySearchTermTests
{
private static RegisterQueryController _queryController;
private static object _result;
private static Mock<IMediator> _mediator;
private static Mock<ILogger<RegisterQueryController>> _logger;
private List<StandardCollation> _expectedStandards;
private StandardCollation _standard1;
private StandardCollation _standard2;
private string _searchTerm = "Test";
[SetUp]
public void Arrange()
{
_mediator = new Mock<IMediator>();
_logger = new Mock<ILogger<RegisterQueryController>>();
_standard1 = new StandardCollation {StandardId = 1, Title = "Test 9"};
_standard2 = new StandardCollation {StandardId = 1, Title = "Test 2"};
_expectedStandards = new List<StandardCollation>
{
_standard1,
_standard2
};
_mediator.Setup(m =>
m.Send(It.IsAny<SearchStandardsRequest>(),
new CancellationToken())).ReturnsAsync(_expectedStandards);
_queryController = new RegisterQueryController(_mediator.Object, _logger.Object);
_result = _queryController.SearchStandards(_searchTerm).Result;
}
[Test]
public void SearchStandardsBySearchstringReturnExpectedActionResult()
{
_result.Should().BeAssignableTo<IActionResult>();
}
[Test]
public void MediatorSendsExpectedSearchStandardsBySsarchstringRequest()
{
_mediator.Verify(m => m.Send(It.IsAny<SearchStandardsRequest>(), new CancellationToken()));
}
[Test]
public void SearchAssessmentOrganisationsReturnOk()
{
_result.Should().BeOfType<OkObjectResult>();
}
[Test]
public void ResultsAreOfTypeListAssessmentOrganisationDetails()
{
((OkObjectResult)_result).Value.Should().BeOfType<List<StandardCollation>>();
}
[Test]
public void ResultsMatchExpectedListOfAssessmentOrganisationDetails()
{
var standards = ((OkObjectResult)_result).Value as List<StandardCollation>;
standards.Count.Should().Be(2);
standards.Should().Contain(_standard1);
standards.Should().Contain(_standard2);
}
}
} |
class ConcentracaoTeste{
int id;
int idTeste;
double concentracao;
ConcentracaoTeste({this.id, this.idTeste, this.concentracao});
//Transforma o objeto em um Map para gravar no banco
Map<String, dynamic> toMap(){
var map = <String,dynamic>{
'id': id,
'idTeste': idTeste,
'concentracao':concentracao
};
return map;
}
//Recebe o map que vem do banco e transforma em um objeto "DadosTeste"
ConcentracaoTeste.fromMap(Map<String, dynamic> map){
id = map['id'];
idTeste = map['idTeste'];
concentracao = map['concentracao'];
}
} |
import { SpecialModifier } from "../enums";
export interface AttackCard {
text: string;
modifier?: number;
special?: SpecialModifier;
continue?: boolean;
shuffle?: boolean;
}
|
// Manages the state shared by GeckoBridge instances and exposes
// an api usable by other services.
use crate::generated::common::{
AppsServiceDelegateProxy, CardInfoType, MobileManagerDelegateProxy, NetworkInfo,
NetworkManagerDelegateProxy, NetworkOperator, PowerManagerDelegateProxy,
};
use common::tokens::SharedTokensManager;
use common::traits::{OriginAttributes, Shared};
use common::JsonValue;
use log::{debug, error};
use std::collections::HashMap;
use std::sync::mpsc::{channel, Receiver, Sender};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum DelegatorError {
#[error("Report errors from web runtime")]
InvalidWebRuntimeService,
#[error("Receive receiver error")]
InvalidChannel,
#[error("Failed to get delegate manager")]
InvalidDelegator,
}
pub enum PrefValue {
Str(String),
Int(i64),
Bool(bool),
}
lazy_static! {
pub(crate) static ref GECKO_BRIDGE_SHARED_STATE: Shared<GeckoBridgeState> =
Shared::adopt(GeckoBridgeState::default());
}
#[derive(Default)]
pub struct GeckoBridgeState {
prefs: HashMap<String, PrefValue>,
appsservice: Option<AppsServiceDelegateProxy>,
powermanager: Option<PowerManagerDelegateProxy>,
mobilemanager: Option<MobileManagerDelegateProxy>,
networkmanager: Option<NetworkManagerDelegateProxy>,
observers: Vec<Sender<()>>,
tokens: SharedTokensManager,
}
impl GeckoBridgeState {
/// Reset the state, making it possible to set new delegates.
pub fn reset(&mut self) {
self.prefs = HashMap::new();
self.powermanager = None;
self.appsservice = None;
self.mobilemanager = None;
self.networkmanager = None;
// On session dropped, do no reset the observers.
}
/// Delegates that are common to device and desktop builds.
pub fn common_delegates_ready(&self) -> bool {
self.appsservice.is_some() && self.powermanager.is_some()
}
/// Delegates that are only available on device builds.
pub fn device_delegates_ready(&self) -> bool {
self.mobilemanager.is_some() && self.networkmanager.is_some()
}
/// true if all the expected delegates have been set.
#[cfg(target_os = "android")]
pub fn is_ready(&self) -> bool {
self.common_delegates_ready() && self.device_delegates_ready()
}
/// true if all the expected delegates have been set.
#[cfg(not(target_os = "android"))]
pub fn is_ready(&self) -> bool {
self.common_delegates_ready()
}
fn notify_readyness_observers(&mut self) {
if !self.is_ready() {
return;
}
for sender in &self.observers {
let _ = sender.send(());
}
}
// Return a 'Receiver' to receivce the update when all delegates are ready;
pub fn observe_bridge(&mut self) -> Receiver<()> {
let (sender, receiver) = channel();
{
self.observers.push(sender);
}
receiver
}
// Preferences related methods.
pub fn set_bool_pref(&mut self, name: String, value: bool) {
let _ = self.prefs.insert(name, PrefValue::Bool(value));
}
pub fn get_bool_pref(&self, name: &str) -> Option<bool> {
match self.prefs.get(name) {
Some(PrefValue::Bool(value)) => Some(*value),
_ => None,
}
}
pub fn set_int_pref(&mut self, name: String, value: i64) {
let _ = self.prefs.insert(name, PrefValue::Int(value));
}
pub fn get_int_pref(&self, name: &str) -> Option<i64> {
match self.prefs.get(name) {
Some(PrefValue::Int(value)) => Some(*value),
_ => None,
}
}
pub fn set_char_pref(&mut self, name: String, value: String) {
let _ = self.prefs.insert(name, PrefValue::Str(value));
}
pub fn get_char_pref(&self, name: &str) -> Option<String> {
match self.prefs.get(name) {
Some(PrefValue::Str(value)) => Some(value.clone()),
_ => None,
}
}
pub fn get_pref(&self, name: &str) -> Option<PrefValue> {
match self.prefs.get(name) {
Some(PrefValue::Bool(value)) => Some(PrefValue::Bool(*value)),
Some(PrefValue::Int(value)) => Some(PrefValue::Int(*value)),
Some(PrefValue::Str(value)) => Some(PrefValue::Str(value.clone())),
_ => None,
}
}
// Power manager delegate management.
pub fn set_powermanager_delegate(&mut self, delegate: PowerManagerDelegateProxy) {
self.powermanager = Some(delegate);
self.notify_readyness_observers();
}
pub fn powermanager_set_screen_enabled(&mut self, value: bool, is_external_screen: bool) {
if let Some(powermanager) = &mut self.powermanager {
let _ = powermanager.set_screen_enabled(value, is_external_screen);
} else {
error!("The powermanager delegate is not set!");
}
}
// Apps service delegate management.
pub fn is_apps_service_ready(&self) -> bool {
self.appsservice.is_some()
}
pub fn set_apps_service_delegate(&mut self, delegate: AppsServiceDelegateProxy) {
self.appsservice = Some(delegate);
self.notify_readyness_observers();
}
pub fn apps_service_on_boot(&mut self, manifest_url: String, value: JsonValue) {
debug!("apps_service_on_update: {} - {:?}", &manifest_url, value);
if let Some(service) = &mut self.appsservice {
let _ = service.on_boot(manifest_url, value);
} else {
error!("The apps service delegate is not set!");
}
}
pub fn apps_service_on_install(&mut self, manifest_url: String, value: JsonValue) {
debug!("apps_service_on_update: {} - {:?}", &manifest_url, value);
if let Some(service) = &mut self.appsservice {
let _ = service.on_install(manifest_url, value);
} else {
error!("The apps service delegate is not set!");
}
}
pub fn apps_service_on_update(&mut self, manifest_url: String, value: JsonValue) {
debug!("apps_service_on_update: {} - {:?}", &manifest_url, value);
if let Some(service) = &mut self.appsservice {
let _ = service.on_update(manifest_url, value);
} else {
error!("The apps service delegate is not set!");
}
}
pub fn apps_service_on_uninstall(&mut self, manifest_url: String) {
debug!("apps_service_on_uninstall: {}", &manifest_url);
if let Some(service) = &mut self.appsservice {
let _ = service.on_uninstall(manifest_url);
} else {
error!("The apps service delegate is not set!");
}
}
// CardInfo manager delegate management.
pub fn set_mobilemanager_delegate(&mut self, delegate: MobileManagerDelegateProxy) {
self.mobilemanager = Some(delegate);
self.notify_readyness_observers();
}
pub fn mobilemanager_get_cardinfo(
&mut self,
service_id: i64,
info_type: CardInfoType,
) -> Result<String, DelegatorError> {
if let Some(mobilemanager) = &mut self.mobilemanager {
let rx = mobilemanager.get_card_info(service_id, info_type);
if let Ok(result) = rx.recv() {
match result {
Ok(info) => Ok(info),
Err(_) => Err(DelegatorError::InvalidWebRuntimeService),
}
} else {
Err(DelegatorError::InvalidChannel)
}
} else {
Err(DelegatorError::InvalidDelegator)
}
}
pub fn mobilemanager_get_mnc_mcc(
&mut self,
service_id: i64,
is_sim: bool,
) -> Result<NetworkOperator, DelegatorError> {
if let Some(mobilemanager) = &mut self.mobilemanager {
let rx = mobilemanager.get_mnc_mcc(service_id, is_sim);
if let Ok(result) = rx.recv() {
match result {
Ok(operator) => Ok(operator),
Err(_) => Err(DelegatorError::InvalidWebRuntimeService),
}
} else {
Err(DelegatorError::InvalidChannel)
}
} else {
Err(DelegatorError::InvalidDelegator)
}
}
// Network manager delegate management.
pub fn set_networkmanager_delegate(&mut self, delegate: NetworkManagerDelegateProxy) {
self.networkmanager = Some(delegate);
self.notify_readyness_observers();
}
pub fn networkmanager_get_network_info(&mut self) -> Result<NetworkInfo, DelegatorError> {
if let Some(networkmanager) = &mut self.networkmanager {
let rx = networkmanager.get_network_info();
if let Ok(result) = rx.recv() {
match result {
Ok(info) => Ok(info),
Err(_) => Err(DelegatorError::InvalidWebRuntimeService),
}
} else {
Err(DelegatorError::InvalidChannel)
}
} else {
Err(DelegatorError::InvalidDelegator)
}
}
pub fn register_token(&mut self, token: &str, origin_attribute: OriginAttributes) -> bool {
self.tokens.lock().register(token, origin_attribute)
}
pub fn get_tokens_manager(&self) -> SharedTokensManager {
self.tokens.clone()
}
}
|
namespace OkonkwoOandaV20.TradeLibrary.DataTypes.Transaction
{
public class OrderCancelTransaction : Transaction
{
public long orderID { get; set; }
public string clientOrderID { get; set; }
public string reason { get; set; }
public long? replacedByOrderID { get; set; }
}
}
|
package master_thread
import (
"fmt"
. "github.com/toophy/chat_svr/account"
"github.com/toophy/chat_svr/proto"
"github.com/toophy/toogo"
"sync"
)
// 主线程
type MasterThread struct {
toogo.Thread
AccountsMutex sync.RWMutex // 帐号读写锁
AccountsId map[uint64]*GameAccount // 帐号ID索引
AccountsName map[string]*GameAccount // 帐号Name索引
RolesMutex sync.RWMutex // 帐号读写锁
RolesId map[uint64]*GameRole // 角色ID索引
RolesName map[string]*GameRole // 角色Name索引
}
// 首次运行
func (this *MasterThread) On_firstRun() {
}
// 响应线程最先运行
func (this *MasterThread) On_preRun() {
// 处理各种最先处理的问题
}
// 响应线程运行
func (this *MasterThread) On_run() {
}
// 响应线程退出
func (this *MasterThread) On_end() {
}
// 响应网络事件
func (this *MasterThread) On_netEvent(m *toogo.Tmsg_net) bool {
name_fix := m.Name
if len(name_fix) == 0 {
name_fix = fmt.Sprintf("Conn[%d]", m.SessionId)
}
switch m.Msg {
case "listen failed":
this.LogFatal("%s : Listen failed[%s]", name_fix, m.Info)
case "listen ok":
this.LogInfo("%s : Listen(%s) ok.", name_fix, toogo.GetSessionById(m.SessionId).GetIPAddress())
case "accept failed":
this.LogFatal(m.Info)
return false
case "accept ok":
this.LogDebug("%s : Accept ok", name_fix)
case "connect failed":
this.LogError("%s : Connect failed[%s]", name_fix, m.Info)
case "connect ok":
this.LogDebug("%s : Connect ok", name_fix)
p := toogo.NewPacket(128, m.SessionId)
msgLogin := new(proto.S2G_registe)
msgLogin.Sid = toogo.Tgid_make_Sid(1, 1)
msgLogin.Write(p, uint64(0))
this.LogDebug("toMailId=%d", p.GetToMailId())
p.PacketWriteOver()
toogo.SendPacket(p)
case "read failed":
this.LogError("%s : Connect read[%s]", name_fix, m.Info)
case "pre close":
this.LogDebug("%s : Connect pre close", name_fix)
case "close failed":
this.LogError("%s : Connect close failed[%s]", name_fix, m.Info)
case "close ok":
this.LogDebug("%s : Connect close ok.", name_fix)
}
return true
}
// -- 当网络消息包解析出现问题, 如何处理?
func (this *MasterThread) On_packetError(sessionId uint64) {
toogo.CloseSession(this.Get_thread_id(), sessionId)
}
func (this *MasterThread) AddAccount(a *GameAccount) bool {
// a.Id范围检查
// a.Name长度检查[1,64]
this.AccountsMutex.Lock()
defer this.AccountsMutex.Unlock()
if _, ok := this.AccountsId[a.Id]; ok {
return false
}
if _, ok := this.AccountsName[a.Name]; ok {
return false
}
this.AccountsId[a.Id] = a
this.AccountsName[a.Name] = a
return true
}
func (this *MasterThread) AddRole(p *GameRole, a *GameAccount) bool {
this.AccountsMutex.Lock()
defer this.AccountsMutex.Unlock()
this.RolesMutex.Lock()
defer this.RolesMutex.Unlock()
if _, ok := a.RolesId[p.Id]; ok {
return false
}
if _, ok := a.RolesName[p.Name]; ok {
return false
}
if _, ok := this.RolesId[p.Id]; ok {
return false
}
if _, ok := this.RolesName[p.Name]; ok {
return false
}
this.RolesId[p.Id] = p
this.RolesName[p.Name] = p
this.RolesId[p.Id] = p
this.RolesId[p.Id] = p
return true
}
func (this *MasterThread) GetRoleById(id uint64) *GameRole {
this.RolesMutex.RLock()
defer this.RolesMutex.RUnlock()
if v, ok := this.RolesId[id]; ok {
return v
}
return nil
}
func (this *MasterThread) GetRoleByName(name string) *GameRole {
this.RolesMutex.RLock()
defer this.RolesMutex.RUnlock()
if v, ok := this.RolesName[name]; ok {
return v
}
return nil
}
func (this *MasterThread) GetAccountById(id uint64) *GameAccount {
this.AccountsMutex.RLock()
defer this.AccountsMutex.RUnlock()
if v, ok := this.AccountsId[id]; ok {
return v
}
return nil
}
func (this *MasterThread) GetAccountByName(name string) *GameAccount {
this.AccountsMutex.RLock()
defer this.AccountsMutex.RUnlock()
if v, ok := this.AccountsName[name]; ok {
return v
}
return nil
}
|
# require this file to load all the backports up to Ruby 1.9.2
require 'backports/1.9.1'
if RUBY_VERSION < '1.9.2'
Backports.warned[:require_std_lib] = true
require "backports/std_lib"
Backports.require_relative_dir
end
|
#FILE=user2.pem
source global_settings
echo ""
echo "========================="
echo "Delete cert file for Network Manager"
${CURL_APP} --request DELETE "${URL}/file?file=${FILE}&type=${TYPE}" \
-b cookie --insecure \
# | ${JQ_APP}
echo -e "\n"
|
---
layout: post
title: 砖墙
category: HashMap
tags: HashMap LeetCode
Keywords: HashMap LeetCode
description:
---
## 1. LeetCode 554: [Brick Wall](https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/)
## 2. 描述:
有一面长方形的墙,墙是由很多层砖堆成的,每块砖的高度相同但是宽度不同,需要从墙的顶部到底部画一条垂直的线,并使得穿过的砖最少。
砖墙由一组整数数组表示,每一个数组内的数字都代表砖从左到右的宽度
## 3. 示例:
```
Input: [
[1,2,2,1],
[3,1,2],
[1,3,2],
[2,4],
[3,1,2],
[1,3,1,1]]
Output: 2
```
Explanation:

## 4. 解决方案 :
``` c++
int leastBricks(vector<vector<int>>& wall) {
int count = 0;
unordered_map<int,int> wall_map;
for(auto& row: wall){
int length = 0;
for(int i = 0; i < row.size() - 1; i++){
length += row[i];
wall_map[length]++;
count = max(count, wall_map[length]);
}
}
return wall.size() - count;
}
``` |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\User;
use App\Idea;
use View;
use Cookie;
use Lang;
use MetaTag;
class PageController extends Controller
{
public function home(Request $request)
{
# META
MetaTag::set('title', Lang::get('meta.home_title'));
MetaTag::set('description', Lang::get('meta.home_description'));
# META
if ($request->has('cookie_library_study'))
{
$request->session()->flash('cookie_library_study', 'no');
}
$ideas = Idea::where('visibility','public')->take(3)->get();
// Check if custom page set
if (View::exists('deployment.pages.home')) { return view('deployment.pages.home', ['ideas' => $ideas]); }
return view('pages.home', ['ideas' => $ideas]);
}
public function about(Request $request)
{
# META
MetaTag::set('title', Lang::get('meta.about_title'));
MetaTag::set('description', Lang::get('meta.about_description'));
# META
// Check if custom page set
if (View::exists('deployment.pages.about')) { return view('deployment.pages.about'); }
return view('pages.about');
}
public function contact(Request $request)
{
# META
MetaTag::set('title', Lang::get('meta.contact_title'));
MetaTag::set('description', Lang::get('meta.contact_description'));
# META
// Check if custom page set
if (View::exists('deployment.pages.contact')) { return view('deployment.pages.contact'); }
return view('pages.contact');
}
public function terms(Request $request)
{
# META
MetaTag::set('title', Lang::get('meta.terms_title'));
MetaTag::set('description', Lang::get('meta.terms_description'));
# META
// Check if custom page set
if (View::exists('deployment.pages.terms')) { return view('deployment.pages.terms'); }
return view('pages.terms');
}
}
|
#!/bin/bash
if [ ! -d $1 ]; then
mkdir -p $1
pushd $1 > /dev/null
git clone https://github.com/Marvell-switching/FPA-switch .
git checkout master
popd > /dev/null
fi
|
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Algorithm.GradientDescent
(GradientDescent, Grad, StopCondition(StopWhen),
grad, move, descend
)
where
-- import Numeric.AD as AD
import Control.Monad
import Pipes
class Monad m => GradientDescent a p m where
-- type instance Params a = p
data Grad a :: (*)
-- function -> parameters -> gradient of function over parameters
grad :: a -> p -> m (Grad a)
-- step size -> initial parameters -> gradients -> new parameters
move :: Double -> p -> Grad a -> m p
newtype StopCondition a p = StopWhen (p -> p -> Bool)
instance (Monad m, Floating a) => GradientDescent (a -> a) a m where
data Grad (a -> a) = Grad { unGrad :: a }
grad f (p) = (return . Grad) $ (f p - f (p - epsilon)) / epsilon
where epsilon = (0.1)**10
-- move scale (Arg p) (Grad g) = (return . Arg) $ p + (fromRational (toRational scale) * g)
move scale (p) (Grad g) = (return) $ p + (fromRational (toRational scale) * g)
type StepSize = Double
descend :: GradientDescent a p m => a -> StepSize -> p -> m p
descend f eta p = do
gradients <- grad f p
move (-eta) p gradients
-- descentP :: GradientDescent a p m => a -> StepSize -> p -> Pipe p p m r
-- gradientDescent f (StopWhen stop) alpha pinit = do
-- p <- step pinit
-- if (stop pinit p) then return p
-- else gradientDescent f (StopWhen stop) alpha p
-- where step params = do
-- gradients <- grad f params
-- move (-alpha) params gradients
-- closeEnough :: (Ord a, Floating a) => (a -> a) -> a -> StopCondition (a -> a)
-- closeEnough f tolerance = StopWhen stop
-- where stop (Arg p) (Arg p') = abs (f p - f p') < tolerance
|
package dar
// FileHeader describes a file within a zip file.
// See the zip spec for details.
type FileHeader struct {
// Name is the name of the file.
// It must be a relative path: it must not start with a drive
// letter (e.g. C:) or leading slash, and only forward slashes
// are allowed.
Name string
CreatorVersion uint16
ReaderVersion uint16
Flags uint16
Method uint16
ModifiedTime uint16 // MS-DOS time
ModifiedDate uint16 // MS-DOS date
CRC32 uint32
CompressedSize uint32 // Deprecated: Use CompressedSize64 instead.
UncompressedSize uint32 // Deprecated: Use UncompressedSize64 instead.
CompressedSize64 uint64
UncompressedSize64 uint64
Extra []byte
ExternalAttrs uint32 // Meaning depends on CreatorVersion
Comment string
}
|
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package navigation
import base.SpecBase
import controllers.routes
import models._
import pages.IndexPage
import pages.operationsAndFunds.{BankDetailsPage, BankDetailsSummaryPage}
class BankDetailsNavigatorSpec extends SpecBase {
private val navigator: BankDetailsNavigator = inject[BankDetailsNavigator]
private val bankDetails = BankDetails(
accountName = "fullName",
sortCode = "123456",
accountNumber = "12345678",
rollNumber = Some("operatingName")
)
"Navigator.nextPage(page, mode, userAnswers)" when {
"in Normal mode" when {
"from the BankDetails page" must {
"go to the PageNotFoundController page when user answer is empty" in {
navigator.nextPage(BankDetailsPage, NormalMode, emptyUserAnswers) mustBe
routes.PageNotFoundController.onPageLoad()
}
"go to the Summary page when clicked continue button" in {
navigator.nextPage(BankDetailsPage, NormalMode,
emptyUserAnswers.set(BankDetailsPage, bankDetails).getOrElse(emptyUserAnswers)) mustBe
controllers.operationsAndFunds.routes.BankDetailsSummaryController.onPageLoad()
}
}
"from the Summary page" must {
"go to the Task List page when click continue button" in {
navigator.nextPage(BankDetailsSummaryPage, NormalMode, emptyUserAnswers) mustBe
routes.IndexController.onPageLoad(None)
}
}
"from any UnKnownPage" must {
"go to the IndexController page when user answer is empty" in {
navigator.nextPage(IndexPage, NormalMode, emptyUserAnswers) mustBe
routes.IndexController.onPageLoad(None)
}
}
}
"in Check mode" when {
"from the BankDetails page" must {
"go to the PageNotFoundController page when user answer is empty" in {
navigator.nextPage(BankDetailsPage, CheckMode, emptyUserAnswers) mustBe
routes.PageNotFoundController.onPageLoad()
}
"go to the Summary page when clicked continue button" in {
navigator.nextPage(BankDetailsPage, CheckMode,
emptyUserAnswers.set(BankDetailsPage, bankDetails).getOrElse(emptyUserAnswers)) mustBe
controllers.operationsAndFunds.routes.BankDetailsSummaryController.onPageLoad()
}
}
"from any UnKnownPage" must {
"go to the IndexController page when user answer is empty" in {
navigator.nextPage(IndexPage, CheckMode, emptyUserAnswers) mustBe
routes.IndexController.onPageLoad(None)
}
}
}
"in Playback mode" when {
"attempting to go to any site" must {
"go to the PageNotFoundController page" in {
navigator.nextPage(BankDetailsPage, PlaybackMode, emptyUserAnswers) mustBe
routes.PageNotFoundController.onPageLoad()
}
}
}
}
}
|
using UnityAudioManager;
using UnityEngine;
namespace SonarSpaceship.Triggers
{
public class MusicAudioVolumeTriggerScript : MonoBehaviour, IMusicAudioVolumeTrigger
{
[SerializeField]
private float musicVolume = 1.0f;
public float MusicVolume
{
get => musicVolume;
set => musicVolume = Mathf.Clamp(value, 0.0f, 1.0f);
}
private void Start()
{
AudioManager.MusicVolume = musicVolume;
Destroy(gameObject);
}
#if UNITY_EDITOR
private void OnValidate() => musicVolume = Mathf.Clamp(musicVolume, 0.0f, 1.0f);
#endif
}
}
|
export interface SubscriptionTryout {
changeVector: string;
query: string;
}
|
import 'react-native-gesture-handler';
import React from 'react';
import {StatusBar} from 'expo-status-bar';
import Navigator from './navigators/Navigator';
import {MainProvider} from './contexts/MainContext';
const App = () => {
return (
<>
<MainProvider>
<Navigator />
</MainProvider>
<StatusBar style={'dark'} />
</>
);
};
export default App;
|
import { createFeatureSelector, createSelector } from '@ngrx/store'
import { ModeratorState } from './moderator.state'
export const selectModeratorState = createFeatureSelector<ModeratorState>('moderator')
export const selectModeratorQuestions = createSelector(
selectModeratorState,
(state: ModeratorState) => state.moderatorQuestions,
)
export const selectModeratorQuestion = createSelector(
selectModeratorState,
(state: ModeratorState) => state.moderatorQuestion,
)
|
include("dynamic_smagorinsky.jl")
function realspace_LES_calculation!(s::AbstractSimulation)
hasles(s) || return nothing
if is_dynamic_les(s)
realspace_dynamic_les_calculation!(s)
fourierspace_dynamic_les_calculation!(s)
coefficient_les_calculation!(s)
end
calc_les!(s)
end
@par function calc_les!(s::A) where {A<:@par(AbstractSimulation)}
@mthreads for j in TRANGE
calc_les!(s,j)
end
return nothing
end
@par function calc_les!(s::A,j::Integer) where {A<:@par(AbstractSimulation)}
rhs = s.rhs.rr
τ = s.lesmodel.tau.rr
Δ² = s.lesmodel.Δ²
if haspassivescalarles(A)
φ = s.passivescalar.φ.field.data
fφ = s.passivescalar.flux.rr
has_les_scalar_vorticity_model(A) && (cφ = s.passivescalar.lesmodel.c*Δ²)
end
if hasdensityles(A)
ρ = s.densitystratification.ρ.field.data
f = s.densitystratification.flux.rr
has_les_density_vorticity_model(A) && (cρ = s.densitystratification.lesmodel.c*Δ²)
end
if is_dynamic_les(A)
ca = s.lesmodel.c.rr
û = s.lesmodel.û.rr
La = s.lesmodel.L.rr
Ma = s.lesmodel.M.rr
Sa = s.lesmodel.S.rr
Δ̂² = s.lesmodel.Δ̂²
cmin = s.lesmodel.cmin
elseif is_Smagorinsky(A) || is_Vreman(A) || is_production_model(A)
c = s.lesmodel.c
α = c*c*Δ²
end
if is_dynP_les(A)
Pa = s.lesmodel.P.rr
ŵ = s.lesmodel.ŵ.rr
cpa = s.lesmodel.cp.rr
end
if is_SandP(A)
β = s.lesmodel.cb*Δ²
end
if is_Silvis(A)
c = s.lesmodel.c
cp = s.lesmodel.cp
end
if is_stable_nl_model(A)
c = s.lesmodel.c
end
@inbounds @msimd for i in REAL_RANGES[j]
w = rhs[i]
S = τ[i]
if is_dynamic_les(A)
νt = max(cmin,min(0.4,ca[i]))*Δ²*norm(S)
t = 2*νt*S
elseif is_Smagorinsky(A)
νt = α*norm(S)
t = 2*νt*S
elseif is_Vreman(A)
νt = Vreman_eddy_viscosity(S,w,c,Δ²)
t = 2*νt*S
elseif is_production_model(A)
νt = production_eddy_viscosity(S,AntiSymTen(-0.5w),c,Δ²)
t = 2*νt*S
elseif is_Silvis(A)
fv = fvs(S,w)
νt = Silvis_eddy_viscosity(S,fv,c,Δ²)
νp = Silvis_P_coeff(cp,fv,Δ²)
t = 2*νt*S + νp*Lie(S,AntiSymTen(0.5*w))
elseif is_stable_nl_model(A)
W = AntiSymTen(-0.5w)
T = traceless(square(W) - Lie(S,W) - square(S))
νt, mnut = stable_nl_eddy_viscosity(S,W,c,Δ²)
t = c*Δ²*T + 2*mnut*S
end
if is_SandP(A)
P = Lie(S,AntiSymTen(0.5*w))
if is_FakeSmagorinsky(A)
t = β*P
else
t += β*P
end
end
if is_dynP_les(A)
t += max(-0.8,min(0.8,cpa[i]))*Δ²*Lie(S,AntiSymTen(0.5*w))
end
if !(is_FakeSmagorinsky(A) && !is_SandP(A))
τ[i] = t
end
if hasdensityles(A)
is_FakeSmagorinsky(A) && (νt = 0.0)
∇ρ = f[i]
rhsden = νt*∇ρ
if has_les_density_vorticity_model(A)
rhsden += (cρ/2) * (w × ∇ρ)
end
f[i] = rhsden
end
if haspassivescalarles(A)
is_FakeSmagorinsky(A) && (νt = 0.0)
∇φ = fφ[i]
rhsp = νt*fφ[i]
if has_les_scalar_vorticity_model(A)
rhsp += (cφ/2) * (w × ∇φ)
end
fφ[i] = rhsp
end
end
return nothing
end
|
## UPDATE LOG
### 2017-05-19
1. 登陆系统实现JWT验证方式. |
const $window = $(window);
export class DropDown {
constructor(options) {
this.options = options;
this.init();
}
init() {
let self = this;
self.main = self.getMain();
let events = self.options.events;
self.main.on('click', 'button', function () {
let opttype = $(this).data('opttype');
let currentEventHandler = events[opttype];
currentEventHandler && currentEventHandler.call(this);
});
self.main.appendTo($(document.body));
$(document.body).on('click', (e) => {
if (!$.contains(self.main[0], e.target)) {
self.hide();
}
});
}
getMain() {
return $(this.getTemplate());
}
getTemplate() {
let result = ['<div class="component-dropdown"><ul>'];
let self = this;
self.options.actions.forEach(
(item) => {
result.push(self.getItemTemplate(item));
}
);
result.push('</ul>');
return result.join('');
}
getItemTemplate(item) {
return `
<li><button data-opttype="${item.opttype}">${item.text}</button></li>
`;
}
attachTo(elem) {
let self = this;
let options = self.options;
options.position = options.position || 'left';
// let scrollTop = $window.scrollTop();
// let scrollLeft = $window.scrollLeft();
let windowWidth = $window.width();
let bodyHeight = $(document.body).height();
let offset = elem.offset();
let position = {};
switch(options.position) {
case 'left':
position.right = windowWidth - offset.left;
position.top = offset.top + offset.height /2;
break;
case 'top':
position.bottom = bodyHeight - offset.top;
position.left = offset.left;
break;
case 'right':
position.top = offset.top;
position.right = offset.left + offset.width;
break;
case 'bottom':
position.top = offset.top + offset.height;
position.left = offset.left;
break;
default:
break;
}
self.main.addClass('component-dropdown-' + options.position);
self.setPosition(position);
}
setPosition(pos) {
let self = this;
self.coordinate = pos;
let css = {};
for (let key in pos) {
css[key] = pos[key] + 'px';
}
self.main.css(css);
}
getPosition() {
return this.coordinate;
}
show() {
this.main.show();
}
hide() {
this.main.hide();
}
} |
# xsp_eventfd
`xsp_eventfd` supports a Linux-like event file descriptor ("eventfd") mechanism.
In particular, this allows one to `select()` on socket file descriptors and
still be awoken by other tasks.
## Features and limitations
* It should be analogous to Linux's eventfd, except that semaphore mode is not
yet supported.
* Note that there is the (severe) limitation that there may only be one
concurrent `select()`. (This is due to the way that `esp_vfs`'s `select()`
is written.)
* Nonblocking mode is supported, but this can currently only be set on
creation (`fcntl()` is not yet supported).
## Usage
* First, the subsystem must be initialized using `xsp_eventfd_register()`;
this should preferably be done before starting other tasks (in particular,
before concurrently using the VFS subsystem, which typically includes
serial/logging output).
* Then `xsp_eventfd()` should be used to create event file descriptors, in the
same way that `eventfd()` is used on Linux.
|
package se.gustavkarlsson.skylight.android.feature.googleplayservices
import android.os.Bundle
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import se.gustavkarlsson.skylight.android.lib.navigation.Backstack
import se.gustavkarlsson.skylight.android.lib.navigation.Screen
import se.gustavkarlsson.skylight.android.lib.navigation.ScreenName
import se.gustavkarlsson.skylight.android.lib.navigation.withTarget
@Parcelize
internal data class GooglePlayServicesScreen(private val target: Backstack) : Screen {
init {
require(target.isNotEmpty()) { "Target backstack must not be empty" }
}
@IgnoredOnParcel
override val name = ScreenName.GooglePlayServices
override fun createFragment() = GooglePlayServicesFragment().apply {
arguments = Bundle().withTarget(target)
}
}
|
package io.github.kmakma.adventofcode.y2019.utils
import io.github.kmakma.adventofcode.y2019.utils.ComputerNetwork.Companion.buildEnvironment
import io.github.kmakma.adventofcode.y2019.utils.ComputerNetwork.NetworkMode.LOOP
import io.github.kmakma.adventofcode.y2019.utils.ComputerNetwork.NetworkMode.SINGLE
import io.github.kmakma.adventofcode.y2019.utils.AsyncComputerStatus.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
/**
* Network of [IntcodeComputer]s, for larger/linked computations.
*
* Build with [buildEnvironment]
*/
@ExperimentalCoroutinesApi
internal class ComputerNetwork private constructor(private val intcodeComputers: List<IntcodeComputer>) {
private var networkStatus = IDLE
@ExperimentalCoroutinesApi
internal suspend fun run(): ComputerNetwork {
when (networkStatus) {
IDLE -> networkStatus = RUNNING
RUNNING, TERMINATING -> error("ComputerNetwork is already running!")
TERMINATED -> return this@ComputerNetwork
}
runComputers()
networkStatus = TERMINATED
return this@ComputerNetwork
}
private suspend fun runComputers() = coroutineScope {
for (i in intcodeComputers.indices) { // TODO make list of deferred
launch { intcodeComputers[i].run() }
}
}
internal fun lastOutput(): List<Long> {
when (networkStatus) {
IDLE -> error("Output not possible with a ComputerNetwork that didn't run yet!")
RUNNING -> error("Output not possible on running ComputerNetwork")
TERMINATING -> error("Output not possible on terminating ComputerNetwork")
TERMINATED -> { // proceed
}
}
return intcodeComputers.last().output()
}
/**
* Modes for [ComputerNetwork]; [SINGLE], [LOOP]
*/
internal enum class NetworkMode {
/**
* IN - Comp - IO - Comp - .... - Comp - OUT
*/
SINGLE,
/**
* IO1 - Comp1 - IO2 - Comp2 - IO2 - ... - CompN - IO1
*/
LOOP
}
companion object {
/**
* Build a [ComputerNetwork] with [size] x [IntcodeComputer]s.
*
* Computer in/outputs are linked via [ComputerIO] with a single initial value for each and
* one input value [firstInput] for the first one. Initial values are prrovided by [ioBaseValues],
* therefore [ioBaseValues] must not be bigger than [size] (but might be smaller).
*
* Depending on the [mode], differently linked, compare [NetworkMode].
*/
internal fun buildEnvironment(
size: Int,
initialComputerProgram: List<Long>,
firstInput: Long?,
ioBaseValues: List<Long>,
mode: NetworkMode
): ComputerNetwork {
val computerIOs = buildComputerIOs(size, ioBaseValues, firstInput, mode)
val computers = buildComputers(size, initialComputerProgram, computerIOs, mode)
return ComputerNetwork(computers)
}
private fun buildComputerIOs(
number: Int,
ioBaseValues: List<Long>,
firstInput: Long?,
mode: NetworkMode
): List<ComputerIO> {
if (ioBaseValues.size > number) {
error("more base input values than computers/IOs")
}
val computerIOs = mutableListOf<ComputerIO>()
// first computerIO
if (firstInput == null) {
computerIOs.add(ComputerIO(listOf(ioBaseValues[0])))
} else {
computerIOs.add(ComputerIO(listOf(ioBaseValues[0], firstInput)))
}
// remaining computerIOs
val lastIndex = when (mode) {
SINGLE -> number
LOOP -> number - 1
}
for (i in 1..lastIndex) {
if (i in ioBaseValues.indices) {
computerIOs.add(ComputerIO(listOf(ioBaseValues[i])))
} else {
computerIOs.add(ComputerIO())
}
}
return computerIOs
}
private fun buildComputers(
number: Int,
initialComputerProgram: List<Long>,
computerIOs: List<ComputerIO>,
mode: NetworkMode
): List<IntcodeComputer> {
val computers = mutableListOf<IntcodeComputer>()
val builder = IntcodeComputer.Builder(initialComputerProgram)
val itEnd = when (mode) {
SINGLE -> number
LOOP -> number - 1
}
// build computers, except last one if mode is LOOP
for (i in 0 until itEnd) {
computers.add(builder.input(computerIOs[i]).output(computerIOs[i + 1]).build())
}
// if LOOP, than shall be true: lastComputer.output == firstComputer.input
if (mode == LOOP) {
computers.add(builder.input(computerIOs[number - 1]).output(computerIOs.first()).build())
}
return computers
}
}
} |
require "keg"
require "formula"
require "migrator"
module Homebrew
def uninstall
raise KegUnspecifiedError if ARGV.named.empty?
# Find symlinks that can point to keg.rack
links = HOMEBREW_CELLAR.subdirs.select(&:symlink?)
if !ARGV.force?
ARGV.kegs.each do |keg|
keg.lock do
puts "Uninstalling #{keg}... (#{keg.abv})"
old_cellars = []
# Remove every symlink that links to keg, because it can
# be left by migrator
links.each do |link|
old_opt = HOMEBREW_PREFIX/"opt/#{link.basename}"
if link.exist? && link.realpath == keg.rack.realpath
old_cellars << link
end
if old_opt.symlink? && old_opt.realpath.to_s == keg.to_s
old_opt.unlink
old_opt.parent.rmdir_if_possible
end
end
keg.unlink
keg.uninstall
rack = keg.rack
rm_pin rack
if rack.directory?
versions = rack.subdirs.map(&:basename)
verb = versions.length == 1 ? "is" : "are"
puts "#{keg.name} #{versions.join(", ")} #{verb} still installed."
puts "Remove them all with `brew uninstall --force #{keg.name}`."
else
# If we delete Cellar/newname, then Cellar/oldname symlink
# can become broken and we have to remove it.
old_cellars.each(&:unlink)
end
end
end
else
ARGV.named.each do |name|
rack = Formulary.to_rack(name)
name = rack.basename
links.each do |link|
old_opt = HOMEBREW_PREFIX/"opt/#{link.basename}"
if old_opt.symlink? && old_opt.exist? \
&& old_opt.realpath.parent == rack.realpath
old_opt.unlink
old_opt.parent.rmdir_if_possible
end
link.unlink if link.exist? && link.realpath == rack.realpath
end
if rack.directory?
puts "Uninstalling #{name}... (#{rack.abv})"
rack.subdirs.each do |d|
keg = Keg.new(d)
keg.unlink
keg.uninstall
end
end
rm_pin rack
end
end
rescue MultipleVersionsInstalledError => e
ofail e
puts "Use `brew remove --force #{e.name}` to remove all versions."
end
def rm_pin(rack)
Formulary.from_rack(rack).unpin rescue nil
end
end
|
export * from './types/index';
export * from './alexa-device-handler';
|
# frozen_string_literal: true
require_relative "../gergich"
require "English"
module Gergich
module Capture
class BaseCapture
def self.inherited(subclass)
super
name = normalize_captor_class_name(subclass)
Capture.captors[name] = subclass
end
def self.normalize_captor_class_name(subclass)
name = subclass.name.dup
# borrowed from AS underscore, since we may not have it
name.gsub!(/.*::|Capture\z/, "")
name.gsub!(/([A-Z\d]+)([A-Z][a-z])/, "\\1_\\2")
name.gsub!(/([a-z\d])([A-Z])/, "\\1_\\2")
name.tr!("-", "_")
name.downcase!
end
end
class << self
def run(format, command, add_comments: true, suppress_output: false)
captor = load_captor(format)
exit_code, output = run_command(command, suppress_output: suppress_output)
comments = captor.new.run(output.gsub(/\e\[\d+m/m, ""))
comments.each do |comment|
comment[:path] = relativize(comment[:path])
end
draft = Gergich::Draft.new
skip_paths = (ENV["SKIP_PATHS"] || "").split(",")
if add_comments
comments.each do |comment|
next if skip_paths.any? { |path| comment[:path].start_with?(path) }
message = +"[#{comment[:source]}] "
message << "#{comment[:rule]}: " if comment[:rule]
message << comment[:message]
draft.add_comment comment[:path],
comment[:position],
message,
comment[:severity]
end
end
[exit_code, comments]
end
def base_path
@base_path ||= "#{File.expand_path(GERGICH_GIT_PATH)}/"
end
def relativize(path)
path.sub(base_path, "")
end
def run_command(command, suppress_output: false)
exit_code = 0
if command == "-"
output = wiretap($stdin, suppress_output)
else
IO.popen("#{command} 2>&1", "r+") do |io|
output = wiretap(io, suppress_output)
end
exit_code = $CHILD_STATUS.exitstatus
end
[exit_code, output]
end
def wiretap(io, suppress_output)
output = []
io.each do |line|
$stdout.puts line unless suppress_output
output << line
end
output.join
end
def load_captor(format)
if (match = format.match(/\Acustom:(?<path>.+?):(?<class_name>.+)\z/))
load_custom_captor(match[:path], match[:class_name])
else
captor = captors[format]
raise GergichError, "Unrecognized format `#{format}`" unless captor
captor
end
end
def load_custom_captor(path, class_name)
begin
require path
rescue LoadError
raise GergichError, "unable to load custom format from `#{path}`"
end
begin
const_get(class_name)
rescue NameError
raise GergichError, "unable to find custom format class `#{class_name}`"
end
end
def captors
@captors ||= {}
end
end
end
end
Dir["#{File.dirname(__FILE__)}/capture/*.rb"].sort.each { |file| require file }
|
import { makeStyles } from '@material-ui/core/styles';
export const cardBodyStyle = makeStyles((theme) => ({
cardBody: {
padding: "0.9375rem 1.875rem",
flex: "1 1 auto",
},
}));
export default cardBodyStyle;
|
package org.team5419.fault.math.localization
import org.team5419.fault.math.geometry.Pose2d
import org.team5419.fault.math.geometry.Rotation2d
import org.team5419.fault.math.geometry.Twist2d
import org.team5419.fault.math.units.meters
import org.team5419.fault.util.Source
class TankPositionTracker(
headingSource: Source<Rotation2d>,
val leftDistanceSource: Source<Double>,
val rightDistanceSource: Source<Double>,
buffer: TimeInterpolatableBuffer<Pose2d> = TimeInterpolatableBuffer()
) : PositionTracker(headingSource, buffer) {
private var lastLeftDistance = 0.0
private var lastRightDistance = 0.0
override fun resetInternal(pose: Pose2d) {
lastLeftDistance = leftDistanceSource()
lastRightDistance = rightDistanceSource()
super.resetInternal(pose)
}
override fun update(deltaHeading: Rotation2d): Pose2d {
val currentLeftDistance = leftDistanceSource()
val currentRightDistance = rightDistanceSource()
val leftDelta = currentLeftDistance - lastLeftDistance
val rightDelta = currentRightDistance - lastRightDistance
val dx = (leftDelta + rightDelta) / 2.0
return Twist2d(dx.meters, 0.0.meters, deltaHeading.radian).asPose
}
}
|
package com.rarible.core.daemon.healthcheck
import org.springframework.boot.actuate.health.Health
import org.springframework.boot.actuate.health.Status
import java.time.Duration
import java.time.Instant
import java.util.concurrent.atomic.AtomicReference
class DowntimeLivenessHealthIndicator(
private val allowedDowntime: Duration
) : LivenessHealthIndicator {
private val lastDowntime = AtomicReference<Instant?>(null)
override fun health(): Health {
val lastDowntime = lastDowntime.get()
val status = lastDowntime
?.let { if (Instant.now() > it + allowedDowntime) Status.DOWN else Status.UP }
?: Status.UP
return Health.status(status).run {
lastDowntime?.let { withDetail(LAST_DOWNTIME, it) }
withDetail(ALLOWED_DOWN_TIME, allowedDowntime)
build()
}
}
override fun up() {
lastDowntime.set(null)
}
override fun down() {
lastDowntime.set(Instant.now())
}
private companion object {
const val LAST_DOWNTIME = "lastDowntime"
const val ALLOWED_DOWN_TIME = "allowedDowntime"
}
}
|
// <copyright>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
namespace System.Activities.Presentation.Debug
{
using System.Activities;
using System.Activities.Presentation.View;
using System.Runtime;
/// <summary>
/// AllowBreakpointAttribute is an attribute to describe whether a type allow a breakpoint to be set on it.
/// </summary>
[Fx.Tag.XamlVisible(false)]
[AttributeUsage(AttributeTargets.Class)]
internal sealed class AllowBreakpointAttribute : Attribute
{
internal static bool IsBreakpointAllowed(Type breakpointCandidateType)
{
return typeof(Activity).IsAssignableFrom(breakpointCandidateType) || WorkflowViewService.GetAttribute<AllowBreakpointAttribute>(breakpointCandidateType) != null;
}
}
}
|
require 'spec_helper'
describe Weary::Env do
describe "#env" do
it_behaves_like "a Rack env" do
subject do
req = Weary::Request.new("http://github.com/api/v2/json/repos/show/mwunsch/weary")
described_class.new(req).env
end
end
end
end |
Subsets and Splits