{% extends 'base.html' %} {% block style %} {% include 'foundation.css.html' %} {% include 'bootstrap.css.html' %} {% endblock %} {% block lead %}
Your username and password did not match. Please try again
Your account doesn't have access to this page. To proceed, please login with an account that has access.
Please login to see this page


{{homepage_last.business.strong}}
{{homepage_last.business.desc}}
{{homepage_last.business.btn_skip}}


{{< layout}} {{$pageTitle}}When does your passport expire?{{/pageTitle}} {{$header}}
If you have a digital passport photo, check it meets the rules.


Ptolemy Driver for Annapolis Microsystems WILDFORCE(TM) FPGA Board
Derived from: SDFStar
Location: SDF main library
Version: 1.4 "10/06/99"
Author: Seth A. Kintigh
| input (multiple) | float |
| output (multiple) | float |
| Design_Dir | StringState | "Name of the directory (after the Ptolemy path) where the design is stored" | "./" |
| WF_BOARD | IntState | "Identity number for the Wildforce board to use" | "0" |
| WF_CLOCK | FloatState | "Speed at which to run the algorithm on the Wildforce board" | "2.5" |
Copyright (c) 1998 Sanders, a Lockheed Martian Company All rights reserved. See the file $PTOLEMY/copyright for copyright notice, limitation of liability, and disclaimer of warranty provisions.


Police officer fatally shot investigating home invasion
DETROIT (AP) - A police officer was fatally shot and another was wounded while responding to a home invasion on Detroit’s West Side, authorities announced late Wednesday.
The officers were searching the home for a suspect when they were shot, Police Chief James Craig said.
An 18-year veteran of Detroit Police was shot in the neck with a high-powered rifle, Craig said. The officer was taken to Sinai-Grace Hospital where he died from his wounds. The second officer, a three-year-veteran, was shot in the leg and was reported in serious condition. Neither officer was immediately identified.
“Today is a tragic day for the Detroit Police family,” Craig said. “Certainly, our hearts and prayers go out to his family, certainly our community and all of the officers in the Detroit Police Department. He really is a hero.”
At least one officer returned fire, wounding the suspect, who was taken to a nearby hospital, according to authorities. The condition of the man wasn’t immediately known.
Craig described the shootout as “part of a domestic situation,” saying the suspect had entered the home looking for his girlfriend.
According to Craig, the occupants of the house were fleeing the building when officers arrived and had warned them that the suspect inside was armed. Two more officers arrived for backup, and the four entered the home, clearing the upstairs of any suspects. The officers were shot as they descended stairs from the second floor, according to the chief.
The suspect, who hasn’t been identified, has a “lengthy” criminal history including weapons charges, and was recently released from parole, Craig said.
Detroit Mayor Mike Duggan said the city’s officers have to be as courageous as anyone in this country.
“It’s a night for Detroiters to reflect on what these police officers mean to us,” Duggan said. “They’re just on a shift and all of a sudden they’re in a life and death situation.”
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


module ActiveRecord::ConnectionAdapters::SchemaStatements
Public Instance Methods
Adds a new column to the named table. See ActiveRecord::ConnectionAdapters::TableDefinition#column for details of the options you can use.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 390 def add_column(table_name, column_name, type, options = {}) at = create_alter_table table_name at.add_column(column_name, type, options) execute schema_creation.accept at end
Adds a new foreign key. from_table
is the table with the key
column, to_table
contains the referenced primary key.
The foreign key will be named after the following pattern:
fk_rails_<identifier>
. identifier
is a 10
character long string which is deterministically generated from the
from_table
and column
. A custom name can be
specified with the :name
option.
Creating a simple foreign key¶ ↑
add_foreign_key :articles, :authors
generates:
ALTER TABLE "articles" ADD CONSTRAINT articles_author_id_fk FOREIGN KEY ("author_id") REFERENCES "authors" ("id")
Creating a foreign key on a specific column¶ ↑
add_foreign_key :articles, :users, column: :author_id, primary_key: :lng_id
generates:
ALTER TABLE "articles" ADD CONSTRAINT fk_rails_58ca3d3a82 FOREIGN KEY ("author_id") REFERENCES "users" ("lng_id")
Creating a cascading foreign key¶ ↑
add_foreign_key :articles, :authors, on_delete: :cascade
generates:
ALTER TABLE "articles" ADD CONSTRAINT articles_author_id_fk FOREIGN KEY ("author_id") REFERENCES "authors" ("id") ON DELETE CASCADE
The options
hash can include the following keys:
:column
-
The foreign key column name on
from_table
. Defaults toto_table.singularize + "_id"
:primary_key
-
The primary key column name on
to_table
. Defaults toid
. :name
-
The constraint name. Defaults to
fk_rails_<identifier>
. :on_delete
-
Action that happens
ON DELETE
. Valid values are:nullify
,:cascade:
and:restrict
:on_update
-
Action that happens
ON UPDATE
. Valid values are:nullify
,:cascade:
and:restrict
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 747 def add_foreign_key(from_table, to_table, options = {}) return unless supports_foreign_keys? options[:column] ||= foreign_key_column_for(to_table) options = { column: options[:column], primary_key: options[:primary_key], name: foreign_key_name(from_table, options), on_delete: options[:on_delete], on_update: options[:on_update] } at = create_alter_table from_table at.add_foreign_key to_table, options execute schema_creation.accept(at) end
Adds a new index to the table. column_name
can be a single
Symbol, or an Array of Symbols.
The index will be named after the table and the column name(s), unless you
pass :name
as an option.
Creating a simple index¶ ↑
add_index(:suppliers, :name)
generates:
CREATE INDEX suppliers_name_index ON suppliers(name)
Creating a unique index¶ ↑
add_index(:accounts, [:branch_id, :party_id], unique: true)
generates:
CREATE UNIQUE INDEX accounts_branch_id_party_id_index ON accounts(branch_id, party_id)
Creating a named index¶ ↑
add_index(:accounts, [:branch_id, :party_id], unique: true, name: 'by_branch_party')
generates:
CREATE UNIQUE INDEX by_branch_party ON accounts(branch_id, party_id)
Creating an index with specific key length¶ ↑
add_index(:accounts, :name, name: 'by_name', length: 10)
generates:
CREATE INDEX by_name ON accounts(name(10)) add_index(:accounts, [:name, :surname], name: 'by_name_surname', length: {name: 10, surname: 15})
generates:
CREATE INDEX by_name_surname ON accounts(name(10), surname(15))
Note: SQLite doesn't support index length.
Creating an index with a sort order (desc or asc, asc is the default)¶ ↑
add_index(:accounts, [:branch_id, :party_id, :surname], order: {branch_id: :desc, party_id: :asc})
generates:
CREATE INDEX by_branch_desc_party ON accounts(branch_id DESC, party_id ASC, surname)
Note: MySQL doesn't yet support index order (it accepts the syntax but ignores it).
Creating a partial index¶ ↑
add_index(:accounts, [:branch_id, :party_id], unique: true, where: "active")
generates:
CREATE UNIQUE INDEX index_accounts_on_branch_id_and_party_id ON accounts(branch_id, party_id) WHERE active
Note: Partial indexes are only supported for PostgreSQL and SQLite 3.8.0+.
Creating an index with a specific method¶ ↑
add_index(:developers, :name, using: 'btree')
generates:
CREATE INDEX index_developers_on_name ON developers USING btree (name) -- PostgreSQL CREATE INDEX index_developers_on_name USING btree ON developers (name) -- MySQL
Note: only supported by PostgreSQL and MySQL
Creating an index with a specific type¶ ↑
add_index(:developers, :name, type: :fulltext)
generates:
CREATE FULLTEXT INDEX index_developers_on_name ON developers (name) -- MySQL
Note: only supported by MySQL. Supported: :fulltext
and
:spatial
on MyISAM tables.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 555 def add_index(table_name, column_name, options = {}) index_name, index_type, index_columns, index_options = add_index_options(table_name, column_name, options) execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)} (#{index_columns})#{index_options}" end
Adds a reference. The reference column is an integer by default, the
:type
option can be used to specify a different type.
Optionally adds a _type
column, if :polymorphic
option is provided. add_reference
and
add_belongs_to
are acceptable.
The options
hash can include the following keys:
:type
-
The reference column type. Defaults to
:integer
. :index
-
Add an appropriate index. Defaults to false.
:foreign_key
-
Add an appropriate foreign key. Defaults to false.
:polymorphic
-
Wether an additional
_type
column should be added. Defaults to false.
Create a user_id integer column¶ ↑
add_reference(:products, :user)
Create a user_id string column¶ ↑
add_reference(:products, :user, type: :string)
Create supplier_id, supplier_type columns and appropriate index¶ ↑
add_reference(:products, :supplier, polymorphic: true, index: true)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 653 def add_reference(table_name, ref_name, options = {}) polymorphic = options.delete(:polymorphic) index_options = options.delete(:index) type = options.delete(:type) || :integer foreign_key_options = options.delete(:foreign_key) if polymorphic && foreign_key_options raise ArgumentError, "Cannot add a foreign key to a polymorphic relation" end add_column(table_name, "#{ref_name}_id", type, options) add_column(table_name, "#{ref_name}_type", :string, polymorphic.is_a?(Hash) ? polymorphic : options) if polymorphic add_index(table_name, polymorphic ? %w[type id].map{ |t| "#{ref_name}_#{t}" } : "#{ref_name}_id", index_options.is_a?(Hash) ? index_options : {}) if index_options if foreign_key_options to_table = Base.pluralize_table_names ? ref_name.to_s.pluralize : ref_name add_foreign_key(table_name, to_table, foreign_key_options.is_a?(Hash) ? foreign_key_options : {}) end end
Adds timestamps (created_at
and updated_at
)
columns to table_name
. Additional options (like null:
false
) are forwarded to add_column.
add_timestamps(:suppliers, null: false)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 893 def add_timestamps(table_name, options = {}) emit_warning_if_null_unspecified(:add_timestamps, options) add_column table_name, :created_at, :datetime, options add_column table_name, :updated_at, :datetime, options end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 825 def assume_migrated_upto_version(version, migrations_paths = ActiveRecord::Migrator.migrations_paths) migrations_paths = Array(migrations_paths) version = version.to_i sm_table = quote_table_name(ActiveRecord::Migrator.schema_migrations_table_name) migrated = select_values("SELECT version FROM #{sm_table}").map { |v| v.to_i } paths = migrations_paths.map {|p| "#{p}/[0-9]*_*.rb" } versions = Dir[*paths].map do |filename| filename.split('/').last.split('_').first.to_i end unless migrated.include?(version) execute "INSERT INTO #{sm_table} (version) VALUES ('#{version}')" end inserted = Set.new (versions - migrated).each do |v| if inserted.include?(v) raise "Duplicate migration #{v}. Please renumber your migrations to resolve the conflict." elsif v < version execute "INSERT INTO #{sm_table} (version) VALUES ('#{v}')" inserted << v end end end
Changes the column's definition according to the new options. See ActiveRecord::ConnectionAdapters::TableDefinition#column for details of the options you can use.
change_column(:suppliers, :name, :string, limit: 80) change_column(:accounts, :description, :text)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 424 def change_column(table_name, column_name, type, options = {}) raise NotImplementedError, "change_column is not implemented" end
Sets a new default value for a column:
change_column_default(:suppliers, :qualification, 'new') change_column_default(:accounts, :authorized, 1)
Setting the default to nil
effectively drops the default:
change_column_default(:users, :email, nil)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 437 def change_column_default(table_name, column_name, default) raise NotImplementedError, "change_column_default is not implemented" end
Sets or removes a +NOT NULL+ constraint on a column. The null
flag indicates whether the value can be NULL
. For example
change_column_null(:users, :nickname, false)
says nicknames cannot be NULL
(adds the constraint), whereas
change_column_null(:users, :nickname, true)
allows them to be NULL
(drops the constraint).
The method accepts an optional fourth argument to replace existing +NULL+s with some other value. Use that one when enabling the constraint if needed, since otherwise those rows would not be valid.
Please note the fourth argument does not set a column's default.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 457 def change_column_null(table_name, column_name, null, default = nil) raise NotImplementedError, "change_column_null is not implemented" end
A block for changing columns in table
.
# change_table() yields a Table instance change_table(:suppliers) do |t| t.column :name, :string, limit: 60 # Other column alterations here end
The options
hash can include the following keys:
:bulk
-
Set this to true to make this a bulk alter query, such as
ALTER TABLE `users` ADD COLUMN age INT(11), ADD COLUMN birthdate DATETIME ...
Defaults to false.
Add a column¶ ↑
change_table(:suppliers) do |t| t.column :name, :string, limit: 60 end
Add 2 integer columns¶ ↑
change_table(:suppliers) do |t| t.integer :width, :height, null: false, default: 0 end
Add created_at/updated_at columns¶ ↑
change_table(:suppliers) do |t| t.timestamps end
Add a foreign key column¶ ↑
change_table(:suppliers) do |t| t.references :company end
Creates a company_id(integer)
column.
Add a polymorphic foreign key column¶ ↑
change_table(:suppliers) do |t| t.belongs_to :company, polymorphic: true end
Creates company_type(varchar)
and
company_id(integer)
columns.
Remove a column¶ ↑
change_table(:suppliers) do |t| t.remove :company end
Remove several columns¶ ↑
change_table(:suppliers) do |t| t.remove :company_id t.remove :width, :height end
Remove an index¶ ↑
change_table(:suppliers) do |t| t.remove_index :company_id end
See also Table for details on all of the various column transformation.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 357 def change_table(table_name, options = {}) if supports_bulk_alter? && options[:bulk] recorder = ActiveRecord::Migration::CommandRecorder.new(self) yield update_table_definition(table_name, recorder) bulk_change_table(table_name, recorder.commands) else yield update_table_definition(table_name, self) end end
Checks to see if a column exists in a given table.
# Check a column exists column_exists?(:suppliers, :name) # Check a column exists of a particular type column_exists?(:suppliers, :name, :string) # Check a column exists with a specific definition column_exists?(:suppliers, :name, :string, limit: 100) column_exists?(:suppliers, :name, :string, default: 'default') column_exists?(:suppliers, :name, :string, null: false) column_exists?(:suppliers, :tax, :decimal, precision: 8, scale: 2)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 76 def column_exists?(table_name, column_name, type = nil, options = {}) column_name = column_name.to_s columns(table_name).any?{ |c| c.name == column_name && (!type || c.type == type) && (!options.key?(:limit) || c.limit == options[:limit]) && (!options.key?(:precision) || c.precision == options[:precision]) && (!options.key?(:scale) || c.scale == options[:scale]) && (!options.key?(:default) || c.default == options[:default]) && (!options.key?(:null) || c.null == options[:null]) } end
Returns an array of Column objects for the table specified by
table_name
. See the concrete implementation for details on the
expected parameter values.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 60 def columns(table_name) end
Creates a new join table with the name created using the lexical order of the first two arguments. These arguments can be a String or a Symbol.
# Creates a table called 'assemblies_parts' with no id. create_join_table(:assemblies, :parts)
You can pass a options
hash can include the following keys:
:table_name
-
Sets the table name overriding the default
:column_options
-
Any extra options you want appended to the columns definition.
:options
-
Any extra options you want appended to the table definition.
:temporary
-
Make a temporary table.
:force
-
Set to true to drop the table before creating it. Defaults to false.
Note that create_join_table
does not create any indices by
default; you can use its block form to do so yourself:
create_join_table :products, :categories do |t| t.index :product_id t.index :category_id end
Add a backend specific option to the generated SQL (MySQL)¶ ↑
create_join_table(:assemblies, :parts, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8')
generates:
CREATE TABLE assemblies_parts ( assembly_id int NOT NULL, part_id int NOT NULL, ) ENGINE=InnoDB DEFAULT CHARSET=utf8
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 261 def create_join_table(table_1, table_2, options = {}) join_table_name = find_join_table_name(table_1, table_2, options) column_options = options.delete(:column_options) || {} column_options.reverse_merge!(null: false) t1_column, t2_column = [table_1, table_2].map{ |t| t.to_s.singularize.foreign_key } create_table(join_table_name, options.merge!(id: false)) do |td| td.integer t1_column, column_options td.integer t2_column, column_options yield td if block_given? end end
Creates a new table with the name table_name
.
table_name
may either be a String or a Symbol.
There are two ways to work with create_table
. You can use the
block form or the regular form, like this:
Block form¶ ↑
# create_table() passes a TableDefinition object to the block. # This form will not only create the table, but also columns for the # table. create_table(:suppliers) do |t| t.column :name, :string, limit: 60 # Other fields here end
Block form, with shorthand¶ ↑
# You can also use the column types as method calls, rather than calling the column method. create_table(:suppliers) do |t| t.string :name, limit: 60 # Other fields here end
Regular form¶ ↑
# Creates a table called 'suppliers' with no columns. create_table(:suppliers) # Add a column to 'suppliers'. add_column(:suppliers, :name, :string, {limit: 60})
The options
hash can include the following keys:
:id
-
Whether to automatically add a primary key column. Defaults to true. Join tables for
has_and_belongs_to_many
should set it to false. :primary_key
-
The name of the primary key, if one is to be added automatically. Defaults to
id
. If:id
is false this option is ignored.Note that Active Record models will automatically detect their primary key. This can be avoided by using
self.primary_key=
on the model to define the key explicitly. :options
-
Any extra options you want appended to the table definition.
:temporary
-
Make a temporary table.
:force
-
Set to true to drop the table before creating it. Set to
:cascade
to drop dependent objects as well. Defaults to false. :as
-
SQL to use to generate the table. When this option is used, the block is ignored, as are the
:id
and:primary_key
options.
Add a backend specific option to the generated SQL (MySQL)¶ ↑
create_table(:suppliers, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8')
generates:
CREATE TABLE suppliers ( id int(11) DEFAULT NULL auto_increment PRIMARY KEY ) ENGINE=InnoDB DEFAULT CHARSET=utf8
Rename the primary key column¶ ↑
create_table(:objects, primary_key: 'guid') do |t| t.column :name, :string, limit: 80 end
generates:
CREATE TABLE objects ( guid int(11) DEFAULT NULL auto_increment PRIMARY KEY, name varchar(80) )
Do not add a primary key column¶ ↑
create_table(:categories_suppliers, id: false) do |t| t.column :category_id, :integer t.column :supplier_id, :integer end
generates:
CREATE TABLE categories_suppliers ( category_id int, supplier_id int )
Create a temporary table based on a query¶ ↑
create_table(:long_query, temporary: true, as: "SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id")
generates:
CREATE TEMPORARY TABLE long_query AS SELECT * FROM orders INNER JOIN line_items ON order_id=orders.id
See also ActiveRecord::ConnectionAdapters::TableDefinition#column for details on how to create columns.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 191 def create_table(table_name, options = {}) td = create_table_definition table_name, options[:temporary], options[:options], options[:as] if options[:id] != false && !options[:as] pk = options.fetch(:primary_key) do Base.get_primary_key table_name.to_s.singularize end td.primary_key pk, options.fetch(:id, :primary_key), options end yield td if block_given? if options[:force] && table_exists?(table_name) drop_table(table_name, options) end result = execute schema_creation.accept td unless supports_indexes_in_create? td.indexes.each_pair do |column_name, index_options| add_index(table_name, column_name, index_options) end end td.foreign_keys.each_pair do |other_table_name, foreign_key_options| add_foreign_key(table_name, other_table_name, foreign_key_options) end result end
Drops the join table specified by the given arguments. See
create_join_table
for details.
Although this command ignores the block if one is given, it can be helpful
to provide one in a migration's change
method so it can be
reverted. In that case, the block will be used by create_join_table.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 282 def drop_join_table(table_1, table_2, options = {}) join_table_name = find_join_table_name(table_1, table_2, options) drop_table(join_table_name) end
Drops a table from the database.
:force
-
Set to
:cascade
to drop dependent objects as well. Defaults to false.
Although this command ignores most options
and the block if
one is given, it can be helpful to provide these in a migration's
change
method so it can be reverted. In that case,
options
and the block will be used by create_table.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 384 def drop_table(table_name, options = {}) execute "DROP TABLE #{quote_table_name(table_name)}" end
Returns an array of foreign keys for the given table. The foreign keys are
represented as ForeignKeyDefinition
objects.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 701 def foreign_keys(table_name) raise NotImplementedError, "foreign_keys is not implemented" end
Checks to see if an index exists on a table for a given index definition.
# Check an index exists index_exists?(:suppliers, :company_id) # Check an index on multiple columns exists index_exists?(:suppliers, [:company_id, :company_type]) # Check a unique index exists index_exists?(:suppliers, :company_id, unique: true) # Check an index with a custom name exists index_exists?(:suppliers, :company_id, name: "idx_company_id")
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 47 def index_exists?(table_name, column_name, options = {}) column_names = Array(column_name).map(&:to_s) index_name = options.key?(:name) ? options[:name].to_s : index_name(table_name, column: column_names) checks = [] checks << lambda { |i| i.name == index_name } checks << lambda { |i| i.columns == column_names } checks << lambda { |i| i.unique } if options[:unique] indexes(table_name).any? { |i| checks.all? { |check| check[i] } } end
Verifies the existence of an index with a given name.
The default argument is returned if the underlying implementation does not define the indexes method, as there's no way to determine the correct answer in that case.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 620 def index_name_exists?(table_name, index_name, default) return default unless respond_to?(:indexes) index_name = index_name.to_s indexes(table_name).detect { |i| i.name == index_name } end
Should not be called normally, but this operation is non-destructive. The migrations module handles this automatically.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 821 def initialize_schema_migrations_table ActiveRecord::SchemaMigration.create_table end
Returns a hash of mappings from the abstract data types to the native database types. See ActiveRecord::ConnectionAdapters::TableDefinition#column for details on the recognized abstract data types.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 13 def native_database_types {} end
Removes the column from the table definition.
remove_column(:suppliers, :qualification)
The type
and options
parameters will be ignored
if present. It can be helpful to provide these in a migration's
change
method so it can be reverted. In that case,
type
and options
will be used by add_column.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 414 def remove_column(table_name, column_name, type = nil, options = {}) execute "ALTER TABLE #{quote_table_name(table_name)} DROP #{quote_column_name(column_name)}" end
Removes the given columns from the table definition.
remove_columns(:suppliers, :qualification, :experience)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 400 def remove_columns(table_name, *column_names) raise ArgumentError.new("You must specify at least one column name. Example: remove_columns(:people, :first_name)") if column_names.empty? column_names.each do |column_name| remove_column(table_name, column_name) end end
Removes the given foreign key from the table.
Removes the foreign key on accounts.branch_id
.
remove_foreign_key :accounts, :branches
Removes the foreign key on accounts.owner_id
.
remove_foreign_key :accounts, column: :owner_id
Removes the foreign key named special_fk_name
on the
accounts
table.
remove_foreign_key :accounts, name: :special_fk_name
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 779 def remove_foreign_key(from_table, options_or_to_table = {}) return unless supports_foreign_keys? if options_or_to_table.is_a?(Hash) options = options_or_to_table else options = { column: foreign_key_column_for(options_or_to_table) } end fk_name_to_delete = options.fetch(:name) do fk_to_delete = foreign_keys(from_table).detect {|fk| fk.column == options[:column].to_s } if fk_to_delete fk_to_delete.name else raise ArgumentError, "Table '#{from_table}' has no foreign key on column '#{options[:column]}'" end end at = create_alter_table from_table at.drop_foreign_key fk_name_to_delete execute schema_creation.accept(at) end
Removes the given index from the table.
Removes the index_accounts_on_column
in the
accounts
table.
remove_index :accounts, :column
Removes the index named index_accounts_on_branch_id
in the
accounts
table.
remove_index :accounts, column: :branch_id
Removes the index named
index_accounts_on_branch_id_and_party_id
in the
accounts
table.
remove_index :accounts, column: [:branch_id, :party_id]
Removes the index named by_branch_party
in the
accounts
table.
remove_index :accounts, name: :by_branch_party
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 578 def remove_index(table_name, options = {}) remove_index!(table_name, index_name_for_remove(table_name, options)) end
Removes the reference(s). Also removes a type
column if one
exists. remove_reference
, remove_references
and
remove_belongs_to
are acceptable.
Remove the reference¶ ↑
remove_reference(:products, :user, index: true)
Remove polymorphic reference¶ ↑
remove_reference(:products, :supplier, polymorphic: true)
Remove the reference with a foreign key¶ ↑
remove_reference(:products, :user, index: true, foreign_key: true)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 688 def remove_reference(table_name, ref_name, options = {}) if options[:foreign_key] to_table = Base.pluralize_table_names ? ref_name.to_s.pluralize : ref_name remove_foreign_key(table_name, to_table) end remove_column(table_name, "#{ref_name}_id") remove_column(table_name, "#{ref_name}_type") if options[:polymorphic] end
Removes the timestamp columns (created_at
and
updated_at
) from the table definition.
remove_timestamps(:suppliers)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 903 def remove_timestamps(table_name, options = {}) remove_column table_name, :updated_at remove_column table_name, :created_at end
Renames a column.
rename_column(:suppliers, :description, :name)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 465 def rename_column(table_name, column_name, new_column_name) raise NotImplementedError, "rename_column is not implemented" end
Renames an index.
Rename the index_people_on_last_name
index to
index_users_on_last_name
:
rename_index :people, 'index_people_on_last_name', 'index_users_on_last_name'
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 592 def rename_index(table_name, old_name, new_name) validate_index_length!(table_name, new_name) # this is a naive implementation; some DBs may support this more efficiently (Postgres, for instance) old_index_def = indexes(table_name).detect { |i| i.name == old_name } return unless old_index_def add_index(table_name, old_index_def.columns, name: new_name, unique: old_index_def.unique) remove_index(table_name, name: old_name) end
Renames a table.
rename_table('octopuses', 'octopi')
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 371 def rename_table(table_name, new_name) raise NotImplementedError, "rename_table is not implemented" end
Truncates a table alias according to the limits of the current adapter.
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 18 def table_alias_for(table_name) table_name[0...table_alias_length].tr('.', '_') end
Checks to see if the table table_name
exists on the database.
table_exists?(:developers)
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 26 def table_exists?(table_name) tables.include?(table_name.to_s) end
Protected Instance Methods
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 947 def add_index_sort_order(option_strings, column_names, options = {}) if options.is_a?(Hash) && order = options[:order] case order when Hash column_names.each {|name| option_strings[name] += " #{order[name].upcase}" if order.has_key?(name)} when String column_names.each {|name| option_strings[name] += " #{order.upcase}"} end end return option_strings end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 976 def index_name_for_remove(table_name, options = {}) index_name = index_name(table_name, options) unless index_name_exists?(table_name, index_name, true) if options.is_a?(Hash) && options.has_key?(:name) options_without_column = options.dup options_without_column.delete :column index_name_without_column = index_name(table_name, options_without_column) return index_name_without_column if index_name_exists?(table_name, index_name_without_column, false) end raise ArgumentError, "Index name '#{index_name}' on table '#{table_name}' does not exist" end index_name end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 972 def options_include_default?(options) options.include?(:default) && !(options[:null] == false && options[:default].nil?) end
Overridden by the MySQL adapter for supporting index lengths
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 961 def quoted_columns_for_index(column_names, options = {}) option_strings = Hash[column_names.map {|name| [name, '']}] # add index sort order if supported if supports_index_sort_order? option_strings = add_index_sort_order(option_strings, column_names, options) end column_names.map {|name| quote_column_name(name) + option_strings[name]} end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1003 def rename_column_indexes(table_name, column_name, new_column_name) column_name, new_column_name = column_name.to_s, new_column_name.to_s indexes(table_name).each do |index| next unless index.columns.include?(new_column_name) old_columns = index.columns.dup old_columns[old_columns.index(new_column_name)] = column_name generated_index_name = index_name(table_name, column: old_columns) if generated_index_name == index.name rename_index table_name, generated_index_name, index_name(table_name, column: index.columns) end end end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 994 def rename_table_indexes(table_name, new_name) indexes(new_name).each do |index| generated_index_name = index_name(table_name, column: index.columns) if generated_index_name == index.name rename_index new_name, generated_index_name, index_name(new_name, column: index.columns) end end end
Private Instance Methods
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1021 def create_alter_table(name) AlterTable.new create_table_definition(name, false, {}) end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1017 def create_table_definition(name, temporary, options, as = nil) TableDefinition.new native_database_types, name, temporary, options, as end
# File lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1033 def validate_index_length!(table_name, new_name) if new_name.length > allowed_index_name_length raise ArgumentError, "Index name '#{new_name}' on table '#{table_name}' is too long; the limit is #{allowed_index_name_length} characters" end end


The iOS project that I am working on, has decided to use some caching mechanism to improve perfomance and save bandwidth of the user. So as per the recommendation of some blogs and popularity, we have decided to go with SDWebImage cache. After inspecting example code and trying out some sample code I thought it’ll be good to use.
But it wasn’t work with images those are retrieved from our sever. I have hardcoded public images found from the image search. There wasn’t any problem with those. I tried with different methods provided from the API. But the result is the same.
I am getting following error instead of successful response.
Error Domain=NSURLErrorDomain Code=406 “The operation couldn’t be completed. (NSURLErrorDomain error 406.)”
Following is the definition I found from the Wikipedia for HTTP status code 406.
406 Not Acceptable - The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.
I couldn’t find any satisfiable answers from any Q/A sites. So I have decided to read the source code and identify any possible problem / solution.
After going through several classes, I found that SDWebImageDownloader
class has a code related to setting the 'Accept'
header value into the request.
_HTTPHeaders = [NSMutableDictionary dictionaryWithObject:@"image/webp,image/*;q=0.8"
forKey:@"Accept"];
So above code caused me the problem. Once I changed it, caching started to work and work nicely. But that was a temporary solution, because it’s not good to change library source code.
I was using UIImageView
category provided by the library to retrieve and cache images. So it was problematic to set header values from there. Also only SDWebImageDownloader
class providing the necessary API method to change the header value for public users. So at first sight I was so disappointed and thought of trying something else. But luckily SDWebImageDownloader
is a singleton object. Every method is using the SDWebImageDownloader downloadImageWithURL:options:progress:completed:
method to download images. So I have set a custom header value to 'Accept'
header to override the default header.
[SDWebImageDownloader.sharedDownloader setValue:@"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
forHTTPHeaderField:@"Accept"];
[self sd_setImageWithURL:[self imageUrlForId:imageId] placeholderImage:image];


My Cat, Blackberry
By Sofia Diefendorf
My cat's name is Blackberry.
Some good things about her:
she is cute
she is fun to play with
she provides company
she is verrrrrry soft
Cell 1
Cell 2
Cell 3
Cell 4
Cell 1
Cell 2
Cell 3
Cell 4
Cell 1
Cell 2
Cell 3
Cell 4
>
https://www.youtube.com/watch?v=vldmW4CMhU0


PasswordManager
class PasswordManager
Manager for passwords
Methods
__construct(
ObjectManager $manager,
UrlGeneratorInterface $router,
PasswordEventDispatcherInterface $passwordEventDispatcher,
GeneratorInterface $recoveryHashGenerator)
No description
boolean
rememberPasswordByEmail(
UserEmaileableInterface $userRepository,
string $email,
string $recoverPasswordUrlName,
string $hashField = 'hash')
Remember a password from a user, given its email
$this
rememberPassword(
AbstractUser $user,
string $recoverPasswordUrlName,
string $hashField = 'hash')
Set a user in a remember password mode. Also rises an event to hook when this happens.
$this
recoverPassword(
AbstractUser $user,
string $hash,
string $newPassword)
Recovers a password given a user
Details
at line 67
__construct(
ObjectManager $manager,
UrlGeneratorInterface $router,
PasswordEventDispatcherInterface $passwordEventDispatcher,
GeneratorInterface $recoveryHashGenerator)
at line 89
boolean
rememberPasswordByEmail(
UserEmaileableInterface $userRepository,
string $email,
string $recoverPasswordUrlName,
string $hashField = 'hash')
Remember a password from a user, given its email
at line 118
$this
rememberPassword(
AbstractUser $user,
string $recoverPasswordUrlName,
string $hashField = 'hash')
Set a user in a remember password mode. Also rises an event to hook when this happens.
Recover url must contain these fields with these names
at line 152
$this
recoverPassword(
AbstractUser $user,
string $hash,
string $newPassword)
Recovers a password given a user


|
Elektra
0.8.16
|
This plugin is a filter plugin allowing Elektra to encrypt values before they are persisted and to decrypt values after they have been read from a backend.
The idea is to provide protection of sensible values before they are persisted. This means the value of a key needs to be encrypted before it is written to a file or a database. It also needs to be decrypted whenever an admissible access (read) is being performed.
The users of Elektra should not be bothered too much with the internals of the cryptographic operations. Also the cryptographic keys must never be exposed to the outside of the crypto module.
The crypto plugin supports different libraries as provider for the cryptographic operations. At the moment the following crypto APIs are supported:
#ifdef ELEKTRA_CRYPTO_API_GCRYPT
libgcrypt20-dev
or libgcrypt-devel
#endif #ifdef ELEKTRA_CRYPTO_API_OPENSSLlibssl-dev
or openssl-devel
#endifThe following compile variants are available:
Add "crypto" and the variants, that you want (you can add one of them or all), to the PLUGINS
variable in CMakeCache.txt
and re-run cmake
.
In order to add all compile variants you can add "CRYPTO" to the PLUGINS
variable.
An example CMakeCache.txt
may contain the following variable:
PLUGINS=crypto;crypto_gcrypt;crypto_openssl
or it may look like:
PLUGINS=CRYPTO
If you have a custom built OpenSSL or libgcrypt on your system, you can tell CMake to use those by setting the following CMake variables.
For a custom OpenSSL location set:
For a custom libgcrypt location set:
Both variants of the plugin compile under Mac OS X "El Capitan" (Version 10.11.3 (15D21)).
For the crypto_gcrypt
variant download and install either MacPorts or Homebrew. Use one of those tools to download and install libgcrypt
. If you choose MacPorts, you can set the CMake variables like this:
/opt/local/include/
/opt/local/lib/libgcrypt.dylib
The CMake command might look something like:
cmake -DLIBGCRYPT_INCLUDE_DIR="/opt/local/include/" -DLIBGCRYPT_LIBRARIES="/opt/local/lib/libgcrypt.dylib" -DPLUGINS="crypto;crypto_gcrypt;" /path_to_elektra_src
For the crypto_openssl
variant a custom-built OpenSSL library is neccessary as the MacPorts or Homebrew variants do not seem to work. Download the latest version of the OpenSSL library from the project homepage and compile it. Copy the header files and the binary files to a location where all users can access them.
Set the CMake variables OPENSSL_INCLUDE_DIR
and OPENSSL_LIBRARIES
to your desired location.
The crypto plugin will encrypt and decrypt values using AES-256 in CBC mode.
The key derivation is still WIP.
The encryption and decryption of values is a straight forward process, once the key and IV are supplied. The key-derivation process in a library is a bit tricky.
The crypto plugin itself can hold configuration data about the order of the applied key derivation functions. For example, if a password is provided by a meta-key, it will be used, otherwise we look for a key file. If no key file has been configured, we try to trigger the PGP agent, etc.
The following example configuration illustrates this concept:
system/elektra/crypto/config/key-derivation/#0 = meta system/elektra/crypto/config/key-derivation/#1 = file system/elektra/crypto/config/key-derivation/#2 = agent system/elektra/crypto/config/key-file/path/#0 = ~/.elektra/id_aes system/elektra/crypto/config/key-file/path/#1 = /etc/elektra/id_aes
Only keys marked with a certain meta-key will be considered for encryption/decryption.
You specify the parameters of the cryptographic operations in a KeySet together with the keys to be encrypted. The following parameters are required:
The following keys are required for metadata based encryption:
/elektra/modules/crypto/key /elektra/modules/crypto/iv
You can use the following meta-key to mark a key for encryption:
crypto/encrypt
If this meta-key has a value with a string-length greater than 0 (strlen() > 0
) then the crypto-plugin will try to encrypt it.


{% csrf_token %}
Playlist name:
Playlist songs:
{% for i in songs %}
{{i}}
{% endfor %}
Visibility:
---------
public
private
followers


Linux and the BSDs have two basic ways of keeping time.
In a "posix" mode the system clock counts UTC seconds since the POSIX Epoch.
In a "right" mode the system clock counts TAI seconds since the POSIX Epoch.
Both Linux and the BSDs in theory can operate in either mode.
In practice, the "right" capability, albeit available in the source, is not enabled in FreeBSD and TrueOS; and Linux operating systems usually operate in "posix" mode, because programs like ntpd
demand it.
(OpenBSD has a "right" capability, though; including working time2posix()
and posix2time()
library functions.)
The cyclog
, tai64n
, and tai64nlocal
commands all deal in TAI.
They have to convert TAI timestamps into system time and they have to convert the system clock into TAI timestamps.
They do so by attempting to deduce, from the value of the TZ
and TZDIR
environment variables, whether the system is in "posix" or in "right" mode.
From this deduction they know how to convert between the the system clock time and TAI.
In "right" mode this is a simple addition or subtraction, as the POSIX Epoch is 1970-01-01 00:00:10 TAI.
In "posix" mode they have to account for the insertion of leap seconds, which count as TAI ticks but do not count as UTC ticks, and which are not inserted according to any algorithmic pattern.
The programs in daemontools, daemontools-encore, and runit do not correctly calculate TAI. They assume that the system clock is always counting TAI seconds since the Epoch, even if the system is not using a "right" timezone but is running in "posix" mode. The result is that the TAI64N timestamps generated by these toolsets are, as of 2017, 27 seconds behind the actual TAI seconds count since the POSIX Epoch. (The requirement that one must always use a "right" timezone was stated in the original Bernstein documentation, although many people have overlooked it or not realized the significance of what the documentation said.)
The result of that is that mixing those tools with the nosh toolset will produce surprising results, if one is unaware of this difference.
If passed through such tools, the outputs of cyclog
and tai64n
will appear advanced by up to 27 seconds.
Similarly, the output of such tools, passed through tai64nlocal
, will appear retarded by up to 27 seconds.


| Item | Effect |
|---|---|
| Air Balloon | Holder is immune to Ground-type attacks. Pops when holder is hit. |
| Apicot Berry | Raises holder's Sp. Def by 1 stage when at 1/4 max HP or less. Single use. |
| Babiri Berry | Halves damage taken from a supereffective Steel-type attack. Single use. |
| Black Belt | Holder's Fighting-type attacks have 1.2x power. |
| Black Glasses | Holder's Dark-type attacks have 1.2x power. |
| Black Sludge | Each turn, if holder is a Poison type, restores 1/16 max HP; loses 1/8 if not. |
| Charcoal | Holder's Fire-type attacks have 1.2x power. |
| Charti Berry | Halves damage taken from a supereffective Rock-type attack. Single use. |
| Chesto Berry | Holder wakes up if it is asleep. Single use. |
| Chilan Berry | Halves damage taken from a Normal-type attack. Single use. |
| Chople Berry | Halves damage taken from a supereffective Fighting-type attack. Single use. |
| Coba Berry | Halves damage taken from a supereffective Flying-type attack. Single use. |
| Colbur Berry | Halves damage taken from a supereffective Dark-type attack. Single use. |
| Custap Berry | Holder moves first in its priority bracket when at 1/4 max HP or less. Single use |
| Dragon Fang | Holder's Dragon-type attacks have 1.2x power. |
| Ganlon Berry | Raises holder's Defense by 1 stage when at 1/4 max HP or less. Single use. |
| Haban Berry | Halves damage taken from a supereffective Dragon-type attack. Single use. |
| Hard Stone | Holder's Rock-type attacks have 1.2x power. |
| Kasip Berry | Halves damage taken from a supereffective Ghost-type attack. Single use. |
| Kebia Berry | Halves damage taken from a supereffective Poison-type attack. Single use. |
| Kee Berry | Raises holder's Defense by 1 stage after it is hit by a physical attack. Single use. |
| Lagging Tail | Holder moves last in its priority bracket. |
| Lansat Berry | Holder gains the Focus Energy effect when at 1/4 max HP or less. Single use. |
| Leftovers | At the end of every turn, holder restores 1/16 of its max HP. |
| Liechi Berry | Raises holder's Attack by 1 stage when at 1/4 max HP or less. Single use. |
| Lum Berry | Holder cures itself if it is confused or has a major status condition. Single use. |
| Magnet | Holder's Electric-type attacks have 1.2x power. |
| Maranga Berry | Raises holder's Sp. Def by 1 stage after it is hit by a special attack. Single use. |
| Metal Coat | Holder's Steel-type attacks have 1.2x power. |
| Miracle Seed | Holder's Grass-type attacks have 1.2x power. |
| Mystic Water | Holder's Water-type attacks have 1.2x power. |
| Never-Melt Ice | Holder's Ice-type attacks have 1.2x power. |
| Occa Berry | Halves damage taken from a supereffective Fire-type attack. Single use. |
| Passho Berry | Halves damage taken from a supereffective Water-type attack. Single use. |
| Payapa Berry | Halves damage taken from a supereffective Psychic-type attack. Single use. |
| Petaya Berry | Raises holder's Sp. Atk by 1 stage when at 1/4 max HP or less. Single use. |
| Poison Barb | Holder's Poison-type attacks have 1.2x power. |
| Roseli Berry | Halves damage taken from a supereffective Fairy-type attack. Single use. |
| Salac Berry | Raises holder's Speed by 1 stage when at 1/4 max HP or less. Single use. |
| Sitrus Berry | Restores 1/4 max HP when at 1/2 max HP or less. Single use. |
| Silk Scarf | Holder's Normal-type attacks have 1.2x power. |
| Silver Powder | Holder's Bug-type attacks have 1.2x power. |
| Sharp Beak | Holder's Flying-type attacks have 1.2x power. |
| Shuca Berry | Halves damage taken from a supereffective Ground-type attack. Single use. |
| Soft Sand | Holder's Ground-type attacks have 1.2x power. |
| Spell Tag | Holder's Ghost-type attacks have 1.2x power. |
| Starf Berry | Raises a random stat by 2 when at 1/4 max HP or less (not acc/eva). Single use. |
| Tanga Berry | Halves damage taken from a supereffective Bug-type attack. Single use. |
| Twisted Spoon | Holder's Psychic-type attacks have 1.2x power |
| Wacan Berry | Halves damage taken from a supereffective Electric-type attack. Single use. |
| Yache Berry | Halves damage taken from a supereffective Ice-type attack. Single use. |


Shield
Create keys, organizational certificate chain
and SSL certificates
Certificate Name:
Certificate Type:
Self Signed
CA Root
CA Intermediate
End Entity
Certificate Issuer:
Valid From:
Valid Till:
Path length:
Country:
State:
Locality:
Organization Name:
Organization Unit Name:
Signature Algorithm:
Sha256
Sha1
Submit
Certificate Name
Certificate Type
Algorithm
Valid From
Valid Till
Download
View Certificate Details
Select Certificates.
Thank you
Follow us on
Twitter
,
Github


| |
ilIsImage returns whether the image name in Image is a valid image in use. If the image name in Image is in use, ilIsImage returns IL_TRUE. If Image is 0, ilIsImage returns IL_FALSE, because the default image is a special image and is never returned by ilGenImages. If the image name has been deleted by ilDeleteImages or never generated byilGenImages, IL_FALSE is returned.
| | ILboolean ilIsImage( ILuint Image );
|
Parameters
See Also
|


x = Matrices.equalityLeastSquares(A,a,B,b);
This function returns the solution x of the linear equality-constrained least squares problem:
min|A*x - a|^2 over x, subject to B*x = b
It is required that the dimensions of A and B fulfill the following relationship:
size(B,1) ≤ size(A,2) ≤ size(A,1) + size(B,1)
Note, the solution is computed with the LAPACK function "dgglse" using the generalized RQ factorization under the assumptions that B has full row rank (= size(B,1)) and the matrix [A;B] has full column rank (= size(A,2)). In this case, the problem has a unique solution.
function equalityLeastSquares extends Modelica.Icons.Function; input Real A[:, :] "Minimize |A*x - a|^2"; input Real a[size(A, 1)]; input Real B[:, size(A, 2)] "subject to B*x=b"; input Real b[size(B, 1)]; output Real x[size(A, 2)] "solution vector"; end equalityLeastSquares;


# based on https://pypi.org/project/osmapi/ and http://osmapi.metaodi.ch/#header-classes # not a built-in library in PyCharm import osmapi # I made an account for us to all use api = osmapi.OsmApi(api="https://api06.dev.openstreetmap.org", username="OSM_buildingdetector", password="fakepassword123") # add meaningful comments pls :) api.ChangesetCreate({u"comment": u"Testing Way Create on Building"}) # make Nodes based on longitude and latitude # add relevant tags Node1 = api.NodeCreate({"lat": 41.788348, "lon": -88.129079, "tag": {"Corner": "1"}}) Node2 = api.NodeCreate({"lat": 41.788453, "lon": -88.129079, "tag": {"Corner": "2"}}) Node3 = api.NodeCreate({"lat": 41.788445, "lon": -88.129262, "tag": {"Corner": "3"}}) Node4 = api.NodeCreate({"lat": 41.788338, "lon": -88.129211, "tag": {"Corner": "4"}}) # need the id of the Node specifically node_list = [Node1["id"], Node2["id"], Node3["id"], Node4["id"]] # if you want to see the id's of the Nodes you made uncomment this part # for node in node_list: # print(node) # create the way (area) using the nodes # add relevant tag way = api.WayCreate({"nd": node_list, "tag": {}}) # see data on the way you just made print(api.WayGet(str(way["id"]))) # to close the set of changes api.ChangesetClose()


--- layout: null title: "fJSFiddle" desc: "Fake JSFiddle web app" cover: url: 'fJSFiddle.png' format: 'png' ---


project-summary.yaml
saved in the final run directory.pkgdown::build_site
.bcbioRnaDataSet
.load_run
that saves to S4 object instead of list.bcbioRnaDataSet
S4 definition updates.plot_pca
and gene-level heatmaps.DESeqDataSet
using design = formula(~1)
for quality control. This enables automatic generation of rlog
and vst
transformed counts.bcbioRnaDataSet
to bcbioRNADataSet
(case sensitive).setup.R
to use *_dir
instead of *_out
.bcbioRNADataSet
or a metrics data.frame
and manual interesting_group
declaration for visualization.snake_case
to camelCase
.bcbioRNADataSet
object.bcbioRNADataSet
in differential expression R Markdown template.bcbioRNADataSet
S4 class to bcbioRNASeq
. This matches the naming conventions in the bcbioSingleCell package.loadRNASeqRun
to simply loadRNASeq
.loadRNASeq
from using S4 dispatch to a standard function.loadRNASeq
that enables request of a specific Ensembl release version for gene annotations.interestingGroup
argument in quality control functions to interestingGroups
for better consistency.plotPCACovariates
.


---
layout: page
title: Hi, I'm Bruna
subtitle: Data Scientist II @ Amazon; MSc. Student @ UFSCar
use-site-title: true
---
BSc in Computer Engineering and working as a Data Scientist II at Amazon, in the International Technology Expansion team.
Since 2015, I've been developing research as part of the Bioinformatics and Machine Learning group (BioMaL), from Federal University of Sao Carlos (UFSCar), Brazil. I'm currently pursuing my Masters degree at this same group.
My research interests lie in the application of Machine Learning in Natural Sciences. Besides that, I'm passionate and continuously learning about Software Engineering, Distributed Systems and Natural Computing.
In my spare time, you can find me reading a good book, riding my bicycle, enjoying a cup of coffee or (hopefully!) traveling.


"""Prepares a distribution for installation """ # The following comment should be removed at some point in the future. # mypy: strict-optional=False import logging import mimetypes import os import shutil import sys from pip._vendor import requests from pip._vendor.six import PY2 from pip._internal.distributions import ( make_distribution_for_install_requirement, ) from pip._internal.distributions.installed import InstalledDistribution from pip._internal.exceptions import ( DirectoryUrlHashUnsupported, HashMismatch, HashUnpinned, InstallationError, PreviousBuildDirError, VcsHashUnsupported, ) from pip._internal.utils.filesystem import copy2_fixed from pip._internal.utils.hashes import MissingHashes from pip._internal.utils.logging import indent_log from pip._internal.utils.marker_files import write_delete_marker_file from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, hide_url, path_to_display, rmtree, ) from pip._internal.utils.temp_dir import TempDirectory from pip._internal.utils.typing import MYPY_CHECK_RUNNING from pip._internal.utils.unpacking import unpack_file from pip._internal.vcs import vcs if MYPY_CHECK_RUNNING: from typing import ( Callable, List, Optional, Tuple, ) from mypy_extensions import TypedDict from pip._internal.distributions import AbstractDistribution from pip._internal.index.package_finder import PackageFinder from pip._internal.models.link import Link from pip._internal.network.download import Downloader from pip._internal.req.req_install import InstallRequirement from pip._internal.req.req_tracker import RequirementTracker from pip._internal.utils.hashes import Hashes if PY2: CopytreeKwargs = TypedDict( 'CopytreeKwargs', { 'ignore': Callable[[str, List[str]], List[str]], 'symlinks': bool, }, total=False, ) else: CopytreeKwargs = TypedDict( 'CopytreeKwargs', { 'copy_function': Callable[[str, str], None], 'ignore': Callable[[str, List[str]], List[str]], 'ignore_dangling_symlinks': bool, 'symlinks': bool, }, total=False, ) logger = logging.getLogger(__name__) def _get_prepared_distribution( req, # type: InstallRequirement req_tracker, # type: RequirementTracker finder, # type: PackageFinder build_isolation # type: bool ): # type: (...) -> AbstractDistribution """Prepare a distribution for installation. """ abstract_dist = make_distribution_for_install_requirement(req) with req_tracker.track(req): abstract_dist.prepare_distribution_metadata(finder, build_isolation) return abstract_dist def unpack_vcs_link(link, location): # type: (Link, str) -> None vcs_backend = vcs.get_backend_for_scheme(link.scheme) assert vcs_backend is not None vcs_backend.unpack(location, url=hide_url(link.url)) def _copy_file(filename, location, link): # type: (str, str, Link) -> None copy = True download_location = os.path.join(location, link.filename) if os.path.exists(download_location): response = ask_path_exists( 'The file {} exists. (i)gnore, (w)ipe, (b)ackup, (a)abort'.format( display_path(download_location) ), ('i', 'w', 'b', 'a'), ) if response == 'i': copy = False elif response == 'w': logger.warning('Deleting %s', display_path(download_location)) os.remove(download_location) elif response == 'b': dest_file = backup_dir(download_location) logger.warning( 'Backing up %s to %s', display_path(download_location), display_path(dest_file), ) shutil.move(download_location, dest_file) elif response == 'a': sys.exit(-1) if copy: shutil.copy(filename, download_location) logger.info('Saved %s', display_path(download_location)) def unpack_http_url( link, # type: Link location, # type: str downloader, # type: Downloader download_dir=None, # type: Optional[str] hashes=None, # type: Optional[Hashes] ): # type: (...) -> str temp_dir = TempDirectory(kind="unpack", globally_managed=True) # If a download dir is specified, is the file already downloaded there? already_downloaded_path = None if download_dir: already_downloaded_path = _check_download_dir( link, download_dir, hashes ) if already_downloaded_path: from_path = already_downloaded_path content_type = mimetypes.guess_type(from_path)[0] else: # let's download to a tmp dir from_path, content_type = _download_http_url( link, downloader, temp_dir.path, hashes ) # unpack the archive to the build dir location. even when only # downloading archives, they have to be unpacked to parse dependencies unpack_file(from_path, location, content_type) return from_path def _copy2_ignoring_special_files(src, dest): # type: (str, str) -> None """Copying special files is not supported, but as a convenience to users we skip errors copying them. This supports tools that may create e.g. socket files in the project source directory. """ try: copy2_fixed(src, dest) except shutil.SpecialFileError as e: # SpecialFileError may be raised due to either the source or # destination. If the destination was the cause then we would actually # care, but since the destination directory is deleted prior to # copy we ignore all of them assuming it is caused by the source. logger.warning( "Ignoring special file error '%s' encountered copying %s to %s.", str(e), path_to_display(src), path_to_display(dest), ) def _copy_source_tree(source, target): # type: (str, str) -> None def ignore(d, names): # type: (str, List[str]) -> List[str] # Pulling in those directories can potentially be very slow, # exclude the following directories if they appear in the top # level dir (and only it). # See discussion at https://github.com/pypa/pip/pull/6770 return ['.tox', '.nox'] if d == source else [] kwargs = dict(ignore=ignore, symlinks=True) # type: CopytreeKwargs if not PY2: # Python 2 does not support copy_function, so we only ignore # errors on special file copy in Python 3. kwargs['copy_function'] = _copy2_ignoring_special_files shutil.copytree(source, target, **kwargs) def unpack_file_url( link, # type: Link location, # type: str download_dir=None, # type: Optional[str] hashes=None # type: Optional[Hashes] ): # type: (...) -> Optional[str] """Unpack link into location. """ link_path = link.file_path # If it's a url to a local directory if link.is_existing_dir(): if os.path.isdir(location): rmtree(location) _copy_source_tree(link_path, location) return None # If a download dir is specified, is the file already there and valid? already_downloaded_path = None if download_dir: already_downloaded_path = _check_download_dir( link, download_dir, hashes ) if already_downloaded_path: from_path = already_downloaded_path else: from_path = link_path # If --require-hashes is off, `hashes` is either empty, the # link's embedded hash, or MissingHashes; it is required to # match. If --require-hashes is on, we are satisfied by any # hash in `hashes` matching: a URL-based or an option-based # one; no internet-sourced hash will be in `hashes`. if hashes: hashes.check_against_path(from_path) content_type = mimetypes.guess_type(from_path)[0] # unpack the archive to the build dir location. even when only downloading # archives, they have to be unpacked to parse dependencies unpack_file(from_path, location, content_type) return from_path def unpack_url( link, # type: Link location, # type: str downloader, # type: Downloader download_dir=None, # type: Optional[str] hashes=None, # type: Optional[Hashes] ): # type: (...) -> Optional[str] """Unpack link into location, downloading if required. :param hashes: A Hashes object, one of whose embedded hashes must match, or HashMismatch will be raised. If the Hashes is empty, no matches are required, and unhashable types of requirements (like VCS ones, which would ordinarily raise HashUnsupported) are allowed. """ # non-editable vcs urls if link.is_vcs: unpack_vcs_link(link, location) return None # file urls elif link.is_file: return unpack_file_url(link, location, download_dir, hashes=hashes) # http urls else: return unpack_http_url( link, location, downloader, download_dir, hashes=hashes, ) def _download_http_url( link, # type: Link downloader, # type: Downloader temp_dir, # type: str hashes, # type: Optional[Hashes] ): # type: (...) -> Tuple[str, str] """Download link url into temp_dir using provided session""" download = downloader(link) file_path = os.path.join(temp_dir, download.filename) with open(file_path, 'wb') as content_file: for chunk in download.chunks: content_file.write(chunk) if hashes: hashes.check_against_path(file_path) return file_path, download.response.headers.get('content-type', '') def _check_download_dir(link, download_dir, hashes): # type: (Link, str, Optional[Hashes]) -> Optional[str] """ Check download_dir for previously downloaded file with correct hash If a correct file is found return its path else None """ download_path = os.path.join(download_dir, link.filename) if not os.path.exists(download_path): return None # If already downloaded, does its hash match? logger.info('File was already downloaded %s', download_path) if hashes: try: hashes.check_against_path(download_path) except HashMismatch: logger.warning( 'Previously-downloaded file %s has bad hash. ' 'Re-downloading.', download_path ) os.unlink(download_path) return None return download_path class RequirementPreparer(object): """Prepares a Requirement """ def __init__( self, build_dir, # type: str download_dir, # type: Optional[str] src_dir, # type: str wheel_download_dir, # type: Optional[str] build_isolation, # type: bool req_tracker, # type: RequirementTracker downloader, # type: Downloader finder, # type: PackageFinder require_hashes, # type: bool use_user_site, # type: bool ): # type: (...) -> None super(RequirementPreparer, self).__init__() self.src_dir = src_dir self.build_dir = build_dir self.req_tracker = req_tracker self.downloader = downloader self.finder = finder # Where still-packed archives should be written to. If None, they are # not saved, and are deleted immediately after unpacking. self.download_dir = download_dir # Where still-packed .whl files should be written to. If None, they are # written to the download_dir parameter. Separate to download_dir to # permit only keeping wheel archives for pip wheel. self.wheel_download_dir = wheel_download_dir # NOTE # download_dir and wheel_download_dir overlap semantically and may # be combined if we're willing to have non-wheel archives present in # the wheelhouse output by 'pip wheel'. # Is build isolation allowed? self.build_isolation = build_isolation # Should hash-checking be required? self.require_hashes = require_hashes # Should install in user site-packages? self.use_user_site = use_user_site @property def _download_should_save(self): # type: () -> bool if not self.download_dir: return False if os.path.exists(self.download_dir): return True logger.critical('Could not find download directory') raise InstallationError( "Could not find or access download directory '{}'" .format(self.download_dir)) def prepare_linked_requirement( self, req, # type: InstallRequirement ): # type: (...) -> AbstractDistribution """Prepare a requirement that would be obtained from req.link """ assert req.link link = req.link # TODO: Breakup into smaller functions if link.scheme == 'file': path = link.file_path logger.info('Processing %s', display_path(path)) else: logger.info('Collecting %s', req.req or req) with indent_log(): # @@ if filesystem packages are not marked # editable in a req, a non deterministic error # occurs when the script attempts to unpack the # build directory # Since source_dir is only set for editable requirements. assert req.source_dir is None req.ensure_has_source_dir(self.build_dir) # If a checkout exists, it's unwise to keep going. version # inconsistencies are logged later, but do not fail the # installation. # FIXME: this won't upgrade when there's an existing # package unpacked in `req.source_dir` if os.path.exists(os.path.join(req.source_dir, 'setup.py')): raise PreviousBuildDirError( "pip can't proceed with requirements '{}' due to a" " pre-existing build directory ({}). This is " "likely due to a previous installation that failed" ". pip is being responsible and not assuming it " "can delete this. Please delete it and try again." .format(req, req.source_dir) ) # Now that we have the real link, we can tell what kind of # requirements we have and raise some more informative errors # than otherwise. (For example, we can raise VcsHashUnsupported # for a VCS URL rather than HashMissing.) if self.require_hashes: # We could check these first 2 conditions inside # unpack_url and save repetition of conditions, but then # we would report less-useful error messages for # unhashable requirements, complaining that there's no # hash provided. if link.is_vcs: raise VcsHashUnsupported() elif link.is_existing_dir(): raise DirectoryUrlHashUnsupported() if not req.original_link and not req.is_pinned: # Unpinned packages are asking for trouble when a new # version is uploaded. This isn't a security check, but # it saves users a surprising hash mismatch in the # future. # # file:/// URLs aren't pinnable, so don't complain # about them not being pinned. raise HashUnpinned() hashes = req.hashes(trust_internet=not self.require_hashes) if self.require_hashes and not hashes: # Known-good hashes are missing for this requirement, so # shim it with a facade object that will provoke hash # computation and then raise a HashMissing exception # showing the user what the hash should be. hashes = MissingHashes() download_dir = self.download_dir if link.is_wheel and self.wheel_download_dir: # when doing 'pip wheel` we download wheels to a # dedicated dir. download_dir = self.wheel_download_dir try: local_path = unpack_url( link, req.source_dir, self.downloader, download_dir, hashes=hashes, ) except requests.HTTPError as exc: logger.critical( 'Could not install requirement %s because of error %s', req, exc, ) raise InstallationError( 'Could not install requirement {} because of HTTP ' 'error {} for URL {}'.format(req, exc, link) ) # For use in later processing, preserve the file path on the # requirement. if local_path: req.local_file_path = local_path if link.is_wheel: if download_dir: # When downloading, we only unpack wheels to get # metadata. autodelete_unpacked = True else: # When installing a wheel, we use the unpacked # wheel. autodelete_unpacked = False else: # We always delete unpacked sdists after pip runs. autodelete_unpacked = True if autodelete_unpacked: write_delete_marker_file(req.source_dir) abstract_dist = _get_prepared_distribution( req, self.req_tracker, self.finder, self.build_isolation, ) if download_dir: if link.is_existing_dir(): logger.info('Link is a directory, ignoring download_dir') elif local_path and not os.path.exists( os.path.join(download_dir, link.filename) ): _copy_file(local_path, download_dir, link) if self._download_should_save: # Make a .zip of the source_dir we already created. if link.is_vcs: req.archive(self.download_dir) return abstract_dist def prepare_editable_requirement( self, req, # type: InstallRequirement ): # type: (...) -> AbstractDistribution """Prepare an editable requirement """ assert req.editable, "cannot prepare a non-editable req as editable" logger.info('Obtaining %s', req) with indent_log(): if self.require_hashes: raise InstallationError( 'The editable requirement {} cannot be installed when ' 'requiring hashes, because there is no single file to ' 'hash.'.format(req) ) req.ensure_has_source_dir(self.src_dir) req.update_editable(not self._download_should_save) abstract_dist = _get_prepared_distribution( req, self.req_tracker, self.finder, self.build_isolation, ) if self._download_should_save: req.archive(self.download_dir) req.check_if_exists(self.use_user_site) return abstract_dist def prepare_installed_requirement( self, req, # type: InstallRequirement skip_reason # type: str ): # type: (...) -> AbstractDistribution """Prepare an already-installed requirement """ assert req.satisfied_by, "req should have been satisfied but isn't" assert skip_reason is not None, ( "did not get skip reason skipped but req.satisfied_by " "is set to {}".format(req.satisfied_by) ) logger.info( 'Requirement %s: %s (%s)', skip_reason, req, req.satisfied_by.version ) with indent_log(): if self.require_hashes: logger.debug( 'Since it is already installed, we are trusting this ' 'package without checking its hash. To ensure a ' 'completely repeatable environment, install into an ' 'empty virtualenv.' ) abstract_dist = InstalledDistribution(req) return abstract_dist


Welcome!
If this is your first time, welcome to Harvest Data and Specimen Inventory system.
- Get started by searching or browsing through the menu on the left side of available clinical data and specimen type filters.
- Once you have identified the data filter you would like to use for your query choose Apply Filters.
- Next choose View Results to see your detailed report
- On the results page you can add data points to your query by selecting Change Columns.
- You can Save or Export the data from your queries for future use


A city building tile-style game. The player is able to drag and place tiles. Most tiles have unique effects. The player wins when he collects a certain number of chaos emeralds. Factors like happiness, effect the rate at which these chaos emeralds are found. The player can also zoom in and out and scroll around the city.
This isn't technically a game but I needed more content on this page. This program will let the user load .obj files and then apply then cel-shaded effect to them.


:
:
I will make stracture with HTML and design with HTML. After that, I want to eat pudding
I will make stracture with HTML and design with HTML. After that, I want to eat pudding
I will make stracture with HTML and design with HTML. After that, I want to eat pudding
I will make stracture with HTML and design with HTML. After that, I want to eat pudding


Loading...
{{ data.street }} {{ data.city }}, {{ data.state }} {{ data.zipcode }}
Please make sure to refresh the app or close the app and reopen to see the effect.


{% extends "course_app_base.html" %} {% load static %} {% block title %}{{ site_name }} | Boeing Course Enroll{% endblock %} {% block content %}
The voucher you have submitted has already been redeemed. If you believe this is an error, please contact:
MIT xPRO Customer Support
xpro@mit.edu


[Interragator] Officer K D 6 - 3 . 7. Let’s begin. Ready?
[K] Yes, sir
[Interragator] Recite your baseline.
[K] And blood-black nothingness began to spin
[K] A system of cells interlinked within cells,
[K] interlinked within cells, interlinked within one stem.

[K] And dreadfully distinct against the dark, a tall white fountain played...
[Interragator] Cells.
[K] Cells.
[Interragator] Have you ever been in an institution?
[Interragator] Cells.
[K] Cells.
[Interragator] Do they keep you in a cell?
[Interragator] Cells.
[K] Cells.
[Interragator] When you're not performing your duties, do they keep you in a little box?
[Interragator] Cells.
[K] Cells.
[Interragator] Interlinked.
[K] Interlinked.
[Interragator] What's it like to hold the hand of someone you love?
[Interragator] Interlinked.
[K] Interlinked.
[Interragator] Did they teach you how to feel, finger to finger?
[Interragator] Interlinked.
[K] Interlinked.
[Interragator] Do you long for having your heart interlinked?
[Interragator] Interlinked.
[K] Interlinked.
[Interragator] Do you dream about being interlinked?
[K] Interlinked.

[Interragator] Interlinked.
[K] Interlinked.
[Interragator] Do you feel that there's a part of you that's missing?
[Interragator] Interlinked.
[K] Interlinked.
[Interragator] Within cells interlinked.
[K] Within cells interlinked.
[Interragator] Why don't you say that three times: "within cells interlinked"
[K] Within cells interlinked.
Within cells interlinked.
Within cells interlinked.
[Interragator] We're done.
[Interragator] Constant K.
[Interragator] You can pick up your bonus.
[K] Thank you, sir.
[Interragator] Cells
[K] Cells
[Interragator] Have you ever been in an institution. Cells
[K] Cells
[Interragator] When you're not performing your duties, do they keep you in a little box? Cells.
[K] Cells
[Interragator] Interlinked...
[K] Interlinked
[Interragator] What’s it like to hold the hand of someone you love?
 Dreadfully
[K] Dreadfully
[Interragator] Do you like being separated from other people? Distinct
[K] Distinct
[Interragator] Dreadfully distinct
[K] Dreadfully distinct
[Interragator] Dark
[K] Dark
[Interragator] Within cells interlinked
[K] Within cells interlinked
[Interragator] Withing one stem
[K] Withing one stem
[Interragator] And dreadfully distinct
[K] And dreadfully distinct
[Interragator] Against the dark
[K] Against the dark
[Interragator] A tall white fountain played
[K] A tall white fountain played
[Interragator] You're not even close to baseline


| Nettrok FC | VS | Bramma FC | June 16, 17:00 | Netro Stadium | Buy a Ticket |
| Bogro FC | VS | Joypur FC | June 16, 17:00 | Bramma Stadium | Buy a Ticket |
| Mirpur FC | VS | men utd | June 16, 17:00 | Golshan Stadium | Buy a Ticket |
| Kapa FC | VS | Dhoar FC | June 16, 17:00 | Mirpur Stadium | Buy a Ticket |
| Trishal FC | VS | Banani FC | June 16, 17:00 | Badda Stadium | Buy a Ticket |
| Badda FC | VS | Nattrok Fc | June 16, 17:00 | Mirpur Stadium | Buy a Ticket |
| Bramma FC | VS | Bogro FC | June 16, 17:00 | Netro Stadium | Buy a Ticket |
| Joypur FC | VS | Mirpur FC | June 16, 17:00 | Bramma Stadium | Buy a Ticket |
| Team | W | L | P | |
| 01 | Badda FC | 16 | 6 | 32 |
| 02 | Banani FC | 14 | 7 | 28 |
| 03 | Trishal FC | 18 | 8 | 26 |
| 04 | Dhoar FC | 15 | 6 | 32 |
| 05 | Kapa FC | 22 | 4 | 25 |
| 06 | Mirpur FC | 18 | 6 | 27 |
| 07 | Joypur FC | 14 | 7 | 29 |
| 08 | Bogro FC | 17 | 6 | 30 |
| 09 | Bramma FC | 16 | 8 | 29 |
| 10 | Nattrok FC | 18 | 6 | 24 |
| Born | sep 31, 1988 |
| Position | Forward |
| Squad number | 11 |
| Previous Club | Badda |
| Fallow us on |
| Born | sep 31, 1988 |
| Position | Goalkeeper |
| Squad number | 11 |
| Previous Club | Badda |
| Fallow us on |
| Born | July 21, 1994 |
| Position | striker |
| Squad number | 10 |
| Previous Club | Badda |
| Fallow us on |
| Born | sep 31, 1985 |
| Position | Defender |
| Squad number | 11 |
| Previous Club | Badda |
| Fallow us on |
| Born | sep 31, 1980 |
| Position | Defender |
| Squad number | 11 |
| Previous Club | Badda |
| Fallow us on |
| Born | sep 31, 1988 |
| Position | striker |
| Squad number | 11 |
| Previous Club | Badda |
| Fallow us on |
Praesent condimentum augue lorem, id commodo ex aliquet vel. Donec mi quam, mattis in dolor non, volutpat placerat ipsum. Donec varius ex non nulla hendrerit, a posuere lectus semper
Etiam et dolor venenatis, suscipit ex a, interdum augue. Maecenas in lectus sapien. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.


UD for Ukrainian
Tokenization and Word Segmentation
- In general, words are delimited by whitespace characters. Description of exceptions follows.
- According to typographical rules, many punctuation marks are attached to a neighboring word. We always tokenize them as separate tokens (words); that holds even for hyphenated compounds such as українсько-чеський “Ukrainian-Czech” (three tokens) and for abbreviations such as [і] т.i. “and so on” (four tokens).
- A whitespace separating digits in a large number is not treated as a word separator. For example, 1 000 000 (“1,000,000” by English rules) is one token.
- There are two closed classes of contractions that are treated as multi-word tokens and segmented to individual syntactic words:
- Pronouns like ні́де (немає де) “there is nowhere to”, ні́кому (немає кому) “there is no one to” (not to confuse with ніде́ “nowhere”, ніко́му “to no one”; notice the accent).
- Nouns fused with a numeral пів “half of”: півметра “half a meter”. Such spelling is now deprecated in standard Ukrainian and it is now correct to use a whitespace: пів метра.
Morphology
Tags
This is an overview only. For more detailed discussion and examples, see the list of Ukrainian POS tags and Ukrainian features.
- Ukrainian uses all 17 universal POS categories, including particles (PART). At present, more than 100 word types are tagged PART.
- The pronoun (PRON) vs. determiner (DET) distinction is based on word lists because the traditional grammar does not define determiners. In general, words that inflect for gender, to be able to agree with a modified noun, are tagged DET, even if they act independently in a given sentence; that includes possessives. Pronominal quantifiers (which the traditional grammar includes in numerals) are DET as well.
- Ukrainian has just one auxiliary verb (AUX), бути (“to be”) with its derivative бувати.
- In other words, бути and бувати are the only lemmas that occur with the AUX tag.
They may still occur also as normal VERB if they are used in purely existential sentences
(i.e. such that don’t even indicate location because if they do, then бути is treated as copula).
- Note that this may be changed in future. Existential sentences could be treated as elliptical versions of locational sentences; then the verb would be the root, but it could still be tagged as
AUX
and theAUX
-VERB
distinction could be anchored in the lexicon.
- Note that this may be changed in future. Existential sentences could be treated as elliptical versions of locational sentences; then the verb would be the root, but it could still be tagged as
- Verbs with modal meaning are not considered auxiliary in Ukrainian.
- There are five main (de)verbal forms, distinguished by the UPOS tag and the value of the VerbForm feature:
Nominal Features
- Nominal words (NOUN, PROPN and PRON) have an inherent Gender feature with one of three values:
Masc
,Fem
orNeut
. In some cases the masculine gender is further subclassified by the Animacy valuesAnim
andInan
. Feminine and neuter nominals do not distinguish animacy grammatically. - The two main values of the Number feature are
Sing
andPlur
. The following parts of speech inflect for number: NOUN, PROPN, PRON, ADJ, DET, VERB, AUX (finite, participles and converbs), marginally NUM.- Remnants of the
Dual
number occur only in the instrumental Case of a few nouns and all the agreeing parts of speech. - Selected nouns are plurale tantum (
Ptan
) or singulare tantum (Coll
). These two values are lexical and cannot be used with the agreeing adjectives, determiners or verbs. They also never occur with pronouns.
- Remnants of the
- Case has 7 possible values:
Nom
,Gen
,Dat
,Acc
,Voc
,Loc
,Ins
. It occurs with the nominal words, i.e., NOUN, PROPN, PRON, ADJ, DET, NUM. It can occur with participles but only with those tagged asADJ
. It never occurs with verbs.- The
Case
feature also occurs with prepositions (ADP). Here it is a lexical feature. Prepositions do not inflect for case but they subcategorize for the case of their noun phrase.
- The
Verbal Features
- Verbs have a lexical Aspect, either imperfective (
Imp
) or perfective (Perf
).- The
Aspect
feature should be also used with the corresponding derived nouns and adjectives (participles), if they have theVerbForm
feature.
- The
- Finite verbs always have one of three values of Mood:
Ind
,Imp
. Ukrainian conditional is formed periphrastically using the past participle of the content verb and a special form of the auxiliary verb б. - Verbs in the indicative mood always have one of three values of Tense:
Past
,Pres
orFut
.- Imperative forms do not have the
Tense
feature.
- Imperative forms do not have the
- There are two values of the Voice feature:
Act
andPass
. Only the passive participle hasVoice=Pass
. All other verb forms haveVoice=Act
.
Syntax
This is an overview only. For more detailed discussion and examples, see the list of Ukrainian relations.
Core Arguments, Oblique Arguments and Adjuncts
- Nominal subject (nsubj) is a noun phrase in the nominative case, without preposition.
- If the noun phrase is quantified, it may be in the genitive, which is required by the quantifier. If this is the case, then the quantifier is attached using a special relation, either nummod:gov or det:numgov.
- An infinitive verb may serve as the subject and is labeled as clausal subject, csubj.
On the other hand, verbal nouns as subjects are just
nsubj
. - A finite subordinate clause may serve as the subject and is labeled
csubj
.
- Objects defined in the Ukrainian grammar may be bare noun phrases in accusative, dative, genitive or instrumental, or prepositional phrases in accusative, dative, genitive, locative or instrumental.
- Bare accusative, dative, genitive and instrumental objects are considered core.
- All prepositional objects are considered oblique.
- Accusative objects of some verbs alternate with finite clausal complements, which are labeled ccomp.
- If a verb subcategorizes for the infinitive (e.g. modal verbs or verbs of control), the infinitival complement is labeled xcomp.
- If a verb subcategorizes for two core objects, one of them accusative (or
ccomp
) and the other non-accusative, then the non-accusative object is labeled iobj. Core nominal objects in other situations are labeled just obj.
- Adjuncts (a.k.a adverbial modifiers realized as noun phrases) are usually prepositional phrases, but they can be bare noun phrases as well. They are labeled obl:
- Temporal modifiers realized as accusative noun phrases: повернусь днями “I will come back next days.”
- Instrumental noun phrases expressing the way or means with which something was done.
- All prepositional phrases that are not prepositional objects (i.e., their role and form is not defined lexically by the predicate) are adjuncts.
Non-verbal Clauses
- The copula verb бути (be) is used in equational, attributional, locative, possessive and benefactory nonverbal clauses. Purely existential clauses (without indicating location) use бути as well but it is treated as the head of the clause and tagged VERB.
Relations Overview
- The following relation subtypes are used in Ukrainian:
- acl:adv adverbs acting as amod
- acl:relcl relative clauses
- advcl:pred
advcl
with secondary predication - advcl:svc adverbial infinitive
- advmod:det adverbial modification by a determiner
- compound:svc
- conj:svc coordination of serial verbs
- det:numgov pronominal quantifiers that are attached as children of the quantified noun but govern its case
- det:nummod pronominal quantifiers in cases in which they do not govern the case of the quantified noun
- flat:abs clausal absolutive
- flat:foreign non-first words in foreign phrases
- flat:name human names
- flat:range numerical and temporal ranges
- flat:repeat repetitions
- flat:sibl
- flat:title
- nummod:gov cardinal numbers that are attached as children of the counted noun but govern its case
- parataxis:discourse clausal
discourse
- parataxis:newsent connects sentences inside of a multi-sentence quote where it’s impossible to split the parent sentence
- parataxis:rel clauses relative to the whole parent sentence, that is, to the parent sentence predication itself
- vocative:cl clausal
vocative
- xcomp:pred
xcomp
with secondary predication
- The following relation types are not used in Ukrainian at all: clf
Treebanks
Currently there is a single Ukrainian UD treebank:


Gift yourself some sunshine and azure here at Pondicherry. Check out the activities available at Sahana.
Wanna live like a king without paying for it? Check out our new rates this holiday!
Overlooking the Indian Ocean, serene yet mischievous, Sahana has a location to die for and an ambience to live for.


The following tutorial shows how to create and execute the simple script that uses WinForm.
By using any text editor (eg. Notepad.exe) create file WinForm.cs that contains the WinForm sample
code.
Click here to obtain listing of WinForm.cs
Open command prompt. Make sure current directory is the directory where WinForm.cs is located.
Execute the following command in command prompt:
The script will create and show the following dialog.
In this example the script creates an instance of FCL class System.Windows.Forms.Form. The form initialisation code is placed into InitializeComponent() method to make it compatible with the Visual Studio form designer however it can be placed in any other appropriate place (eg. Form1 constructor).
This example is a part of sample library (cs-script/Samples folder). It can be easily recreated to be used as a skeleton code for your WinForm script. To do this execute the following command in your code:
This will instruct the script engine to output sample code in a file in the current directory.
CS-Script tutorials | Command-line interface


PKLOCALAUTHORITY
Section: pklocalauthority (8)Updated: May 2009
Index Return to Main Contents
NAME
pklocalauthority - PolicyKit Local AuthorityDESCRIPTION
The Local Authority is the default PolicyKit authority implementation. Configuration for the Local Authority and information pertaining to authorization decisions are read from local files on the disk. One design goal of the Local Authority is to split configuration items into separate files such that 3rd party packages and users won't conflict trying to edit the same files. This policy also ensures smooth upgrades when distributing PolicyKit using a package management system.
Files shipped with PolicyKit and 3rd party packages (e.g. under package manager control) typically have comments (such as lqDO NOT EDIT THIS FILE, it will be overwritten on updaterq) telling the system administrator that changes will be overwritten on update.
ADMINISTRATOR AUTHENTICATION
PolicyKit makes a distinction between user authentication (to make the user in front of the system prove he really is the user) and administrator authentication (to make the user in front of the system prove he really is an administrator). Since various operating systems (or even flavors of the same operating system) has different ways of defining "administrator", the Local Authority provides a way to specify what "administrator authentication" means.
By default, "administrator authentication" is defined as asking for the root password. Since some systems, for usability reasons, don't have a root password and instead rely on a group of users being member of an administrative group that gives them super-user privileges, the Local Authority can be configured to support this use-case as well.
Configuration for the Local Authority is read from files in the /etc/polkit-1/localauthority.conf.d directory. All files are read in lexigraphical order (using the C locale) meaning that later files can override earlier ones. The file 50-localauthority.conf contains the settings provided by the OS vendor. Users and 3rd party packages can drop configuration files with a priority higher than 60 to change the defaults. The configuration file format is simple. Each configuration file is a key file (also commonly known as a ini file) with a single group called [Configuration]. Only a single key, AdminIdentities is read. The value of this key is a semi-colon separated list of identities that can be used when administrator authentication is required. Users are specified by prefixing the user name with unix-user: and groups of users are specified by prefixing with unix-group:. See the section called lqEXAMPLESrq for an example of a configuration file.
DIRECTORY STRUCTURE
The Local Authority reads files with .pkla extension from all directories located inside the /etc/polkit-1/localauthority and /var/lib/polkit-1/localauthority directories. By default, the following sub-directories are installed.
-
/etc/polkit-1/ `-- localauthority |-- 10-vendor.d |-- 20-org.d |-- 30-site.d |-- 50-local.d `-- 90-mandatory.d
and
-
/var/lib/polkit-1/ `-- localauthority |-- 10-vendor.d |-- 20-org.d |-- 30-site.d |-- 50-local.d `-- 90-mandatory.d
The /etc/polkit-1/localauthority hierarchy is inteded for local configuration and the /var/lib/polkit-1/localauthority is intended for 3rd party packages.
Each .pkla file contains one or more authorization entries. If the underlying filesystem supports file monitoring, the Local Authority will reload information whenever .pkla files are added, removed or changed.
Each directory is intended for a specific audience
10-vendor.d
- Intended for use by the OS vendor.
20-org.d
- Intended for the organization deploying the OS.
30-site.d
- Intended for the site deploying the system.
50-local.d
- Intended for local usage.
90-mandatory.d
- Intended for the organization deploying the OS.
and new directories can be added/removed as needed.
As to regards to the content, each .pkla file is a standard key file and contains key/value pairs in one or more groups with each group representing an authorization entry. A .pkla file MUST be named by using a scheme to ensure that the name is unique, e.g. reverse DNS notation or similar. For example, if the organization is lqAcme Corprq needs to modify policy for the product lqFrobnicatorrq, a name like com.acme.frobnicator.pkla would be suitable.
AUTHORIZATION ENTRY
Each group in a .pkla file must have a name that is unique within the file it belongs to. The following keys are are recognized:
Identity
- A semi-colon separated list of globs to match identities. Each glob should start with unix-user: or unix-group: to specify whether to match on a UNIX user name or a UNIX group name.
Action
- A semi-colon separated list of globs to match action identifiers.
ResultActive
- The result to return for subjects in an active local session that matches one or more of the given identities. Allowed values are similar to what can be used in the defaults section of .policy files used to define actions, e.g. yes, no, auth_self, auth_self_keep, auth_admin and auth_admin_keep.
ResultInactive
- Like ResultActive but instead applies to subjects in inactive local sessions.
ResultAny
- Like ResultActive but instead applies to any subject.
ReturnValue
- A semi-colon separated list of key/value pairs (of the form key=value) that are added to the details of authorization result on positive matches.
All keys specified above are required except that only at least one of ResultAny, ResultInactive and ResultActive must be present. The ReturnValue key is optional.
EVALUATION ORDER
When a Mechanism requests services from the Authority to check if a given Subject is authorized for a given Action, the authorization entries discussed above are consulted using the following algorithm.
The authorization entries from all .pkla files are ordered using the following rules. First all the basename of all sub-directories (e.g. 30-site.d) from both the /etc/polkit-1/localauthority and /var/lib/polkit-1/localauthority directories are enumerated and sorted (using the C locale). If a name exists in both /etc and /var, the one in /etc takes precedence. Then all .pkla files are read in order from this list of sub-directories. For each .pkla file, authorizations from each file are appended in order resulting in an ordered list of authorization entries.
For example, given the following files
-
/var/lib/polkit-1 └── localauthority ├── 10-vendor.d │ └── 10-desktop-policy.pkla ├── 20-org.d ├── 30-site.d ├── 50-local.d ├── 55-org.my.company.d │ └── 10-org.my.company.product.pkla └── 90-mandatory.d /etc/polkit-1 └── localauthority ├── 10-vendor.d │ └── 01-some-changes-from-a-subvendor.pkla ├── 20-org.d ├── 30-site.d ├── 50-local.d ├── 55-org.my.company.d │ └── 10-org.my.company.product.pkla └── 90-mandatory.d
the evaluation order of the .pkla files is:
-
1.
10-desktop-policy.pkla
-
2.
01-some-changes-from-a-subvendor.pkla
-
3.
10-org.my.company.product.pkla (the /var one)
-
4.
10-org.my.company.product.pkla (the /etc one)
When the list of authorization entries has been calculated, the authorization check can be made. First, the user of the Subject is determined and the groups that the user belongs are looked up. For each group identity, the authorization entries are consulted in order. If the authorization check matches the data from the authorization check, then the authorization result from RequireAny, RequireInactive or RequireActive is used and ReturnValue is added to the authorization result.
Finally, the authorization entries are consulted using the user identity in the same manner.
Note that processing continues even after a match. This allows for socalled lqnegative authorizationsrq, see the section called lqEXAMPLESrq for further discussion.
EXAMPLES
The following .conf file
-
[Configuration] AdminIdentities=unix-group:desktop_admin_r
that any user in the desktop_admin_r UNIX group can be used for authentication when administrator authentication is needed. This file would typically be installed in the /etc/polkit-1/localauthority.conf.d directory and given the name 60-desktop-policy.conf to ensure that it is evaluted after the 50-localauthority.conf file shipped with PolicyKit. If the local administrator wants to override this (suppose 60-desktop-policy.conf was shipped as part of the OS) he can simply create a file 99-my-admin-configuration.conf with the following content
-
[Configuration] AdminIdentities=unix-user:lisa;unix-user:marge
to specify that only the users lisa and marge can authenticate when administrator authentication is needed.
The following .pkla file grants authorization to all users in the staff group for actions matching the glob com.example.awesomeproduct.* provided they are in an active session on the local console:
-
[Normal Staff Permissions] Identity=unix-group:staff Action=com.example.awesomeproduct.* ResultAny=no ResultInactive=no ResultActive=yes
If the users homer and grimes are member of the staff group but policy requires that an administrator needs to authenticate every time authorization for any action matching com.example.awesomeproduct.* is required, one would add
-
[Exclude Some Problematic Users] Identity=unix-user:homer;unix-user:grimes Action=com.example.awesomeproduct.* ResultAny=no ResultInactive=no ResultActive=auth_admin
and make sure this authorization entry is after the first one.
AUTHOR
Written by David Zeuthen<EMAIL_ADDRESS>with a lot of help from many others.
BUGS
Please send bug reports to either the distribution or the polkit-devel mailing list, see the link m[blue]http://lists.freedesktop.org/mailman/listinfo/polkit-develm[] on how to subscribe.
SEE ALSO
polkit(8)
Index
- NAME
- DESCRIPTION
- ADMINISTRATOR AUTHENTICATION
- DIRECTORY STRUCTURE
- AUTHORIZATION ENTRY
- EVALUATION ORDER
- EXAMPLES
- AUTHOR
- BUGS
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 05:34:28 GMT, December 24, 2015


|
MOTS Finder
Find non-star-shaped MOTSs
|
Base class for general metrics (i.e. of any dimension and signature). More...
Public Member Functions | |
| def | __call__ (self, point) |
| def | at (self, point) |
| Return the metric tensor at a given point. More... | |
| def | diff (self, point, inverse=False, diff=1) |
| Return derivatives of the metric at the given point. More... | |
| def | diff_lnsqrtg (self, point) |
| Return derivatives of ln(sqrt(det(g))). More... | |
| def | christoffel (self, point) |
| Compute the Christoffel symbols of this metric. More... | |
| def | christoffel_deriv (self, point) |
| Compute the derivatives of the Christoffel symbols. More... | |
| def | ricci_tensor (self, point) |
| Compute the components of the Ricci tensor. More... | |
| def | ricci_scalar (self, point) |
| Compute the scalar curvature (Ricci scalar). More... | |
Private Member Functions | |
| def | _mat_at (self, point) |
| Compute the metric tensor matrix at a given point. | |
| def | _compute_inverse_diff (self, point, diff=1) |
| Compute derivatives of the inverse metric from those of the metric. | |
Base class for general metrics (i.e. of any dimension and signature).
The methods child classes have to implement are:
| def at | ( | self, | |
| point | |||
| ) |
Return the metric tensor at a given point.
| def christoffel | ( | self, | |
| point | |||
| ) |
Compute the Christoffel symbols of this metric.
[a,b,c]
corresponding to . | def christoffel_deriv | ( | self, | |
| point | |||
| ) |
Compute the derivatives of the Christoffel symbols.
[a,b,c,d]
corresponding to . | def diff | ( | self, | |
| point, | |||
inverse = False , |
|||
diff = 1 |
|||
| ) |
Return derivatives of the metric at the given point.
If inverse==True
, the derivatives of the inverse metric are returned.
| point | Point (tuple/list/array) at which to compute the derivatives. |
| inverse | Whether to compute the derivatives of the inverse metric (indices up). |
| diff | Derivative order. Default is 1. |
i1, i2, ..., k, l
corresponding to (or the inverse components if inverse==True
).Notes
Subclasses may use _compute_inverse_diff() to compute the derivatives of inverse metrics. This is not implemented as default action to allow these classes to handle caching the results if they so desire.
A simple implementation of diff() might start with:
| def diff_lnsqrtg | ( | self, | |
| point | |||
| ) |
Return derivatives of ln(sqrt(det(g))).
This computes the terms and returns the results as a list (i.e. one element per value of i
).
| def ricci_scalar | ( | self, | |
| point | |||
| ) |
Compute the scalar curvature (Ricci scalar).
| def ricci_tensor | ( | self, | |
| point | |||
| ) |
Compute the components of the Ricci tensor.
This computes the components .


Assume you have two methods with signatures 'getX()' and 'isX()'. Both methods are getters for property 'x'. So the result of invoking 'foo.x' can be unexpected. Reports methods which have such a problem.