text
stringlengths 1
22.8M
|
|---|
```kotlin
package net.corda.serialization.internal.amqp
import net.corda.core.serialization.CordaSerializationTransformEnumDefault
import net.corda.core.serialization.CordaSerializationTransformRename
import net.corda.serialization.internal.model.LocalTypeInformation
import org.apache.qpid.proton.amqp.DescribedType
import org.apache.qpid.proton.codec.DescribedTypeConstructor
import java.io.NotSerializableException
import java.util.*
// NOTE: We are effectively going to replicate the annotations, we need to do this because
// we can't instantiate instances of those annotation classes and this code needs to
// work at the de-serialising end
/**
* Base class for representations of specific types of transforms as applied to a type within the
* Corda serialisation framework
*/
abstract class Transform : DescribedType {
companion object : DescribedTypeConstructor<Transform> {
val DESCRIPTOR = AMQPDescriptorRegistry.TRANSFORM_ELEMENT.amqpDescriptor
/**
* @param obj: a serialized instance of a described type, should be one of the
* descendants of this class
*/
private fun checkDescribed(obj: Any?): Any? {
val describedType = obj as DescribedType
if (describedType.descriptor != DESCRIPTOR) {
throw AMQPNoTypeNotSerializableException("Unexpected descriptor ${describedType.descriptor}.")
}
return describedType.described
}
/**
* From an encoded descendant return an instance of the specific type. Transforms are encoded into
* the schema as a list of class name and parameters.Using the class name (list element 0)
* create the appropriate class instance
*
* For future proofing any unknown transform types are not treated as errors, rather we
* simply create a placeholder object so we can ignore it
*
* @param obj: a serialized instance of a described type, should be one of the
* descendants of this class
*/
override fun newInstance(obj: Any?): Transform {
val described = checkDescribed(obj) as List<*>
return when (described[0]) {
EnumDefaultSchemaTransform.typeName -> EnumDefaultSchemaTransform.newInstance(described)
RenameSchemaTransform.typeName -> RenameSchemaTransform.newInstance(described)
else -> UnknownTransform()
}
}
override fun getTypeClass(): Class<*> = Transform::class.java
}
override fun getDescriptor(): Any = DESCRIPTOR
/**
* Return a string representation of a transform in terms of key / value pairs, used
* by the serializer to encode arbitrary transforms
*/
abstract fun params(): String
abstract val name: String
}
/**
* Transform type placeholder that allows for backward compatibility. Should a noce recieve
* a transform type it doesn't recognise, we can will use this as a placeholder
*/
class UnknownTransform : Transform() {
companion object : DescribedTypeConstructor<UnknownTransform> {
const val typeName = "UnknownTransform"
override fun newInstance(obj: Any?) = UnknownTransform()
override fun getTypeClass(): Class<*> = UnknownTransform::class.java
}
override fun getDescribed(): Any = emptyList<Any>()
override fun params() = ""
override val name: String get() = typeName
}
/**
* Used by the unit testing framework
*/
class UnknownTestTransform(val a: Int, val b: Int, val c: Int) : Transform() {
companion object : DescribedTypeConstructor<UnknownTestTransform> {
const val typeName = "UnknownTest"
override fun newInstance(obj: Any?): UnknownTestTransform {
val described = obj as List<*>
return UnknownTestTransform(described[1] as Int, described[2] as Int, described[3] as Int)
}
override fun getTypeClass(): Class<*> = UnknownTransform::class.java
}
override fun getDescribed(): Any = listOf(name, a, b, c)
override fun params() = ""
override val name: String get() = typeName
}
/**
* Transform to be used on an Enumerated Type whenever a new element is added
*
* @property old The value the [new] instance should default to when not available
* @property new the value (as a String) that has been added
*/
class EnumDefaultSchemaTransform(val old: String, val new: String) : Transform() {
companion object : DescribedTypeConstructor<EnumDefaultSchemaTransform> {
/**
* Value encoded into the schema that identifies a transform as this type
*/
const val typeName = "EnumDefault"
override fun newInstance(obj: Any?): EnumDefaultSchemaTransform {
val described = obj as List<*>
val old = described[1] as? String ?: throw IllegalStateException("Was expecting \"old\" as a String")
val new = described[2] as? String ?: throw IllegalStateException("Was expecting \"new\" as a String")
return EnumDefaultSchemaTransform(old, new)
}
override fun getTypeClass(): Class<*> = EnumDefaultSchemaTransform::class.java
}
@Suppress("UNUSED")
constructor (annotation: CordaSerializationTransformEnumDefault) : this(annotation.old, annotation.new)
override fun getDescribed(): Any = listOf(name, old, new)
override fun params() = "old=${old.esc()} new=${new.esc()}"
override fun equals(other: Any?) = (
(other is EnumDefaultSchemaTransform && other.new == new && other.old == old) || super.equals(other))
override fun hashCode() = (17 * new.hashCode()) + old.hashCode()
override val name: String get() = typeName
}
/**
* Transform applied to either a class or enum where a property is renamed
*
* @property from the name of the property or constant prior to being changed, i.e. what it was
* @property to the new name of the property or constant after the change has been made, i.e. what it is now
*/
class RenameSchemaTransform(val from: String, val to: String) : Transform() {
companion object : DescribedTypeConstructor<RenameSchemaTransform> {
/**
* Value encoded into the schema that identifies a transform as this type
*/
const val typeName = "Rename"
override fun newInstance(obj: Any?): RenameSchemaTransform {
val described = obj as List<*>
val from = described[1] as? String ?: throw IllegalStateException("Was expecting \"from\" as a String")
val to = described[2] as? String ?: throw IllegalStateException("Was expecting \"to\" as a String")
return RenameSchemaTransform(from, to)
}
override fun getTypeClass(): Class<*> = RenameSchemaTransform::class.java
}
@Suppress("UNUSED")
constructor (annotation: CordaSerializationTransformRename) : this(annotation.from, annotation.to)
override fun getDescribed(): Any = listOf(name, from, to)
override fun params() = "from=${from.esc()} to=${to.esc()}"
override fun equals(other: Any?) = (
(other is RenameSchemaTransform && other.from == from && other.to == to) || super.equals(other))
override fun hashCode() = (11 * from.hashCode()) + to.hashCode()
override val name: String get() = typeName
}
typealias TransformsMap = EnumMap<TransformTypes, MutableList<Transform>>
/**
* Processes the annotations applied to classes intended for serialisation, to get the transforms that can be applied to them.
*/
object TransformsAnnotationProcessor {
/**
* Obtain all of the transforms applied for the given [Class].
*/
fun getTransformsSchema(type: Class<*>): TransformsMap {
return when {
type.isEnum -> getEnumTransformsSchema(type)
// We only have transforms for enums at present.
else -> TransformsMap(TransformTypes::class.java)
}
}
fun getEnumTransformsSchema(type: Class<*>): TransformsMap {
val result = TransformsMap(TransformTypes::class.java)
supportedTransforms.forEach { supportedTransform ->
val annotationContainer = type.getAnnotation(supportedTransform.type) ?: return@forEach
result.processAnnotations(
type,
supportedTransform.enum,
supportedTransform.getAnnotations(annotationContainer))
}
return result
}
private fun TransformsMap.processAnnotations(type: Class<*>, transformType: TransformTypes, annotations: List<Annotation>) {
annotations.forEach { annotation ->
addTransform(type, transformType, transformType.build(annotation))
}
}
private fun TransformsMap.addTransform(type: Class<*>, transformType: TransformTypes, transform: Transform) {
// we're explicitly rejecting repeated annotations, whilst it's fine and we'd just
// ignore them it feels like a good thing to alert the user to since this is
// more than likely a typo in their code so best make it an actual error
compute(transformType) { _, transforms ->
when {
transforms == null -> mutableListOf(transform)
transform in transforms -> throw AMQPNotSerializableException(
type,
"Repeated unique transformation annotation of type ${transform.name}")
else -> transforms.apply { this += transform }
}
}
}
}
/**
* Represents the set of all transforms that can be a applied to all classes represented as part of
* an AMQP schema. It forms a part of the AMQP envelope alongside the [Schema] and the serialized bytes
*
* @property types maps class names to a map of transformation types. In turn those transformation types
* are each a list of instances o that transform.
*/
data class TransformsSchema(val types: Map<String, EnumMap<TransformTypes, MutableList<Transform>>>) : DescribedType {
companion object : DescribedTypeConstructor<TransformsSchema> {
val DESCRIPTOR = AMQPDescriptorRegistry.TRANSFORM_SCHEMA.amqpDescriptor
/**
* Prepare a schema for encoding, takes all of the types being transmitted and inspects each
* one for any transform annotations. If there are any build up a set that can be
* encoded into the AMQP [Envelope]
*
* @param schema should be a [Schema] generated for a serialised data structure
* @param sf should be provided by the same serialization context that generated the schema
*/
fun build(schema: Schema, sf: LocalSerializerFactory): TransformsSchema {
val transformsMap = schema.types.asSequence().mapNotNull { type ->
val localTypeInformation = sf.getTypeInformation(type.name)
if (localTypeInformation is LocalTypeInformation.AnEnum) {
localTypeInformation.transforms.source.let {
if (it.isEmpty()) null else type.name to it
}
}
else null
}.toMap()
return TransformsSchema(transformsMap)
}
override fun getTypeClass(): Class<*> = TransformsSchema::class.java
/**
* Constructs an instance of the object from the serialised form of an instance
* of this object
*/
override fun newInstance(described: Any?): TransformsSchema {
val rtn = mutableMapOf<String, EnumMap<TransformTypes, MutableList<Transform>>>()
val describedType = described as? DescribedType ?: return TransformsSchema(rtn)
if (describedType.descriptor != DESCRIPTOR) {
throw NotSerializableException("Unexpected descriptor ${describedType.descriptor}.")
}
val map = describedType.described as? Map<*, *>
?: throw NotSerializableException("Transform schema must be encoded as a map")
map.forEach { type ->
val fingerprint = type.key as? String
?: throw NotSerializableException("Fingerprint must be encoded as a string")
rtn[fingerprint] = EnumMap<TransformTypes, MutableList<Transform>>(TransformTypes::class.java)
(type.value as Map<*, *>).forEach { transformType, transforms ->
val transform = TransformTypes.newInstance(transformType)
rtn[fingerprint]!![transform] = mutableListOf()
(transforms as List<*>).forEach {
rtn[fingerprint]!![TransformTypes.newInstance(transformType)]?.add(Transform.newInstance(it))
?: throw NotSerializableException("De-serialization error with transform for class "
+ "${type.key} ${transform.name}")
}
}
}
return TransformsSchema(rtn)
}
}
override fun getDescriptor(): Any = DESCRIPTOR
override fun getDescribed(): Any = types
@Suppress("NAME_SHADOWING")
override fun toString(): String {
data class Indent(val indent: String) {
@Suppress("UNUSED") constructor(i: Indent) : this(" ${i.indent}")
override fun toString() = indent
}
val sb = StringBuilder("")
val indent = Indent("")
sb.appendLine("$indent<type-transforms>")
types.forEach { type ->
val indent = Indent(indent)
sb.appendLine("$indent<type name=${type.key.esc()}>")
type.value.forEach { transform ->
val indent = Indent(indent)
sb.appendLine("$indent<transforms type=${transform.key.name.esc()}>")
transform.value.forEach {
val indent = Indent(indent)
sb.appendLine("$indent<transform ${it.params()} />")
}
sb.appendLine("$indent</transforms>")
}
sb.appendLine("$indent</type>")
}
sb.appendLine("$indent</type-transforms>")
return sb.toString()
}
}
private fun String.esc() = "\"$this\""
```
|
```objective-c
#pragma once
#include <Parsers/IParserBase.h>
namespace DB
{
/** Parses queries of the form
* SHOW [EXTENDED] INDEX|INDEXES|KEYS FROM|IN tbl [FROM|IN db] [WHERE expr]
*/
class ParserShowIndexesQuery : public IParserBase
{
protected:
const char * getName() const override { return "SHOW INDEXES query"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};
}
```
|
```java
package org.goshop.shiro.service;
import org.goshop.redis.service.JedisClient;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* Created by Administrator on 2016/3/13.
*/
public class RedisCacheManager implements CacheManager {
private static final Logger logger = LoggerFactory
.getLogger(RedisCacheManager.class);
@Autowired
private JedisClient jedisClient;
public JedisClient getJedisClient() {
return jedisClient;
}
public void setJedisClient(JedisClient jedisClient) {
this.jedisClient = jedisClient;
}
// fast lookup by name map
private final ConcurrentMap<String, Cache> caches = new ConcurrentHashMap<String, Cache>();
/**
* The Redis key prefix for caches
*/
private String keyPrefix = "goshop2_shiro_redis_cache:";
/**
* Returns the Redis session keys
* prefix.
* @return The prefix
*/
public String getKeyPrefix() {
return keyPrefix;
}
/**
* Sets the Redis sessions key
* prefix.
* @param keyPrefix The prefix
*/
public void setKeyPrefix(String keyPrefix) {
this.keyPrefix = keyPrefix;
}
@Override
public <K, V> Cache<K, V> getCache(String name) throws CacheException {
logger.debug(": " + name + " RedisCache");
Cache c = caches.get(name);
if (c == null) {
// create a new cache instance
c = new RedisCache<K, V>(jedisClient, keyPrefix);
// add it to the cache collection
caches.put(name, c);
}
return c;
}
}
```
|
```c
/*++
version 3. Alternative licensing terms are available. Contact
info@minocacorp.com for details. See the LICENSE file at the root of this
project for complete licensing information.
Module Name:
runtime.c
Abstract:
This module implements platform-specific runtime code for the Raspberry Pi
2 system.
Author:
Chris Stevens 19-Mar-2015
Environment:
Firmware
--*/
//
// your_sha256_hash--- Includes
//
#include <uefifw.h>
#include "../rpi2fw.h"
//
// your_sha256_hash Definitions
//
//
// Define the Raspberry Pi 2 specific reset status value to indicate that the
// firmware should not proceed with the next boot. The reset status register
// stores the partition to boot in every other of the first 12 bits. The value
// 0x3F (spaced out to 0x555) indicates that the firmware should halt.
//
#define RPI2_BCM2709_PRM_RESET_STATUS_HALT 0x00000555
//
// ------------------------------------------------------ Data Type Definitions
//
//
// ----------------------------------------------- Internal Function Prototypes
//
EFIAPI
VOID
EfipBcm2836ResetSystem (
EFI_RESET_TYPE ResetType,
EFI_STATUS ResetStatus,
UINTN DataSize,
VOID *ResetData
);
EFIAPI
EFI_STATUS
EfipBcm2836GetTime (
EFI_TIME *Time,
EFI_TIME_CAPABILITIES *Capabilities
);
EFIAPI
EFI_STATUS
EfipBcm2836SetTime (
EFI_TIME *Time
);
EFIAPI
EFI_STATUS
EfipBcm2836GetWakeupTime (
BOOLEAN *Enabled,
BOOLEAN *Pending,
EFI_TIME *Time
);
EFIAPI
EFI_STATUS
EfipBcm2836SetWakeupTime (
BOOLEAN Enable,
EFI_TIME *Time
);
//
// your_sha256_hash---- Globals
//
VOID *EfiBcm2836PrmBase = (VOID *)BCM2836_BASE + BCM2709_PRM_OFFSET;
//
// your_sha256_hash-- Functions
//
EFI_STATUS
EfiPlatformRuntimeInitialize (
VOID
)
/*++
Routine Description:
This routine performs platform-specific firmware initialization in the
runtime core driver. The runtime routines are in a separate binary from the
firmware core routines as they need to be relocated for runtime. This
routine should perform platform-specific initialization needed to provide
the core runtime services.
Arguments:
None.
Return Value:
EFI status code.
--*/
{
//
// Take over the runtime services. The runtime library recomputes the
// CRC so there's no need to do it here.
//
EfiRuntimeServices->GetTime = EfipBcm2836GetTime;
EfiRuntimeServices->SetTime = EfipBcm2836SetTime;
EfiRuntimeServices->GetWakeupTime = EfipBcm2836GetWakeupTime;
EfiRuntimeServices->SetWakeupTime = EfipBcm2836SetWakeupTime;
EfiRuntimeServices->ResetSystem = EfipBcm2836ResetSystem;
return EFI_SUCCESS;
}
EFI_STATUS
EfiPlatformReadNonVolatileData (
VOID *Data,
UINTN DataSize
)
/*++
Routine Description:
This routine reads the EFI variable data from non-volatile storage.
Arguments:
Data - Supplies a pointer where the platform returns the non-volatile
data.
DataSize - Supplies the size of the data to return.
Return Value:
EFI_SUCCESS if some data was successfully loaded.
EFI_UNSUPPORTED if the platform does not have non-volatile storage. In this
case the firmware core saves the non-volatile variables to a file on the
EFI system partition, and the variable library hopes to catch the same
variable buffer on reboots to see variable writes that happened at
runtime.
EFI_DEVICE_IO_ERROR if a device error occurred during the operation.
Other error codes on other failures.
--*/
{
return EFI_UNSUPPORTED;
}
EFI_STATUS
EfiPlatformWriteNonVolatileData (
VOID *Data,
UINTN DataSize
)
/*++
Routine Description:
This routine writes the EFI variable data to non-volatile storage.
Arguments:
Data - Supplies a pointer to the data to write.
DataSize - Supplies the size of the data to write, in bytes.
Return Value:
EFI_SUCCESS if some data was successfully loaded.
EFI_UNSUPPORTED if the platform does not have non-volatile storage. In this
case the firmware core saves the non-volatile variables to a file on the
EFI system partition, and the variable library hopes to catch the same
variable buffer on reboots to see variable writes that happened at
runtime.
EFI_DEVICE_IO_ERROR if a device error occurred during the operation.
Other error codes on other failures.
--*/
{
return EFI_UNSUPPORTED;
}
VOID
EfiPlatformRuntimeExitBootServices (
VOID
)
/*++
Routine Description:
This routine is called in the runtime core driver when the firmware is in
the process of terminating boot services. The platform can do any work it
needs to prepare for the imminent termination of boot services.
Arguments:
None.
Return Value:
None.
--*/
{
return;
}
VOID
EfiPlatformRuntimeVirtualAddressChange (
VOID
)
/*++
Routine Description:
This routine is called in the runtime core driver when the firmware is
converting to virtual address mode. It should convert any pointers it's
got. This routine is called after ExitBootServices, so no EFI boot services
are available.
Arguments:
None.
Return Value:
None.
--*/
{
//
// Convert the PRM base for ResetSystem.
//
EfiConvertPointer(0, &EfiBcm2836PrmBase);
return;
}
//
// --------------------------------------------------------- Internal Functions
//
EFIAPI
VOID
EfipBcm2836ResetSystem (
EFI_RESET_TYPE ResetType,
EFI_STATUS ResetStatus,
UINTN DataSize,
VOID *ResetData
)
/*++
Routine Description:
This routine resets the entire platform.
Arguments:
ResetType - Supplies the type of reset to perform.
ResetStatus - Supplies the status code for this reset.
DataSize - Supplies the size of the reset data.
ResetData - Supplies an optional pointer for reset types of cold, warm, or
shutdown to a null-terminated string, optionally followed by additional
binary data.
Return Value:
None. This routine does not return.
--*/
{
volatile UINT32 *PrmResetStatus;
volatile UINT32 *ResetControl;
UINT32 Value;
volatile UINT32 *Watchdog;
//
// Attempt to flush non-volatile variable data out to storage.
//
EfiCoreFlushVariableData();
//
// There is no official way to shutdown the BCM2836. The Raspberry Pi 2
// firmware, however, stores the boot partition information in the PRM
// reset status register. A special partition value is reserved to indicate
// that the firmware should not proceed with the boot process.
//
if (ResetType == EfiResetShutdown) {
PrmResetStatus = EfiBcm2836PrmBase + Bcm2709PrmResetStatus;
*PrmResetStatus |= BCM2709_PRM_PASSWORD |
RPI2_BCM2709_PRM_RESET_STATUS_HALT;
}
Watchdog = EfiBcm2836PrmBase + Bcm2709PrmWatchdog;
*Watchdog = BCM2709_PRM_WATCHDOG_RESET_TICKS | BCM2709_PRM_PASSWORD;
ResetControl = EfiBcm2836PrmBase + Bcm2709PrmResetControl;
Value = *ResetControl;
Value &= ~BCM2709_PRM_RESET_CONTROL_TYPE_MASK;
Value |= BCM2709_PRM_PASSWORD |
BCM2709_PRM_RESET_CONTROL_TYPE_FULL;
*ResetControl = Value;
return;
}
EFIAPI
EFI_STATUS
EfipBcm2836GetTime (
EFI_TIME *Time,
EFI_TIME_CAPABILITIES *Capabilities
)
/*++
Routine Description:
This routine returns the current time and dat information, and
timekeeping capabilities of the hardware platform.
Arguments:
Time - Supplies a pointer where the current time will be returned.
Capabilities - Supplies an optional pointer where the capabilities will be
returned on success.
Return Value:
EFI_SUCCESS on success.
EFI_INVALID_PARAMETER if the time parameter was NULL.
EFI_DEVICE_ERROR if there was a hardware error accessing the device.
EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
--*/
{
return EFI_UNSUPPORTED;
}
EFIAPI
EFI_STATUS
EfipBcm2836SetTime (
EFI_TIME *Time
)
/*++
Routine Description:
This routine sets the current local time and date information.
Arguments:
Time - Supplies a pointer to the time to set.
Return Value:
EFI_SUCCESS on success.
EFI_INVALID_PARAMETER if a time field is out of range.
EFI_DEVICE_ERROR if there was a hardware error accessing the device.
EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
--*/
{
return EFI_UNSUPPORTED;
}
EFIAPI
EFI_STATUS
EfipBcm2836GetWakeupTime (
BOOLEAN *Enabled,
BOOLEAN *Pending,
EFI_TIME *Time
)
/*++
Routine Description:
This routine gets the current wake alarm setting.
Arguments:
Enabled - Supplies a pointer that receives a boolean indicating if the
alarm is currently enabled or disabled.
Pending - Supplies a pointer that receives a boolean indicating if the
alarm signal is pending and requires acknowledgement.
Time - Supplies a pointer that receives the current wake time.
Return Value:
EFI_SUCCESS on success.
EFI_INVALID_PARAMETER if any parameter is NULL.
EFI_DEVICE_ERROR if there was a hardware error accessing the device.
EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
--*/
{
return EFI_UNSUPPORTED;
}
EFIAPI
EFI_STATUS
EfipBcm2836SetWakeupTime (
BOOLEAN Enable,
EFI_TIME *Time
)
/*++
Routine Description:
This routine sets the current wake alarm setting.
Arguments:
Enable - Supplies a boolean enabling or disabling the wakeup timer.
Time - Supplies an optional pointer to the time to set. This parameter is
only optional if the enable parameter is FALSE.
Return Value:
EFI_SUCCESS on success.
EFI_INVALID_PARAMETER if a time field is out of range.
EFI_DEVICE_ERROR if there was a hardware error accessing the device.
EFI_UNSUPPORTED if the wakeup timer is not supported on this platform.
--*/
{
return EFI_UNSUPPORTED;
}
```
|
Phaeotrichosphaeria is a genus of fungi in the Sordariomycetes class (subclass Sordariomycetidae) of the Ascomycota. The relationship of this taxon to other taxa within the class is unknown (incertae sedis), and it has not yet been placed with certainty into any order or family.
References
External links
Index Fungorum
Sordariomycetes
|
SPCC might refer to:
Educational institutions
St. Paul's Co-educational College in Hong Kong
St. Philip's Christian College in Waratah, Australia
St Peter Claver College in Riverview, Australia
South Piedmont Community College in the US state of North Carolina
Societies for the Prevention of Cruelty to Children
National Society for the Prevention of Cruelty to Children
Irish Society for the Prevention of Cruelty to Children
Massachusetts Society for the Prevention of Cruelty to Children
New York Society for the Prevention of Cruelty to Children
Children 1st, previously known as the Royal Scottish Society for Prevention of Cruelty to Children
Other
St Pancras Cruising Club, a members' group of canal boat owners in London
St. Paul Curling Club in St. Paul, Minnesota
Sex Positive Community Center in Seattle, Washington
Shelly Park Cruising Club
Spill Prevention, Control and Countermeasure, a program of the United States Environmental Protection Agency
Southern Pacific Communications Company, a component part of the U.S. telecom company CenturyLink
Cold Rolled Carbon Steel Sheets and Strip, a Japanese industrial standard.
|
```python
Get the most of `float`s
Looping techniques
How to count
`weakref` callbacks
`weakref` proxies
```
|
```c++
//your_sha256_hash-----------//
//
// See accompanying file LICENSE_1_0.txt or copy at
// path_to_url
//
// See path_to_url for more information.
//your_sha256_hash-----------//
#ifndef BOOST_COMPUTE_DETAIL_DIAGNOSTIC_HPP
#define BOOST_COMPUTE_DETAIL_DIAGNOSTIC_HPP
// Macros for suppressing warnings for GCC version 4.6 or later. Usage:
//
// BOOST_COMPUTE_BOOST_COMPUTE_GCC_DIAG_OFF(sign-compare);
// if(a < b){
// BOOST_COMPUTE_BOOST_COMPUTE_GCC_DIAG_ON(sign-compare);
//
// Source: path_to_url
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#define BOOST_COMPUTE_GCC_DIAG_STR(s) #s
#define BOOST_COMPUTE_GCC_DIAG_JOINSTR(x,y) BOOST_COMPUTE_GCC_DIAG_STR(x ## y)
# define BOOST_COMPUTE_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
# define BOOST_COMPUTE_GCC_DIAG_PRAGMA(x) BOOST_COMPUTE_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
# define BOOST_COMPUTE_GCC_DIAG_OFF(x) BOOST_COMPUTE_GCC_DIAG_PRAGMA(push) \
BOOST_COMPUTE_GCC_DIAG_PRAGMA(ignored BOOST_COMPUTE_GCC_DIAG_JOINSTR(-W,x))
# define BOOST_COMPUTE_GCC_DIAG_ON(x) BOOST_COMPUTE_GCC_DIAG_PRAGMA(pop)
# else
# define BOOST_COMPUTE_GCC_DIAG_OFF(x) \
BOOST_COMPUTE_GCC_DIAG_PRAGMA(ignored BOOST_COMPUTE_GCC_DIAG_JOINSTR(-W,x))
# define BOOST_COMPUTE_GCC_DIAG_ON(x) \
BOOST_COMPUTE_GCC_DIAG_PRAGMA(warning BOOST_COMPUTE_GCC_DIAG_JOINSTR(-W,x))
# endif
#else // Ensure these macros do nothing for other compilers.
# define BOOST_COMPUTE_GCC_DIAG_OFF(x)
# define BOOST_COMPUTE_GCC_DIAG_ON(x)
#endif
// Macros for suppressing warnings for Clang.
//
// BOOST_COMPUTE_BOOST_COMPUTE_CLANG_DIAG_OFF(sign-compare);
// if(a < b){
// BOOST_COMPUTE_BOOST_COMPUTE_CLANG_DIAG_ON(sign-compare);
//
// Source: path_to_url
#ifdef __clang__
# define BOOST_COMPUTE_CLANG_DIAG_STR(s) # s
// stringize s to "no-sign-compare"
# define BOOST_COMPUTE_CLANG_DIAG_JOINSTR(x,y) BOOST_COMPUTE_CLANG_DIAG_STR(x ## y)
// join -W with no-unused-variable to "-Wno-sign-compare"
# define BOOST_COMPUTE_CLANG_DIAG_DO_PRAGMA(x) _Pragma (#x)
// _Pragma is unary operator #pragma ("")
# define BOOST_COMPUTE_CLANG_DIAG_PRAGMA(x) \
BOOST_COMPUTE_CLANG_DIAG_DO_PRAGMA(clang diagnostic x)
# define BOOST_COMPUTE_CLANG_DIAG_OFF(x) BOOST_COMPUTE_CLANG_DIAG_PRAGMA(push) \
BOOST_COMPUTE_CLANG_DIAG_PRAGMA(ignored BOOST_COMPUTE_CLANG_DIAG_JOINSTR(-W,x))
// For example: #pragma clang diagnostic ignored "-Wno-sign-compare"
# define BOOST_COMPUTE_CLANG_DIAG_ON(x) BOOST_COMPUTE_CLANG_DIAG_PRAGMA(pop)
// For example: #pragma clang diagnostic warning "-Wno-sign-compare"
#else // Ensure these macros do nothing for other compilers.
# define BOOST_COMPUTE_CLANG_DIAG_OFF(x)
# define BOOST_COMPUTE_CLANG_DIAG_ON(x)
# define BOOST_COMPUTE_CLANG_DIAG_PRAGMA(x)
#endif
// Macros for suppressing warnings for MSVC. Usage:
//
// BOOST_COMPUTE_BOOST_COMPUTE_MSVC_DIAG_OFF(4018); //sign-compare
// if(a < b){
// BOOST_COMPUTE_BOOST_COMPUTE_MSVC_DIAG_ON(4018);
//
#if defined(_MSC_VER)
# define BOOST_COMPUTE_MSVC_DIAG_DO_PRAGMA(x) __pragma(x)
# define BOOST_COMPUTE_MSVC_DIAG_PRAGMA(x) \
BOOST_COMPUTE_MSVC_DIAG_DO_PRAGMA(warning(x))
# define BOOST_COMPUTE_MSVC_DIAG_OFF(x) BOOST_COMPUTE_MSVC_DIAG_PRAGMA(push) \
BOOST_COMPUTE_MSVC_DIAG_PRAGMA(disable: x)
# define BOOST_COMPUTE_MSVC_DIAG_ON(x) BOOST_COMPUTE_MSVC_DIAG_PRAGMA(pop)
#else // Ensure these macros do nothing for other compilers.
# define BOOST_COMPUTE_MSVC_DIAG_OFF(x)
# define BOOST_COMPUTE_MSVC_DIAG_ON(x)
#endif
// Macros for suppressing warnings for GCC, Clang and MSVC. Usage:
//
// BOOST_COMPUTE_DIAG_OFF(sign-compare, sign-compare, 4018);
// if(a < b){
// BOOST_COMPUTE_DIAG_ON(sign-compare, sign-compare, 4018);
//
#if defined(_MSC_VER) // MSVC
# define BOOST_COMPUTE_DIAG_OFF(gcc, clang, msvc) BOOST_COMPUTE_MSVC_DIAG_OFF(msvc)
# define BOOST_COMPUTE_DIAG_ON(gcc, clang, msvc) BOOST_COMPUTE_MSVC_DIAG_ON(msvc)
#elif defined(__clang__) // Clang
# define BOOST_COMPUTE_DIAG_OFF(gcc, clang, msvc) BOOST_COMPUTE_CLANG_DIAG_OFF(clang)
# define BOOST_COMPUTE_DIAG_ON(gcc, clang, msvc) BOOST_COMPUTE_CLANG_DIAG_ON(clang)
#elif defined(__GNUC__) // GCC/G++
# define BOOST_COMPUTE_DIAG_OFF(gcc, clang, msvc) BOOST_COMPUTE_GCC_DIAG_OFF(gcc)
# define BOOST_COMPUTE_DIAG_ON(gcc, clang, msvc) BOOST_COMPUTE_GCC_DIAG_ON(gcc)
#else // Ensure these macros do nothing for other compilers.
# define BOOST_COMPUTE_DIAG_OFF(gcc, clang, msvc)
# define BOOST_COMPUTE_DIAG_ON(gcc, clang, msvc)
#endif
#define BOOST_COMPUTE_DISABLE_DEPRECATED_DECLARATIONS() \
BOOST_COMPUTE_DIAG_OFF(deprecated-declarations, deprecated-declarations, 4996)
#define BOOST_COMPUTE_ENABLE_DEPRECATED_DECLARATIONS() \
BOOST_COMPUTE_DIAG_ON(deprecated-declarations, deprecated-declarations, 4996);
#endif /* BOOST_COMPUTE_DETAIL_DIAGNOSTIC_HPP */
```
|
```scss
/*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
.mat-mdc-card {
div:first-of-type {
width: 50%;
margin: auto;
padding-right: 10px;
position: sticky;
top: 0;
z-index: 2;
input {
width: 100%;
margin: 0 0 15px;
}
}
}
```
|
```c++
#pragma once
// (See path_to_url
// `pqrs::dispatcher::hardware_time_source` can be used safely in a multi-threaded environment.
// `pqrs::dispatcher::pseudo_time_source` can be used safely in a multi-threaded environment.
#include "types.hpp"
#include <mutex>
namespace pqrs {
namespace dispatcher {
class time_source {
public:
virtual time_point now(void) = 0;
};
class hardware_time_source final : public time_source {
public:
virtual time_point now(void) {
return std::chrono::time_point_cast<duration>(std::chrono::system_clock::now());
}
};
class pseudo_time_source final : public time_source {
public:
pseudo_time_source(void) : now_(duration(0)) {
}
virtual time_point now(void) {
std::lock_guard<std::mutex> lock(mutex_);
return now_;
}
void set_now(time_point value) {
std::lock_guard<std::mutex> lock(mutex_);
now_ = value;
}
private:
time_point now_;
mutable std::mutex mutex_;
};
} // namespace dispatcher
} // namespace pqrs
```
|
```objective-c
#import <Foundation/Foundation.h>
@interface PodsDummy_JSPatch : NSObject
@end
@implementation PodsDummy_JSPatch
@end
```
|
```go
package internal
import (
"encoding/json"
"fmt"
"github.com/influxdata/chronograf"
"google.golang.org/protobuf/proto"
)
//go:generate protoc --go_out=. internal.proto
// MarshalBuild encodes a build to binary protobuf format.
func MarshalBuild(b chronograf.BuildInfo) ([]byte, error) {
return proto.Marshal(&BuildInfo{
Version: b.Version,
Commit: b.Commit,
})
}
// UnmarshalBuild decodes a build from binary protobuf data.
func UnmarshalBuild(data []byte, b *chronograf.BuildInfo) error {
var pb BuildInfo
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
b.Version = pb.Version
b.Commit = pb.Commit
return nil
}
// MarshalSource encodes a source to binary protobuf format.
func MarshalSource(s chronograf.Source) ([]byte, error) {
return proto.Marshal(&Source{
ID: int64(s.ID),
Name: s.Name,
Type: s.Type,
Username: s.Username,
Password: s.Password,
SharedSecret: s.SharedSecret,
URL: s.URL,
MetaURL: s.MetaURL,
InsecureSkipVerify: s.InsecureSkipVerify,
Default: s.Default,
Telegraf: s.Telegraf,
Organization: s.Organization,
Role: s.Role,
DefaultRP: s.DefaultRP,
Version: s.Version,
})
}
// UnmarshalSource decodes a source from binary protobuf data.
func UnmarshalSource(data []byte, s *chronograf.Source) error {
var pb Source
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
s.ID = int(pb.ID)
s.Name = pb.Name
s.Type = pb.Type
s.Username = pb.Username
s.Password = pb.Password
s.SharedSecret = pb.SharedSecret
s.URL = pb.URL
s.MetaURL = pb.MetaURL
s.InsecureSkipVerify = pb.InsecureSkipVerify
s.Default = pb.Default
s.Telegraf = pb.Telegraf
s.Organization = pb.Organization
s.Role = pb.Role
s.DefaultRP = pb.DefaultRP
s.Version = pb.Version
return nil
}
// MarshalServer encodes a server to binary protobuf format.
func MarshalServer(s chronograf.Server) ([]byte, error) {
var (
metadata []byte
err error
)
metadata, err = json.Marshal(s.Metadata)
if err != nil {
return nil, err
}
return proto.Marshal(&Server{
ID: int64(s.ID),
SrcID: int64(s.SrcID),
Name: s.Name,
Username: s.Username,
Password: s.Password,
URL: s.URL,
Active: s.Active,
Organization: s.Organization,
InsecureSkipVerify: s.InsecureSkipVerify,
Type: s.Type,
MetadataJSON: string(metadata),
})
}
// UnmarshalServer decodes a server from binary protobuf data.
func UnmarshalServer(data []byte, s *chronograf.Server) error {
var pb Server
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
s.Metadata = make(map[string]interface{})
if len(pb.MetadataJSON) > 0 {
if err := json.Unmarshal([]byte(pb.MetadataJSON), &s.Metadata); err != nil {
return err
}
}
s.ID = int(pb.ID)
s.SrcID = int(pb.SrcID)
s.Name = pb.Name
s.Username = pb.Username
s.Password = pb.Password
s.URL = pb.URL
s.Active = pb.Active
s.Organization = pb.Organization
s.InsecureSkipVerify = pb.InsecureSkipVerify
s.Type = pb.Type
return nil
}
// MarshalLayout encodes a layout to binary protobuf format.
func MarshalLayout(l chronograf.Layout) ([]byte, error) {
cells := make([]*Cell, len(l.Cells))
for i, c := range l.Cells {
queries := make([]*Query, len(c.Queries))
for j, q := range c.Queries {
r := new(Range)
if q.Range != nil {
r.Upper, r.Lower = q.Range.Upper, q.Range.Lower
}
queries[j] = &Query{
Command: q.Command,
DB: q.DB,
RP: q.RP,
GroupBys: q.GroupBys,
Wheres: q.Wheres,
Label: q.Label,
Range: r,
}
}
axes := make(map[string]*Axis, len(c.Axes))
for a, r := range c.Axes {
axes[a] = &Axis{
Bounds: r.Bounds,
Label: r.Label,
}
}
cells[i] = &Cell{
X: c.X,
Y: c.Y,
W: c.W,
H: c.H,
I: c.I,
Name: c.Name,
Queries: queries,
Type: c.Type,
Axes: axes,
}
}
return proto.Marshal(&Layout{
ID: l.ID,
Measurement: l.Measurement,
Application: l.Application,
Autoflow: l.Autoflow,
Cells: cells,
})
}
// UnmarshalLayout decodes a layout from binary protobuf data.
func UnmarshalLayout(data []byte, l *chronograf.Layout) error {
var pb Layout
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
l.ID = pb.ID
l.Measurement = pb.Measurement
l.Application = pb.Application
l.Autoflow = pb.Autoflow
cells := make([]chronograf.Cell, len(pb.Cells))
for i, c := range pb.Cells {
queries := make([]chronograf.Query, len(c.Queries))
for j, q := range c.Queries {
queries[j] = chronograf.Query{
Command: q.Command,
DB: q.DB,
RP: q.RP,
GroupBys: q.GroupBys,
Wheres: q.Wheres,
Label: q.Label,
}
if q.Range.Upper != q.Range.Lower {
queries[j].Range = &chronograf.Range{
Upper: q.Range.Upper,
Lower: q.Range.Lower,
}
}
}
axes := make(map[string]chronograf.Axis, len(c.Axes))
for a, r := range c.Axes {
axes[a] = chronograf.Axis{
Bounds: r.Bounds,
Label: r.Label,
}
}
cells[i] = chronograf.Cell{
X: c.X,
Y: c.Y,
W: c.W,
H: c.H,
I: c.I,
Name: c.Name,
Queries: queries,
Type: c.Type,
Axes: axes,
}
}
l.Cells = cells
return nil
}
// MarshalDashboard encodes a dashboard to binary protobuf format.
func MarshalDashboard(d chronograf.Dashboard) ([]byte, error) {
cells := make([]*DashboardCell, len(d.Cells))
for i, c := range d.Cells {
queries := make([]*Query, len(c.Queries))
for j, q := range c.Queries {
r := new(Range)
if q.Range != nil {
r.Upper, r.Lower = q.Range.Upper, q.Range.Lower
}
q.Shifts = q.QueryConfig.Shifts
queries[j] = &Query{
Command: q.Command,
Label: q.Label,
Range: r,
Source: q.Source,
Type: q.Type,
}
shifts := make([]*TimeShift, len(q.Shifts))
for k := range q.Shifts {
shift := &TimeShift{
Label: q.Shifts[k].Label,
Unit: q.Shifts[k].Unit,
Quantity: q.Shifts[k].Quantity,
}
shifts[k] = shift
}
queries[j].Shifts = shifts
}
colors := make([]*Color, len(c.CellColors))
for j, color := range c.CellColors {
colors[j] = &Color{
ID: color.ID,
Type: color.Type,
Hex: color.Hex,
Name: color.Name,
Value: color.Value,
}
}
axes := make(map[string]*Axis, len(c.Axes))
for a, r := range c.Axes {
axes[a] = &Axis{
Bounds: r.Bounds,
Label: r.Label,
Prefix: r.Prefix,
Suffix: r.Suffix,
Base: r.Base,
Scale: r.Scale,
}
}
sortBy := &RenamableField{
InternalName: c.TableOptions.SortBy.InternalName,
DisplayName: c.TableOptions.SortBy.DisplayName,
Visible: c.TableOptions.SortBy.Visible,
}
tableOptions := &TableOptions{
VerticalTimeAxis: c.TableOptions.VerticalTimeAxis,
SortBy: sortBy,
Wrapping: c.TableOptions.Wrapping,
FixFirstColumn: c.TableOptions.FixFirstColumn,
}
decimalPlaces := &DecimalPlaces{
IsEnforced: c.DecimalPlaces.IsEnforced,
Digits: c.DecimalPlaces.Digits,
}
fieldOptions := make([]*RenamableField, len(c.FieldOptions))
for i, field := range c.FieldOptions {
fieldOptions[i] = &RenamableField{
InternalName: field.InternalName,
DisplayName: field.DisplayName,
Visible: field.Visible,
}
}
note := c.Note
noteVisibility := c.NoteVisibility
cells[i] = &DashboardCell{
ID: c.ID,
X: c.X,
Y: c.Y,
W: c.W,
H: c.H,
Name: c.Name,
Queries: queries,
Type: c.Type,
Axes: axes,
Colors: colors,
Legend: &Legend{
Type: c.Legend.Type,
Orientation: c.Legend.Orientation,
},
TableOptions: tableOptions,
FieldOptions: fieldOptions,
TimeFormat: c.TimeFormat,
DecimalPlaces: decimalPlaces,
Note: note,
NoteVisibility: noteVisibility,
}
}
templates := make([]*Template, len(d.Templates))
for i, t := range d.Templates {
vals := make([]*TemplateValue, len(t.Values))
for j, v := range t.Values {
vals[j] = &TemplateValue{
Selected: v.Selected,
Type: v.Type,
Value: v.Value,
Key: v.Key,
}
}
template := &Template{
ID: string(t.ID),
TempVar: t.Var,
Values: vals,
Type: t.Type,
Label: t.Label,
SourceID: t.SourceID,
}
if t.Query != nil {
template.Query = &TemplateQuery{
Command: t.Query.Command,
Flux: t.Query.Flux,
Db: t.Query.DB,
Rp: t.Query.RP,
Measurement: t.Query.Measurement,
TagKey: t.Query.TagKey,
FieldKey: t.Query.FieldKey,
}
}
templates[i] = template
}
return proto.Marshal(&Dashboard{
ID: int64(d.ID),
Cells: cells,
Templates: templates,
Name: d.Name,
Organization: d.Organization,
})
}
// UnmarshalDashboard decodes a layout from binary protobuf data.
func UnmarshalDashboard(data []byte, d *chronograf.Dashboard) error {
var pb Dashboard
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
cells := make([]chronograf.DashboardCell, len(pb.Cells))
for i, c := range pb.Cells {
queries := make([]chronograf.DashboardQuery, len(c.Queries))
for j, q := range c.Queries {
queryType := "influxql"
if q.Type != "" {
queryType = q.Type
}
queries[j] = chronograf.DashboardQuery{
Command: q.Command,
Label: q.Label,
Source: q.Source,
Type: queryType,
}
if q.Range.Upper != q.Range.Lower {
queries[j].Range = &chronograf.Range{
Upper: q.Range.Upper,
Lower: q.Range.Lower,
}
}
shifts := make([]chronograf.TimeShift, len(q.Shifts))
for k := range q.Shifts {
shift := chronograf.TimeShift{
Label: q.Shifts[k].Label,
Unit: q.Shifts[k].Unit,
Quantity: q.Shifts[k].Quantity,
}
shifts[k] = shift
}
queries[j].Shifts = shifts
}
colors := make([]chronograf.CellColor, len(c.Colors))
for j, color := range c.Colors {
colors[j] = chronograf.CellColor{
ID: color.ID,
Type: color.Type,
Hex: color.Hex,
Name: color.Name,
Value: color.Value,
}
}
axes := make(map[string]chronograf.Axis, len(c.Axes))
for a, r := range c.Axes {
// axis base defaults to 10
if r.Base == "" {
r.Base = "10"
}
if r.Scale == "" {
r.Scale = "linear"
}
axis := chronograf.Axis{
Bounds: r.Bounds,
Label: r.Label,
Prefix: r.Prefix,
Suffix: r.Suffix,
Base: r.Base,
Scale: r.Scale,
}
axes[a] = axis
}
legend := chronograf.Legend{}
if c.Legend != nil {
legend.Type = c.Legend.Type
legend.Orientation = c.Legend.Orientation
}
tableOptions := chronograf.TableOptions{}
if c.TableOptions != nil {
sortBy := chronograf.RenamableField{}
if c.TableOptions.SortBy != nil {
sortBy.InternalName = c.TableOptions.SortBy.InternalName
sortBy.DisplayName = c.TableOptions.SortBy.DisplayName
sortBy.Visible = c.TableOptions.SortBy.Visible
}
tableOptions.SortBy = sortBy
tableOptions.VerticalTimeAxis = c.TableOptions.VerticalTimeAxis
tableOptions.Wrapping = c.TableOptions.Wrapping
tableOptions.FixFirstColumn = c.TableOptions.FixFirstColumn
}
fieldOptions := make([]chronograf.RenamableField, len(c.FieldOptions))
for i, field := range c.FieldOptions {
fieldOptions[i] = chronograf.RenamableField{}
fieldOptions[i].InternalName = field.InternalName
fieldOptions[i].DisplayName = field.DisplayName
fieldOptions[i].Visible = field.Visible
}
decimalPlaces := chronograf.DecimalPlaces{}
if c.DecimalPlaces != nil {
decimalPlaces.IsEnforced = c.DecimalPlaces.IsEnforced
decimalPlaces.Digits = c.DecimalPlaces.Digits
} else {
decimalPlaces.IsEnforced = true
decimalPlaces.Digits = 2
}
note := c.Note
noteVisibility := c.NoteVisibility
// FIXME: this is merely for legacy cells and
// should be removed as soon as possible
cellType := c.Type
if cellType == "" {
cellType = "line"
}
cells[i] = chronograf.DashboardCell{
ID: c.ID,
X: c.X,
Y: c.Y,
W: c.W,
H: c.H,
Name: c.Name,
Queries: queries,
Type: cellType,
Axes: axes,
CellColors: colors,
Legend: legend,
TableOptions: tableOptions,
FieldOptions: fieldOptions,
TimeFormat: c.TimeFormat,
DecimalPlaces: decimalPlaces,
Note: note,
NoteVisibility: noteVisibility,
}
}
templates := make([]chronograf.Template, len(pb.Templates))
for i, t := range pb.Templates {
vals := make([]chronograf.TemplateValue, len(t.Values))
for j, v := range t.Values {
vals[j] = chronograf.TemplateValue{
Selected: v.Selected,
Type: v.Type,
Value: v.Value,
Key: v.Key,
}
}
template := chronograf.Template{
ID: chronograf.TemplateID(t.ID),
TemplateVar: chronograf.TemplateVar{
Var: t.TempVar,
Values: vals,
},
Type: t.Type,
Label: t.Label,
SourceID: t.SourceID,
}
if t.SourceID == "" {
template.SourceID = "dynamic"
}
if t.Query != nil {
template.Query = &chronograf.TemplateQuery{
Command: t.Query.Command,
Flux: t.Query.Flux,
DB: t.Query.Db,
RP: t.Query.Rp,
Measurement: t.Query.Measurement,
TagKey: t.Query.TagKey,
FieldKey: t.Query.FieldKey,
}
}
templates[i] = template
}
d.ID = chronograf.DashboardID(pb.ID)
d.Cells = cells
d.Templates = templates
d.Name = pb.Name
d.Organization = pb.Organization
return nil
}
// ScopedAlert contains the source and the kapacitor id
type ScopedAlert struct {
chronograf.AlertRule
SrcID int
KapaID int
}
// MarshalAlertRule encodes an alert rule to binary protobuf format.
func MarshalAlertRule(r *ScopedAlert) ([]byte, error) {
j, err := json.Marshal(r.AlertRule)
if err != nil {
return nil, err
}
return proto.Marshal(&AlertRule{
ID: r.ID,
SrcID: int64(r.SrcID),
KapaID: int64(r.KapaID),
JSON: string(j),
})
}
// UnmarshalAlertRule decodes an alert rule from binary protobuf data.
func UnmarshalAlertRule(data []byte, r *ScopedAlert) error {
var pb AlertRule
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
err := json.Unmarshal([]byte(pb.JSON), &r.AlertRule)
if err != nil {
return err
}
r.SrcID = int(pb.SrcID)
r.KapaID = int(pb.KapaID)
return nil
}
// MarshalUser encodes a user to binary protobuf format.
// We are ignoring the password for now.
func MarshalUser(u *chronograf.User) ([]byte, error) {
roles := make([]*Role, len(u.Roles))
for i, role := range u.Roles {
roles[i] = &Role{
Organization: role.Organization,
Name: role.Name,
}
}
return MarshalUserPB(&User{
ID: u.ID,
Name: u.Name,
Provider: u.Provider,
Scheme: u.Scheme,
Roles: roles,
SuperAdmin: u.SuperAdmin,
})
}
// MarshalUserPB encodes a user to binary protobuf format.
// We are ignoring the password for now.
func MarshalUserPB(u *User) ([]byte, error) {
return proto.Marshal(u)
}
// UnmarshalUser decodes a user from binary protobuf data.
// We are ignoring the password for now.
func UnmarshalUser(data []byte, u *chronograf.User) error {
var pb User
if err := UnmarshalUserPB(data, &pb); err != nil {
return err
}
roles := make([]chronograf.Role, len(pb.Roles))
for i, role := range pb.Roles {
roles[i] = chronograf.Role{
Organization: role.Organization,
Name: role.Name,
}
}
u.ID = pb.ID
u.Name = pb.Name
u.Provider = pb.Provider
u.Scheme = pb.Scheme
u.SuperAdmin = pb.SuperAdmin
u.Roles = roles
return nil
}
// UnmarshalUserPB decodes a user from binary protobuf data.
// We are ignoring the password for now.
func UnmarshalUserPB(data []byte, u *User) error {
return proto.Unmarshal(data, u)
}
// MarshalRole encodes a role to binary protobuf format.
func MarshalRole(r *chronograf.Role) ([]byte, error) {
return MarshalRolePB(&Role{
Organization: r.Organization,
Name: r.Name,
})
}
// MarshalRolePB encodes a role to binary protobuf format.
func MarshalRolePB(r *Role) ([]byte, error) {
return proto.Marshal(r)
}
// UnmarshalRole decodes a role from binary protobuf data.
func UnmarshalRole(data []byte, r *chronograf.Role) error {
var pb Role
if err := UnmarshalRolePB(data, &pb); err != nil {
return err
}
r.Organization = pb.Organization
r.Name = pb.Name
return nil
}
// UnmarshalRolePB decodes a role from binary protobuf data.
func UnmarshalRolePB(data []byte, r *Role) error {
return proto.Unmarshal(data, r)
}
// MarshalOrganization encodes a organization to binary protobuf format.
func MarshalOrganization(o *chronograf.Organization) ([]byte, error) {
return MarshalOrganizationPB(&Organization{
ID: o.ID,
Name: o.Name,
DefaultRole: o.DefaultRole,
})
}
// MarshalOrganizationPB encodes a organization to binary protobuf format.
func MarshalOrganizationPB(o *Organization) ([]byte, error) {
return proto.Marshal(o)
}
// UnmarshalOrganization decodes a organization from binary protobuf data.
func UnmarshalOrganization(data []byte, o *chronograf.Organization) error {
var pb Organization
if err := UnmarshalOrganizationPB(data, &pb); err != nil {
return err
}
o.ID = pb.ID
o.Name = pb.Name
o.DefaultRole = pb.DefaultRole
return nil
}
// UnmarshalOrganizationPB decodes a organization from binary protobuf data.
func UnmarshalOrganizationPB(data []byte, o *Organization) error {
return proto.Unmarshal(data, o)
}
// MarshalConfig encodes a config to binary protobuf format.
func MarshalConfig(c *chronograf.Config) ([]byte, error) {
return MarshalConfigPB(&Config{
Auth: &AuthConfig{
SuperAdminNewUsers: c.Auth.SuperAdminNewUsers,
},
})
}
// MarshalConfigPB encodes a config to binary protobuf format.
func MarshalConfigPB(c *Config) ([]byte, error) {
return proto.Marshal(c)
}
// UnmarshalConfig decodes a config from binary protobuf data.
func UnmarshalConfig(data []byte, c *chronograf.Config) error {
var pb Config
if err := UnmarshalConfigPB(data, &pb); err != nil {
return err
}
if pb.Auth == nil {
return fmt.Errorf("Auth config is nil")
}
c.Auth.SuperAdminNewUsers = pb.Auth.SuperAdminNewUsers
return nil
}
// UnmarshalConfigPB decodes a config from binary protobuf data.
func UnmarshalConfigPB(data []byte, c *Config) error {
return proto.Unmarshal(data, c)
}
// MarshalOrganizationConfig encodes a config to binary protobuf format.
func MarshalOrganizationConfig(c *chronograf.OrganizationConfig) ([]byte, error) {
columns := make([]*LogViewerColumn, len(c.LogViewer.Columns))
for i, column := range c.LogViewer.Columns {
encodings := make([]*ColumnEncoding, len(column.Encodings))
for j, e := range column.Encodings {
encodings[j] = &ColumnEncoding{
Type: e.Type,
Value: e.Value,
Name: e.Name,
}
}
columns[i] = &LogViewerColumn{
Name: column.Name,
Position: column.Position,
Encodings: encodings,
}
}
return MarshalOrganizationConfigPB(&OrganizationConfig{
OrganizationID: c.OrganizationID,
LogViewer: &LogViewerConfig{
Columns: columns,
},
})
}
// MarshalOrganizationConfigPB encodes a config to binary protobuf format.
func MarshalOrganizationConfigPB(c *OrganizationConfig) ([]byte, error) {
return proto.Marshal(c)
}
// UnmarshalOrganizationConfig decodes a config from binary protobuf data.
func UnmarshalOrganizationConfig(data []byte, c *chronograf.OrganizationConfig) error {
var pb OrganizationConfig
if err := UnmarshalOrganizationConfigPB(data, &pb); err != nil {
return err
}
if pb.LogViewer == nil {
return fmt.Errorf("Log Viewer config is nil")
}
c.OrganizationID = pb.OrganizationID
columns := make([]chronograf.LogViewerColumn, len(pb.LogViewer.Columns))
for i, c := range pb.LogViewer.Columns {
columns[i].Name = c.Name
columns[i].Position = c.Position
encodings := make([]chronograf.ColumnEncoding, len(c.Encodings))
for j, e := range c.Encodings {
encodings[j].Type = e.Type
encodings[j].Value = e.Value
encodings[j].Name = e.Name
}
columns[i].Encodings = encodings
}
c.LogViewer.Columns = columns
ensureHostnameColumn(c)
return nil
}
// Ensures the hostname is added since it was missing in 1.6.2
func ensureHostnameColumn(c *chronograf.OrganizationConfig) {
var maxPosition int32
for _, v := range c.LogViewer.Columns {
if v.Name == "hostname" {
return
}
if v.Position > maxPosition {
maxPosition = v.Position
}
}
c.LogViewer.Columns = append(c.LogViewer.Columns, newHostnameColumn(maxPosition+1))
}
func newHostnameColumn(p int32) chronograf.LogViewerColumn {
return chronograf.LogViewerColumn{
Name: "hostname",
Position: p,
Encodings: []chronograf.ColumnEncoding{
{
Type: "visibility",
Value: "visible",
},
},
}
}
// UnmarshalOrganizationConfigPB decodes a config from binary protobuf data.
func UnmarshalOrganizationConfigPB(data []byte, c *OrganizationConfig) error {
return proto.Unmarshal(data, c)
}
// MarshalMapping encodes a mapping to binary protobuf format.
func MarshalMapping(m *chronograf.Mapping) ([]byte, error) {
return MarshalMappingPB(&Mapping{
Provider: m.Provider,
Scheme: m.Scheme,
ProviderOrganization: m.ProviderOrganization,
ID: m.ID,
Organization: m.Organization,
})
}
// MarshalMappingPB encodes a mapping to binary protobuf format.
func MarshalMappingPB(m *Mapping) ([]byte, error) {
return proto.Marshal(m)
}
// UnmarshalMapping decodes a mapping from binary protobuf data.
func UnmarshalMapping(data []byte, m *chronograf.Mapping) error {
var pb Mapping
if err := UnmarshalMappingPB(data, &pb); err != nil {
return err
}
m.Provider = pb.Provider
m.Scheme = pb.Scheme
m.ProviderOrganization = pb.ProviderOrganization
m.Organization = pb.Organization
m.ID = pb.ID
return nil
}
// UnmarshalMappingPB decodes a mapping from binary protobuf data.
func UnmarshalMappingPB(data []byte, m *Mapping) error {
return proto.Unmarshal(data, m)
}
```
|
Čentur () is a settlement 5 km southeast of Koper in the Littoral region of Slovenia. It is divided into two separate hamlets: Veliki Čentur and Mali Čentur (literally, 'big Čentur' and 'little Čentur').
References
External links
Čentur on Geopedia
Populated places in the City Municipality of Koper
|
Caribbean Club on Key Largo, northernmost of the Florida Keys, was developed and built by auto parts and real estate promoter Carl Graham Fisher in 1938.
Carl Fisher, considered a genius as a promoter, had conceived the Lincoln Highway, the first road across America, in 1913. Fisher had helped develop the Indianapolis Motor Speedway and Miami Beach and had at one time been worth an estimated $100 million. He lost his fortune in the Stock Market Crash of 1929 and the Great Depression. One source indicates that during the years before his death, Fisher was living in a modest cottage on Miami Beach.
His last project was the development of the Caribbean Club on Key Largo as a fishing club for men who were far from wealthy. Eight years after his death, the Caribbean Club became famous as a purported "on location" filming site for the 1948 film Key Largo starring Humphrey Bogart and Lauren Bacall. In fact, only that film's initial exterior shots were filmed in the Florida Keys, and the rest was filmed in the Warner Bros. studio. After Fisher's death, the club was turned into a casino. In 1990, the Orlando Sentinel reviewed the sources of the rumours about the filming of "Key Largo" in an article titled "Who Cares if Bogie and Bacall Never Set Foot Here". At that time, the property was described as a motel with "modest rooms and cottages".
By 1948, the property was owned by the Krone family in 1948; it was extensively damaged by fire in 1955 and it was rebuilt in a different style. The Caribbean Club was acquired by Ruth and Lefty Whitehurst in 1963; fire again caused damage in 1971 and repairs were completed. As of 2021, the business was operated by the couple's children and grandchildren. The family's website was reporting that exterior shots for "Key Largo" were filmed here.
References
Books
Fisher, Jane (1947) Fabulous Hoosier R.M. McBride and Co.; New York, New York
Fisher, Jerry M. (1998) The Pacesetter: The Untold Story of Carl G. Fisher Lost Coast Press; Ft. Bragg, California
Foster, Mark S. (2000) Castles in the Sand: The Life and Times of Carl Graham Fisher. University press of Florida; Gainesville, Florida
External links
Top 50 Most Influential people in Florida History website
Lincoln Highway Association official website
Lost Indiana website
Newsday: 1926: Carl Fisher Creates Montauk
Newsday: Mogul of Montauk
American Experience series: Carl Fisher, "Mr. Miami Beach"
Fisher Island official website
Caribbean Club Official Website
2004 article in the Chicago Sun Times
Buildings and structures in Monroe County, Florida
History of Monroe County, Florida
1938 establishments in Florida
|
```c++
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/linkage.h"
#include "src/codegen/assembler-inl.h"
#include "src/codegen/macro-assembler.h"
#include "src/codegen/optimized-compilation-info.h"
#include "src/compiler/frame.h"
#include "src/compiler/osr.h"
#include "src/compiler/pipeline.h"
namespace v8 {
namespace internal {
namespace compiler {
namespace {
inline LinkageLocation regloc(Register reg, MachineType type) {
return LinkageLocation::ForRegister(reg.code(), type);
}
} // namespace
std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k) {
switch (k) {
case CallDescriptor::kCallCodeObject:
os << "Code";
break;
case CallDescriptor::kCallJSFunction:
os << "JS";
break;
case CallDescriptor::kCallAddress:
os << "Addr";
break;
case CallDescriptor::kCallWasmCapiFunction:
os << "WasmExit";
break;
case CallDescriptor::kCallWasmFunction:
os << "WasmFunction";
break;
case CallDescriptor::kCallWasmImportWrapper:
os << "WasmImportWrapper";
break;
case CallDescriptor::kCallBuiltinPointer:
os << "BuiltinPointer";
break;
}
return os;
}
std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
// TODO(svenpanne) Output properties etc. and be less cryptic.
return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount()
<< "s" << d.StackParameterCount() << "i" << d.InputCount() << "f"
<< d.FrameStateCount();
}
MachineSignature* CallDescriptor::GetMachineSignature(Zone* zone) const {
size_t param_count = ParameterCount();
size_t return_count = ReturnCount();
MachineType* types = zone->NewArray<MachineType>(param_count + return_count);
int current = 0;
for (size_t i = 0; i < return_count; ++i) {
types[current++] = GetReturnType(i);
}
for (size_t i = 0; i < param_count; ++i) {
types[current++] = GetParameterType(i);
}
return new (zone) MachineSignature(return_count, param_count, types);
}
int CallDescriptor::GetFirstUnusedStackSlot() const {
int slots_above_sp = 0;
for (size_t i = 0; i < InputCount(); ++i) {
LinkageLocation operand = GetInputLocation(i);
if (!operand.IsRegister()) {
int new_candidate =
-operand.GetLocation() + operand.GetSizeInPointers() - 1;
if (new_candidate > slots_above_sp) {
slots_above_sp = new_candidate;
}
}
}
return slots_above_sp;
}
int CallDescriptor::GetStackParameterDelta(
CallDescriptor const* tail_caller) const {
int callee_slots_above_sp = GetFirstUnusedStackSlot();
int tail_caller_slots_above_sp = tail_caller->GetFirstUnusedStackSlot();
int stack_param_delta = callee_slots_above_sp - tail_caller_slots_above_sp;
if (ShouldPadArguments(stack_param_delta)) {
if (callee_slots_above_sp % 2 != 0) {
// The delta is odd due to the callee - we will need to add one slot
// of padding.
++stack_param_delta;
} else {
// The delta is odd because of the caller. We already have one slot of
// padding that we can reuse for arguments, so we will need one fewer
// slot.
--stack_param_delta;
}
}
return stack_param_delta;
}
int CallDescriptor::GetTaggedParameterSlots() const {
int result = 0;
for (size_t i = 0; i < InputCount(); ++i) {
LinkageLocation operand = GetInputLocation(i);
if (!operand.IsRegister() && operand.GetType().IsTagged()) {
++result;
}
}
return result;
}
bool CallDescriptor::CanTailCall(const CallDescriptor* callee) const {
if (ReturnCount() != callee->ReturnCount()) return false;
for (size_t i = 0; i < ReturnCount(); ++i) {
if (!LinkageLocation::IsSameLocation(GetReturnLocation(i),
callee->GetReturnLocation(i)))
return false;
}
return true;
}
// TODO(jkummerow, sigurds): Arguably frame size calculation should be
// keyed on code/frame type, not on CallDescriptor kind. Think about a
// good way to organize this logic.
int CallDescriptor::CalculateFixedFrameSize(Code::Kind code_kind) const {
switch (kind_) {
case kCallJSFunction:
return PushArgumentCount()
? OptimizedBuiltinFrameConstants::kFixedSlotCount
: StandardFrameConstants::kFixedSlotCount;
case kCallAddress:
if (code_kind == Code::C_WASM_ENTRY) {
return CWasmEntryFrameConstants::kFixedSlotCount;
}
return CommonFrameConstants::kFixedSlotCountAboveFp +
CommonFrameConstants::kCPSlotCount;
case kCallCodeObject:
case kCallBuiltinPointer:
return TypedFrameConstants::kFixedSlotCount;
case kCallWasmFunction:
case kCallWasmImportWrapper:
return WasmCompiledFrameConstants::kFixedSlotCount;
case kCallWasmCapiFunction:
return WasmExitFrameConstants::kFixedSlotCount;
}
UNREACHABLE();
}
CallDescriptor* Linkage::ComputeIncoming(Zone* zone,
OptimizedCompilationInfo* info) {
DCHECK(!info->IsNotOptimizedFunctionOrWasmFunction());
if (!info->closure().is_null()) {
// If we are compiling a JS function, use a JS call descriptor,
// plus the receiver.
SharedFunctionInfo shared = info->closure()->shared();
return GetJSCallDescriptor(zone, info->is_osr(),
1 + shared.internal_formal_parameter_count(),
CallDescriptor::kCanUseRoots);
}
return nullptr; // TODO(titzer): ?
}
// static
bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
switch (function) {
// Most runtime functions need a FrameState. A few chosen ones that we know
// not to call into arbitrary JavaScript, not to throw, and not to lazily
// deoptimize are whitelisted here and can be called without a FrameState.
case Runtime::kAbort:
case Runtime::kAllocateInOldGeneration:
case Runtime::kCreateIterResultObject:
case Runtime::kIncBlockCounter:
case Runtime::kIsFunction:
case Runtime::kNewClosure:
case Runtime::kNewClosure_Tenured:
case Runtime::kNewFunctionContext:
case Runtime::kPushBlockContext:
case Runtime::kPushCatchContext:
case Runtime::kReThrow:
case Runtime::kStringEqual:
case Runtime::kStringLessThan:
case Runtime::kStringLessThanOrEqual:
case Runtime::kStringGreaterThan:
case Runtime::kStringGreaterThanOrEqual:
case Runtime::kToFastProperties: // TODO(conradw): Is it safe?
case Runtime::kTraceEnter:
case Runtime::kTraceExit:
return false;
// Some inline intrinsics are also safe to call without a FrameState.
case Runtime::kInlineCreateIterResultObject:
case Runtime::kInlineIncBlockCounter:
case Runtime::kInlineGeneratorClose:
case Runtime::kInlineGeneratorGetResumeMode:
case Runtime::kInlineCreateJSGeneratorObject:
case Runtime::kInlineIsArray:
case Runtime::kInlineIsJSReceiver:
case Runtime::kInlineIsRegExp:
case Runtime::kInlineIsSmi:
return false;
default:
break;
}
// For safety, default to needing a FrameState unless whitelisted.
return true;
}
bool CallDescriptor::UsesOnlyRegisters() const {
for (size_t i = 0; i < InputCount(); ++i) {
if (!GetInputLocation(i).IsRegister()) return false;
}
for (size_t i = 0; i < ReturnCount(); ++i) {
if (!GetReturnLocation(i).IsRegister()) return false;
}
return true;
}
CallDescriptor* Linkage::GetRuntimeCallDescriptor(
Zone* zone, Runtime::FunctionId function_id, int js_parameter_count,
Operator::Properties properties, CallDescriptor::Flags flags) {
const Runtime::Function* function = Runtime::FunctionForId(function_id);
const int return_count = function->result_size;
const char* debug_name = function->name;
if (!Linkage::NeedsFrameStateInput(function_id)) {
flags = static_cast<CallDescriptor::Flags>(
flags & ~CallDescriptor::kNeedsFrameState);
}
return GetCEntryStubCallDescriptor(zone, return_count, js_parameter_count,
debug_name, properties, flags);
}
CallDescriptor* Linkage::GetCEntryStubCallDescriptor(
Zone* zone, int return_count, int js_parameter_count,
const char* debug_name, Operator::Properties properties,
CallDescriptor::Flags flags) {
const size_t function_count = 1;
const size_t num_args_count = 1;
const size_t context_count = 1;
const size_t parameter_count = function_count +
static_cast<size_t>(js_parameter_count) +
num_args_count + context_count;
LocationSignature::Builder locations(zone, static_cast<size_t>(return_count),
static_cast<size_t>(parameter_count));
// Add returns.
if (locations.return_count_ > 0) {
locations.AddReturn(regloc(kReturnRegister0, MachineType::AnyTagged()));
}
if (locations.return_count_ > 1) {
locations.AddReturn(regloc(kReturnRegister1, MachineType::AnyTagged()));
}
if (locations.return_count_ > 2) {
locations.AddReturn(regloc(kReturnRegister2, MachineType::AnyTagged()));
}
// All parameters to the runtime call go on the stack.
for (int i = 0; i < js_parameter_count; i++) {
locations.AddParam(LinkageLocation::ForCallerFrameSlot(
i - js_parameter_count, MachineType::AnyTagged()));
}
// Add runtime function itself.
locations.AddParam(
regloc(kRuntimeCallFunctionRegister, MachineType::Pointer()));
// Add runtime call argument count.
locations.AddParam(
regloc(kRuntimeCallArgCountRegister, MachineType::Int32()));
// Add context.
locations.AddParam(regloc(kContextRegister, MachineType::AnyTagged()));
// The target for runtime calls is a code object.
MachineType target_type = MachineType::AnyTagged();
LinkageLocation target_loc =
LinkageLocation::ForAnyRegister(MachineType::AnyTagged());
return new (zone) CallDescriptor( // --
CallDescriptor::kCallCodeObject, // kind
target_type, // target MachineType
target_loc, // target location
locations.Build(), // location_sig
js_parameter_count, // stack_parameter_count
properties, // properties
kNoCalleeSaved, // callee-saved
kNoCalleeSaved, // callee-saved fp
flags, // flags
debug_name); // debug name
}
CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
int js_parameter_count,
CallDescriptor::Flags flags) {
const size_t return_count = 1;
const size_t context_count = 1;
const size_t new_target_count = 1;
const size_t num_args_count = 1;
const size_t parameter_count =
js_parameter_count + new_target_count + num_args_count + context_count;
LocationSignature::Builder locations(zone, return_count, parameter_count);
// All JS calls have exactly one return value.
locations.AddReturn(regloc(kReturnRegister0, MachineType::AnyTagged()));
// All parameters to JS calls go on the stack.
for (int i = 0; i < js_parameter_count; i++) {
int spill_slot_index = i - js_parameter_count;
locations.AddParam(LinkageLocation::ForCallerFrameSlot(
spill_slot_index, MachineType::AnyTagged()));
}
// Add JavaScript call new target value.
locations.AddParam(
regloc(kJavaScriptCallNewTargetRegister, MachineType::AnyTagged()));
// Add JavaScript call argument count.
locations.AddParam(
regloc(kJavaScriptCallArgCountRegister, MachineType::Int32()));
// Add context.
locations.AddParam(regloc(kContextRegister, MachineType::AnyTagged()));
// The target for JS function calls is the JSFunction object.
MachineType target_type = MachineType::AnyTagged();
// When entering into an OSR function from unoptimized code the JSFunction
// is not in a register, but it is on the stack in the marker spill slot.
LinkageLocation target_loc =
is_osr ? LinkageLocation::ForSavedCallerFunction()
: regloc(kJSFunctionRegister, MachineType::AnyTagged());
return new (zone) CallDescriptor( // --
CallDescriptor::kCallJSFunction, // kind
target_type, // target MachineType
target_loc, // target location
locations.Build(), // location_sig
js_parameter_count, // stack_parameter_count
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved
kNoCalleeSaved, // callee-saved fp
flags, // flags
"js-call");
}
// TODO(turbofan): cache call descriptors for code stub calls.
// TODO(jgruber): Clean up stack parameter count handling. The descriptor
// already knows the formal stack parameter count and ideally only additional
// stack parameters should be passed into this method. All call-sites should
// be audited for correctness (e.g. many used to assume a stack parameter count
// of 0).
CallDescriptor* Linkage::GetStubCallDescriptor(
Zone* zone, const CallInterfaceDescriptor& descriptor,
int stack_parameter_count, CallDescriptor::Flags flags,
Operator::Properties properties, StubCallMode stub_mode) {
const int register_parameter_count = descriptor.GetRegisterParameterCount();
const int js_parameter_count =
register_parameter_count + stack_parameter_count;
const int context_count = descriptor.HasContextParameter() ? 1 : 0;
const size_t parameter_count =
static_cast<size_t>(js_parameter_count + context_count);
DCHECK_GE(stack_parameter_count, descriptor.GetStackParameterCount());
size_t return_count = descriptor.GetReturnCount();
LocationSignature::Builder locations(zone, return_count, parameter_count);
// Add returns.
if (locations.return_count_ > 0) {
locations.AddReturn(regloc(kReturnRegister0, descriptor.GetReturnType(0)));
}
if (locations.return_count_ > 1) {
locations.AddReturn(regloc(kReturnRegister1, descriptor.GetReturnType(1)));
}
if (locations.return_count_ > 2) {
locations.AddReturn(regloc(kReturnRegister2, descriptor.GetReturnType(2)));
}
// Add parameters in registers and on the stack.
for (int i = 0; i < js_parameter_count; i++) {
if (i < register_parameter_count) {
// The first parameters go in registers.
Register reg = descriptor.GetRegisterParameter(i);
MachineType type = descriptor.GetParameterType(i);
locations.AddParam(regloc(reg, type));
} else {
// The rest of the parameters go on the stack.
int stack_slot = i - register_parameter_count - stack_parameter_count;
locations.AddParam(LinkageLocation::ForCallerFrameSlot(
stack_slot, MachineType::AnyTagged()));
}
}
// Add context.
if (context_count) {
locations.AddParam(regloc(kContextRegister, MachineType::AnyTagged()));
}
// The target for stub calls depends on the requested mode.
CallDescriptor::Kind kind;
MachineType target_type;
switch (stub_mode) {
case StubCallMode::kCallCodeObject:
kind = CallDescriptor::kCallCodeObject;
target_type = MachineType::AnyTagged();
break;
case StubCallMode::kCallWasmRuntimeStub:
kind = CallDescriptor::kCallWasmFunction;
target_type = MachineType::Pointer();
break;
case StubCallMode::kCallBuiltinPointer:
kind = CallDescriptor::kCallBuiltinPointer;
target_type = MachineType::AnyTagged();
break;
}
LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
return new (zone) CallDescriptor( // --
kind, // kind
target_type, // target MachineType
target_loc, // target location
locations.Build(), // location_sig
stack_parameter_count, // stack_parameter_count
properties, // properties
kNoCalleeSaved, // callee-saved registers
kNoCalleeSaved, // callee-saved fp
CallDescriptor::kCanUseRoots | flags, // flags
descriptor.DebugName(), // debug name
descriptor.allocatable_registers());
}
// static
CallDescriptor* Linkage::GetBytecodeDispatchCallDescriptor(
Zone* zone, const CallInterfaceDescriptor& descriptor,
int stack_parameter_count) {
const int register_parameter_count = descriptor.GetRegisterParameterCount();
const int parameter_count = register_parameter_count + stack_parameter_count;
DCHECK_EQ(descriptor.GetReturnCount(), 1);
LocationSignature::Builder locations(zone, 1, parameter_count);
locations.AddReturn(regloc(kReturnRegister0, descriptor.GetReturnType(0)));
// Add parameters in registers and on the stack.
for (int i = 0; i < parameter_count; i++) {
if (i < register_parameter_count) {
// The first parameters go in registers.
Register reg = descriptor.GetRegisterParameter(i);
MachineType type = descriptor.GetParameterType(i);
locations.AddParam(regloc(reg, type));
} else {
// The rest of the parameters go on the stack.
int stack_slot = i - register_parameter_count - stack_parameter_count;
locations.AddParam(LinkageLocation::ForCallerFrameSlot(
stack_slot, MachineType::AnyTagged()));
}
}
// The target for interpreter dispatches is a code entry address.
MachineType target_type = MachineType::Pointer();
LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
const CallDescriptor::Flags kFlags =
CallDescriptor::kCanUseRoots | CallDescriptor::kFixedTargetRegister;
return new (zone) CallDescriptor( // --
CallDescriptor::kCallAddress, // kind
target_type, // target MachineType
target_loc, // target location
locations.Build(), // location_sig
stack_parameter_count, // stack_parameter_count
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved registers
kNoCalleeSaved, // callee-saved fp
kFlags, // flags
descriptor.DebugName());
}
LinkageLocation Linkage::GetOsrValueLocation(int index) const {
CHECK(incoming_->IsJSFunctionCall());
int parameter_count = static_cast<int>(incoming_->JSParameterCount() - 1);
int first_stack_slot = OsrHelper::FirstStackSlotIndex(parameter_count);
if (index == kOsrContextSpillSlotIndex) {
// Context. Use the parameter location of the context spill slot.
// Parameter (arity + 2) is special for the context of the function frame.
// >> context_index = target + receiver + params + new_target + #args
int context_index = 1 + 1 + parameter_count + 1 + 1;
return incoming_->GetInputLocation(context_index);
} else if (index >= first_stack_slot) {
// Local variable stored in this (callee) stack.
int spill_index =
index - first_stack_slot + StandardFrameConstants::kFixedSlotCount;
return LinkageLocation::ForCalleeFrameSlot(spill_index,
MachineType::AnyTagged());
} else {
// Parameter. Use the assigned location from the incoming call descriptor.
int parameter_index = 1 + index; // skip index 0, which is the target.
return incoming_->GetInputLocation(parameter_index);
}
}
namespace {
inline bool IsTaggedReg(const LinkageLocation& loc, Register reg) {
return loc.IsRegister() && loc.AsRegister() == reg.code() &&
loc.GetType().representation() ==
MachineRepresentation::kTaggedPointer;
}
} // namespace
bool Linkage::ParameterHasSecondaryLocation(int index) const {
// TODO(titzer): this should be configurable, not call-type specific.
if (incoming_->IsJSFunctionCall()) {
LinkageLocation loc = GetParameterLocation(index);
return IsTaggedReg(loc, kJSFunctionRegister) ||
IsTaggedReg(loc, kContextRegister);
}
if (incoming_->IsWasmFunctionCall()) {
LinkageLocation loc = GetParameterLocation(index);
return IsTaggedReg(loc, kWasmInstanceRegister);
}
return false;
}
LinkageLocation Linkage::GetParameterSecondaryLocation(int index) const {
// TODO(titzer): these constants are necessary due to offset/slot# mismatch
static const int kJSContextSlot = 2 + StandardFrameConstants::kCPSlotCount;
static const int kJSFunctionSlot = 3 + StandardFrameConstants::kCPSlotCount;
static const int kWasmInstanceSlot = 3 + StandardFrameConstants::kCPSlotCount;
DCHECK(ParameterHasSecondaryLocation(index));
LinkageLocation loc = GetParameterLocation(index);
// TODO(titzer): this should be configurable, not call-type specific.
if (incoming_->IsJSFunctionCall()) {
if (IsTaggedReg(loc, kJSFunctionRegister)) {
return LinkageLocation::ForCalleeFrameSlot(kJSFunctionSlot,
MachineType::AnyTagged());
} else {
DCHECK(IsTaggedReg(loc, kContextRegister));
return LinkageLocation::ForCalleeFrameSlot(kJSContextSlot,
MachineType::AnyTagged());
}
}
if (incoming_->IsWasmFunctionCall()) {
DCHECK(IsTaggedReg(loc, kWasmInstanceRegister));
return LinkageLocation::ForCalleeFrameSlot(kWasmInstanceSlot,
MachineType::AnyTagged());
}
UNREACHABLE();
return LinkageLocation::ForCalleeFrameSlot(0, MachineType::AnyTagged());
}
} // namespace compiler
} // namespace internal
} // namespace v8
```
|
The Olympia's Tour is a cycling stage race held in the Netherlands.
History
A.S.C. Olympia was founded in Amsterdam on 27 November 1898. It ran one-day races but wanted a race through all the Netherlands. The first Olympia's Tour was in 1909, with three stages and one rest day. The second in 1910 went to Maastricht and Groningen. It was 17 years before the third race, partly because races on public roads were forbidden in the Netherlands during the First World War. An international field with 16 Germans, the champions of Switzerland and Luxembourg and around 40 Dutch riders left the Rembrandtplein on 17 August 1927. The Dutch were mainly amateurs, the Germans sponsored riders who rode for bicycle manufacturers such as Opel and Diamant which provided material and a support team. The German Rudolf Wolke won after four stages and 800 kilometres ahead of Janus Braspennincx. It was the last race until 1955.
The race resumed on 17 June 1955, with 93 riders leaving Stadionplein in Amsterdam South for a stage of 212 km to Hoogeveen. The race was a battle until the end, when 26-year-old Piet Kooyman won. After 1955 the race was held every year except 2001, when it was stopped by a foot-and-mouth disease crisis, and the COVID-19 pandemic in the Netherlands cancelled the 2020 and 2021 editions of the race.
Some winners have become successful professionals. They include Henk Nijdam, Frits Schür, Cees Priem, Fedor den Hertog, Leo van Vliet, John Talen, Servais Knaven, Danny Nelissen, Matthé Pronk, Joost Posthuma and Thomas Dekker.
Past winners
References
Cycle races in the Netherlands
1909 establishments in the Netherlands
Recurring sporting events established in 1909
UCI Europe Tour races
|
Jan Malík (born 7 April 1992) is a Czech professional footballer who plays as a midfielder.
Career
He made his debut in Czech First League on 22 May 2013 in the home match against Sparta.
On 27 June 2016, Malík signed for Bulgarian First League club Cherno More. On 31 July 2016, he made his debut in a 3–1 away win against Pirin Blagoevgrad, coming on as substitute for Hugo Seco. He was released in December.
On 3 March 2017, Malík joined Polish side Legionovia Legionowo.
References
External links
Profile at FC Zbrojovka Brno official site
1992 births
Living people
Footballers from Brno
Czech men's footballers
Czech Republic men's under-21 international footballers
Czech First League players
First Professional Football League (Bulgaria) players
FC Zbrojovka Brno players
PFC Cherno More Varna players
Legionovia Legionowo (football) players
Czech expatriate men's footballers
Czech expatriate sportspeople in Bulgaria
Expatriate men's footballers in Bulgaria
Czech expatriate sportspeople in Poland
Expatriate men's footballers in Poland
Men's association football midfielders
|
```css
Change the style of the decoration with `text-decoration-style`
Use ```list-style-type``` to change the marker type in lists
Load custom fonts on a web page using `@font-face`
Comma-separated lists
Page breaks for printing
```
|
Campephaga is a genus of bird in the cuckoo-shrike family Campephagidae.
The genus contains four species:
Black cuckooshrike (Campephaga flava)
Petit's cuckooshrike (Campephaga petiti)
Red-shouldered cuckooshrike (Campephaga phoenicea)
Purple-throated cuckooshrike (Campephaga quiscalina)
The genus name is combination of two Greek words: , meaning "caterpillar" and - (from ) meaning "-eating".
References
Bird genera
Taxa named by Louis Pierre Vieillot
Taxonomy articles created by Polbot
|
X. roseum may refer to:
Xanthosoma roseum, an ornamental plant in the genus Xanthosoma
Xenophyllum roseum, a species of flowering plant found only in Ecuador
Synonyms
Xiphosium roseum, a synonym for Eria rosea, a species of orchid
See also
Roseum (disambiguation)
|
Joseph Hall (1789–1862), the inventor of 'Wet Puddling', was born in 1789 and apprenticed in 1806 as a puddler to use Henry Cort's puddling process. He tried adding old iron to the charge of the puddling furnace and later puddler's bosh cinder (iron scale, that is rust) to the charge. This caused the charge (to his surprise) to boil violently. When this subsided he gathered the iron into a puddle ball in the usual way, and this proved to be good iron.
In 1830, with the financial support of others he established the Bloomfield Ironworks at Tipton, the firm becoming Bailey, Barrows and Hall in 1834. In 1838, he patented the use of 'bulldog' (roasted tap cinder) to protect the iron bottom plate of the puddling furnace (Patent no.7778 21 August 1838). In 1849, he moved to small house at Handsworth but continued to visit the works occasionally. He died there in 1862.
Further reading
R. A. Mott, 'Dry and Wet Puddling' Trans. Newcomen Soc. 49, (1977–8), 156–7.
W. K. V. Gale, The Black Country Iron Industry (Iron and Steel Institute, London, 1966), 66–9.
19th-century British inventors
Hall, Joseph (Metallugist)
1789 births
1862 deaths
People from Handsworth, West Midlands
|
Action Now! was a Dutch pay television movie channel, broadcasting in the Netherlands and Flanders. The programming of the channel mainly consisted of action movies. In November 2008 Dutch largest cable company Ziggo removed Action Now! from its network, followed by Caiway on 1 April 2009. The availability of Action Now! dropped considerably in the Netherlands, resulting in the closure of the channel on 31 May 2009.
References
Television channels and stations established in 2006
Television channels and stations disestablished in 2009
2006 establishments in the Netherlands
2009 disestablishments in the Netherlands
Defunct television channels in the Netherlands
Defunct television channels in Belgium
|
```objective-c
/**
* @file
* @brief Reset Controller Devicetree macro public API header file.
*/
/*
*
*/
#ifndef ZEPHYR_INCLUDE_DEVICETREE_RESET_H_
#define ZEPHYR_INCLUDE_DEVICETREE_RESET_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup devicetree-reset-controller Devicetree Reset Controller API
* @ingroup devicetree
* @{
*/
/**
* @brief Get the node identifier for the controller phandle from a
* "resets" phandle-array property at an index
*
* Example devicetree fragment:
*
* reset1: reset-controller@... { ... };
*
* reset2: reset-controller@... { ... };
*
* n: node {
* resets = <&reset1 10>, <&reset2 20>;
* };
*
* Example usage:
*
* DT_RESET_CTLR_BY_IDX(DT_NODELABEL(n), 0)) // DT_NODELABEL(reset1)
* DT_RESET_CTLR_BY_IDX(DT_NODELABEL(n), 1)) // DT_NODELABEL(reset2)
*
* @param node_id node identifier
* @param idx logical index into "resets"
* @return the node identifier for the reset controller referenced at
* index "idx"
* @see DT_PHANDLE_BY_IDX()
*/
#define DT_RESET_CTLR_BY_IDX(node_id, idx) \
DT_PHANDLE_BY_IDX(node_id, resets, idx)
/**
* @brief Equivalent to DT_RESET_CTLR_BY_IDX(node_id, 0)
* @param node_id node identifier
* @return a node identifier for the reset controller at index 0
* in "resets"
* @see DT_RESET_CTLR_BY_IDX()
*/
#define DT_RESET_CTLR(node_id) \
DT_RESET_CTLR_BY_IDX(node_id, 0)
/**
* @brief Get the node identifier for the controller phandle from a
* resets phandle-array property by name
*
* Example devicetree fragment:
*
* reset1: reset-controller@... { ... };
*
* reset2: reset-controller@... { ... };
*
* n: node {
* resets = <&reset1 10>, <&reset2 20>;
* reset-names = "alpha", "beta";
* };
*
* Example usage:
*
* DT_RESET_CTLR_BY_NAME(DT_NODELABEL(n), alpha) // DT_NODELABEL(reset1)
* DT_RESET_CTLR_BY_NAME(DT_NODELABEL(n), beta) // DT_NODELABEL(reset2)
*
* @param node_id node identifier
* @param name lowercase-and-underscores name of a resets element
* as defined by the node's reset-names property
* @return the node identifier for the reset controller referenced by name
* @see DT_PHANDLE_BY_NAME()
*/
#define DT_RESET_CTLR_BY_NAME(node_id, name) \
DT_PHANDLE_BY_NAME(node_id, resets, name)
/**
* @brief Get a reset specifier's cell value at an index
*
* Example devicetree fragment:
*
* reset: reset-controller@... {
* compatible = "vnd,reset";
* #reset-cells = <1>;
* };
*
* n: node {
* resets = <&reset 10>;
* };
*
* Bindings fragment for the vnd,reset compatible:
*
* reset-cells:
* - id
*
* Example usage:
*
* DT_RESET_CELL_BY_IDX(DT_NODELABEL(n), 0, id) // 10
*
* @param node_id node identifier for a node with a resets property
* @param idx logical index into resets property
* @param cell lowercase-and-underscores cell name
* @return the cell value at index "idx"
* @see DT_PHA_BY_IDX()
*/
#define DT_RESET_CELL_BY_IDX(node_id, idx, cell) \
DT_PHA_BY_IDX(node_id, resets, idx, cell)
/**
* @brief Get a reset specifier's cell value by name
*
* Example devicetree fragment:
*
* reset: reset-controller@... {
* compatible = "vnd,reset";
* #reset-cells = <1>;
* };
*
* n: node {
* resets = <&reset 10>;
* reset-names = "alpha";
* };
*
* Bindings fragment for the vnd,reset compatible:
*
* reset-cells:
* - id
*
* Example usage:
*
* DT_RESET_CELL_BY_NAME(DT_NODELABEL(n), alpha, id) // 10
*
* @param node_id node identifier for a node with a resets property
* @param name lowercase-and-underscores name of a resets element
* as defined by the node's reset-names property
* @param cell lowercase-and-underscores cell name
* @return the cell value in the specifier at the named element
* @see DT_PHA_BY_NAME()
*/
#define DT_RESET_CELL_BY_NAME(node_id, name, cell) \
DT_PHA_BY_NAME(node_id, resets, name, cell)
/**
* @brief Equivalent to DT_RESET_CELL_BY_IDX(node_id, 0, cell)
* @param node_id node identifier for a node with a resets property
* @param cell lowercase-and-underscores cell name
* @return the cell value at index 0
* @see DT_RESET_CELL_BY_IDX()
*/
#define DT_RESET_CELL(node_id, cell) \
DT_RESET_CELL_BY_IDX(node_id, 0, cell)
/**
* @brief Get the node identifier for the controller phandle from a
* "resets" phandle-array property at an index
*
* @param inst instance number
* @param idx logical index into "resets"
* @return the node identifier for the reset controller referenced at
* index "idx"
* @see DT_RESET_CTLR_BY_IDX()
*/
#define DT_INST_RESET_CTLR_BY_IDX(inst, idx) \
DT_RESET_CTLR_BY_IDX(DT_DRV_INST(inst), idx)
/**
* @brief Equivalent to DT_INST_RESET_CTLR_BY_IDX(inst, 0)
* @param inst instance number
* @return a node identifier for the reset controller at index 0
* in "resets"
* @see DT_RESET_CTLR()
*/
#define DT_INST_RESET_CTLR(inst) \
DT_INST_RESET_CTLR_BY_IDX(inst, 0)
/**
* @brief Get the node identifier for the controller phandle from a
* resets phandle-array property by name
*
* @param inst instance number
* @param name lowercase-and-underscores name of a resets element
* as defined by the node's reset-names property
* @return the node identifier for the reset controller referenced by
* the named element
* @see DT_RESET_CTLR_BY_NAME()
*/
#define DT_INST_RESET_CTLR_BY_NAME(inst, name) \
DT_RESET_CTLR_BY_NAME(DT_DRV_INST(inst), name)
/**
* @brief Get a DT_DRV_COMPAT instance's reset specifier's cell value
* at an index
* @param inst DT_DRV_COMPAT instance number
* @param idx logical index into resets property
* @param cell lowercase-and-underscores cell name
* @return the cell value at index "idx"
* @see DT_RESET_CELL_BY_IDX()
*/
#define DT_INST_RESET_CELL_BY_IDX(inst, idx, cell) \
DT_RESET_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
/**
* @brief Get a DT_DRV_COMPAT instance's reset specifier's cell value by name
* @param inst DT_DRV_COMPAT instance number
* @param name lowercase-and-underscores name of a resets element
* as defined by the node's reset-names property
* @param cell lowercase-and-underscores cell name
* @return the cell value in the specifier at the named element
* @see DT_RESET_CELL_BY_NAME()
*/
#define DT_INST_RESET_CELL_BY_NAME(inst, name, cell) \
DT_RESET_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
/**
* @brief Equivalent to DT_INST_RESET_CELL_BY_IDX(inst, 0, cell)
* @param inst DT_DRV_COMPAT instance number
* @param cell lowercase-and-underscores cell name
* @return the value of the cell inside the specifier at index 0
*/
#define DT_INST_RESET_CELL(inst, cell) \
DT_INST_RESET_CELL_BY_IDX(inst, 0, cell)
/**
* @brief Get a Reset Controller specifier's id cell at an index
*
* This macro only works for Reset Controller specifiers with cells named "id".
* Refer to the node's binding to check if necessary.
*
* Example devicetree fragment:
*
* reset: reset-controller@... {
* compatible = "vnd,reset";
* #reset-cells = <1>;
* };
*
* n: node {
* resets = <&reset 10>;
* };
*
* Bindings fragment for the vnd,reset compatible:
*
* reset-cells:
* - id
*
* Example usage:
*
* DT_RESET_ID_BY_IDX(DT_NODELABEL(n), 0) // 10
*
* @param node_id node identifier
* @param idx logical index into "resets"
* @return the id cell value at index "idx"
* @see DT_PHA_BY_IDX()
*/
#define DT_RESET_ID_BY_IDX(node_id, idx) \
DT_PHA_BY_IDX(node_id, resets, idx, id)
/**
* @brief Equivalent to DT_RESET_ID_BY_IDX(node_id, 0)
* @param node_id node identifier
* @return the id cell value at index 0
* @see DT_RESET_ID_BY_IDX()
*/
#define DT_RESET_ID(node_id) \
DT_RESET_ID_BY_IDX(node_id, 0)
/**
* @brief Get a DT_DRV_COMPAT instance's Reset Controller specifier's id cell value
* at an index
* @param inst DT_DRV_COMPAT instance number
* @param idx logical index into "resets"
* @return the id cell value at index "idx"
* @see DT_RESET_ID_BY_IDX()
*/
#define DT_INST_RESET_ID_BY_IDX(inst, idx) \
DT_RESET_ID_BY_IDX(DT_DRV_INST(inst), idx)
/**
* @brief Equivalent to DT_INST_RESET_ID_BY_IDX(inst, 0)
* @param inst DT_DRV_COMPAT instance number
* @return the id cell value at index 0
* @see DT_INST_RESET_ID_BY_IDX()
*/
#define DT_INST_RESET_ID(inst) \
DT_INST_RESET_ID_BY_IDX(inst, 0)
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_DEVICETREE_RESET_H_ */
```
|
Military leadership in the American Civil War was vested in both the political and the military structures of the belligerent powers. The overall military leadership of the United States during the Civil War was ultimately vested in the President of the United States as constitutional commander-in-chief, and in the political heads of the military departments he appointed. Most of the major Union wartime commanders had, however, previous regular army experience. A smaller number of military leaders originated from the United States Volunteers. Some of them derived from nations other than the United States.
In the Southern Confederacy, the constitutional commander-in-chief was educated at West Point and had served in the Mexican War. Many officers in the United States Army, most of them educated at West Point at the expense of the United States, and having taken an oath of allegiance to the same, joined the rebellion against it. Several significant Confederate military leaders emerged from state unit commands. Some military leaders derived from countries other than the United States.
The United States (The Union)
Civilian military leaders
President Abraham Lincoln was Commander-in-Chief of the Union armed forces throughout the conflict; after his April 14, 1865 assassination, Vice President Andrew Johnson became the nation's chief executive. Lincoln's first Secretary of War was Simon Cameron; Edwin M. Stanton was confirmed to replace Cameron in January 1862. Thomas A. Scott was Assistant Secretary of War. Gideon Welles was Secretary of the Navy, aided by Assistant Secretary of the Navy Gustavus Fox.
Regular Army officers
When the war began, the American standing army or "Regular army" consisted of only 1080 commissioned officers and 15,000 enlisted men. Although 142 regular officers became Union generals during the war, most remained "frozen" in their regular units. That stated, most of the major Union wartime commanders had previous regular army experience. Over the course of the war, the Commanding General of the United States Army was, in order of service, Winfield Scott, George B. McClellan, Henry Halleck, and finally, Ulysses S. Grant.
Commanding Generals, U.S.A.
Robert Anderson
Don Carlos Buell
John Buford
Ambrose Burnside
Edward Canby
Philip St. George Cooke
Darius N. Couch
Thomas Turpin Crittenden
Thomas Leonidas Crittenden
Samuel Curtis
Abner Doubleday
William B. Franklin
James A. Garfield
Quincy Adams Gillmore
Gordon Granger
Ulysses S. Grant
David McMurtrie Gregg
Henry Wager Halleck
Winfield Scott Hancock
William B. Hazen
Samuel P. Heintzelman
Joseph Hooker
Oliver O. Howard
Andrew A. Humphreys
Henry Jackson Hunt
David Hunter
Philip Kearny
Erasmus D. Keyes
John McArthur
George B. McClellan
Alexander McDowell McCook
Irvin McDowell
James B. McPherson
Joseph K. Mansfield
George Meade
Montgomery C. Meigs
Wesley Merritt
Dixon S. Miles
Edward Ord
Alfred Pleasonton
John Pope
John F. Reynolds
William Rosecrans
John Schofield
Winfield Scott
John Sedgwick
Philip Sheridan
William T. Sherman
Henry W. Slocum
Andrew Jackson Smith
William Farrar Smith
George Stoneman
Edwin V. Sumner
George Sykes
George Henry Thomas
Alfred Thomas Archimedes Torbert
Gouverneur K. Warren
James H. Wilson
John E. Wool
Militia and political leaders appointed to Union military leadership
Under the United States Constitution, each state recruited, trained, equipped, and maintained local militia; regimental officers were appointed and promoted by state governors. After states answered Lincoln's April 15, 1861, ninety-day call for 75,000 volunteer soldiers, most Union states' regiments and batteries became known as United States Volunteers to distinguish between state-raised forces and regular army units. Union brigade-level officers (generals) could receive two different types of Federal commissions: U.S. Army or U.S. Volunteers (ex: Major General, U.S.A. as opposed to Major General, U.S.V.). While most Civil War generals held volunteer or brevet rank, many generals held both types of commission; regular rank was considered superior.
Edward D. Baker
Nathaniel Prentice Banks
Francis Preston Blair, Jr.
Benjamin Franklin Butler
Joshua Lawrence Chamberlain
Jacob Dolson Cox
John Adams Dix
John C. Frémont
Nathan Kimball
John A. Logan
John Alexander McClernand
Daniel Sickles
James B. Steedman
Alfred Terry
Lew Wallace
Native American and international officers in Union Army
Reflecting the multi-national makeup of the soldiers engaged, some Union military leaders derived from nations other than the United States.
Philippe, Comte de Paris
Michael Corcoran
Włodzimierz Krzyżanowski
Thomas Francis Meagher
Ely Parker
Albin F. Schoepf
Carl Schurz
Franz Sigel
Régis de Trobriand
Ivan Turchaninov
August Willich
Union naval leaders
The rapid rise of the United States Navy during the Civil War contributed enormously to the North's ability to effectively blockade ports and Confederate shipping from quite early in the conflict. Handicapped by an aging 90 ship fleet, and despite significant manpower losses to the Confederate Navy after secession, a massive ship construction campaign embracing technological innovations from civil engineer James Buchanan Eads and naval engineers like Benjamin F. Isherwood and John Ericsson, along with four years' daily experience with modern naval conflict put the U. S. Navy onto a path which has led to today's world naval dominance.
Commanding Officer, U.S.N.
John A. Dahlgren
Charles Henry Davis
Samuel Francis du Pont
David Farragut
Andrew Hull Foote
Samuel Phillips Lee
David Dixon Porter
John Ancrum Winslow
John Lorimer Worden
The Confederate States
Civilian military leaders
Jefferson Davis was named provisional president on February 9, 1861, and assumed similar commander-in-chief responsibilities as would Lincoln; on November 6, 1861, Davis was elected President of the Confederate States of America under the Confederate Constitution. Alexander H. Stephens was appointed as Vice President of the Confederate States of America on February 18, 1861, and later assumed identical vice presidential responsibilities as Hannibal Hamlin did. Several men served the Confederacy as Secretary of War, including Leroy Pope Walker, Judah P. Benjamin, George W. Randolph, James Seddon, and John C. Breckinridge. Stephen Mallory was Confederate Secretary of the Navy throughout the conflict.
Former Regular Army officers
In the wake of secession, many regular officers felt they could not betray loyalty to their home state, and as a result some 313 of those officers resigned their commission and in many cases took up arms for the Confederate Army. Himself a graduate of West Point and a former regular officer, Confederate President Jefferson Davis highly prized these valuable recruits to the cause and saw that former regular officers were given positions of authority and responsibility.
Richard H. Anderson
P.G.T. Beauregard
Milledge Luke Bonham
Braxton Bragg
Simon Bolivar Buckner, Sr.
George B. Crittenden
Samuel Cooper
Jubal Anderson Early
Richard S. Ewell
Franklin Gardner
Robert S. Garnett
Josiah Gorgas
William Joseph Hardee
Ambrose Powell Hill
Daniel Harvey Hill
John Bell Hood
Thomas J. "Stonewall" Jackson
Albert Sidney Johnston
Joseph E. Johnston
Robert E. Lee
Stephen D. Lee
Mansfield Lovell
James Longstreet
John B. Magruder
Humphrey Marshall
Dabney Herndon Maury
John Hunt Morgan
John C. Pemberton
George Pickett
Edmund Kirby Smith
Gustavus Woodson Smith
J.E.B. Stuart
William B. Taliaferro
Earl Van Dorn
Joseph Wheeler
Henry A. Wise
Militia and political leaders appointed to Confederate military leadership
The land of Davy Crockett and Andrew Jackson, the state military tradition was especially strong in southern states, some of which were until recently frontier areas. Several significant Confederate military leaders emerged from state unit commands.
John C. Breckinridge
Benjamin F. Cheatham
Nathan Bedford Forrest
Wade Hampton
James L. Kemper
Ben McCulloch
Leonidas Polk
Sterling Price
Alexander P. Stewart
Richard Taylor
Native American and international officers in Confederate army
While no foreign power sent troops or commanders directly to assist the Confederate States, some leaders derived from countries other than the United States.
Patrick Cleburne
Stand Watie
Camille Armand Jules Marie, Prince de Polignac
Raleigh E. Colston
Collett Leventhorpe
George St. Leger Grenfell
Confederate naval leaders
The Confederate Navy possessed no extensive shipbuilding facilities; instead, it relied on refitting captured ships or purchased warships from Great Britain. The South had abundant navigable inland waterways, but after the Union built a vast fleet of gunboats, they soon dominated the Mississippi, Tennessee, Cumberland, Red and other rivers, rendering those waterways almost useless to the Confederacy. Confederates did seize several Union Navy vessels in harbor after secession and converted a few into ironclads, like the CSS Virginia. Blockade runners were built and operated by British naval interests, although by late in the war the C.S. Navy operated some. A few new vessels were built or purchased in Britain, notably the CSS Shenandoah and the CSS Alabama. These warships acted as raiders, wreaking havoc with commercial shipping. Aggrieved by these losses, in 1871 the U.S. government was awarded damages from Great Britain in the Alabama Claims.
John Mercer Brooke
Isaac Newton Brown
Franklin Buchanan
James Dunwoody Bulloch
Catesby ap Roger Jones
Matthew Fontaine Maury
Raphael Semmes
Josiah Tattnall III
James Iredell Waddell
See also
History of Confederate States Army Generals
Confederate States Armed Forces
Union Army
Union Navy
Notes
References
Boatner, Mark Mayo, III. The Civil War Dictionary. New York: McKay, 1959; revised 1988. .
Eicher, John and David Eicher, Civil War High Commands, Stanford University Press, 2001,
Warner, Ezra J., Generals in Blue: Lives of the Union Commanders, Louisiana State University Press, 1964,
Warner, Ezra J., Generals in Gray: Lives of the Confederate Commanders, Louisiana State University Press, 1959,
Waugh, John C., The Class of 1846, From West Point to Appomattox: Stonewall Jackson, George McClellan and their Brothers, New York: Warner, 1994.
Further reading
American National Biography (20 vol. 2000; online and paper copies at academic libraries) short biographies by specialists
Bledsoe, Andrew S. Citizen-Officers: The Union and Confederate Volunteer Junior Officer Corps in the American Civil War. Baton Rouge, Louisiana: Louisiana State University Press, 2015. .
Current, Richard N., et al. eds. Encyclopedia of the Confederacy (1993) (4 Volume set; also 1 vol abridged version) ()
Dictionary of American Biography 30 vol, 1934–1990; short biographies by specialists
Faust, Patricia L. (ed.) Historical Times Illustrated Encyclopedia of the Civil War (1986) () 2000 short entries
Heidler, David Stephen. Encyclopedia of the American Civil War: A Political, Social, and Military History (2002), 1600 entries in 2700 pages in 5 vol or 1-vol editions
Woodworth, Steven E. ed. American Civil War: A Handbook of Literature and Research (1996) (), 750 pages of historiography and bibliography
Military history of the American Civil War
Military leadership
|
```smalltalk
Extension { #name : 'Point' }
{ #category : '*Math-Operations-Extensions' }
Point >> angle [
"Answer the angle in radians between the vectors represented by the receiver and (1, 0) from the origin."
^ self y arcTan: self x
]
{ #category : '*Math-Operations-Extensions' }
Point >> angleWith: aPoint [
"Answer the angle in radians between the vectors represented by the receiver and aPoint from the origin."
| ar ap |
ar := self angle.
ap := aPoint angle.
^ ap >= ar
ifTrue: [ ap - ar ]
ifFalse: [ Float pi * 2 - ar + ap ]
]
{ #category : '*Math-Operations-Extensions' }
Point >> bearingToPoint: anotherPoint [
"Return the bearing, in degrees, from the receiver to anotherPoint."
| deltaX deltaY |
deltaX := anotherPoint x - x.
deltaY := anotherPoint y - y.
deltaX abs < 0.001
ifTrue: [ ^ deltaY > 0 ifTrue: [ 180 ] ifFalse: [ 0 ]].
^ ((deltaX >= 0 ifTrue: [90] ifFalse: [270])
- ((deltaY / deltaX) arcTan negated radiansToDegrees)) rounded
]
{ #category : '*Math-Operations-Extensions' }
Point >> degrees [
"Answer the angle the receiver makes with origin in degrees. right is 0; down is 90."
| tan theta |
^ x = 0
ifTrue:
[ y >= 0
ifTrue: [ 90.0 ]
ifFalse: [ 270.0 ] ]
ifFalse:
[ tan := y asFloat / x asFloat.
theta := tan arcTan.
x >= 0
ifTrue:
[ y >= 0
ifTrue: [ theta radiansToDegrees ]
ifFalse: [ 360.0 + theta radiansToDegrees ] ]
ifFalse: [ 180.0 + theta radiansToDegrees ] ]
]
{ #category : '*Math-Operations-Extensions' }
Point >> distanceTo: aPoint [
"Answer the distance between aPoint and the receiver."
| dx dy |
dx := aPoint x - x.
dy := aPoint y - y.
^ (dx * dx + (dy * dy)) sqrt
]
{ #category : '*Math-Operations-Extensions' }
Point >> normal [
"Answer a Point representing the unit vector rotated 90 deg clockwise. For the zero point return -1@0."
| n d |
n := y negated @ x.
(d := (n x * n x + (n y * n y))) = 0
ifTrue: [ ^ -1 @0 ].
^ n / d sqrt
]
{ #category : '*Math-Operations-Extensions' }
Point >> normalized [
"Optimized for speed"
| r |
r := (x * x + (y * y)) sqrt.
^ (x / r) @ (y / r)
]
{ #category : '*Math-Operations-Extensions' }
Point >> onLineFrom: p1 to: p2 [
^ self onLineFrom: p1 to: p2 within: 2
]
{ #category : '*Math-Operations-Extensions' }
Point >> onLineFrom: p1 to: p2 within: epsilon [
"Answer true if the receiver lies on the given line segment between p1 and p2 within a small epsilon."
"is this point within the box spanning p1 and p2 expanded by epsilon? (optimized)"
p1 x < p2 x
ifTrue: [
((x < (p1 x - epsilon)) or: [x > (p2 x + epsilon)]) ifTrue: [^ false]]
ifFalse: [
((x < (p2 x - epsilon)) or: [x > (p1 x + epsilon)]) ifTrue: [^ false]].
p1 y < p2 y
ifTrue: [
((y < (p1 y - epsilon)) or: [y > (p2 y + epsilon)]) ifTrue: [^ false]]
ifFalse: [
((y < (p2 y - epsilon)) or: [y > (p1 y + epsilon)]) ifTrue: [^ false]].
"it's in the box; is it on the line?"
^ (self distanceTo: (self nearestPointAlongLineFrom: p1 to: p2)) <= epsilon
]
{ #category : '*Math-Operations-Extensions' }
Point >> r [
"Answer the receiver's radius in polar coordinate system."
^ (self dotProduct: self) sqrt
]
{ #category : '*Math-Operations-Extensions' }
Point class >> r: rho degrees: degrees [
"Answer an instance of me with polar coordinates rho and theta."
^ self basicNew setR: rho degrees: degrees
]
{ #category : '*Math-Operations-Extensions' }
Point >> rotateBy: angle about: center [
"This method returns the point obtained after rotating myself (counter clockwise)
around the #center point of an #angle given as parameter. The #angle provided as
parameter is interpreted as being in radian."
| p r theta |
p := self - center.
r := p r.
theta := angle asFloat - p theta.
^ (center x asFloat + (r * theta cos)) @ (center y asFloat - (r * theta sin))
]
{ #category : '*Math-Operations-Extensions' }
Point >> rotateBy: direction centerAt: c [
"Answer a Point which is rotated according to direction, about the point c.
Direction must be one of #right (CW), #left (CCW) or #pi (180 degrees)."
| offset |
offset := self - c.
direction == #right ifTrue: [ ^ offset y negated @ offset x + c ].
direction == #left ifTrue: [ ^ offset y @ offset x negated + c ].
direction == #pi ifTrue: [ ^ c - offset ].
self error: 'unrecognizable direction'
]
{ #category : '*Math-Operations-Extensions' }
Point >> setR: rho degrees: degrees [
| radians |
radians := degrees asFloat degreesToRadians.
x := rho asFloat * radians cos.
y := rho asFloat * radians sin
]
{ #category : '*Math-Operations-Extensions' }
Point >> theta [
"Answer the angle the receiver makes with origin in radians. right is 0;
down is 90."
| tan theta |
^ x = 0
ifTrue: [y >= 0
ifTrue: [ 1.570796326794897 "90.0 degreesToRadians" ]
ifFalse: [ 4.71238898038469 "270.0 degreesToRadians" ] ]
ifFalse:
[tan := y asFloat / x asFloat.
theta := tan arcTan.
x >= 0
ifTrue: [y >= 0
ifTrue: [ theta ]
ifFalse: [ "360.0 degreesToRadians" 6.283185307179586 + theta ]]
ifFalse: [ "180.0 degreesToRadians" 3.141592653589793 + theta ] ]
]
```
|
```python
"""
output.py
Output functions.
See README.md for details on installing/using.
"""
from datetime import datetime
from colorama import Fore, Style, init
from helpers import strfdelta
import jsonpickle
# pylint: disable=missing-docstring, line-too-long
# Initialize colorama
init(convert=True)
FILE_NAME = "botreport_" + datetime.now().strftime("%Y%m%d_%H%M%S") + ".html"
OUTPUT_FILE = open(FILE_NAME, mode="w", encoding="utf-8")
# Overall container for outputing JSON for UI
class OuputIssuesJson():
def __init__(self):
self.repositories = []
def write_output(self, file_name = "botreport_" + datetime.now().strftime("%Y%m%d_%H%M%S") + ".json"):
with open(file_name, mode="w", encoding="utf-8") as json_file:
json_file.write(jsonpickle.encode(self, unpicklable=False))
# Repository output format for UI
class OutputRepository():
def __init__(self, name):
self.name = name
self.issues = []
# Issue output format for UI
class OutputIssue():
def __init__(self, tag, issue):
self.tag = tag
self.issue = issue
def print_issue(issue):
print(f' {issue.number} : {issue.title}')
print(f' {issue.html_url}')
OUTPUT_FILE.write(f'<span class="tab2">{issue.number} : <a href="{issue.html_url}" target="_blank">{issue.title}</a></span>')
OUTPUT_FILE.write("<br/>")
# Uncomment if you want to add labels.
# add_label(repo, issue, BOT_SERVICES_LABEL)
def print_status(text, css=''):
print(u''+text)
has_css = True if (len(css) > 0) else False
if has_css:
OUTPUT_FILE.write(f"<span class='{css}'>")
OUTPUT_FILE.write(f"{text}</br>")
if has_css:
OUTPUT_FILE.write("</span>")
def print_stale_issue(issue):
print(f' {issue.number} : {issue.title}')
OUTPUT_FILE.write(f'<span class="tab2">{issue.number} : <a href="{issue.html_url}" target="_blank">{issue.title}</a></span>')
OUTPUT_FILE.write("<br/>")
print_status(f' Issue Age: {Fore.RED}{strfdelta(datetime.utcnow() - issue.created_at, "{days} days {hours}:{minutes}:{seconds}")}{Style.RESET_ALL}','tab3')
print_status(f' Last Comment: {Fore.RED}{strfdelta(datetime.utcnow() - issue.last_comment, "{days} days {hours}:{minutes}:{seconds}")}{Style.RESET_ALL}','tab3')
print(f' {issue.html_url}')
def print_break():
OUTPUT_FILE.write("<br/>")
def setup_html():
OUTPUT_FILE.write("<html>\n<head>\n<title>Bot Report</title>\n")
OUTPUT_FILE.write("<style type='text/css'>body{ font-family: Helvetica,Arial,sans-serif; }.tab1 { margin-left: 30px; }.tab2 { margin-left: 60px; }.tab3 { margin-left: 90px; }</style>\n")
OUTPUT_FILE.write("</head>\n<body>\n")
return OUTPUT_FILE
```
|
The German Bight (; ; ; ; ; sometimes also the German Bay) is the southeastern bight of the North Sea bounded by the Netherlands and Germany to the south, and Denmark and Germany to the east (the Jutland peninsula). To the north and west it is limited by the Dogger Bank. The Bight contains the Frisian and Danish Islands. The Wadden Sea is approximately ten to twelve kilometres wide at the location of the German Bight. The Frisian islands and the nearby coastal areas are collectively known as Frisia. The southern portion of the bight is also known as the Heligoland Bight. Between 1949 and 1956 the BBC Sea Area Forecast (Shipping Forecast) used "Heligoland" as the designation for the area now referred to as German Bight.
Use
The German Bight contains some of Germany's largest national parks by area, the aim of which is to protect the Wadden Sea, a UNESCO World Heritage Site in the "nature" category. Due to being divided among three different states of Germany those protected areas fall into three different national parks, namely the Lower Saxon Wadden Sea National Park, the Schleswig-Holstein Wadden Sea National Park and the small Hamburg Wadden Sea National Park mostly around the island of Neuwerk. Despite or maybe because of its unique natural environment, the German Bight is also subject to intense economic and recreational use with the Wadden Sea being one of Germany's most popular tourist destinations. Mudflat hiking is a particularly popular tourist activity usually undertaken with licensed guides employed by the national park service. Fishing and mussel banks (particularly oysters) are other important economic activities with crangon crangon a particularly well regarded product of local fishing. Energy extraction also plays an important role with Germany's only offshore oil rig (Mittelplate) located in the German Bight and an increasing penetration by offshore wind farms such as Alpha Ventus. While offshore wind farms are more expensive to build and require more expensive operations for maintenance and repair than land-based wind turbines the steadier winds out at sea allow for steadier power output and a higher capacity factor. Both these advantages are important enough to justify the higher cost as Germany is in the process of phasing out nuclear energy and plans to phase out all fossil fuels thereafter leaving few dispatchable electricity sources.
Traffic
The German Bight has also played an important role as a shipping lane since medieval times with the approach to the Port of Hamburg passing through it and then the Elbe River estuary. Other important ports along the German Bight are Bremerhaven/Bremen, Emden (important for export of motorcars, particularly those made at the local VW plant) and the JadeWeserPort at Wilhelmshaven which is Germany's only deepwater port. Shipping in the German Bight often relies on tidal channels (called "Priel" in German) for shipping lanes, but as the sediment is moved around by tides, wind and waves and as ships reach ever greater draughts extensive dredging is necessary to keep shipping lanes open. Some of the East Frisian Islands can be reached on foot at low tide and the sailing schedules of local ferries are tide-dependent. While the mudflats are usually barred to anything but foot traffic and more heavily protected areas of the national parks are off-limits to all but scientists, there is a scheduled horse drawn carriage service from the mainland to Neuwerk locally known as a Wattwagen (mud flats wagon). The island of Sylt can be reached by the railway-only Hindenburgdamm causeway which was built after World War I when the port on the mainland from which ferries to Sylt had left up to that point came under Danish rule following the 1920 Schleswig plebiscites. Some of the Halligen also have railway connections to the mainland but in some cases those are only usable at low tide. Those lines are the Dagebüll–Oland–Langeneß island railway and the Lüttmoorsiel-Nordstrandischmoor island railway. While there is no scheduled traffic, island residents can use their own (usually self-built) rail vehicles. In the past those were sail bogeys, but nowadays most are diesel driven draisines with battery-electric railcars increasingly gaining ground. The rail lines are also used by the government for coastal protection work and to transport goods and personnel.
See also
Bight (geography)
Frisia
Frisian Islands
Wadden Sea
References
Further reading
External links
Map of the region
Bays of Schleswig-Holstein
Frisia
Bays of Lower Saxony
Shipping Forecast areas
Bays of the Netherlands
Bights (geography)
|
Pablo Olmedo Castañón (born May 8, 1975 in Mexico City) is a middle and long-distance runner from Mexico.
He twice won the gold medal in the men's 5.000 metres at the Central American and Caribbean Games, and competed for his native country at the 2000 Summer Olympics in Sydney, Australia.
International competitions
References
sports-reference
Picture of Pablo Olmedo
1975 births
Living people
Athletes from Mexico City
Mexican male long-distance runners
Mexican male middle-distance runners
Olympic athletes for Mexico
Athletes (track and field) at the 2000 Summer Olympics
World Athletics Championships athletes for Mexico
Pan American Games competitors for Mexico
Athletes (track and field) at the 1999 Pan American Games
Athletes (track and field) at the 2003 Pan American Games
Central American and Caribbean Games gold medalists for Mexico
Central American and Caribbean Games silver medalists for Mexico
Competitors at the 1998 Central American and Caribbean Games
Competitors at the 2002 Central American and Caribbean Games
Central American and Caribbean Games medalists in athletics
20th-century Mexican people
21st-century Mexican people
|
The Church of Kurt Cobain was a Christian church founded in 1996 in Portland, Oregon, and whose patron was Kurt Cobain, the lead singer and guitarist of American rock band Nirvana, who committed suicide in April 1994.
History
The church was founded by Jim Dillon, in Portland, Oregon. Dillon stated that he got the idea for the church from a similar church in San Francisco that paid tribute to jazz musician John Coltrane and that his church aimed to find meaning in the life of Kurt Cobain who committed suicide in 1994. He also stated that Cobain's music has a deeper spiritual message. Instead of playing "Amazing Grace" on an organ, the church would play the Nirvana song "Smells Like Teen Spirit". Dillon also stated of another Nirvana song, "Rape Me", that "In essence, the real message is one of a Christian theme - treat me the way you want me to treat you".
The church held a rally on May 28, 1996, to inaugurate their place of worship and the founders claimed that their purpose was to pay homage to Cobain who they referred to as a "Saint" and also to the Generation X who they felt had been ignored by the Baby boomer focused-world.
A September 1996 article by Spin stated that the Kurt Cobain Church had been a media hoax. In a July 2021 article by Alan Cross in A Journal of Musical Things, he claimed that the Church of Kurt Cobain while having Dillon as its reverend and having a big recruitment drive in 1996, was in fact a stunt created by an art director named Jerry Ketel and that the purpose of it was to make a statement against celebrity culture and society's fascination with drug abuse and suicide. Cross believed that Ketel had fooled some big media outlets into thinking that it was real.
References
Church of Kurt Cobain
Church of Kurt Cobain
|
```php
<?php
namespace WPGraphQL\Type\InterfaceType;
use WPGraphQL\Model\Post;
use WPGraphQL\Model\Term;
use WPGraphQL\Registry\TypeRegistry;
class MenuItemLinkable {
/**
* Registers the MenuItemLinkable Interface Type
*
* @param \WPGraphQL\Registry\TypeRegistry $type_registry Instance of the WPGraphQL Type Registry
*
* @throws \Exception
*/
public static function register_type( TypeRegistry $type_registry ): void {
register_graphql_interface_type(
'MenuItemLinkable',
[
'description' => __( 'Nodes that can be linked to as Menu Items', 'wp-graphql' ),
'interfaces' => [ 'Node', 'UniformResourceIdentifiable', 'DatabaseIdentifier' ],
'fields' => [],
'resolveType' => static function ( $node ) use ( $type_registry ) {
switch ( true ) {
case $node instanceof Post:
/** @var \WP_Post_Type $post_type_object */
$post_type_object = get_post_type_object( $node->post_type );
$type = $type_registry->get_type( $post_type_object->graphql_single_name );
break;
case $node instanceof Term:
/** @var \WP_Taxonomy $tax_object */
$tax_object = get_taxonomy( $node->taxonomyName );
$type = $type_registry->get_type( $tax_object->graphql_single_name );
break;
default:
$type = null;
}
return $type;
},
]
);
}
}
```
|
Mitwaa or Mitwa () is a Marathi movie produced by Sagar Pictures. starring Swwapnil Joshi, Sonalee Kulkarni and Prarthana Behere. Swwapnil Joshi and Sonalee Kulkarni appear opposite each other for the first time.
Plot
Shivam Sarang, a rich hotelier from Goa, doesn't believe in love or the institution of marriage. But when he meets Nandini, a smart woman who starts working in his hotel, he is attracted to her. He proposes to her but she rejects him because of her past.
A few years earlier she was an orphan who was supposed to marry Ashwin Desai. She didn't love him but respected and trusted him. He loved her so much that he treated her like a princess. He started to teach her how to drive. During one driving attempt, they got into an accident. Nandini was safe but Ashwin got hurt while saving her and from on he was in hospital in a vegetative state. Doctors said he couldn't move his body at all so it was better to let him go but Nandini wasn't ready. She believed he would come back to her and was living in hope.
After much persuading Nandini agrees that she loves Shivam and she is ready to be with him but two hours of her day will be for Ashwin. Due to his insecurities, Shivam goes to meet Ashwin, but after meeting him, Ashwin dies.
Nandini blames Shivam for Ashwin's death because he met him and made him realise that Nandini is now with Shivam and therefore he has no reason to live anymore. But Ashwin's mother thanks Shivam because she believes that after seeing Shivam, Ashwin was relieved that someone was there to look after Nandini and that's the reason he left the world left happily and not in sorrow.
After sometime, Nandini also accepts the fact that she loves Shivam. Eventually they marry and have a daughter, but again when both Shivam and Nandini get into an accident she forgets everything, her marriage, her daughter, the death of Ashwin. She continues to go to hospital for two hours and talks with an empty bed assuming Ashwin is lying there.
Cast
Swwapnil Joshi as Shivam Sarang
Sonalee Kulkarni as Nandini
Prarthana Behere as Avani
Aruna Irani as Rosie aunty
Sangram Salvi as Ashwin Desai
Ela Bhate as Ashwin's mother
Bageshree Nimbalkar Deshpande as co- worker
Production
For the second heroine, the director wanted a fresh face. A talent hunt show to find the new face was conducted by Swwapnil Joshi on Marathi Music channel 9X Jhakaas, and Prarthana Behere was selected. The film was released on 13 February 2015.
The movie was remade in Bengali in 2017 as Ami Je Ke Tomar starring Ankush.
Soundtrack
"Savar Re Mana", sung by Swapnil Bandodkar, Janhavi Prabhu-Arora and composed by Nilesh Moharir became popular. The song "Dur Dur" sung by Swapnil Bandodkar Bela Shende and Adarsh Shinde also became popular. The second song "Satyam Shivam Sundaram" from the film was released in Zee Gaurav Puraskar on 26 October.
Box office
The movie opened to fantastic response at the box office collecting in its opening weekend. After a long run at the box office, the movie collected in its theatrical run.
References
External links
Mitwa Music Track
2015 films
2015 romantic drama films
Indian romantic drama films
2010s Marathi-language films
Marathi films remade in other languages
Films directed by Swapna Waghmare Joshi
|
```java
package jvmgo.book.ch09;
public class CloneTest implements Cloneable {
private double pi = 3.14;
@Override
public CloneTest clone() {
try {
return (CloneTest) super.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public static void main(String[] args) {
CloneTest obj1 = new CloneTest();
CloneTest obj2 = obj1.clone();
obj1.pi = 3.1415926;
System.out.println(obj1.pi);
System.out.println(obj2.pi);
}
}
```
|
```c++
//===------------------ llvm-opt-report/OptReport.cpp ---------------------===//
//
// See path_to_url for license information.
//
//===your_sha256_hash------===//
///
/// \file
/// This file implements a tool that can parse the YAML optimization
/// records and generate an optimization summary annotated source listing
/// report.
///
//===your_sha256_hash------===//
#include "llvm-c/Remarks.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Remarks/RemarkFormat.h"
#include "llvm/Remarks/RemarkParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdlib>
#include <map>
#include <optional>
#include <set>
using namespace llvm;
// Mark all our options with this category, everything else (except for -version
// and -help) will be hidden.
static cl::OptionCategory
OptReportCategory("llvm-opt-report options");
static cl::opt<std::string>
InputFileName(cl::Positional, cl::desc("<input>"), cl::init("-"),
cl::cat(OptReportCategory));
static cl::opt<std::string>
OutputFileName("o", cl::desc("Output file"), cl::init("-"),
cl::cat(OptReportCategory));
static cl::opt<std::string>
InputRelDir("r", cl::desc("Root for relative input paths"), cl::init(""),
cl::cat(OptReportCategory));
static cl::opt<bool>
Succinct("s", cl::desc("Don't include vectorization factors, etc."),
cl::init(false), cl::cat(OptReportCategory));
static cl::opt<bool>
NoDemangle("no-demangle", cl::desc("Don't demangle function names"),
cl::init(false), cl::cat(OptReportCategory));
static cl::opt<std::string> ParserFormat("format",
cl::desc("The format of the remarks."),
cl::init("yaml"),
cl::cat(OptReportCategory));
namespace {
// For each location in the source file, the common per-transformation state
// collected.
struct OptReportLocationItemInfo {
bool Analyzed = false;
bool Transformed = false;
OptReportLocationItemInfo &operator |= (
const OptReportLocationItemInfo &RHS) {
Analyzed |= RHS.Analyzed;
Transformed |= RHS.Transformed;
return *this;
}
bool operator < (const OptReportLocationItemInfo &RHS) const {
if (Analyzed < RHS.Analyzed)
return true;
else if (Analyzed > RHS.Analyzed)
return false;
else if (Transformed < RHS.Transformed)
return true;
return false;
}
};
// The per-location information collected for producing an optimization report.
struct OptReportLocationInfo {
OptReportLocationItemInfo Inlined;
OptReportLocationItemInfo Unrolled;
OptReportLocationItemInfo Vectorized;
int VectorizationFactor = 1;
int InterleaveCount = 1;
int UnrollCount = 1;
OptReportLocationInfo &operator |= (const OptReportLocationInfo &RHS) {
Inlined |= RHS.Inlined;
Unrolled |= RHS.Unrolled;
Vectorized |= RHS.Vectorized;
VectorizationFactor =
std::max(VectorizationFactor, RHS.VectorizationFactor);
InterleaveCount = std::max(InterleaveCount, RHS.InterleaveCount);
UnrollCount = std::max(UnrollCount, RHS.UnrollCount);
return *this;
}
bool operator < (const OptReportLocationInfo &RHS) const {
if (Inlined < RHS.Inlined)
return true;
else if (RHS.Inlined < Inlined)
return false;
else if (Unrolled < RHS.Unrolled)
return true;
else if (RHS.Unrolled < Unrolled)
return false;
else if (Vectorized < RHS.Vectorized)
return true;
else if (RHS.Vectorized < Vectorized || Succinct)
return false;
else if (VectorizationFactor < RHS.VectorizationFactor)
return true;
else if (VectorizationFactor > RHS.VectorizationFactor)
return false;
else if (InterleaveCount < RHS.InterleaveCount)
return true;
else if (InterleaveCount > RHS.InterleaveCount)
return false;
else if (UnrollCount < RHS.UnrollCount)
return true;
return false;
}
};
typedef std::map<std::string, std::map<int, std::map<std::string, std::map<int,
OptReportLocationInfo>>>> LocationInfoTy;
} // anonymous namespace
static bool readLocationInfo(LocationInfoTy &LocationInfo) {
ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
MemoryBuffer::getFile(InputFileName.c_str());
if (std::error_code EC = Buf.getError()) {
WithColor::error() << "Can't open file " << InputFileName << ": "
<< EC.message() << "\n";
return false;
}
Expected<remarks::Format> Format = remarks::parseFormat(ParserFormat);
if (!Format) {
handleAllErrors(Format.takeError(), [&](const ErrorInfoBase &PE) {
PE.log(WithColor::error());
errs() << '\n';
});
return false;
}
Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
remarks::createRemarkParserFromMeta(*Format, (*Buf)->getBuffer());
if (!MaybeParser) {
handleAllErrors(MaybeParser.takeError(), [&](const ErrorInfoBase &PE) {
PE.log(WithColor::error());
errs() << '\n';
});
return false;
}
remarks::RemarkParser &Parser = **MaybeParser;
while (true) {
Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
if (!MaybeRemark) {
Error E = MaybeRemark.takeError();
if (E.isA<remarks::EndOfFileError>()) {
// EOF.
consumeError(std::move(E));
break;
}
handleAllErrors(std::move(E), [&](const ErrorInfoBase &PE) {
PE.log(WithColor::error());
errs() << '\n';
});
return false;
}
const remarks::Remark &Remark = **MaybeRemark;
bool Transformed = Remark.RemarkType == remarks::Type::Passed;
int VectorizationFactor = 1;
int InterleaveCount = 1;
int UnrollCount = 1;
for (const remarks::Argument &Arg : Remark.Args) {
if (Arg.Key == "VectorizationFactor")
Arg.Val.getAsInteger(10, VectorizationFactor);
else if (Arg.Key == "InterleaveCount")
Arg.Val.getAsInteger(10, InterleaveCount);
else if (Arg.Key == "UnrollCount")
Arg.Val.getAsInteger(10, UnrollCount);
}
const std::optional<remarks::RemarkLocation> &Loc = Remark.Loc;
if (!Loc)
continue;
StringRef File = Loc->SourceFilePath;
unsigned Line = Loc->SourceLine;
unsigned Column = Loc->SourceColumn;
// We track information on both actual and potential transformations. This
// way, if there are multiple possible things on a line that are, or could
// have been transformed, we can indicate that explicitly in the output.
auto UpdateLLII = [Transformed](OptReportLocationItemInfo &LLII) {
LLII.Analyzed = true;
if (Transformed)
LLII.Transformed = true;
};
if (Remark.PassName == "inline") {
auto &LI = LocationInfo[std::string(File)][Line]
[std::string(Remark.FunctionName)][Column];
UpdateLLII(LI.Inlined);
} else if (Remark.PassName == "loop-unroll") {
auto &LI = LocationInfo[std::string(File)][Line]
[std::string(Remark.FunctionName)][Column];
LI.UnrollCount = UnrollCount;
UpdateLLII(LI.Unrolled);
} else if (Remark.PassName == "loop-vectorize") {
auto &LI = LocationInfo[std::string(File)][Line]
[std::string(Remark.FunctionName)][Column];
LI.VectorizationFactor = VectorizationFactor;
LI.InterleaveCount = InterleaveCount;
UpdateLLII(LI.Vectorized);
}
}
return true;
}
static bool writeReport(LocationInfoTy &LocationInfo) {
std::error_code EC;
llvm::raw_fd_ostream OS(OutputFileName, EC, llvm::sys::fs::OF_TextWithCRLF);
if (EC) {
WithColor::error() << "Can't open file " << OutputFileName << ": "
<< EC.message() << "\n";
return false;
}
bool FirstFile = true;
for (auto &FI : LocationInfo) {
SmallString<128> FileName(FI.first);
if (!InputRelDir.empty())
sys::fs::make_absolute(InputRelDir, FileName);
const auto &FileInfo = FI.second;
ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
MemoryBuffer::getFile(FileName);
if (std::error_code EC = Buf.getError()) {
WithColor::error() << "Can't open file " << FileName << ": "
<< EC.message() << "\n";
return false;
}
if (FirstFile)
FirstFile = false;
else
OS << "\n";
OS << "< " << FileName << "\n";
// Figure out how many characters we need for the vectorization factors
// and similar.
OptReportLocationInfo MaxLI;
for (auto &FLI : FileInfo)
for (auto &FI : FLI.second)
for (auto &LI : FI.second)
MaxLI |= LI.second;
bool NothingInlined = !MaxLI.Inlined.Transformed;
bool NothingUnrolled = !MaxLI.Unrolled.Transformed;
bool NothingVectorized = !MaxLI.Vectorized.Transformed;
unsigned VFDigits = llvm::utostr(MaxLI.VectorizationFactor).size();
unsigned ICDigits = llvm::utostr(MaxLI.InterleaveCount).size();
unsigned UCDigits = llvm::utostr(MaxLI.UnrollCount).size();
// Figure out how many characters we need for the line numbers.
int64_t NumLines = 0;
for (line_iterator LI(*Buf.get(), false); LI != line_iterator(); ++LI)
++NumLines;
unsigned LNDigits = llvm::utostr(NumLines).size();
for (line_iterator LI(*Buf.get(), false); LI != line_iterator(); ++LI) {
int64_t L = LI.line_number();
auto LII = FileInfo.find(L);
auto PrintLine = [&](bool PrintFuncName,
const std::set<std::string> &FuncNameSet) {
OptReportLocationInfo LLI;
std::map<int, OptReportLocationInfo> ColsInfo;
unsigned InlinedCols = 0, UnrolledCols = 0, VectorizedCols = 0;
if (LII != FileInfo.end() && !FuncNameSet.empty()) {
const auto &LineInfo = LII->second;
for (auto &CI : LineInfo.find(*FuncNameSet.begin())->second) {
int Col = CI.first;
ColsInfo[Col] = CI.second;
InlinedCols += CI.second.Inlined.Analyzed;
UnrolledCols += CI.second.Unrolled.Analyzed;
VectorizedCols += CI.second.Vectorized.Analyzed;
LLI |= CI.second;
}
}
if (PrintFuncName) {
OS << " > ";
bool FirstFunc = true;
for (const auto &FuncName : FuncNameSet) {
if (FirstFunc)
FirstFunc = false;
else
OS << ", ";
bool Printed = false;
if (!NoDemangle) {
int Status = 0;
char *Demangled =
itaniumDemangle(FuncName.c_str(), nullptr, nullptr, &Status);
if (Demangled && Status == 0) {
OS << Demangled;
Printed = true;
}
if (Demangled)
std::free(Demangled);
}
if (!Printed)
OS << FuncName;
}
OS << ":\n";
}
// We try to keep the output as concise as possible. If only one thing on
// a given line could have been inlined, vectorized, etc. then we can put
// the marker on the source line itself. If there are multiple options
// then we want to distinguish them by placing the marker for each
// transformation on a separate line following the source line. When we
// do this, we use a '^' character to point to the appropriate column in
// the source line.
std::string USpaces(Succinct ? 0 : UCDigits, ' ');
std::string VSpaces(Succinct ? 0 : VFDigits + ICDigits + 1, ' ');
auto UStr = [UCDigits](OptReportLocationInfo &LLI) {
std::string R;
raw_string_ostream RS(R);
if (!Succinct) {
RS << LLI.UnrollCount;
RS << std::string(UCDigits - RS.str().size(), ' ');
}
return RS.str();
};
auto VStr = [VFDigits,
ICDigits](OptReportLocationInfo &LLI) -> std::string {
std::string R;
raw_string_ostream RS(R);
if (!Succinct) {
RS << LLI.VectorizationFactor << "," << LLI.InterleaveCount;
RS << std::string(VFDigits + ICDigits + 1 - RS.str().size(), ' ');
}
return RS.str();
};
OS << llvm::format_decimal(L, LNDigits) << " ";
OS << (LLI.Inlined.Transformed && InlinedCols < 2 ? "I" :
(NothingInlined ? "" : " "));
OS << (LLI.Unrolled.Transformed && UnrolledCols < 2 ?
"U" + UStr(LLI) : (NothingUnrolled ? "" : " " + USpaces));
OS << (LLI.Vectorized.Transformed && VectorizedCols < 2 ?
"V" + VStr(LLI) : (NothingVectorized ? "" : " " + VSpaces));
OS << " | " << *LI << "\n";
for (auto &J : ColsInfo) {
if ((J.second.Inlined.Transformed && InlinedCols > 1) ||
(J.second.Unrolled.Transformed && UnrolledCols > 1) ||
(J.second.Vectorized.Transformed && VectorizedCols > 1)) {
OS << std::string(LNDigits + 1, ' ');
OS << (J.second.Inlined.Transformed &&
InlinedCols > 1 ? "I" : (NothingInlined ? "" : " "));
OS << (J.second.Unrolled.Transformed &&
UnrolledCols > 1 ? "U" + UStr(J.second) :
(NothingUnrolled ? "" : " " + USpaces));
OS << (J.second.Vectorized.Transformed &&
VectorizedCols > 1 ? "V" + VStr(J.second) :
(NothingVectorized ? "" : " " + VSpaces));
OS << " | " << std::string(J.first - 1, ' ') << "^\n";
}
}
};
// We need to figure out if the optimizations for this line were the same
// in each function context. If not, then we want to group the similar
// function contexts together and display each group separately. If
// they're all the same, then we only display the line once without any
// additional markings.
std::map<std::map<int, OptReportLocationInfo>,
std::set<std::string>> UniqueLIs;
OptReportLocationInfo AllLI;
if (LII != FileInfo.end()) {
const auto &FuncLineInfo = LII->second;
for (const auto &FLII : FuncLineInfo) {
UniqueLIs[FLII.second].insert(FLII.first);
for (const auto &OI : FLII.second)
AllLI |= OI.second;
}
}
bool NothingHappened = !AllLI.Inlined.Transformed &&
!AllLI.Unrolled.Transformed &&
!AllLI.Vectorized.Transformed;
if (UniqueLIs.size() > 1 && !NothingHappened) {
OS << " [[\n";
for (const auto &FSLI : UniqueLIs)
PrintLine(true, FSLI.second);
OS << " ]]\n";
} else if (UniqueLIs.size() == 1) {
PrintLine(false, UniqueLIs.begin()->second);
} else {
PrintLine(false, std::set<std::string>());
}
}
}
return true;
}
int main(int argc, const char **argv) {
InitLLVM X(argc, argv);
cl::HideUnrelatedOptions(OptReportCategory);
cl::ParseCommandLineOptions(
argc, argv,
"A tool to generate an optimization report from YAML optimization"
" record files.\n");
LocationInfoTy LocationInfo;
if (!readLocationInfo(LocationInfo))
return 1;
if (!writeReport(LocationInfo))
return 1;
return 0;
}
```
|
```xml
<!--
Description: normal link(s)
-->
<rss version="2.0">
<channel>
<link>path_to_url
<link>path_to_url
<link href="path_to_url" />
</channel>
</rss>
```
|
```xml
<Window x:Class="XIVLauncher.Windows.GenericAddonSetupWindow"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:d="path_to_url"
xmlns:mc="path_to_url"
xmlns:local="clr-namespace:XIVLauncher"
xmlns:components="clr-namespace:XIVLauncher.Xaml.Components"
mc:Ignorable="d"
Title="{Binding GenericAddonSetupTitleLoc}" Height="281.747" Width="533.495"
WindowStartupLocation="CenterScreen"
Icon="pack://application:,,,/Resources/dalamud_icon.ico" ResizeMode="NoResize"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
Background="{DynamicResource MaterialDesignPaper}"
TextElement.FontWeight="Medium"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto">
<Grid>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0"
Text="{Binding GenericAddonSetupDescriptionLoc}" />
<components:FileEntry x:Name="PathEntry" Description="Select an Addon file"
Filters="EXE File, *.exe;Powershell Script, *.ps1;Shell Script, *.bat" Margin="10,0,0,80"
Width="400" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Label Margin="10,0,0,10" Width="400" VerticalAlignment="Center" HorizontalAlignment="Left" Content="{Binding CommandLineParametersLoc}"/>
<TextBox x:Name="CommandLineTextBox" Margin="10,0,0,-30" Width="400"
VerticalAlignment="Center" HorizontalAlignment="Left" />
<CheckBox x:Name="AdminCheckBox" Content="{Binding RunAsAdminLoc}" Margin="10,0,0,-100" Width="400"
VerticalAlignment="Center" HorizontalAlignment="Left" Checked="AdminCheckBox_OnChecked"
Unchecked="AdminCheckBox_OnUnchecked" />
<CheckBox x:Name="RunOnCloseCheckBox" Content="{Binding RunOnCloseLoc}" Margin="10,0,0,-140"
Width="400" VerticalAlignment="Center" HorizontalAlignment="Left" />
<CheckBox x:Name="KillCheckBox" Content="{Binding KillAfterCloseLoc}" Margin="10,0,0,-180"
Width="400" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button Content="{Binding OkLoc}" Width="79" VerticalAlignment="Bottom" HorizontalAlignment="Right"
Margin="0,0,10,10" Click="NextButton_Click" />
</Grid>
</Window>
```
|
```coffeescript
React = require 'react'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
ReactCSSTransitionGroup = React.createFactory require 'react-addons-css-transition-group'
recorder = require 'actions-recorder'
query = require '../query'
orders = require '../util/orders'
handlers = require '../handlers'
lang = require '../locales/lang'
LightPopover = React.createFactory require '../module/light-popover'
Icon = React.createFactory require '../module/icon'
ContactName = React.createFactory require '../app/contact-name'
T = React.PropTypes
{ div, span } = React.DOM
module.exports = React.createClass
displayName: 'message-receipt-status'
mixins: [PureRenderMixin]
propTypes:
message: T.instanceOf(Immutable.Map)
getInitialState: ->
showDropdown: false
getDropdownBaseArea: ->
if @state.showDropdown and @refs.root
@refs.root.getBoundingClientRect()
else
{}
onClick: (event) ->
event.stopPropagation()
@setState
showDropdown: not @state.showDropdown
onDropdownClose: ->
@setState
showDropdown: false
positionAlgorithm: (area) ->
if (area.left + 240) > window.innerWidth
left = area.left - 220
else
left = area.left
if (area.top + 320) > window.innerHeight
left: area.left - 224
bottom: window.innerHeight - area.top
else
left: area.left - 224
top: area.bottom
renderReceiptDropdown: ->
LightPopover
name: 'receipt-dropdown'
onPopoverClose: @onDropdownClose
positionAlgorithm: @positionAlgorithm
baseArea: @getDropdownBaseArea()
showClose: false
show: @state.showDropdown
@renderReceiptDropdownContent()
renderReceiptDropdownContent: ->
return null if not @state.showDropdown
_teamId = @props.message.get('_teamId')
contacts = query.contactsBy(recorder.getState(), _teamId)
mentions = @props.message.get('mentions')
receiptors = @props.message.get('receiptors')
contacts = contacts
.filter (contact) ->
mentions.includes(contact.get('_id'))
.sort orders.byPinyin
.sortBy (contact) ->
-receiptors.includes(contact.get('_id'))
.map (contact) ->
onClick = ->
handlers.router.chat(_teamId, contact.get('_id'))
ContactName
key: contact.get('_id')
contact: contact
_teamId: _teamId
onClick: onClick
active: receiptors.includes(contact.get('_id'))
div className: 'receipt-dropdown',
div className: 'header',
if mentions.size is receiptors.size
lang.getText('read-by-all')
else
"#{lang.getText('read-by')} (#{receiptors.size}/#{mentions.size})"
div className: 'thin-scroll',
contacts
render: ->
return null if not @props.message
mentions = @props.message.get('mentions') or Immutable.List()
return null if mentions.size is 0
_userId = query.userId(recorder.getState())
_creatorId = @props.message.get('_creatorId')
receiptors = @props.message.get('receiptors') or Immutable.List()
isMentioned = mentions.includes(_userId)
hasReadMessage = receiptors.includes(_userId)
span ref: 'root', className: 'message-read-status',
Icon
size: 16
name: 'tick-circle'
className: 'muted'
onClick: @onClick
@renderReceiptDropdown()
```
|
Leonid Zaslavsky (born 26 November 1969) is an Australian wrestler. He competed in the men's freestyle 62 kg at the 1996 Summer Olympics.
References
External links
1969 births
Living people
Australian male sport wrestlers
Olympic wrestlers for Australia
Wrestlers at the 1996 Summer Olympics
Sportspeople from Odesa
|
In computer hardware, a controller may refer to:
Memory controller, a unit that manages access to memory
Game controller, a device by which the user controls the operation of the computer
Host controller
Network controller
Graphics controller or video display controller
SCSI host bus adapter
Network interface controller (NIC)
Parallel port controller
Microcontroller unit (MCU)
Keyboard controller
Programmable Interrupt Controller
Northbridge (computing)
Southbridge (computing)
Universal asynchronous receiver/transmitter (UART) communications controller chip
Peripheral DMA controller
Floppy disk controller
Disk array controller, also known as a RAID controller, a type of storage controller
Flash controller, or SSD controller, which manages flash memory
Terminal Access Controller
IBM 2821 Control Unit, used to attach card readers, punches and line printers to IBM System/360 and IBM System/370 computers
IBM 270x and IBM 37xx, used for telecommunications
IBM 3271, 3272, 3271, and 3174, used to attach terminals (display devices)
MIDI controller
Programmable logic controller
|
Štós (before 1973 Štos; , earlier Stoos; , earlier Soosz, in the Middle Ages Hegyalja) is a village and municipality in Košice-okolie District in the Košice Region of eastern Slovakia. It is one of several towns in Bodva Valley. Other towns in Bodva Valley include: Jasov, Lucia Bania, Medzev (Metzenseifen), and Vyšný Medzev (Upper Metzenseifen).
History
The village developed from an old Slav mining settlement. After the Mongol invasion of 1241, the depopulated region was resettled by German settlers. The place-name derives from the German family name Stoss. In 1341 many privileges were given to German miners. The village passed to Jasov and in 1427 to Smolník. After that, it belonged to the local lord Ján Baglos. In 1449 Johann Kistner from Štitník gave his part of the village to Carthusian monastery of the Spiš County.
Geography
Ethnicity
Culture
References
External links
Villages and municipalities in Košice-okolie District
|
Taxpayers for Common Sense (TCS) is a nonpartisan federal budget watchdog organization based in Washington, D.C., in the United States. TCS is a 501(c)(3) non-profit organization; its 501(c)(4) affiliate is Taxpayers for Common Sense Action (TCS Action). The current president of TCS is Stephen Ellis. Founded in 1995 by Jill Lancelot and Rafael DeGennaro, TCS states that its mission is to ensure that the federal government spends taxpayer money efficiently and responsibly.
In 2000, former United States Senator William Proxmire asked Taxpayers for Common Sense to revive the Golden Fleece Award, which was awarded to federal programs that most Americans would agree were wasteful. The first revived Golden Fleece was awarded to the Federal Aviation Administration for the Tampa International Airport.
TCS creates databases of the earmarks that appear in congressional spending bills. TCS is credited with labeling the Gravina Island Bridge proposal in Ketchikan, Alaska, as the "Bridge to Nowhere". The project received a $223 million earmark in 2005 and was later cancelled on September 21, 2007.
During the 2020 COVID-19 pandemic, the group received $178,500 in federally backed small business loan from Citibank as part of the Paycheck Protection Program. TCS said it was the first time they had accepted government money.
References
External links
Political advocacy groups in the United States
Government watchdog groups in the United States
Organizations established in 1995
501(c)(3) organizations
Non-profit organizations based in Washington, D.C.
|
Gmina Czerniejewo is an urban-rural gmina (administrative district) in Gniezno County, Greater Poland Voivodeship, in west-central Poland. Its seat is the town of Czerniejewo, which lies approximately south-west of Gniezno and east of the regional capital Poznań.
The gmina covers an area of , and as of 2006 its total population is 6,913 (out of which the population of Czerniejewo amounts to 2,556, and the population of the rural part of the gmina is 4,357).
Villages
Apart from the town of Czerniejewo, Gmina Czerniejewo contains the villages and settlements of Czeluścin, Gębarzewko, Gębarzewo, Golimowo, Goraniec, Goranin, Graby, Kąpiel, Kosmowo, Kosowo, Nidom, Pakszyn, Pakszynek, Pawłowo, Rakowo, Szczytniki Czerniejewskie and Żydowo.
Neighbouring gminas
Gmina Czerniejewo is bordered by the town of Gniezno and by the gminas of Gniezno, Łubowo, Nekla, Niechanowo, Pobiedziska and Września.
References
Polish official population figures 2006
Czerniejewo
Gniezno County
|
```xml
import "reflect-metadata"
import { expect } from "chai"
import { DataSource, Repository } from "../../../src"
import { Post } from "./entity/Post"
import {
reloadTestingDatabases,
closeTestingConnections,
setupSingleTestingConnection,
} from "../../utils/test-utils"
describe("github issues > #2331 undefined value is nulling column on update", () => {
let dataSource: DataSource
let repository: Repository<Post>
before(async () => {
const options = setupSingleTestingConnection("postgres", {
entities: [__dirname + "/entity/*{.js,.ts}"],
schemaCreate: true,
dropSchema: true,
})
if (!options) return
dataSource = new DataSource(options)
await dataSource.initialize()
})
beforeEach(async () => {
if (!dataSource) return
await reloadTestingDatabases([dataSource])
repository = dataSource.getRepository(Post)
})
after(() => closeTestingConnections([dataSource]))
it("should not overwrite column with null when passing undefined", async () => {
if (!dataSource) return
const post = new Post()
post.id = 1
post.title = "Some post"
post.author = "Some author"
await repository.save(post)
await repository.update(
{
id: post.id,
},
{
title: "Updated post",
author: undefined,
},
)
const postReloaded = await repository.findOne({
where: { id: post.id },
})
expect(postReloaded).to.exist
expect(postReloaded!.author).to.be.equal("Some author")
})
})
```
|
```objective-c
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of NVIDIA CORPORATION nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#ifndef PULLEY_JOINT_H
#define PULLEY_JOINT_H
#include "PxPhysicsAPI.h"
// a pulley joint constrains two actors such that the sum of their distances from their respective anchor points at their attachment points
// is a fixed value (the parameter 'distance'). Only dynamic actors are supported.
//
// The constraint equation is as follows:
//
// |anchor0 - attachment0| + |anchor1 - attachment1| * ratio = distance
//
// where 'ratio' provides mechanical advantage.
//
// The above equation results in a singularity when the anchor point is coincident with the attachment point; for simplicity
// the constraint does not attempt to handle this case robustly.
class PulleyJoint : public physx::PxConstraintConnector
{
public:
static const physx::PxU32 TYPE_ID = physx::PxConcreteType::eFIRST_USER_EXTENSION;
PulleyJoint(physx::PxPhysics& physics,
physx::PxRigidBody& body0, const physx::PxTransform& localFrame0, const physx::PxVec3& attachment0,
physx::PxRigidBody& body1, const physx::PxTransform& localFrame1, const physx::PxVec3& attachment1);
void release();
// attribute accessor and mutators
void setAttachment0(const physx::PxVec3& pos);
physx::PxVec3 getAttachment0() const;
void setAttachment1(const physx::PxVec3& pos);
physx::PxVec3 getAttachment1() const;
void setDistance(physx::PxReal totalDistance);
physx::PxReal getDistance() const;
void setRatio(physx::PxReal ratio);
physx::PxReal getRatio() const;
// PxConstraintConnector boilerplate
void* prepareData();
void onConstraintRelease();
void onComShift(physx::PxU32 actor);
void onOriginShift(const physx::PxVec3& shift);
void* getExternalReference(physx::PxU32& typeID);
bool updatePvdProperties(physx::pvdsdk::PvdDataStream&,
const physx::PxConstraint*,
physx::PxPvdUpdateType::Enum) const { return true; }
physx::PxBase* getSerializable() { return NULL; }
virtual physx::PxConstraintSolverPrep getPrep() const { return sShaderTable.solverPrep; }
virtual const void* getConstantBlock() const { return &mData; }
private:
static physx::PxU32 solverPrep(physx::Px1DConstraint* constraints,
physx::PxVec3& body0WorldOffset,
physx::PxU32 maxConstraints,
physx::PxConstraintInvMassScale&,
const void* constantBlock,
const physx::PxTransform& bA2w,
const physx::PxTransform& bB2w);
static void visualize(physx::PxConstraintVisualizer& viz,
const void* constantBlock,
const physx::PxTransform& body0Transform,
const physx::PxTransform& body1Transform,
physx::PxU32 flags);
static void project(const void* constantBlock,
physx::PxTransform& bodyAToWorld,
physx::PxTransform& bodyBToWorld,
bool projectToA);
struct PulleyJointData
{
physx::PxTransform c2b[2];
physx::PxVec3 attachment0;
physx::PxVec3 attachment1;
physx::PxReal distance;
physx::PxReal ratio;
physx::PxReal tolerance;
};
physx::PxRigidBody* mBody[2];
physx::PxTransform mLocalPose[2];
physx::PxConstraint* mConstraint;
PulleyJointData mData;
static physx::PxConstraintShaderTable
sShaderTable;
~PulleyJoint() {}
};
#endif
```
|
The Our Lady of Victory Cathedral (), also Vitória Cathedral, is a Catholic church in Dom Luiz Scortegagna Square, in the City of Vitória, Brazil.
History
The cathedral is constructed on the site of a structure demolished at the beginning of the 20th century. Construction on the cathedral began in 1920 and was completed in the seventies.
It was built on the site where, until 1918, there was a church called Church of Our Lady of Victory (Nossa Senhora da Vitória), which was the main church of the city. It was a colonial style church, which began to be built in 1551, when Victoria was still called Vila Nova, in the period of the first grantee of the captaincy of the Holy Spirit, Vasco Fernandes Coutinho.
With the creation of the Diocese of Espíritu Santo (1895) and the appointment of the first bishop, Monsignor Juan Bautista Correia Neri, the church received the title of Cathedral.
See also
Roman Catholicism in Brazil
Our Lady of Victory
References
Roman Catholic cathedrals in Espírito Santo
Vitória, Espírito Santo
|
Mark Edward Lutz (born December 23, 1951 in Minneapolis, Minnesota) is an American former sprinter. He ran for his home country in the 200 metres at the 1976 Summer Olympics, finishing 5th in his qualifying heat.
Biography
Lutz studied at the University of Kansas where he was a key member of the Kansas Jayhawks track team between 1971 and 1974. During his time there he tried to qualify for 200 m event at the 1972 Munich Olympics but was eliminated in a qualifying heat at the United States Olympic Trials.
He was renowned at the time he was running for being one of the very few white sprinters at the elite level in the U.S. Lutz won a gold medal at the World University Games in 1973 as part of the 4x400 metres relay. That same year he was runner up at the USA Outdoor Track and Field Championships in the 200 metres.
In 1976, and now attending Long Beach State University, Lutz qualified for the 200 m at the 1976 Montreal Olympics by finishing third at the trials. Lutz was a surprise qualifier. He was even last at the turn in the final, overtaking the more highly fancied Steve Riddick only in the closing stages. His American teammates Millard Hampton and Dwayne Evans went on to medal in the competition, finishing second and third respectively.
In 1976 he was married to distance star and both a Pacific Coast Club teammate and Long Beach State University classmate Francie Larrieu. She hyphenated her name during the period they were married. They divorced in 1978. He later married hurdler Patrice Donnelly, also a Montreal Olympian.
References
1951 births
Living people
American male sprinters
Athletes (track and field) at the 1976 Summer Olympics
Olympic track and field athletes for the United States
Track and field athletes from Minneapolis
Kansas Jayhawks men's track and field athletes
Universiade medalists in athletics (track and field)
FISU World University Games gold medalists for the United States
Medalists at the 1973 Summer Universiade
|
```javascript
import Cascader from './Cascader';
export default Cascader;
```
|
Juan de Padilla, OFM (1500–1542) was a Spanish Catholic priest and missionary who spent much of his life exploring North America with Francisco Vásquez de Coronado. He was killed in what would become Kansas by Native Americans in 1542.
Biography
Padilla and three other Franciscans, together with more than 300 Spanish soldiers and workers, accompanied Coronado on his quest for the Seven Cities of Gold, a mythical land of great wealth. When Coronado abandoned his search, Padilla and others followed him to explore what is now the Southwestern United States; Padilla was one of the first Europeans to see the Grand Canyon. But, when Coronado was told by a native named the "Turk" that a great land called Quivira was in modern-day Kansas, Coronado's entire party immediately left in search of it.
After reaching the location in 1541, the Spaniards camped alongside a Wichita village for 25 days. Finding no gold, they killed the Turk in fury. Coronado returned to the Southwest and Padilla followed. One year later, the missionary priest returned to Kansas to preach to the Wichita, and establish the first Christian mission in the present-day United States.
Death
He was killed in Kansas in 1542 by Native Americans, and is considered to be one of the first Christian martyrs in the U.S.
Legends
Juan de Padilla is associated with a miracle known as the "Rising of the coffin of Padre Padilla". The story of seeing his coffin rise above the ground was repeated for many years, and was believed by many people in Isleta, where the Padre is believed to be buried. Additionally, his corpse was claimed to have been fresh when rising the first time according to the legend (incorruptibility). Against this is that this clearly was no longer true later as the corpse is missing a foot, and the claims of his body being incorruptible have no witnesses.
Anton Docher, once a priest in Isleta, investigated the miracle in the presence of several witnesses. He opened the grave of Padre Padilla. During this operation, Docher injured his arm and suffered from the then highly dangerous gangrene. Doctors recommended amputation for his survival. The native inhabitants invoked the intercession of Padre Padilla. Docher made a prayer to Padre Padilla to cure and forgive him for what he did, and supposedly, the wound had disappeared. cf
Memorial
In 1950, the Knights of Columbus erected a commemorative cross dedicated to Padilla near Lyons, Kansas. The stone marker reads:
In popular culture
In the 1976 album Leftoverture by the American rock group Kansas, the first movement of Magnum Opus is entitled "Father Padilla Meets the Perfect Gnat."
Notes
References
Samuel Gance, Anton ou la trajectoire d'un père, L'Harmattan, Paris, 2013, 208 p.
1500 births
1542 deaths
People from Andalusia
Spanish explorers of North America
Pre-statehood history of Kansas
Martyred Roman Catholic priests
Franciscan martyrs
16th-century Roman Catholic martyrs
|
```javascript
function copyLogUnix() {
pack_file('/var/log/' + args.logName, args.logName);
}
function copyLogWindows() {
var fileName = 'c:\\' + args.logName + '.log';
var output = execute('wevtutil epl ' + args.logName + ' ' + fileName);
if (!output.Success) {
pack(output);
throw output.Error + ': ';
}
pack_file(fileName, args.logName);
del(fileName);
}
try {
if (env.OS === 'windows') {
copyLogWindows();
} else {
copyLogUnix();
}
} catch (ex) {
pack('Error: ' + ex);
}
```
|
```c
/*
*
*/
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gatt.h>
#include "common.h"
CREATE_FLAG(flag_is_connected);
CREATE_FLAG(flag_discover_complete);
CREATE_FLAG(flag_write_complete);
CREATE_FLAG(flag_read_complete);
static struct bt_conn *g_conn;
static uint16_t chrc_handle;
static uint16_t long_chrc_handle;
static const struct bt_uuid *test_svc_uuid = TEST_SERVICE_UUID;
#define NUM_ITERATIONS 10
#define ARRAY_ITEM(i, _) i
static uint8_t chrc_data[] = { LISTIFY(CHRC_SIZE, ARRAY_ITEM, (,)) }; /* 1, 2, 3 ... */
static uint8_t long_chrc_data[] = { LISTIFY(LONG_CHRC_SIZE, ARRAY_ITEM, (,)) }; /* 1, 2, 3 ... */
static void connected(struct bt_conn *conn, uint8_t err)
{
char addr[BT_ADDR_LE_STR_LEN];
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
if (err != 0) {
FAIL("Failed to connect to %s (%u)\n", addr, err);
return;
}
printk("Connected to %s\n", addr);
g_conn = conn;
SET_FLAG(flag_is_connected);
}
static void disconnected(struct bt_conn *conn, uint8_t reason)
{
char addr[BT_ADDR_LE_STR_LEN];
if (conn != g_conn) {
return;
}
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
printk("Disconnected: %s (reason 0x%02x)\n", addr, reason);
bt_conn_unref(g_conn);
g_conn = NULL;
UNSET_FLAG(flag_is_connected);
}
static struct bt_conn_cb conn_callbacks = {
.connected = connected,
.disconnected = disconnected,
};
void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type,
struct net_buf_simple *ad)
{
char addr_str[BT_ADDR_LE_STR_LEN];
int err;
if (g_conn != NULL) {
return;
}
/* We're only interested in connectable events */
if (type != BT_HCI_ADV_IND && type != BT_HCI_ADV_DIRECT_IND) {
return;
}
bt_addr_le_to_str(addr, addr_str, sizeof(addr_str));
printk("Device found: %s (RSSI %d)\n", addr_str, rssi);
printk("Stopping scan\n");
err = bt_le_scan_stop();
if (err != 0) {
FAIL("Could not stop scan: %d");
return;
}
err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN,
BT_LE_CONN_PARAM_DEFAULT, &g_conn);
if (err != 0) {
FAIL("Could not connect to peer: %d", err);
}
}
static uint8_t discover_func(struct bt_conn *conn,
const struct bt_gatt_attr *attr,
struct bt_gatt_discover_params *params)
{
int err;
if (attr == NULL) {
if (chrc_handle == 0 || long_chrc_handle == 0) {
FAIL("Did not discover chrc (%x) or long_chrc (%x)",
chrc_handle, long_chrc_handle);
}
(void)memset(params, 0, sizeof(*params));
SET_FLAG(flag_discover_complete);
return BT_GATT_ITER_STOP;
}
printk("[ATTRIBUTE] handle %u\n", attr->handle);
if (params->type == BT_GATT_DISCOVER_PRIMARY &&
bt_uuid_cmp(params->uuid, TEST_SERVICE_UUID) == 0) {
printk("Found test service\n");
params->uuid = NULL;
params->start_handle = attr->handle + 1;
params->type = BT_GATT_DISCOVER_CHARACTERISTIC;
err = bt_gatt_discover(conn, params);
if (err != 0) {
FAIL("Discover failed (err %d)\n", err);
}
return BT_GATT_ITER_STOP;
} else if (params->type == BT_GATT_DISCOVER_CHARACTERISTIC) {
struct bt_gatt_chrc *chrc = (struct bt_gatt_chrc *)attr->user_data;
if (bt_uuid_cmp(chrc->uuid, TEST_CHRC_UUID) == 0) {
printk("Found chrc\n");
chrc_handle = chrc->value_handle;
} else if (bt_uuid_cmp(chrc->uuid, TEST_LONG_CHRC_UUID) == 0) {
printk("Found long_chrc\n");
long_chrc_handle = chrc->value_handle;
}
}
return BT_GATT_ITER_CONTINUE;
}
static void gatt_discover(void)
{
static struct bt_gatt_discover_params discover_params;
int err;
printk("Discovering services and characteristics\n");
discover_params.uuid = test_svc_uuid;
discover_params.func = discover_func;
discover_params.start_handle = BT_ATT_FIRST_ATTRIBUTE_HANDLE;
discover_params.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE;
discover_params.type = BT_GATT_DISCOVER_PRIMARY;
err = bt_gatt_discover(g_conn, &discover_params);
if (err != 0) {
FAIL("Discover failed(err %d)\n", err);
}
WAIT_FOR_FLAG(flag_discover_complete);
printk("Discover complete\n");
}
static void gatt_write_cb(struct bt_conn *conn, uint8_t err,
struct bt_gatt_write_params *params)
{
if (err != BT_ATT_ERR_SUCCESS) {
FAIL("Write failed: 0x%02X\n", err);
}
(void)memset(params, 0, sizeof(*params));
SET_FLAG(flag_write_complete);
}
static void gatt_write(uint16_t handle)
{
static struct bt_gatt_write_params write_params;
int err;
if (handle == chrc_handle) {
printk("Writing to chrc\n");
write_params.data = chrc_data;
write_params.length = sizeof(chrc_data);
} else if (handle) {
printk("Writing to long_chrc\n");
write_params.data = long_chrc_data;
write_params.length = sizeof(long_chrc_data);
}
write_params.func = gatt_write_cb;
write_params.handle = handle;
UNSET_FLAG(flag_write_complete);
err = bt_gatt_write(g_conn, &write_params);
if (err != 0) {
FAIL("bt_gatt_write failed: %d\n", err);
}
WAIT_FOR_FLAG(flag_write_complete);
printk("success\n");
}
static uint8_t gatt_read_cb(struct bt_conn *conn, uint8_t err,
struct bt_gatt_read_params *params,
const void *data, uint16_t length)
{
if (err != BT_ATT_ERR_SUCCESS) {
FAIL("Read failed: 0x%02X\n", err);
}
if (params->single.handle == chrc_handle) {
if (length != CHRC_SIZE ||
memcmp(data, chrc_data, length) != 0) {
FAIL("chrc data different than expected", err);
}
} else if (params->single.handle == chrc_handle) {
if (length != LONG_CHRC_SIZE ||
memcmp(data, long_chrc_data, length) != 0) {
FAIL("long_chrc data different than expected", err);
}
}
(void)memset(params, 0, sizeof(*params));
SET_FLAG(flag_read_complete);
return 0;
}
static void gatt_read(uint16_t handle)
{
static struct bt_gatt_read_params read_params;
int err;
printk("Reading chrc\n");
read_params.func = gatt_read_cb;
read_params.handle_count = 1;
read_params.single.handle = chrc_handle;
read_params.single.offset = 0;
UNSET_FLAG(flag_read_complete);
err = bt_gatt_read(g_conn, &read_params);
if (err != 0) {
FAIL("bt_gatt_read failed: %d\n", err);
}
WAIT_FOR_FLAG(flag_read_complete);
printk("success\n");
}
static void test_main(void)
{
int err;
bt_conn_cb_register(&conn_callbacks);
for (int i = 0; i < NUM_ITERATIONS; i++) {
err = bt_enable(NULL);
if (err != 0) {
FAIL("Bluetooth discover failed (err %d)\n", err);
}
printk("Bluetooth initialized\n");
err = bt_le_scan_start(BT_LE_SCAN_PASSIVE, device_found);
if (err != 0) {
FAIL("Scanning failed to start (err %d)\n", err);
}
printk("Scanning successfully started\n");
WAIT_FOR_FLAG(flag_is_connected);
gatt_discover();
/* Write and read a few times to ensure stateless behavior */
for (size_t i = 0; i < 3; i++) {
gatt_write(chrc_handle);
gatt_read(chrc_handle);
gatt_write(long_chrc_handle);
gatt_read(long_chrc_handle);
}
err = bt_conn_disconnect(g_conn, 0x13);
if (err != 0) {
FAIL("Disconnect failed (err %d)\n", err);
return;
}
WAIT_FOR_FLAG_UNSET(flag_is_connected);
err = bt_disable();
if (err != 0) {
FAIL("Bluetooth disable failed (err %d)\n", err);
}
printk("Bluetooth successfully disabled\n");
}
PASS("GATT client Passed\n");
}
static const struct bst_test_instance test_vcs[] = {
{
.test_id = "gatt_client",
.test_pre_init_f = test_init,
.test_tick_f = test_tick,
.test_main_f = test_main
},
BSTEST_END_MARKER
};
struct bst_test_list *test_gatt_client_install(struct bst_test_list *tests)
{
return bst_add_tests(tests, test_vcs);
}
```
|
```javascript
import React from 'react';
import {CreateQueue} from '../../../app/components/queue/createQueue.js';
describe('<CreateQueue />', () => {
let wrapper;
before(() => {
const props = {
loading: true,
dispatch: sinon.spy(),
children: '',
};
wrapper = shallow(<CreateQueue {...props} />, themeContext);
});
it('Component is rendering', () => {
expect(wrapper).to.exist;
});
});
```
|
```xml
// Use to update maintenance state
export class UpdateMaintenance {
static readonly type = '[CDS] Update Maintenance';
constructor(public enable: boolean) { }
}
export class GetCDSStatus {
static readonly type = '[CDS] Get CDS Status';
constructor() { }
}
```
|
Mahur Berenji or Mahoor Berenji () may refer to:
Mahur Berenji-ye Olya
Mahur Berenji-ye Sofla
Mahur Berenji Rural District
|
```javascript
import BaseMask from './_base.mask'
import CustomMask from './custom.mask'
const CREDIT_CARD_MASKS = {
'visa-or-mastercard': {
regular: '9999 9999 9999 9999',
obfuscated: '9999 **** **** 9999'
},
'amex': {
regular: '9999 999999 99999',
obfuscated: '9999 ****** 99999'
},
'diners': {
regular: '9999 999999 9999',
obfuscated: '9999 ****** 9999'
},
}
const CREDIT_CARD_SETTINGS = {
obfuscated: false,
issuer: 'visa-or-mastercard'
}
const MASK_TRANSLATION = {
'*': val => null
}
export default class CreditCardMask extends BaseMask {
static getType() {
return 'credit-card'
}
getValue(value, settings) {
let selectedMask = this.getMask(value, settings)
return CustomMask.shared.getValue(value, {
mask: selectedMask,
translation: MASK_TRANSLATION
})
}
validate(value, settings) {
if (!!value) {
let selectedMask = this.getMask(value, settings)
return value.length === selectedMask.length
}
return true
}
getRawValue(maskedValue, settings) {
if (!maskedValue) return []
return maskedValue.split(' ').map(val => {
if (!val) return ''
return val.trim()
})
}
getMask(value, settings) {
let mergedSettings = super.mergeSettings(CREDIT_CARD_SETTINGS, settings)
const selectedMask = this._selectMask(mergedSettings.issuer, mergedSettings.obfuscated)
return selectedMask
}
_selectMask(issuer, obfuscated) {
const maskType = obfuscated ? 'obfuscated' : 'regular'
return CREDIT_CARD_MASKS[issuer][maskType]
}
}
```
|
Siân Davey (born 1964) is a British photographer. Her work focuses on her family, community and self, and is informed by her background in psychology.
Davey has published two books, Looking for Alice (2015) and Martha (2018). In 2017 she had a solo exhibition at the National Portrait Gallery, London and was awarded the Royal Photographic Society's Hood Medal for Looking for Alice.
Life and work
Davey was born in Brighton in 1964. She studied painting at Bath Academy of Fine Art (1985) and social policy at the University of Brighton (1990). She was a psychotherapist for 15 years before taking up photography in 2014, which she studied at Plymouth University (MA 2014 and MFA 2016).
Her photographic practice focuses on her family, community and self, and is informed by her background in psychology. Her series Looking for Alice is a portrait of her daughter Alice who has Down syndrome. One of the photographs from this series was selected for the 2014 Taylor Wessing Photographic Portrait Prize exhibition. The series was published by Trolley Books in 2015. In 2016, Looking for Alice was shortlisted for Photobook of the Year in the Paris Photo–Aperture Foundation PhotoBook Awards.
Davey's teenage daughter Martha assisted with the creation of Looking for Alice. This led to Davey's next series Martha that focuses on Martha and her teenage friends. Two photographs from this series were selected for the 2016 Taylor Wessing Photographic Portrait Prize exhibition.
In 2017, Davey exhibited her series Together as a pop-up exhibition at the National Portrait Gallery, London. The work was made as a commission for the McCain Foods We Are Family series "which celebrates British families in all their shapes and sizes". In creating the work, she travelled across Britain and photographed 31 families in 21 days.
Publications
Looking for Alice. London: Trolley, 2015. . With a text by David Chandler.
Martha. London: Trolley, 2018. With a foreword by Kate Bush.
Awards
2017: Hood Medal, Royal Photographic Society, Bath, for Looking for Alice
2019: W. Eugene Smith Fellowship from the W. Eugene Smith Memorial Fund
Solo exhibitions
We Are Family (Davey's Together series), Print Shop Gallery, National Portrait Gallery, London, 2017
References
External links
Together: a photographic study of UK family life – photographs
1964 births
Living people
People from Brighton
British women photographers
Photographers from Sussex
|
Op-die-Berg is a settlement in Cape Winelands District Municipality in the Western Cape province of South Africa. It is located north of Ceres in the Kouebokkeveld region, synonymous with cherry orchards and occasional heavy snowfalls in winter.
References
Populated places in the Witzenberg Local Municipality
|
```javascript
Registry user accounts for npm
Calling remote scripts with npm
`npm` as an alternative to Gulp
devDependencies in `npm`
`optionalDependencies` in npm
```
|
```yaml
board:
name: esp32_devkitc_wroom
vendor: espressif
socs:
- name: esp32
```
|
The Quechua Alliance is a community organization that promotes and celebrates Andean culture in the United States.
Annual meetings
Since 2015, the Quechua Alliance has held annual meetings where students, activists, academics, and the interested public participate to learn about innovative projects in the different varieties of Quechua, as well as to raise awareness about the relevance of the Indigenous languages of the Americas. For each edition, about one-hundred people from across the US participate.
The first editions were held at the University of Pennsylvania, in Philadelphia (2015, 2016, 2018) and also has been hosted at New York University in New York City (2017), at Ohio State University in Columbus (2019), at the University of California, Berkeley (2020 - virtual), and at Harvard University (2023) in the Boston area.
Quechua Award for Lifetime Achievement
The Quechua Alliance yearly acknowledges persons who have dedicated their lives to the promotion of Quechua languages and Andean culture. The awardees include: Clodoaldo Soto Ruiz (2015), Julia García (2016), Kichwa Hatari (2017), Elva Ambía (2018), Luis Morato (2019) and Yarina (2023).
Awards on Quechua Digital Activism
Since 2020, in collaboration with the Quechua programs at the universities of Pennsylvania, Illinois, and Peru's Ministry of Culture, those awards were created with the aim of raising awareness of the importance of language rights for Indigenous Languages speakers and to recognize the work of educators using digital platforms in Quechua.
References
Quechuan languages
Indigenous languages of the Andes
Indigenous rights in the United States
Indigenous culture in the United States
|
Santa María Totolapilla is a town and municipality in Oaxaca in south-western Mexico. The municipality covers an area of km².
It is part of the Tehuantepec District in the west of the Istmo Region.
As of 2005, the municipality had a total population of .
References
Municipalities of Oaxaca
|
```markdown
### Source:
1) path_to_url
2) path_to_url
```
```markdown
## Get the CelebA dataset```
```python
!wget -q path_to_url
```
```markdown
## Get helpers```
```python
!wget -q path_to_url
```
```python
!pwd
```
```python
!ls
```
```markdown
## Get the Kaggle api token and upload it to colab. Follow the instructions [here](path_to_url#api-credentials).```
```python
!pip install -qq kaggle
```
```python
try:
from google.colab import files
except ModuleNotFoundError:
%pip install -qq google
from google.colab import files
uploaded = files.upload()
```
```python
!mkdir /root/.kaggle
```
```python
!cp kaggle.json /root/.kaggle/kaggle.json
```
```python
!chmod 600 /root/.kaggle/kaggle.json
```
```markdown
## Getting the checkpoint of the model from buckets. ```
```python
try:
from google.colab import auth
except ModuleNotFoundError:
%pip install -qq google
from google.colab import auth
auth.authenticate_user()
```
```python
bucket_name = "probml_data"
```
```python
!mkdir /content/models
```
```python
!gsutil cp -r gs://{bucket_name}/mix_PPCA /content/models/
```
```markdown
# Main```
```python
try:
import sys, os
except ModuleNotFoundError:
%pip install -qq sys,
import sys, os
try:
import torch
except ModuleNotFoundError:
%pip install -qq torch
import torch
try:
from torchvision.datasets import CelebA, MNIST
except ModuleNotFoundError:
%pip install -qq torchvision
from torchvision.datasets import CelebA, MNIST
import torchvision.transforms as transforms
try:
from pytorch_lightning import LightningDataModule, LightningModule, Trainer
except ModuleNotFoundError:
%pip install -qq pytorch_lightning
from pytorch_lightning import LightningDataModule, LightningModule, Trainer
from torch.utils.data import DataLoader, random_split, SequentialSampler, RandomSampler
import numpy as np
from matplotlib import pyplot as plt
try:
from imageio import imwrite
except ModuleNotFoundError:
%pip install -qq imageio
from imageio import imwrite
from packaging import version
try:
from tqdm import tqdm
except ModuleNotFoundError:
%pip install -qq tqdm
from tqdm import tqdm
try:
from data import CelebADataset, CelebADataModule
except ModuleNotFoundError:
%pip install -qq data
from data import CelebADataset, CelebADataModule
try:
from mfa_celeba_helpers import *
except ModuleNotFoundError:
%pip install -qq mfa_celeba_helpers
from mfa_celeba_helpers import *
from IPython.display import Image
def main(argv):
assert version.parse(torch.__version__) >= version.parse("1.2.0")
dataset = argv[1] if len(argv) == 2 else "celeba"
print("Preparing dataset and parameters for", dataset, "...")
if dataset == "celeba":
image_shape = [64, 64, 3] # The input image shape
n_components = 300 # Number of components in the mixture model
n_factors = 10 # Number of factors - the latent dimension (same for all components)
batch_size = 1000 # The EM batch size
num_iterations = 30 # Number of EM iterations (=epochs)
feature_sampling = 0.2 # For faster responsibilities calculation, randomly sample the coordinates (or False)
mfa_sgd_epochs = 0 # Perform additional training with diagonal (per-pixel) covariance, using SGD
init_method = "rnd_samples" # Initialize each component from few random samples using PPCA
trans = transforms.Compose(
[
CropTransform((25, 50, 25 + 128, 50 + 128)),
transforms.Resize(image_shape[0]),
transforms.ToTensor(),
ReshapeTransform([-1]),
]
)
train_set = CelebADataset(root="./data", split="train", transform=trans, download=True)
test_set = CelebADataset(root="./data", split="test", transform=trans, download=True)
elif dataset == "mnist":
image_shape = [28, 28] # The input image shape
n_components = 50 # Number of components in the mixture model
n_factors = 6 # Number of factors - the latent dimension (same for all components)
batch_size = 1000 # The EM batch size
num_iterations = 1 # Number of EM iterations (=epochs)
feature_sampling = False # For faster responsibilities calculation, randomly sample the coordinates (or False)
mfa_sgd_epochs = 0 # Perform additional training with diagonal (per-pixel) covariance, using SGD
init_method = "kmeans" # Initialize by using k-means clustering
trans = transforms.Compose([transforms.ToTensor(), ReshapeTransform([-1])])
train_set = MNIST(root="./data", train=True, transform=trans, download=True)
test_set = MNIST(root="./data", train=False, transform=trans, download=True)
else:
assert False, "Unknown dataset: " + dataset
```
```markdown
# Inference```
```markdown
### Preparing dataset```
```python
"""
Examples for inference using the trained MFA model - likelihood evaluation and (conditional) reconstruction
"""
if __name__ == "__main__":
dataset = "celeba"
find_outliers = True
reconstruction = True
inpainting = True
print("Preparing dataset and parameters for", dataset, "...")
if dataset == "celeba":
image_shape = [64, 64, 3] # The input image shape
n_components = 300 # Number of components in the mixture model
n_factors = 10 # Number of factors - the latent dimension (same for all components)
batch_size = 128 # The EM batch size
num_iterations = 30 # Number of EM iterations (=epochs)
feature_sampling = 0.2 # For faster responsibilities calculation, randomly sample the coordinates (or False)
mfa_sgd_epochs = 0 # Perform additional training with diagonal (per-pixel) covariance, using SGD
trans = transforms.Compose(
[
CropTransform((25, 50, 25 + 128, 50 + 128)),
transforms.Resize(image_shape[0]),
transforms.ToTensor(),
ReshapeTransform([-1]),
]
)
test_dataset = CelebADataset(root="./data", split="test", transform=trans, download=True)
# The train set has more interesting outliers...
# test_dataset = CelebA(root='./data', split='train', transform=trans, download=True)
else:
assert False, "Unknown dataset: " + dataset
```
```python
def samples_to_mosaic_any_size(gird_size, samples, image_shape=[64, 64, 3]):
images = samples_to_np_images(samples, image_shape)
num_images = images.shape[0]
num_cols = gird_size[1]
num_rows = gird_size[0]
rows = []
for i in range(num_rows):
rows.append(np.hstack([images[j] for j in range(i * num_cols, (i + 1) * num_cols)]))
return np.vstack(rows)
```
```markdown
### Loading pre-trained MFA model```
```python
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
model_dir = "./models/" + "mix_PPCA"
figures_dir = "./figures/" + dataset
os.makedirs(figures_dir, exist_ok=True)
print("Loading pre-trained MFA model...")
model = MFA(n_components=n_components, n_features=np.prod(image_shape), n_factors=n_factors).to(device=device)
model.load_state_dict(torch.load(os.path.join(model_dir, "model_c_300_l_10_init_rnd_samples.pth")))
```
```markdown
### Samples ```
```python
# gird_size = [int(x) for x in input("Enter gird size: ").split()]
gird_size = [3, 4]
```
```python
print("Visualizing the trained model...")
model_image = visualize_model(model, image_shape=image_shape, end_component=10)
fname = os.path.join(figures_dir, "model.jpg")
imwrite(fname, model_image)
display(Image(fname))
```
```python
print("Generating random samples...")
rnd_samples, _ = model.sample(gird_size[0] * gird_size[1], with_noise=False) # 100->n #gird_size[0]*gird_size[1]
mosaic = samples_to_mosaic_any_size(gird_size, samples=rnd_samples, image_shape=image_shape)
fname = os.path.join(figures_dir, "samples.jpg")
imwrite(fname, mosaic)
display(Image(fname))
```
```markdown
### Showing outliers```
```python
# gird_size = [int(x) for x in input("Enter gird size: ").split()]
```
```python
if find_outliers:
print("Finding dataset outliers...")
loader = DataLoader(test_dataset, batch_size=batch_size, shuffle=False, num_workers=8)
all_ll = []
for batch_x, _ in tqdm(loader):
all_ll.append(model.log_prob(batch_x.to(device)))
all_ll = torch.cat(all_ll, dim=0)
ll_sorted = torch.argsort(all_ll).cpu().numpy()
all_keys = [key for key in SequentialSampler(test_dataset)]
outlier_samples, _ = zip(*[test_dataset[all_keys[ll_sorted[i]]] for i in range(gird_size[0] * gird_size[1])])
mosaic = samples_to_mosaic_any_size(gird_size, torch.stack(outlier_samples), image_shape=image_shape)
fname = os.path.join(figures_dir, "outliers.jpg")
imwrite(fname, mosaic)
display(Image(fname))
```
```markdown
### Reconstructing original masked images ```
```python
# mask_type = input("Enter the type of mask from following options: (a)centre (b)bottom (c)right (d)left (e)top: ")
mask_type = "centre"
# gird_size = [int(x) for x in input("Enter gird size: ").split()]
gird_size = [3, 5]
```
```python
if reconstruction:
print("Reconstructing images from the trained model...")
n = gird_size[0] * gird_size[1]
random_samples, _ = zip(
*[test_dataset[k] for k in RandomSampler(test_dataset, replacement=True, num_samples=n)]
) # num_samples -> gird_size = [m1, m2]
random_samples = torch.stack(random_samples)
if inpainting:
w = image_shape[0]
mask = np.ones([3, w, w], dtype=np.float32) # Hide part of each image
if mask_type == "centre":
mask[:, w // 4 : -w // 4, w // 4 : -w // 4] = 0 # Masking centre
elif mask_type == "bottom":
mask[:, w // 2 :, :] = 0 # Masking bottom half
elif mask_type == "right":
mask[:, :, w // 2 :] = 0 # Masking right half
elif mask_type == "left":
mask[:, :, : w // 2] = 0 # Masking left half
else:
mask[:, : w // 2, :] = 0 # Masking top half
mask = torch.from_numpy(mask.flatten()).reshape([1, -1])
random_samples *= mask
used_features = torch.nonzero(mask.flatten()).flatten()
reconstructed_samples = model.conditional_reconstruct(
random_samples.to(device), observed_features=used_features
).cpu()
else:
reconstructed_samples = model.reconstruct(random_samples.to(device)).cpu()
if inpainting:
reconstructed_samples = random_samples * mask + reconstructed_samples * (1 - mask)
mosaic_original = samples_to_mosaic_any_size(gird_size, random_samples, image_shape=image_shape)
fname = os.path.join(figures_dir, "original_samples.jpg")
imwrite(fname, mosaic_original)
display(Image(fname))
mosaic_recontructed = samples_to_mosaic_any_size(gird_size, reconstructed_samples, image_shape=image_shape)
fname = os.path.join(figures_dir, "reconstructed_samples.jpg")
imwrite(fname, mosaic_recontructed)
display(Image(fname))
```
|
```c++
#include "TextLines.hpp"
#include <GL/glew.h>
#include "libslic3r/Model.hpp"
#include "libslic3r/Emboss.hpp"
#include "libslic3r/TriangleMeshSlicer.hpp"
#include "libslic3r/Tesselate.hpp"
#include "libslic3r/AABBTreeLines.hpp"
#include "libslic3r/ExPolygonsIndex.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "slic3r/GUI/Selection.hpp"
#include "slic3r/GUI/GLCanvas3D.hpp"
#include "slic3r/GUI/GLModel.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/3DScene.hpp"
using namespace Slic3r;
using namespace Slic3r::Emboss;
using namespace Slic3r::GUI;
namespace {
// Used to move slice (text line) on place where is approx vertical center of text
// When copy value const double ASCENT_CENTER from Emboss.cpp and Vertical align is center than
// text line will cross object center
const double ascent_ratio_offset = 1 / 3.;
double calc_line_height_in_mm(const Slic3r::Emboss::FontFile& ff, const FontProp& fp); // return lineheight in mm
// Be careful it is not water tide and contain self intersections
// It is only for visualization purposes
indexed_triangle_set its_create_torus(const Slic3r::Polygon &polygon, float radius, size_t steps = 20)
{
assert(!polygon.empty());
if (polygon.empty())
return {};
size_t count = polygon.size();
if (count < 3)
return {};
// convert and scale to float
std::vector<Vec2f> points_d;
points_d.reserve(count);
for (const Point &point : polygon.points)
points_d.push_back(unscale(point).cast<float>());
// pre calculate normalized line directions
auto calc_line_norm = [](const Vec2f &f, const Vec2f &s) -> Vec2f { return (s - f).normalized(); };
std::vector<Vec2f> line_norm(points_d.size());
for (size_t i = 0; i < count - 1; ++i)
line_norm[i] = calc_line_norm(points_d[i], points_d[i + 1]);
line_norm.back() = calc_line_norm(points_d.back(), points_d.front());
// precalculate sinus and cosinus
double angle_step = 2 * M_PI / steps;
std::vector<std::pair<double, float>> sin_cos;
sin_cos.reserve(steps);
for (size_t s = 0; s < steps; ++s) {
double angle = s * angle_step;
sin_cos.emplace_back(
radius * std::sin(angle),
static_cast<float>(radius * std::cos(angle))
);
}
indexed_triangle_set sphere = its_make_sphere(radius, 2 * PI / steps);
// create torus model along polygon path
indexed_triangle_set model;
model.vertices.reserve(2 * steps * count + sphere.vertices.size()*count);
model.indices.reserve(2 * steps * count + sphere.indices.size()*count);
const Vec2f *prev_prev_point_d = &points_d[count-2]; // one before back
const Vec2f *prev_point_d = &points_d.back();
auto calc_angle = [](const Vec2f &d0, const Vec2f &d1) {
double dot = d0.dot(d1);
double det = d0.x() * d1.y() - d0.y() * d1.x(); // Determinant
return std::atan2(det, dot); // atan2(y, x) or atan2(sin, cos)
};
// opposit previos direction of line - for calculate angle
Vec2f opposit_prev_dir = (*prev_prev_point_d) - (*prev_point_d);
for (size_t i = 0; i < count; ++i) {
const Vec2f & point_d = points_d[i];
// line segment direction
Vec2f dir = point_d - (*prev_point_d);
double angle = calc_angle(opposit_prev_dir, dir);
double allowed_preccission = 1e-6;
if (angle >= (PI - allowed_preccission) ||
angle <= (-PI + allowed_preccission))
continue; // it is almost line
// perpendicular direction to line
Vec2d p_dir(dir.y(), -dir.x());
p_dir.normalize(); // Should done with double preccission
// p_dir is tube unit side vector
// tube unit top vector is z direction
// Tube
int prev_index = model.vertices.size() + 2 * sin_cos.size() - 2;
for (const auto &[s, c] : sin_cos) {
Vec2f side = (s * p_dir).cast<float>();
Vec2f xy0 = side + (*prev_point_d);
Vec2f xy1 = side + point_d;
model.vertices.emplace_back(xy0.x(), xy0.y(), c); // pointing of prev index
model.vertices.emplace_back(xy1.x(), xy1.y(), c);
// create triangle indices
int f0 = prev_index;
int s0 = f0 + 1;
int f1 = model.vertices.size() - 2;
int s1 = f1 + 1;
prev_index = f1;
model.indices.emplace_back(s0, f0, s1);
model.indices.emplace_back(f1, s1, f0);
}
prev_prev_point_d = prev_point_d;
prev_point_d = &point_d;
opposit_prev_dir = -dir;
}
// sphere on each point
for (Vec2f& p: points_d){
indexed_triangle_set sphere_copy = sphere;
its_translate(sphere_copy, Vec3f(p.x(), p.y(), 0.f));
its_merge(model, sphere_copy);
}
return model;
}
// select closest contour for each line
TextLines select_closest_contour(const std::vector<Polygons> &line_contours) {
TextLines result;
result.reserve(line_contours.size());
Vec2d zero(0., 0.);
for (const Polygons &polygons : line_contours){
if (polygons.empty()) {
result.emplace_back();
continue;
}
// Improve: use int values and polygons only
// Slic3r::Polygons polygons = union_(polygons);
// std::vector<Slic3r::Line> lines = to_lines(polygons);
// AABBTreeIndirect::Tree<2, Point> tree;
// size_t line_idx;
// Point hit_point;
// Point::Scalar distance = AABBTreeLines::squared_distance_to_indexed_lines(lines, tree, point, line_idx, hit_point);
ExPolygons expolygons = union_ex(polygons);
std::vector<Linef> linesf = to_linesf(expolygons);
AABBTreeIndirect::Tree2d tree = AABBTreeLines::build_aabb_tree_over_indexed_lines(linesf);
size_t line_idx = 0;
Vec2d hit_point;
// double distance =
AABBTreeLines::squared_distance_to_indexed_lines(linesf, tree, zero, line_idx, hit_point);
// conversion between index of point and expolygon
ExPolygonsIndices cvt(expolygons);
ExPolygonsIndex index = cvt.cvt(static_cast<uint32_t>(line_idx));
const Slic3r::Polygon& polygon = index.is_contour() ?
expolygons[index.expolygons_index].contour :
expolygons[index.expolygons_index].holes[index.hole_index()];
Point hit_point_int = hit_point.cast<Point::coord_type>();
TextLine tl{polygon, PolygonPoint{index.point_index, hit_point_int}};
result.emplace_back(tl);
}
return result;
}
inline Eigen::AngleAxis<double> get_rotation() { return Eigen::AngleAxis(-M_PI_2, Vec3d::UnitX()); }
indexed_triangle_set create_its(const TextLines &lines, float radius)
{
indexed_triangle_set its;
// create model from polygons
for (const TextLine &line : lines) {
const Slic3r::Polygon &polygon = line.polygon;
if (polygon.empty()) continue;
indexed_triangle_set line_its = its_create_torus(polygon, radius);
auto transl = Eigen::Translation3d(0., line.y, 0.);
Transform3d tr = transl * get_rotation();
its_transform(line_its, tr);
its_merge(its, line_its);
}
return its;
}
GLModel::Geometry create_geometry(const TextLines &lines, float radius, bool is_mirrored)
{
indexed_triangle_set its = create_its(lines, radius);
GLModel::Geometry geometry;
geometry.format = {GLModel::Geometry::EPrimitiveType::Triangles, GUI::GLModel::Geometry::EVertexLayout::P3};
ColorRGBA color(.7f, .7f, .7f, .7f); // Transparent Gray
geometry.color = color;
geometry.reserve_vertices(its.vertices.size());
for (Vec3f vertex : its.vertices)
geometry.add_vertex(vertex);
geometry.reserve_indices(its.indices.size() * 3);
if (is_mirrored) {
// change order of indices
for (Vec3i t : its.indices)
geometry.add_triangle(t[0], t[2], t[1]);
} else {
for (Vec3i t : its.indices)
geometry.add_triangle(t[0], t[1], t[2]);
}
return geometry;
}
} // namespace
void TextLinesModel::init(const Transform3d &text_tr,
const ModelVolumePtrs &volumes_to_slice,
/*const*/ Emboss::StyleManager &style_manager,
unsigned count_lines)
{
assert(style_manager.is_active_font());
if (!style_manager.is_active_font())
return;
const auto &ffc = style_manager.get_font_file_with_cache();
assert(ffc.has_value());
if (!ffc.has_value())
return;
const auto &ff_ptr = ffc.font_file;
assert(ff_ptr != nullptr);
if (ff_ptr == nullptr)
return;
const FontFile &ff = *ff_ptr;
const FontProp &fp = style_manager.get_font_prop();
m_model.reset();
double line_height_mm;
m_lines = Slic3r::Emboss::create_text_lines(
text_tr, volumes_to_slice, ff, fp, count_lines, &line_height_mm);
if (m_lines.empty())
return;
bool is_mirrored = has_reflection(text_tr);
float radius = static_cast<float>(line_height_mm / 20.);
//*
GLModel::Geometry geometry = create_geometry(m_lines, radius, is_mirrored);
if (geometry.vertices_count() == 0 || geometry.indices_count() == 0)
return;
m_model.init_from(std::move(geometry));
/*/
// slower solution
ColorRGBA color(.7f, .7f, .7f, .7f); // Transparent Gray
m_model.set_color(color);
m_model.init_from(create_its(m_lines));
//*/
}
void TextLinesModel::render(const Transform3d &text_world)
{
if (!m_model.is_initialized())
return;
GUI_App &app = wxGetApp();
const GLShaderProgram *shader = app.get_shader("flat");
if (shader == nullptr)
return;
const Camera &camera = app.plater()->get_camera();
shader->start_using();
shader->set_uniform("view_model_matrix", camera.get_view_matrix() * text_world);
shader->set_uniform("projection_matrix", camera.get_projection_matrix());
bool is_depth_test = glIsEnabled(GL_DEPTH_TEST);
if (!is_depth_test)
glsafe(::glEnable(GL_DEPTH_TEST));
bool is_blend = glIsEnabled(GL_BLEND);
if (!is_blend)
glsafe(::glEnable(GL_BLEND));
// glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
m_model.render();
if (!is_depth_test)
glsafe(::glDisable(GL_DEPTH_TEST));
if (!is_blend)
glsafe(::glDisable(GL_BLEND));
shader->stop_using();
}
namespace {
double calc_line_height_in_mm(const Slic3r::Emboss::FontFile &ff, const FontProp &fp) {
int line_height = Slic3r::Emboss::get_line_height(ff, fp); // In shape size
double scale = Slic3r::Emboss::get_text_shape_scale(fp, ff);
return line_height * scale;
}
} // namespace
Slic3r::Emboss::TextLines Slic3r::Emboss::create_text_lines(
const Transform3d &text_tr,
const ModelVolumePtrs &volumes_to_slice,
const FontFile &ff,
const FontProp &fp,
unsigned count_lines,
double *line_height_mm_ptr
) {
FontProp::VerticalAlign align = fp.align.second;
double line_height_mm = calc_line_height_in_mm(ff, fp);
assert(line_height_mm > 0);
if (line_height_mm <= 0)
return {};
// size_in_mm .. contain volume scale and should be ascent value in mm
double line_offset = fp.size_in_mm * ascent_ratio_offset;
double first_line_center = line_offset + get_align_y_offset_in_mm(align, count_lines, ff, fp);
std::vector<float> line_centers(count_lines);
for (size_t i = 0; i < count_lines; ++i)
line_centers[i] = static_cast<float>(first_line_center - i * line_height_mm);
// contour transformation
Transform3d c_trafo = text_tr * get_rotation();
Transform3d c_trafo_inv = c_trafo.inverse();
std::vector<Polygons> line_contours(count_lines);
for (const ModelVolume *volume : volumes_to_slice) {
MeshSlicingParams slicing_params;
slicing_params.trafo = c_trafo_inv * volume->get_matrix();
for (size_t i = 0; i < count_lines; ++i) {
const Polygons polys =
Slic3r::slice_mesh(volume->mesh().its, line_centers[i], slicing_params);
if (polys.empty())
continue;
Polygons &contours = line_contours[i];
contours.insert(contours.end(), polys.begin(), polys.end());
}
}
// fix for text line out of object
// When move text close to edge - line center could be out of object
for (Polygons &contours : line_contours) {
if (!contours.empty())
continue;
// use line center at zero, there should be some contour.
float line_center = 0.f;
for (const ModelVolume *volume : volumes_to_slice) {
MeshSlicingParams slicing_params;
slicing_params.trafo = c_trafo_inv * volume->get_matrix();
const Polygons polys =
Slic3r::slice_mesh(volume->mesh().its, line_center, slicing_params);
if (polys.empty())
continue;
contours.insert(contours.end(), polys.begin(), polys.end());
}
}
TextLines result = select_closest_contour(line_contours);
assert(result.size() == count_lines);
assert(line_centers.size() == count_lines);
// Fill centers
for (size_t i = 0; i < count_lines; ++i)
result[i].y = line_centers[i];
if (line_height_mm_ptr != nullptr)
*line_height_mm_ptr = line_height_mm;
return result;
}
```
|
```java
package com.taobao.yugong.common.model.record;
/**
*
*
* @author agapple 2013-9-16 4:21:27
*/
public enum IncrementOpType {
I/* INSERT */, U/* UPDATE */, D/* DELETE */;
}
```
|
```kotlin
package mega.privacy.android.app.di.photos
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ViewModelComponent
import mega.privacy.android.app.domain.usecase.DefaultGetNodeListByIds
import mega.privacy.android.app.domain.usecase.GetNodeListByIds
import mega.privacy.android.domain.usecase.DefaultFilterCameraUploadPhotos
import mega.privacy.android.domain.usecase.DefaultFilterCloudDrivePhotos
import mega.privacy.android.domain.usecase.DefaultGetDefaultAlbumPhotos
import mega.privacy.android.domain.usecase.DefaultObserveAlbumPhotosAddingProgress
import mega.privacy.android.domain.usecase.DefaultObserveAlbumPhotosRemovingProgress
import mega.privacy.android.domain.usecase.DefaultSetInitialCUPreferences
import mega.privacy.android.domain.usecase.DefaultUpdateAlbumPhotosAddingProgressCompleted
import mega.privacy.android.domain.usecase.DefaultUpdateAlbumPhotosRemovingProgressCompleted
import mega.privacy.android.domain.usecase.FilterCameraUploadPhotos
import mega.privacy.android.domain.usecase.FilterCloudDrivePhotos
import mega.privacy.android.domain.usecase.GetDefaultAlbumPhotos
import mega.privacy.android.domain.usecase.ObserveAlbumPhotosAddingProgress
import mega.privacy.android.domain.usecase.ObserveAlbumPhotosRemovingProgress
import mega.privacy.android.domain.usecase.SetInitialCUPreferences
import mega.privacy.android.domain.usecase.UpdateAlbumPhotosAddingProgressCompleted
import mega.privacy.android.domain.usecase.UpdateAlbumPhotosRemovingProgressCompleted
@Module
@InstallIn(ViewModelComponent::class)
abstract class PhotosUseCases {
@Binds
abstract fun bindFilterCameraUploadPhotos(useCase: DefaultFilterCameraUploadPhotos): FilterCameraUploadPhotos
@Binds
abstract fun bindFilterCloudDrivePhotos(useCase: DefaultFilterCloudDrivePhotos): FilterCloudDrivePhotos
@Binds
abstract fun bindSetInitialCUPreferences(useCase: DefaultSetInitialCUPreferences): SetInitialCUPreferences
@Binds
abstract fun bindGetNodeListByIds(useCase: DefaultGetNodeListByIds): GetNodeListByIds
@Binds
abstract fun bindGetDefaultAlbumPhotos(useCase: DefaultGetDefaultAlbumPhotos): GetDefaultAlbumPhotos
@Binds
abstract fun bindObserveAlbumPhotosAddingProgress(useCase: DefaultObserveAlbumPhotosAddingProgress): ObserveAlbumPhotosAddingProgress
@Binds
abstract fun bindUpdateAlbumPhotosAddingProgressCompleted(useCase: DefaultUpdateAlbumPhotosAddingProgressCompleted): UpdateAlbumPhotosAddingProgressCompleted
@Binds
abstract fun bindObserveAlbumPhotosRemovingProgress(useCase: DefaultObserveAlbumPhotosRemovingProgress): ObserveAlbumPhotosRemovingProgress
@Binds
abstract fun bindUpdateAlbumPhotosRemovingProgressCompleted(useCase: DefaultUpdateAlbumPhotosRemovingProgressCompleted): UpdateAlbumPhotosRemovingProgressCompleted
}
```
|
Stutz typically refers to the Stutz Motor Company, an American luxury car manufacturer.
Stutz may also refer to:
Stutz (surname), and a list of people with the name
Gerhard Stüdemann (1920–1988), a Luftwaffe pilot nicknamed "Stutz"
Stutz (film), a 2022 documentary directed by Jonah Hill
|
is a Japanese voice actress from Osaka Prefecture who is affiliated with Ken Production. She is known for her roles as Himeko Mashima in the Show By Rock!! franchise, Sasha Necron in The Misfit of Demon King Academy, Yuyu Shirai in Assault Lily Bouquet, and Tsubaki in In the Heart of Kunoichi Tsubaki.
Biography
Natsuyoshi's voice acting activities began after she won an audition held by the talent agency Ken Production in 2016. After two years of training under Ken Production's voice acting school, she formally became affiliated with them in 2018. She played her first role as a mob character in the anime television series Grand Blue, before being cast in her first main role as Himeko Mashima in the Show By Rock!! franchise.
In 2019, Natsuyoshi voiced Vivian in Journal of the Mysterious Creatures. In 2020, she was cast as Yamada in My Roomie Is a Dino, Sasha Necron in The Misfit of Demon King Academy, and as Yuyu Shirai in Assault Lily Bouquet.
Filmography
Anime
2018
Grand Blue, Tinkerbell member C (episode 7)
2019
Karakuri Circus, Rocket Announcement, Alpha
Phantasy Star Online 2: Episode Oracle, Operator
My Hero Academia as Female citizen (episode 68), Female student (episode 72)
2020
Chihayafuru 3, Recorder, girl, Fujisaki girl student
Show by Rock!! Mashumairesh!!, Himeko Mashima
Pokémon Journeys: The Series, Koharu's homeroom teacher, boy
My Roomie Is a Dino, Yamada
Motto! Majime ni Fumajime Kaiketsu Zorori, Staff, wife, Polyrin
Journal of the Mysterious Creatures, Vivian
The Misfit of Demon King Academy, Sasha Necron
Assault Lily Bouquet, Yuyu Shirai
Higurashi: When They Cry – Gou, Waitress
Cardfight!! Vanguard Gaiden if, Staff A
2021
Show by Rock!! Stars!!, Himeko Mashima
I've Been Killing Slimes for 300 Years and Maxed Out My Level, Monk
To Your Eternity, Village woman, handmaiden, Chan's brother, Mia
Tsukimichi: Moonlit Fantasy, Reception
Assault Lily Fruits, Yuyu Shirai
Mieruko-chan, Female friend A
2022
She Professed Herself Pupil of the Wise Man, Emera
Kotaro Lives Alone, Convenience Store Cashier, Woman (episode 2), Boy (episode 5)
In the Heart of Kunoichi Tsubaki, Tsubaki
Don't Hurt Me, My Healer!, Medusa
Shine Post, Rio Seibu
2023
The Misfit of Demon King Academy 2nd Season, Sasha Necron
Yu-Gi-Oh! Go Rush!!, Dinowa Velgear
TBA
Utagoe wa Mille-Feuille, Musubu Mayumori
Video games
2019
The Legend of Zelda: Link's Awakening, Marin
Pokémon Masters, Whitney
Touhou Cannonball, Minamitsu Murasa
2020
Last Period, Furau
Magia Record, Meguru Hibiki
Show By Rock!! Fes A Live, Himeko Mashima
Sakura Kakumei: Hanasaku Otome-tachi, Asebi Mikohama
2021
Assault Lily Last Bullet, Yuyu Shirai
A Certain Magical Index: Imaginary Fest, Ayame Fusō
2022
Azur Lane, Alfredo Oriani
Blue Archive, Kazusa Kyōyama
2023
Uma Musume: Pretty Derby, Cheval Grand
Hyperdimension Neptunia GameMaker R:Evolution, Pipi
References
External links
Agency profile
Japanese video game actresses
Japanese voice actresses
Ken Production voice actors
Voice actresses from Osaka Prefecture
Living people
21st-century Japanese actresses
Year of birth missing (living people)
|
```go
package signing
import (
"context"
"fmt"
"google.golang.org/protobuf/types/known/anypb"
txsigning "cosmossdk.io/x/tx/signing"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
)
// V2AdaptableTx is an interface that wraps the GetSigningTxData method.
// GetSigningTxData returns an x/tx/signing.TxData representation of a transaction for use in signing
// interoperability with x/tx.
type V2AdaptableTx interface {
GetSigningTxData() txsigning.TxData
}
// GetSignBytesAdapter returns the sign bytes for a given transaction and sign mode. It accepts the arguments expected
// for signing in x/auth/tx and converts them to the arguments expected by the txsigning.HandlerMap, then applies
// HandlerMap.GetSignBytes to get the sign bytes.
func GetSignBytesAdapter(
ctx context.Context,
handlerMap *txsigning.HandlerMap,
mode signing.SignMode,
signerData SignerData,
tx sdk.Tx,
) ([]byte, error) {
adaptableTx, ok := tx.(V2AdaptableTx)
if !ok {
return nil, fmt.Errorf("expected tx to be V2AdaptableTx, got %T", tx)
}
txData := adaptableTx.GetSigningTxData()
txSignMode, err := internalSignModeToAPI(mode)
if err != nil {
return nil, err
}
var pubKey *anypb.Any
if signerData.PubKey != nil {
anyPk, err := codectypes.NewAnyWithValue(signerData.PubKey)
if err != nil {
return nil, err
}
pubKey = &anypb.Any{
TypeUrl: anyPk.TypeUrl,
Value: anyPk.Value,
}
}
txSignerData := txsigning.SignerData{
ChainID: signerData.ChainID,
AccountNumber: signerData.AccountNumber,
Sequence: signerData.Sequence,
Address: signerData.Address,
PubKey: pubKey,
}
// Generate the bytes to be signed.
return handlerMap.GetSignBytes(ctx, txSignMode, txSignerData, txData)
}
```
|
Ferdinando Pereira Leda (born 22 April 1980) is a Brazilian footballer. Mainly a defensive midfielder, he can also play as a left back.
Career
Until 2005 Ferdinando played for Centro de Futebol Zico Sociedade Esportiva. Then he was transferred to Avaí. In 2007, he was loaned to Esporte Clube São Bento and in 2010 to Grêmio.
On 26 January 2012, it was announced that Ferdinando joined South Korean club Incheon United.
Honours
Portuguesa
Campeonato Brasileiro Série B: 2011
Campeonato Paulista Série A2: 2013
References
External links
1980 births
Living people
Footballers from Maranhão
Brazilian men's footballers
Men's association football midfielders
Palmas Futebol e Regatas players
Avaí FC players
Esporte Clube São Bento players
Grêmio Foot-Ball Porto Alegrense players
Associação Portuguesa de Desportos players
Incheon United FC players
Nacional Atlético Clube (SP) players
Novo Futebol Clube players
Rio Claro Futebol Clube players
K League 1 players
Júbilo Iwata players
J2 League players
Brazilian expatriate men's footballers
Brazilian expatriate sportspeople in South Korea
Expatriate men's footballers in South Korea
Brazilian expatriate sportspeople in Japan
Expatriate men's footballers in Japan
|
The Château de Frauenberg is a ruined castle in the commune of Frauenberg in the Moselle département of France.
History
The castle dates from 1350 and occupies a site dominating a valley between France and Germany. It was owned by several families, including the lords of Sierck and the counts of Eberstein. Over time, it was altered and renovated, with significant construction in the 13th, 14th, 17th and 18th centuries. It had been dismantled by Cardinal Richelieu in 1634 and was partly destroyed by fire in 1786. On the eve of the French Revolution, the land was bought by Count Gravier de Vergennes (1719-1787), minister of Louis XVI. The castle housed two pottery kilns which operated in Frauenberg from 1785 to 1791 and were the origin of the notable ceramics company, Villeroy & Boch.
It has been classified since 1921 as a monument historique by the French Ministry of Culture. A restoration project was launched by the commune and the Association pour la Sauvegarde du Château et du Patrimoine de Frauenberg in 2018.
See also
List of castles in France
References
External links
Ministry of Culture listing for Château de Frauenberg
Ruined castles in Grand Est
Monuments historiques of Grand Est
Buildings and structures in Moselle (department)
|
Marionettes of the Princess () is a 1924 German silent drama film directed by Frederic Zelnik and starring Gertrude Welcker, Rudolf Forster and Erich Kaiser-Titz.
Cast
Gertrude Welcker
Rudolf Forster
Erich Kaiser-Titz
Maria Forescu
Anton Pointner
Frederic Zelnik
References
External links
Films of the Weimar Republic
German silent feature films
Films directed by Frederic Zelnik
German black-and-white films
1924 drama films
Silent German drama films
1920s German films
|
The Virginia Cavaliers football team represents the University of Virginia (UVA) in the sport of American football. Established in 1888, Virginia plays its home games at Scott Stadium, capacity 61,500, featured directly on its campus near the Academical Village. UVA played an outsized role in the shaping of the modern game's ethics and eligibility rules, as well as its safety rules after a Georgia fullback died fighting the tide of a lopsided Virginia victory in 1897.
Quickly asserting itself as the South's first great program with 28 straight winning seasons from its first in 1888, Virginia football claimed 12 southern championships and was the first Southern program to defeat perennial power (26-time national champions) Yale, in a 10–0 shocker at the Yale Bowl in 1915. During those early days, Virginia established long-lasting rivalries that still continue on: particularly the South's Oldest Rivalry with North Carolina and a heated rivalry with Virginia Tech. Virginia has also played (now FCS) William & Mary annually or biennially for extended stretches since 1908.
Virginia lost its mantle as the region's mark of success between World War I and World War II, but soon thereafter Art Guepe had Virginia winning big again. To avoid the trappings of "big-time football", university president Colgate Darden reduced scholarship and recruiting support, argued against joining the ACC, and declined an invite for Virginia to play unbeaten Georgia Tech in the 1952 Orange Bowl. The Board of Visitors voted to join the ACC anyway, but Guepe left for Vanderbilt and under Dick Voris Virginia embarked on a 28-game losing streak from 1958 to 1960, as Darden retired. Voris left with a record of 1–29, his lone victory a 15–12 nailbiter against Duke. Still limited by a relative lack of funding in those times, his successors managed moderately better records through the 1960s and 1970s.
George Welsh led a dramatic turnaround effort from 1982, and took Virginia to its first dozen bowl games and even its first AP No. 1 ranking throughout October 1990. He was the first ACC coach to reach 100 wins, and retired in 2000 with the most ACC wins (his 85 ranking second to Bobby Bowden as of 2021) of any coach in history. In November 1995, similar to winning the first Southern victory against Yale 80 years prior, Virginia was the first ACC team to defeat Bowden's Florida State teams after they started 29–0 in the conference. The nationally televised event led FSU's President to create the Jefferson-Eppes Trophy, which Virginia again (as of 2021) holds in Charlottesville after winning the latest matchup in 2019.
Virginia remains the only ACC Coastal division program to have ever been ranked AP No. 1 in the nation as an ACC member. The Cavaliers have been participants in one New Year's Six bowl to date, the 2019 Orange Bowl; Virginia's 21 bowl games have also included four Peach Bowls, the Sugar Bowl, and Citrus Bowl, among others. Virginia has thus far produced 11 Consensus All-Americans.
History
Early history (1888–1975)
UVA football began in the fall of 1886, when two graduate students at the University, former Yale student Charles Willcox who was attending medical school at UVA, and former Princeton student, Richard Reid Rogers who matriculated to the law school, introduced the sport. After seeing the success of Princeton and Yale during their undergraduate careers, these two men brought a knowledge of the sport to the South, an area of the country that had no college football teams. Students at UVA began playing pickup games of the kicking-style of football as early as 1870. In 1874, University students were introduced to the sport of rugby when they played to a scoreless tie against a team of Englishmen from Albemarle County. Eight years later, in November 1883, a football club was reorganized, a constitution drawn up, and officers elected. 75 men competed against one another, but not against another collegiate club. The University Magazine describes how "pluck is cultivated by throttling one's competitor and violently throwing him to the ground." Finally, in the fall of 1887, Willcox and Reid, after garnering interest in their fellow students throughout the year, helped Virginia put its first regularly organized team in the field. But in these early days they had had no one to play. Fortunately, Pantops Academy, a boys' school founded just up the road from the UVA Grounds, agreed to a game on November 13, 1887. After playing to a scoreless tie, a rematch was scheduled for March 1888. The historic first touchdown was scored by quarterback Herbert Barry and the University won 26–0. The following season, on December 8, 1888, UVA would play their first intercollegiate game, a 26–0 loss to Johns Hopkins. The loss did not dampen their enthusiasm for the sport. Virginia returned the favor with a 58–0 drubbing of Hopkins the following season when they went 4–2, with a 180–4 margin in its victories and two close losses to an eight-win Lehigh team and Navy. The 1889, 1890, 1892, 1893, 1894, 1895, 1896, and 1897 teams all claim Southern championships. The 116–0 drubbing by Princeton in 1890 signaled football's arrival in the south. The South's Oldest Rivalry started in 1892, when Virginia split games with North Carolina. The 1897 team had a scoreless tie with Vanderbilt in a game billed as the championship of the South. Serving as early as 1892, the school's first athletic director was William Lambeth, a medical professor at the university, and one of the participants in the major rules committees that were enacted to make football a safer sport. The trend was not welcome in all corners, however, according to University historian Philip Alexander Bruce, who wrote disparagingly of the arrival of "professional athletes in disguise" from all over the country. School President Edwin Alderman, though a tireless proponent of college football, was significantly alarmed to appoint an investigating committee in 1904, and a strict athletic code was written in 1906.
Between 1900 and 1915 Virginia saw coaches change 10 times and achieve 10 winning seasons with help from the likes of tackle John Loyd, fullback Bradley Walker, quarterback Robert Kent Gooch and the South's first consensus All-American in halfback Eugene N. "Buck" Mayer. The 1900, 1901, 1902, 1908, 1914, and 1915 teams claim Southern championships. In 1900 the team gave the Sewanee Tigers its first loss since 1897. The team's captain was tackle John Loyd. Virginia lost to Pop Warner's Carlisle Indians. Bradley Walker, later a Nashville attorney and prominent referee, once grabbed Hawley Pierce, Carlisle's biggest player, and carried him ten yards with him dangling over his shoulder. Work began in 1901 on Lambeth Field, propelling sports development at UVA. Along with Walker, "one of the all-time greats in Southern athletic history," the 1901 team featured several prominent players, including tackle Christie Benet, later a United States senator for South Carolina, future physicians guard Buck Harris and halfback Robert M. Coleman, and quarterback Ed Tutwiler, a transfer from Alabama and the son of industrialist and New Market cadet Edward Magruder Tutwiler. The 1901 team defeated Gallaudet, but lost to Georgetown, and so both Gallaudet and Virginia claim titles. The 1902 team beat Carlisle. In 1905, Virginia lost to VPI for the first time, in Hunter Carpenter's senior year. The 1908 team suffered a single scoreless tie to Sewanee. Freshman Archer Christian was trampled to death in the Georgetown game.
1912 featured Virginia in the inaugural South Atlantic Intercollegiate Athletic Association (SAIAA) season. Season tickets were $7.50 for students and $9.50 for alumni when 8,000-seat Lambeth Stadium opened in 1913, with a price tag of $35,000. The season began with three home shutout victories for Virginia, followed later in the season by a home game with Vanderbilt that was billed as The Football Classic of the South. Trainloads of alumni rolled into Charlottesville to watch Virginia crush the Commodores, 34–0, at Lambeth's dedication.
For years hence, it was traditional to designate "a greatest home game" each season. In 1914, it was Georgia—a "Rally 'Round the Rotunda" won by UVA, 28–0, in a drizzle, as Robert Kent Gooch "general-led his men with rare ability", the Alumni News gushed. Betting was heavy on Yale for a 1915 game that ranked as the biggest all-time win at that stage of Virginia's history. No Southern team had ever defeated the Ivy League power until Virginia—led by quarterback Norborne Berkeley and Buck Mayer—won 10–0 in New Haven. Headlines in the Charlottesville Daily Progress read, "Yale Bowl a Soup Tureen—Virginia Eleven Serves Dish of Bulldog Stew!" The 1915 Virginia team was also the only team to beat the "point-a-minute" Commodores. The season's only loss was 9–0 on the road at Harvard. Harvard's only loss was to national champion Cornell. Halfback Eugene N. "Buck" Mayer was the South's first consensus All-American. The University's first-ever losing football season occurred the next year, including a 61–3 payback at Yale. "Played them too early in the season", moaned a 1916 Alumni News. Questions about the role of athletics were cast aside in 1917, dwarfed by a larger battlefront now known as World War I. Athletics were curtailed in 1917 and 1918 "in an effort to adapt this University to the stern necessities of a people at war", according to the Corks & Curls.The war ended, enrollment began to rebuild, and football practice resumed in 1919 with only two lettermen. "All Trains Lead to Charlottesville!" proclaimed posters promoting the "Great Post War Gathering of Virginia Alumni" for the November 15, 1919, home game with Vanderbilt. UVA lost, 10–6, and dropped the traditional Thanksgiving Day game with North Carolina to finish the "start-up" season at 2–5–2.
In December 1919, Dr. Rice Warren was hired as coach in 1920. Warren led the 1920 squad to a 5–2–2 record. UVA also joined the Southern Intercollegiate Athletic Association in 1920, but left with many SIAA teams to form the Southern Conference in 1921. Rice Warren's tenure ended before the 1922 season, and new coach Thomas Campbell guided the team to a 4–4–1 record—not so mediocre considering the '21 team had managed only three points in its final four games. Virginia was a charter member of the Southern Conference in 1921, when it and 13 other schools split from the Southern Intercollegiate Athletic Association. University teams became the Virginia Cavaliers around 1923, and the leader of the first "official Cavs" was Earle "Greasy" Neale. Although his 1923 record was 3–5–1, his teams enjoyed winning records from 1924–27 before falling to 2–6–1 in 1928. Student indifference ran high, participation ran low, and Neale resigned after the 1928 season. Earl Abell took the football reins for two years in the midst of another athletic department reshuffle. The position of athletic director was created, and James G. Driver — a three-year letterman at UVA — was named Athletic Director. Lambeth Field was outgrown by the spring of 1930, as varsity and first-year teams in football, baseball, track, and lacrosse attempted to practice there. UVA historian Virginius Dabney related that spring football workouts were stopped due to the javelins and discus throwers. The University began negotiating to obtain land for a new sports site, and plans were finalized for Scott Stadium to open in October 1931. Land for practice fields between Ivy Road and the C&O Railroad tracks also was acquired. Support for UVA football had become spasmodic—even fraternity brothers were betting openly against the Cavaliers—around 1930, but in 1931, a dynamic new coach named Fred Dawson buoyed spirits. Losing seasons and a lack of athletic scholarships took a toll on Dawson's enthusiasm, however, and he quit after 1933 and was succeeded by Gus Tebell.
Just as frustrated at the dearth of notable wins was university president Edwin Anderson Alderman, who impaneled a committee to study the situation. In 1935 the Southern Conference implemented the Graham Plan, named after the Frank Porter Graham, head of the University of North Carolina system (which included University of North Carolina Tar Heels football and N.C. State Wolf Pack football). The Graham Plan committed the Southern Conference to eliminating any form of subsidization for student athletes that was not available to regular students. The Cavaliers opted to leave the Southern Conference at the end of the 1936 football season, the year the Graham Plan went into effect. Tebell bowed out after three losing seasons, and was succeeded in 1937 by Frank Murray as the Cavaliers began its status as independent (from conference affiliation). Although the Cavaliers went 2–7 during Murray's first year, the team was undefeated against state teams in 1938, posting a 4–4–1 record, creating near hysteria in the student body. The 1940s were a time of mixed success for the Cavaliers—largely thanks to the large numbers of students who served in the armed forces—but it was also known as the era of "Bullet Bill."
William McGarvey Dudley, a 168-pounder from Bluefield, Virginia, is often called the best ever to wear a Virginia uniform. Dudley, who wore jersey number 35, ran, passed, kicked, blocked, tackled, and intercepted his way to All America honors. Under Murray, the 1940 team—running out of a T-formation—went 4–5, but improved to 8–1 in 1941, the only loss a 21–19 upset at Yale. In his final game as a Cavalier, Dudley scored 22 points at North Carolina in a Thanksgiving classic broadcast nationally. After a 28–7 UVA win, his teammates carried him off the field. Dudley finished fifth in the 1941 Heisman Trophy balloting. Murray's 1942 squad dropped to 2–6–1, having lost 29 players to graduation and "scholarshipping for Uncle Sam." Until the war ended in 1945, UVA football functioned with makeshift teams—guest stars from other schools enrolled in the University's military units and were thus eligible to play. In spite of a 7–2 season, Frank Murray left, succeeded in 1946 by Art Guepe, who coached seven years with a winning record. In 1947, Virginia defeated Harvard, 47–0, with a team that featured John Papit, George Neff, and Bob "Rock" Weir. The game was significant because UVA was facing its first-ever black player—Harvard's Chester Pierce. The gridiron success of the late 1940s continued into the early 1950s, as Guepe teams—with Papit, Joe Palumbo, and Tom Scott winning All-America honors—lost only five games from 1950 through 1952. The Guepe years ended after the 1952 season, when the coach was wooed away by Vanderbilt in the wake of University President Colgate Darden's refusal to allow Virginia to participate in any postseason football play. Virginia had just escaped being banned permanently from the NCAA for granting athletic scholarships to student athletes, which was illegal at that time. The NCAA's "Sanity Rules" mandated that college athletes were required to work for their tuition, though this rule was often openly flouted (for instance, prior to the 1950 Rose Bowl, it was revealed that at least 16 Ohio State Buckeye football players had cushy jobs with the state of Ohio, including a running back on the payroll of the state's transportation department as a tire inspector). President Darden made a principled argument against the statute, noting the example of teams such as Ohio State, and stated unequivocally that his school had no intention of following the Code as it enabled the powerhouse schools of the Big Ten and SEC to ignore academics and essentially pay to retain football talent. While UVA (along with traditional UVA rivals Virginia Polytechnic Institute, Maryland, and Boston College) escaped being banned from NCAA play, President Darden was concerned about the effect of "big time football" on the academical status of the University. After the 1951 football season, in which UVA only lost one game, the Virginia Cavaliers found themselves invited to the Orange Bowl, which President Darden promptly declined, setting a precedent not broken for thirty years. Also in 1951, professor Robert Gooch wrote the "Gooch Report", which requested that UVA abolish its football program and discontinue giving athletic scholarships. While President Darden was opposed to entirely abolishing the football program or athletic scholarships, he did diminish the number of athletic scholarships given by 80%. This resulted in the departure of Coach Guepe and a series of losing seasons by the football team.
Heated arguments ensued about whether Virginia should join the Atlantic Coast Conference. Athletic Director and former football coach Gus Tebell and President Darden differed sharply—Tebell in favor, Darden worried about the league's academic standards and the belief that Virginia should only align with other Virginia schools—and the Board of Visitors backed Tebell. Virginia was admitted into the ACC on December 4, 1953. The first 9 years in the ACC brought 9 losing seasons and a 28-game losing streak (the equal second worst in NCAA FBS history), lasting from the third game of 1958 until the opening game of 1961. The streak ended in front of 18,000 fans in Scott Stadium on opening day of the 1961 season. Virginia beat William & Mary 21–6. In 1970, George Blackburn's last year, UVA's football program was integrated for the first time, with the signing of Harrison Davis, Stanley Land, Kent Merritt, and John Rainey. Blackburn was replaced by Don Lawrence, who suffered through three consecutive losing seasons between 1971 and 1973. Lawrence was succeeded by Ulmo Shannon "Sonny" Randle, UVa '59. AstroTurf was laid at Scott Stadium in May 1974 and the team still had a losing season, going 4–7.
Dick Bestwick era (1976–1981)
After a disastrous 1–10 season in 1975, Athletic Director Eugene Corrigan fired Randle and hired Dick Bestwick in 1976. Bestwick proved to be popular with players, alumni, and faculty until the team suffered five losing seasons in six years. Bestwick was dismissed by Athletic Director Dick Schultz after the 1981 season.
George Welsh era (1982–2000)
Head Coach George Welsh was hired for the start of the 1982 season, leaving the same position at the U.S. Naval Academy. He spent years as an assistant coach under Joe Paterno at Penn State and brought a winning tradition in his 19 years at the helm. After going 2–9 and 6–5 in his first two campaigns, Welsh guided the Cavaliers to an 8–2–2 season in 1984 with a 27–24 Peach Bowl win over Purdue representing UVA's first-ever bowl appearance and win.
Many UVA firsts continued under George Welsh:
First-ever unanimous All-America choice—1985, offensive tackle Jim Dombrowski
First 10-win season—1989, 10–3
First ACC Championship—1989
First time ranked No. 1—1990, 4 weeks
First team to beat Florida State in ACC play—1995
In 1985 and 1986, the Cavaliers did not go to bowl games. In 1987, they started 3–4 but would win the last five games to finish 8–4 with an All-American Bowl win over BYU. In 1988, the Cavaliers started 2–4 but would win their last five games to finish 7–4 with no bowl game. The 1989 season was the greatest season in school history, with a record of 10–3 overall, and the winning of the program's first ACC co-championship. Virginia would go on to lose the Florida Citrus Bowl, the first New Year's Day bowl in school history. Virginia, wearing new uniforms for the first time in 10 years and only the second time in head coach George Welsh's tenure, enjoyed one of the finest seasons in their history in 1994.
Most noticeably, the team switched from white helmets with orange and blue stripes down the middle to dark blue helmets with a "V" over two crossed sabres on the sides. The V-Sabre logo was designed by Coach Welsh's son Matt. The rest of the uniform changed from predominantly orange and white to predominantly blue and white. Representing a major athletic facility improvement, the artificial turf at Scott Stadium was removed and replaced with natural grass before the start of the 1995 season. Artificial turf was first installed at Scott Stadium in 1974. David A. Harrison III Field was dedicated September 2, 1995, at Virginia's home opener against William & Mary. In 1995, the Cavaliers won their second ACC title. Citing concerns about his health as a primary reason for his decision, Welsh announced his retirement in a press conference on December 11, 2000, where he said simply "I am now, and forever will be, a Wahoo." Welsh stepped down at Virginia at the age of 67 after establishing himself as the winningest coach in UVA and ACC history. He compiled a 19-year record of 134–86–3 at Virginia, including a conference-record 80 ACC wins. Welsh led the Cavaliers to 12 bowl games and 14 consecutive years of winning at least 7 games.
Al Groh era (2001–2009)
With the retirement of a UVA legend, the Virginia faithful were looking for a new coach who could bring the same success to the team that George Welsh maintained throughout his tenure. After Florida State University's Offensive Coordinator Mark Richt accepted the position as head coach of the University of Georgia, initial speculation centered on former Penn State University Defensive Coordinator Jerry Sandusky, with only Sandusky and Richt being interviewed before, on December 30, 2000, Virginia hired New York Jets head coach and former Virginia player Al Groh. His first year was a rebuilding year with the team going 5–7. Groh then led the Cavaliers to four consecutive winning seasons from 2002 to 2005, including a 3–1 record in bowl games. The 2002 squad saw the breakout season of quarterback Matt Schaub, who led the Cavaliers to a 9–5 season capped by a 48–22 blowout of No. 12West Virginia in the Continental Tire Bowl. The 2003 team faced adversity with an early season injury to Schaub, but the team rallied to finish the year 8–5, including a victory over Pittsburgh in the 2003 Continental Tire Bowl. The 2004 team reached No. 6 in national polls after a 5–0 start, the Cavaliers' highest ranking since 1990, but they lost 36–3 at No. 7 Florida State and finished 8–4 after an upset loss to Fresno State in the MPC Computers Bowl. The 2005 team finished with a 7–5 record, but included Virginia's second-ever victory over Florida State and a win over Minnesota in the Music City Bowl. The 2006 squad's record slipped to 5–7. In 2007, the team went 9–3 for the season, including a 48–0 shutout of the University of Miami in the Hurricanes' last home game in the Orange Bowl Stadium, as well as setting an NCAA record for wins by two points or fewer (five). Gaining an invitation to Jacksonville, Florida, for the Gator Bowl, they subsequently lost 28–31 to Texas Tech. For 2008, the team started with several big losses, but went on to win four games in a row before losing the last four of the season, finishing 5–7. Virginia's 2009 campaign under Groh started with a stunning 26–14 loss to William & Mary of the FCS (formerly I-AA). It was UVA's first loss to a I-AA team since losing to William & Mary 41–37 in 1986. The 2009 team ended 3–9 and Groh was fired following the last game of the season, a loss against rival Virginia Tech.
Mike London era (2010–2015)
Mike London was named head coach of the Cavaliers on December 7, 2009. London, who was previously head coach at the University of Richmond, was an assistant coach under Al Groh from 2001–04 and again from 2006–07. London became one of only 10 black head coaches at the Division I-A level. In his first season with the Cavs, the team went 4–8 overall and 1–7 in conference play. He followed that up with an 8–4 (5–3 ACC) turnaround season, following which he won the ACC Coach of the Year award, after preseason projections had Virginia finishing fifth in the ACC Coastal Division. The 2011 team registered a win at Florida State for the first time in school history and became the first team in FBS history to win games at Miami and Florida State in the same season. The team earned a bid to the 2011 Chick-fil-A Bowl, where they lost to Auburn 43–24. In 2012, the team suffered a disappointing 4–8 season that resulted in the dismissal of four assistant coaches. Prior to the start of the 2013 season, both starting quarterbacks from the year before, Michael Rocco and Phillip Sims, transferred from Virginia, going to Richmond and Winston-Salem State, respectively. The Cavaliers' downward spiral continued in 2013 as the team, now led at quarterback by redshirt sophomore David Watford, finished last in the ACC with a record of 2–10, losing their last nine games of the season. The following year saw marginal improvement under quarterbacks Greyson Lambert and Matt Johns, but went 5–7, including an eleventh-straight loss to Virginia Tech. Athletic director Craig Littlepage chose prior to the end of the season to retain London for 2015, but fans continued to express dissatisfaction with the play-calling of London and his staff, and some calling for London's ouster. After a third 4–8 season in 2015, London resigned as head coach. Perhaps the most damning feature of London's tenure is that he fared 0–12 in Virginia's rivalry games against North Carolina and Virginia Tech.
Bronco Mendenhall era (2016–2021)
BYU head coach Bronco Mendenhall was named head coach of the Cavaliers on December 4, 2015. Mendenhall soon led Virginia to bowl games in his second and third years, including a surprising 28–0 rout of South Carolina in the 2018 Belk Bowl. These were the first consecutive bowl appearances for the program since 2002–2005. Mendenhall also lead the Cavaliers to victory over their arch-rival Hokies in 2019 to break the 15-year losing streak in a game with the most on the line for both teams in nearly a decade, an exciting de facto Coastal Championship Game that sent UVA to the 2019 ACC Championship Game and 2019 Orange Bowl. Mendenhall became the first coach to bring the Commonwealth Cup and Jefferson-Eppes Trophy to Charlottesville at the same time, on the heels of winning his third consecutive South's Oldest Rivalry game. His 2020 and 2021 campaigns did not fare quite as well, with records of 5–5 and 6–6, including 1–3 against Virginia's rivals North Carolina and Virginia Tech. On December 2, 2021, Mendenhall announced that he would step down as head coach following the Cavaliers' 2021 bowl game. The decision was entirely Mendenhall's choice; he was not forced out and was not leaving for another job. 247Sports reported the Virginia opening would project as one of the "more attractive jobs" on the market, considering "strong in-state recruiting grounds" and it being situated in a "wide-open Power Five conference."
Tony Elliott era (2022–present)
Tony Elliott was named the head coach of the Cavaliers on December 10, 2021. Elliott previously served as the assistant head coach, offensive coordinator and tight ends coach at Clemson University. Elliott signed a six-year contract with UVA worth $25.93 million excluding incentives.
On November 13, 2022, three members of the team were shot and killed in a shooting. The suspected gunman was a former high school running back who was a member of the Virginia team for one season in 2018, but due to a lingering injury was unable to practice with the team.
Conference affiliations
Independent (1888–1899)
Eastern Virginia Intercollegiate Athletic Association (1900–1905)
Independent (1906–1911)
South Atlantic Intercollegiate Athletic Association (1912–1921)
Southern Conference (1921–1937)
Independent (1937–1953)
Atlantic Coast Conference (1953–present)
Coastal Division (2005–2022)
Championships
Conference championships
The Cavaliers have won numerous conference championships, although the number is up for dispute. In the latter part of the 19th century, conferences were not prominent as much as independent football play was. Retroactively, a list of independent southern football champions has listed Virginia as champion of the South on an independent level 12 times from 1889 to 1908. The forming of the South Atlantic Intercollegiate Athletic Association has been disputed to either have taken place in either 1908 or 1911.
† Co-championship.
Division championships
Head coaches
Virginia has had 42 head coaches since organized football began in 1888. Tony Elliot has been the current head coach since 2022.
Stadiums
1888–1912 Madison Hall Field
1913–1930 Lambeth Field
1931–present Scott Stadium
Bowl games
Virginia has been invited to the Gator, Peach, Citrus, Sugar, and Orange Bowls, among others. The Cavaliers' most recent bowl appearance was in the 2019 Orange Bowl against the Florida Gators. The program's all-time bowl record is 8–13 through the 2019 season. The team has appeared in four consecutive bowl games twice in its history, in 1994–1996 and 2002–2005. Virginia is the winningest team in Duke's Mayo Bowl history with a 3–0 record after its victories in 2002, 2003, and 2018. Virginia also holds the record for largest margin of victory in that bowl after its 28–0 shutout victory over South Carolina at Bank of America Stadium in 2018.
Final poll rankings
Virginia rankings in final AP and Coaches polls.
Rivalries
Virginia Tech
Virginia and Virginia Tech first met in 1895 and have played annually since 1970, with the Commonwealth Cup awarded to the victor since 1996. Virginia last won the Cup in 2019. That win ended a 15-game losing streak in the rivalry in a de facto Coastal Championship Game that sent UVA to the 2019 Orange Bowl, the first New Year's Six bowl for either of the two programs. Virginia Tech leads the series 60–38–5 through the 2021 season.
North Carolina
The teams have played every year since 1919 and began playing in 1895, in what is by far the longest series in the ACC. The name of the rivalry stems from the fact that the two programs were regarded as the best of the South between 1895 and 1910, winning the vast majority of southern championships during that era. The game was played on Thanksgiving Day through 1950, and a sitting President of the United States (Calvin Coolidge) made the multi-hour trip to Charlottesville on Thanksgiving to view the game in 1928. North Carolina leads the series 63–59–4 per Virginia records, though UVA has held the upper hand, 24–14–1, since 1983.
Florida State
The two teams play for the Jefferson–Eppes Trophy. The trophy was created on the suggestion of former FSU President Sandy D'Alemberte, after Virginia became the first ACC program to defeat Florida State on November 2, 1995. To that point, the Seminoles had run up a perfect 29–0 record through their first 3½ years of Atlantic Coast Conference play. Florida State leads 14–4 through the 2019 season. In recent decades the games are sporadic but competitive: since 2005, Virginia is 3–2 against Florida State (as of 2019). Virginia last won the Trophy in 2019 and holds it currently.
Maryland
Virginia and Maryland were ACC "permanent rivals" from 2005–2013 under the two-division system. Many athletes and students on both sides come from the Washington Metropolitan Area. Maryland leads the series 44–32–2, though UVA has held the upper hand, 15–7, since 1991.
Individual honors
Major awards
Maxwell Award
Bill Dudley—1941
Campbell/Draddy Trophy
Thomas D. Burns—1993
Micah Kiser—2017
John Mackey Award
Heath Miller—2004
Ted Hendricks Award
Chris Long—2007
Bobby Dodd Coach of the Year Award
George Welsh—1991
ACC Coach of the Year
Bill Elias—1961
George Blackburn—1968
George Welsh—1983, 1984, 1991, 1995
Al Groh—2002, 2007
Mike London—2011
ACC Player of the Year
Bob Davis—1966
Frank Quayle—1968
Barry Word—1985
Shawn Moore—1989, 1990
Matt Blundin—1991
Tiki Barber—1996
Matt Schaub—2002
ACC Rookie of the Year
John Ford—1984
Ronde Barber—1994
ACC Defensive Player of the Year
Anthony Poindexter—1998
Chris Long—2007
First Team All Americans
Jim Bakhtiar, FB, 1957
Will Brice, P, 1995
Ahmad Brooks, LB, 2004
Elton Brown, OG, 2004
Mark Dixon, OG, 1993
Jim Dombrowski, OT, 1985
Bill Dudley, HB, 1941
Percy Ellsworth, DB, 1995
D'Brickashaw Ferguson, OT, 2005
Thomas Jones, HB, 1999
Patrick Kerney, DE, 1998
Noel LaMontagne, OT/OG, 1999
Chris Long, DE 2007
Eugene Mayer, HB 1915
Heath Miller, TE, 2004
Herman Moore, WR, 1990
Shawn Moore, QB, 1990
Joe Palumbo, MG, 1951
John Papit, FB, 1949
Anthony Poindexter, DB, 1997 & 1998
Ray Roberts, OT, 1991
Ray Savage, DE/OLB, 1989
Tom Scott, DE, 1952
Chris Slade, DE, 1991 & 1992
John St. Clair, C, 1999
First Team All Southerns
H. T. Summersgill, End, 1898
John Loyd, T, 1898, 1899, & 1900
James Davis, G, 1898
William Choice, G, 1899 & 1900
Harry Gerstle, HB, 1899
Robert M. Coleman, FB, 1899, 1901
Alexis Hobson, End, 1900
Virginius Dabney, HB, 1900
Christie Benet, T, 1901
Buck Harris, G, 1901
Ed Tutwiler, QB, 1901
Bradley Walker, FB, 1901
Thomas Bronston, End, 1902
Henry Johnson, T, 1902 & 1903
Walter Council, T, 1902, 1903, & 1904
John Pollard, QB, 1902 & 1903
Clyde Conner, G, 1903
Branch Johnson, G, 1904
Hammond Johnson, HB, 1904 & 1905
Oscar Randolph, QB, 1906
Henry Cabell Maddux, Jr, End, 1907
William Gloth, C, 1907 & 1908
Sam Honaker, QB, 1907 & 1908
Carlton Elliott, End, 1908 & 1909
B. R. Cecil, T, 1909
Forest Stanton, HB, 1909
Kemper Yancey, FB, 1909
Rube Barker, T, 1914
Harris Coleman, G, 1914
Eugene Mayer, HB, 1914 & 1915
Charles R. Fenwick, T, 1922
G. B. Arnold, HB, 1922
Charles Mackall, G, 1926
Retired numbers
The Cavaliers have retired 6 numbers to date.
Notes:
1 Posthumous honour.
Retired jerseys
The University of Virginia's athletic department has issued the following statement distinguishing "retired jerseys" from "retired numbers": "Jersey retirement honors Virginia players who have significantly impacted the program. Individuals recognized in this way will have their jerseys retired, but their number will remain active."
College Football Hall of Famers
Bill Dudley, HB, inducted in 1956
Earle "Greasy" Neale, head coach, inducted in 1967
Tom Scott, DE, inducted in 1979
Frank Murray, head coach, inducted in 1983
Joe Palumbo, MG, inducted in 1999
George Welsh, head coach, inducted in 2004
Jim Dombrowski, OG, inducted in 2008
Anthony Poindexter, S, inducted in 2020
NFL Hall of Famers
Bill Dudley, HB, inducted December 6, 1966
Earle "Greasy" Neale, head coach, inducted September 13, 1969
Henry Jordan, T, inducted July 29, 1995
Ronde Barber, CB, inducted August 5, 2023
Memorable games
1915: Virginia 10 – Yale 0
Betting was heavy on Yale for a 1915 game that ranked as the biggest all-time win at that stage of Virginia's history. No Southern team had ever defeated the Ivy League power until Virginia—led by quarterback Norborne Berkeley and Buck Mayer—won 10–0 in New Haven.
1990: Virginia 20 – Clemson 7
Prior to the arrival of George Welsh, Clemson dominated the series against Virginia. The Tigers had not lost a single game to the Cavaliers and most games were blowouts. Former Clemson coach Frank Howard had referred to the Cavaliers as "White Meat" back in the 1960s and they hadn't lost to Virginia since. Despite Welsh's success, the Tigers' record against the Cavaliers stood at 29–0 after Clemson defeated the 1989 Virginia team that captured the ACC co-championship. Behind a high-powered offense with Shawn Moore, Herman Moore, and Terry Kirby and a strong defensive effort led by Chris Slade, the Cavaliers finally defeated Clemson, which was ranked in the top ten at the time, in the second game of the 1990 season. The win propelled the Cavaliers' rise in the polls, which culminated in a number-one ranking in late October.
1995: Virginia 33 – Florida State 28
UVa managed to win its share of close games as the 1995 season unfolded, including a 33–28 upset victory over second-ranked and previously unbeaten Florida State. Playing on national television in the first-ever Thursday night game in Charlottesville, Virginia stopped the Seminoles at the goal line on the game's final play (in the early morning hours of Friday, November 3, 1995) to preserve the win. With the victory, the Cavaliers ended FSU's four-year, 29-game winning streak against ACC teams since joining the conference in 1992. Florida State became the highest-ranked team to ever fall to the Cavaliers. Virginia and Florida State were later crowned co-ACC champions after finishing the season with identical 7–1 conference records.
1996: Virginia 20 – North Carolina 17
During a generally disappointing 1996 season, the Cavaliers upset the top ten–ranked Tar Heels at Scott Stadium. In the fourth quarter, North Carolina led Virginia 17–3 and, having advanced within the Cavaliers' five-yard line, were about to put the game away. However, Virginia cornerback Antwan Harris intercepted a Tar Heel pass in the end zone and returned it 95 yards for a touchdown. Quarterback Tim Sherman then led the Cavaliers to another ten points, capped by Rafael Garcia's late game field goal, and the defense shut down the demoralized Tar Heels for a stunning 20–17 comeback victory. The defeat cost North Carolina a bid to the Bowl Alliance; coach Mack Brown left UNC for Texas after another highly ranked Tar Heel team in 1997 also failed to receive a Bowl Alliance bid.
1998: Virginia 36 – Virginia Tech 32
Virginia ended the 1998 regular season with a 36–32 victory at Virginia Tech in the greatest comeback in school history. Down 29–7 at the half, the Cavaliers outscored the Hokies 29–3 in the final two quarters. UVA capped its historic rally with a game-winning 47-yard touchdown pass from Aaron Brooks to wide receiver Ahmad Hawkins with 2:01 left to play. As of 2023, this remains UVA's last win in Blacksburg.
2011: Virginia 14 – Florida State 13
Before 2011, Virginia had never won a game against Florida State in Tallahassee. The Cavaliers' record against the Seminoles stood at 2–14 overall and 0–8 in Doak Campbell Stadium. Virginia running back Kevin Parks ran for a touchdown with 1:16 remaining in the game, giving Virginia the lead. Florida State kicker Dustin Hopkins then missed a 42-yard field goal as time ran out, giving the Cavaliers their first win in Tallahassee in school history.
2019: Virginia 39 – Virginia Tech 30
Virginia lost 15 consecutive games to Virginia Tech from 2004 through 2018. Entering the 2019 contest, the Cavaliers and Hokies had identical records of 5–2 in ACC play and 8–3 overall, making the game a de facto ACC Coastal Division championship. Virginia quarterback Bryce Perkins had a total of 475 yards and three touchdowns, while kicker Brian Delaney kicked two late field goals to give Virginia a tenuous 33–30 lead. With just over a minute left, Virginia sacked the Hokies' Hendon Hooker three consecutive times. On the third sack, Hooker fumbled the ball, which was recovered by defensive lineman Eli Hanback in the VT end zone for a touchdown to seal the win, end the losing streak, and send Virginia to its first ever ACC championship game. Virginia went on to make its first Orange Bowl and also its first New Year's Six bowl game appearance.
Current NFL players
As of December 2, 2022.
Oday Aboushi—OT, Los Angeles Rams
Kurt Benkert—QB
Maurice Canady—CB
Anthony Harris—S, Philadelphia Eagles
Darius Jennings—WR
Rodney McLeod—S, Indianapolis Colts
Taquan Mizzell—RB, B.C. Lions
Morgan Moses—OT, Baltimore Ravens
LaRoy Reynolds—LB
Eric Smith—T, New York Jets
Juan Thornhill–FS, Kansas City Chiefs
Brent Urban—DE, Baltimore Ravens
Joe Reed–WR, Chicago Bears
Bryce Perkins–QB, Los Angeles Rams
Notable former players
Tiki Barber—retired NFL running back, New York Giants
Ronde Barber—retired NFL defensive back, Tampa Bay Buccaneers
Aaron Brooks——retired NFL quarterback, New Orleans Saints and Oakland Raiders
Tyrone Davis—retired NFL wide receiver/tight end, New York Jets and Green Bay Packers
James Farrior— retired NFL linebacker, New York Jets and Pittsburgh Steelers
Jim Grobe—head coach, Wake Forest Demon Deacons football
Thomas Jones—retired NFL running back, Arizona Cardinals, Tampa Bay Buccaneers, Chicago Bears, New York Jets and Kansas City Chiefs
Patrick Kerney—retired NFL defensive end, Atlanta Falcons and Seattle Seahawks
Chris Long-retired NFL defensive end, St. Louis Rams, New England Patriots and Philadelphia Eagles, Walter Payton Man of Year Award
Don Majkowski—retired NFL quarterback
Herman Moore—retired NFL wide receiver, Detroit Lions and New York Giants
Wali Rainer—retired NFL linebacker
Terrence Wilkins—retired NFL and CFL wide receiver, Indianapolis Colts
Derek Dooley—former head coach, University of Tennessee Volunteers football
Jon Tenuta—former defensive coordinator, University of Virginia Cavaliers football
Heath Miller—retired NFL tight end, Pittsburgh Steelers
D'Brickashaw Ferguson – retired NFL Left Tackle, New York Jets
Future opponents
Notes
References
External links
American football teams established in 1888
1888 establishments in Virginia
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\BigtableAdmin;
class GoogleBigtableAdminV2TypeBytesEncoding extends \Google\Model
{
protected $rawType = GoogleBigtableAdminV2TypeBytesEncodingRaw::class;
protected $rawDataType = '';
/**
* @param GoogleBigtableAdminV2TypeBytesEncodingRaw
*/
public function setRaw(GoogleBigtableAdminV2TypeBytesEncodingRaw $raw)
{
$this->raw = $raw;
}
/**
* @return GoogleBigtableAdminV2TypeBytesEncodingRaw
*/
public function getRaw()
{
return $this->raw;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleBigtableAdminV2TypeBytesEncoding::class, your_sha256_hashing');
```
|
The Moulton family were silversmiths in and around Newbury, Massachusetts that extended across six generations for two hundred years. They are sometimes claimed to have the longest continuous span of silversmithing of any American family.
William Moulton (1615-1664) immigrated in 1637 with his two brothers John and Thomas from Norfolk, England, and settled on Winnacunnet Road in Hampton, New Hampshire.
William Moulton II (1664-1732) left the family farm in Hampton in 1682, at age 18, and settled near the Merrimack River in a section of Newbury, Massachusetts that would later become Newburyport. By some accounts, he was the first in six generations of silversmiths. While he did buy and sell silver goods, he was primarily a general trader. His son Joseph Moulton (1694-1750) has also been proposed as the first Moulton to work in silver, but he was actually a blacksmith by trade, though he likely turned his hand to whatever came through his shop door. Although most of the Moultons carried on their craft in Newburyport, some went to other communities where they established themselves as silversmiths.
William Moulton III (1720–1793) was the first verified silversmith. He worked from 1742 to 1762 as a silversmith in Newburyport, Massachusetts, and from 1762 to 1788 in Hampstead, New Hampshire. He then moved in a covered wagon to Marietta, Ohio, carrying his silversmith's tools with him. He was one of the forty-eight pioneers to settle in the Northwest Territory, and is considered one of its founders.
Joseph Moulton (1744–1816), his son and the fourth in line, worked from about 1764 to 1810 as a silversmith in Newburyport, with home and shop on State Street. He had four sons who were silversmiths. 1) Ebenezer moved to Boston. 2) Enoch moved to Portland, Maine, each of them continuing their crafts in their respective places. 3) Abel inherited his father's business in Newburyport.
William Moulton IV (1772–1861) was the fifth in line of the Moulton chain. He worked from 1795 to 1845 as a silversmith in Newburyport, Massachusetts, establishing his own shop there. In addition to supplying church silver and other vessels, he made jewelry in his shop on Merrimack Street. William had two apprentices, Anthony Francis Towle and William P. Jones.
Joseph Moulton (1814–1903), his son and the sixth and final in line, in 1857 sold the silver business he inherited to his father's two apprentices, Anthony Francis Towle and William P. Jones (who were also his apprentices), to form Towle & Jones, Co. In 1873, the son of Anthony Francis Towle, Edward Bass Towle, was added to the business, and the name was changed to A.F. Towle & Son. It was in business through 1902, at which point their dies were purchased by Rogers, Lunt and Bowlen, who were later to become Lunt Silversmiths.
A number of examples of early silver items produced by the Moulton family are in the Strawbery Banke Museum in Portsmouth, New Hampshire.
References
"Towle Silversmiths", SterlingTowle.
"The Moulton & Towle Silversmiths", Lane Memorial Library.
See also
Lunt Silversmiths
Towle Silversmiths
American silversmiths
|
```chuck
/*++
version 3. Alternative licensing terms are available. Contact
info@minocacorp.com for details. See the LICENSE file at the root of this
project for complete licensing information.
Module Name:
Boot Configuration Library
Abstract:
This module implements the Boot Configuration Library.
Author:
Evan Green 20-Feb-2014
Environment:
Any
--*/
from menv import mconfig, kernelLibrary, staticLibrary;
function build() {
var arch = mconfig.arch;
var bconfLib;
var bconfLib32;
var buildBconfLib;
var entries;
var sources;
sources = [
"bconf.c"
];
bconfLib = {
"label": "bconf",
"inputs": sources,
};
buildBconfLib = {
"label": "build_bconf",
"output": "bconf",
"inputs": sources,
"build": true,
"prefix": "build"
};
entries = kernelLibrary(bconfLib);
entries += staticLibrary(buildBconfLib);
if (arch == "x64") {
bconfLib32 = {
"label": "bconf32",
"inputs": sources,
"prefix": "x6432",
"sources_config": {"CPPFLAGS": "-m32"}
};
entries += kernelLibrary(bconfLib32);
}
return entries;
}
```
|
The North American Rotorwerks Pitbull II is an American autogyro, designed and produced by North American Rotorwerks of Tukwila, Washington. When it was available the aircraft was supplied as a kit for amateur construction, but by 2013 production had been suspended.
Design and development
The Pitbull II is a two-seat development of the North American Rotorwerks Pitbull Ultralight. It was designed to comply with the US Experimental - Amateur-built rules. It features a single main rotor, a two-seats in side-by-side configuration open cockpit with a windshield, conventional landing gear and a four-cylinder, air and liquid-cooled, four-stroke, dual-ignition Rotax 912S engine in tractor configuration. The Subaru EA-81 and Subaru EA-82 auto-conversion powerplants are optional.
The aircraft's rotor has a diameter and the cockpit has a width. The tailplane is strut-braced and an electric pre-rotator is standard. A small baggage compartment with a capacity of and a volume of is fitted. The recommended power range is . With its empty weight of and a gross weight of , the useful load is . Construction time from the factory assembly kit is estimated at 100 hours.
The aircraft is intended to resemble the autogyros of the 1930s and as such it uses a radial engine-style round cowling, rounded rudder, barrel-shaped fuselage and other antique styling details.
Specifications (Pitbull II)
References
External links
2000s United States sport aircraft
Homebuilt aircraft
Single-engined tractor autogyros
|
```javascript
/* your_sha256_hash--------------
*
* # Buttons extension for Datatables. Init examples
*
* Specific JS code additions for datatable_extension_buttons_init.html page
*
* Version: 1.0
* Latest update: Nov 9, 2015
*
* your_sha256_hash------------ */
$(function() {
// Table setup
// ------------------------------
// Setting datatable defaults
$.extend( $.fn.dataTable.defaults, {
autoWidth: false,
dom: '<"datatable-header"fBl><"datatable-scroll-wrap"t><"datatable-footer"ip>',
language: {
search: '<span>Filter:</span> _INPUT_',
lengthMenu: '<span>Show:</span> _MENU_',
paginate: { 'first': 'First', 'last': 'Last', 'next': '→', 'previous': '←' }
}
});
// Basic initialization
//$('.datatable-button-init-basic').DataTable({
// buttons: {
// dom: {
// button: {
// className: 'btn btn-default'
// }
// },
// buttons: [
// {extend: 'copy'},
// {extend: 'csv'},
// {extend: 'excel'},
// {extend: 'pdf'},
// {extend: 'print'}
// ]
// }
//});
// Custom button
$('.datatable-button-init-custom').DataTable({
buttons: [
{
text: 'Custom button',
className: 'btn bg-teal-400',
action: function(e, dt, node, config) {
swal({
title: "Good job!",
text: "Custom button activated",
confirmButtonColor: "#66BB6A",
type: "success"
});
}
}
]
});
// Buttons collection
//$('.datatable-button-init-collection').DataTable({
// buttons: [
// {
// extend: 'collection',
// text: '<i class="icon-three-bars"></i> <span class="caret"></span>',
// className: 'btn bg-blue btn-icon',
// buttons: [
// {
// text: 'Toggle first name',
// action: function ( e, dt, node, config ) {
// dt.column( 0 ).visible( ! dt.column( 0 ).visible() );
// }
// },
// {
// text: 'Toggle status',
// action: function ( e, dt, node, config ) {
// dt.column( -2 ).visible( ! dt.column( -2 ).visible() );
// }
// }
// ]
// }
// ]
//});
//
//
//// Page length
//$('.datatable-button-init-length').DataTable({
// dom: '<"datatable-header"fB><"datatable-scroll-wrap"t><"datatable-footer"ip>',
// lengthMenu: [
// [ 10, 25, 50, -1 ],
// [ '10 rows', '25 rows', '50 rows', 'Show all' ]
// ],
// buttons: [
// {
// extend: 'pageLength',
// className: 'btn bg-slate-600'
// }
// ]
//});
// External table additions
// ------------------------------
// Add placeholder to the datatable filter option
$('.dataTables_filter input[type=search]').attr('placeholder','Type to filter...');
// Enable Select2 select for the length option
$('.dataTables_length select').select2({
minimumResultsForSearch: Infinity,
width: 'auto'
});
});
```
|
```c++
// [AsmJit]
// Complete JIT Assembler for C++ Language.
//
// Zlib - See COPYING file in this package.
#define ASMJIT_EXPORTS
// [Dependencies - AsmJit]
#include "../core/assert.h"
// [Api-Begin]
#include "../core/apibegin.h"
// helpers
namespace AsmJit {
// ============================================================================
// [AsmJit::Assert]
// ============================================================================
void assertionFailure(const char* file, int line, const char* exp)
{
fprintf(stderr,
"*** ASSERTION FAILURE at %s (line %d)\n"
"*** %s\n", file, line, exp);
exit(1);
}
} // AsmJit namespace
// [Api-End]
#include "../core/apiend.h"
```
|
Schneider Trophy aircraft racing seaplanes which contested for the Schneider Trophy between 1913 and 1931.
See also
Coupe Deutsch de la Meurthe
Gordon Bennett Trophy
Pulitzer Trophy Races
List of flying boats and floatplanes
List of racing aircraft
References
Notes
Citations
Bibliography
Schneider Trophy
Lists of aircraft by role
|
Gavdaneh-ye Ali Reza (, also Romanized as Gāvdāneh-ye ʿAlī Rez̤ā; also known as Gāvdāneh) is a village in Doshman Ziari Rural District, in the Central District of Kohgiluyeh County, Kohgiluyeh and Boyer-Ahmad Province, Iran. At the 2006 census, its population was 198, in 32 families.
References
Populated places in Kohgiluyeh County
|
```javascript
const connect = require('connect')
const gulp = require('gulp')
const http = require('http')
const mochaPhantomJS = require('gulp-mocha-phantomjs')
const path = require('path')
const serveStatic = require('serve-static')
let parentServer
let childServer
gulp.task('parent-test-server', (done) => {
parentServer = http
.createServer(
connect()
.use(serveStatic('.'))
.use(serveStatic('test/acceptance/fixtures'))
)
.listen(9000, done)
})
gulp.task('child-test-server', (done) => {
childServer = http
.createServer(
connect()
.use(serveStatic('.'))
.use(serveStatic('test/acceptance/fixtures'))
)
.listen(9001, done)
})
gulp.task('do-test', () => {
const stream = mochaPhantomJS({
phantomjs: {
useColors: true
}
})
stream.write({ path: 'path_to_url })
stream.end()
return stream
})
gulp.task('finish-test', (done) => {
parentServer.close()
childServer.close()
done()
})
gulp.task('test', gulp.series('parent-test-server', 'child-test-server', 'do-test', 'finish-test'))
```
|
```php
<?php
namespace arrays\lazy_copy_003;
// causes lazy copy:
function foo($x)
{
echo "keyed aliased foreach enumeration:";
foreach ($x as &$v)
{
if (!is_array($v))
{
echo "- $v\n";
$v = "dummy$v";
}
}
return $x;
}
function bar($x)
{
echo "array enumeration using current(), next(), reset(), end():";
while ($val = current($x))
{
if (!is_array($val))
echo "- $val\n";
next($x);
}
$x[] = "end";// ensure the end is not array, and perform lazy copy
echo "first: " . reset($x);
echo "end: " . end($x);
return $x;
}
function test($x)
{
$x = foo($x);
$x = bar($x);
return $x;
}
$arr = array( 1,2,3, array( 4,5,6, array( 7,8,9 ) ) );
test( $arr );
print_r( $arr );
```
|
Aurelio Scagnellato (26 October 1930 – 10 July 2008) was an Italian football defender and managing director. He is known for his time with the successful Padova side during the late 1950s and early 1960s.
Career
Scagnellato spent his entire professional career with Padova, and was part of the cub's famous defensive line under manager Rocco – nicknamed The Panzer of Rocco – that contributed decisively to the best ever league placement in the history of the Venetian club, a third-place finish during the 1957–58 Serie A season.
With 349 appearances, he is the player with the most matches played in the history of Padova.
After retiring from football, he took on a series of technical and managerial positions at the club, and also held the position of the team's Sporting Director.
Career statistics
External links
Profile at Enciclopediadelcalcio.it
1930 births
2008 deaths
Italian men's footballers
Calcio Padova players
Serie A players
Serie B players
Italian football managers
Men's association football defenders
Sportspeople from South Tyrol
Footballers from Trentino-Alto Adige/Südtirol
|
Stypin is a village in the administrative district of Gmina Babiak, within Koło County, Greater Poland Voivodeship, in west-central Poland. It lies approximately east of Babiak, north-east of Koło, and east of the regional capital Poznań.
References
Villages in Koło County
|
Thomas Richardson, 2nd Lord Cramond (19 June 162716 May 1674) of Honingham Hall, Norfolk was an English politician who sat in the House of Commons from 1660 to 1674.
Richardson was the son of Sir Thomas Richardson and his wife Elizabeth Hewitt daughter of Sir William Hewitt, of Pishiobury, Hertfordshire. He was a grandson of Thomas Richardson who was a judge and speaker of the House of Commons. His grandfather's second wife Elizabeth Richardson, 1st Lady Cramond was given the title Lord Cramond which was to go to her stepson. Richardson succeeded to the peerage on the death of Lady Cramond in April 1651 as his father died on 12 March 1645.
In 1660, Richardson was elected Member of Parliament for Norfolk in the Convention Parliament. He was re-elected MP for Norfolk in 1661 for the Cavalier Parliament and sat until his death in 1674.
Richardson died at the age of 46.
Richardson married Anne Gurney, daughter of Sir Richard Gurney, 1st Baronet, of Totteridge, Hertfordshire. His son Henry succeeded to the title. The estate of Honingham had already been sold to Richard Baylie (in 1650).
References
|-
1627 births
1674 deaths
Richardson, Thomas
Richardson, Thomas
Members of the Parliament of England for Norfolk
Lords of Parliament (pre-1707)
|
Red Scaffold Creek is a stream in the U.S. state of South Dakota.
According to tradition, Red Scaffold Creek was named from an incident when two homicide victims were laid at the creek on a red scaffold.
See also
List of rivers of South Dakota
References
Rivers of Meade County, South Dakota
Rivers of Ziebach County, South Dakota
Rivers of South Dakota
|
```html
<!DOCTYPE html>
<html xmlns="path_to_url"><head><title>Sito (owl.Owl_regression.S.Optimise.Algodiff.Builder.Sito)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../../../index.html">owl</a> » <a href="../../../../../index.html">Owl_regression</a> » <a href="../../../../index.html">S</a> » <a href="../../../index.html">Optimise</a> » <a href="../../index.html">Algodiff</a> » <a href="../index.html">Builder</a> » Sito</nav><header class="odoc-preamble"><h1>Module type <code><span>Builder.Sito</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-label"><a href="#val-label" class="anchor"></a><code><span><span class="keyword">val</span> label : string</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ff_f"><a href="#val-ff_f" class="anchor"></a><code><span><span class="keyword">val</span> ff_f : <span><a href="../../A/index.html#type-elt">A.elt</a> <span class="arrow">-></span></span> <a href="../../index.html#type-t">t</a> * <a href="../../index.html#type-t">t</a> * <a href="../../index.html#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ff_arr"><a href="#val-ff_arr" class="anchor"></a><code><span><span class="keyword">val</span> ff_arr : <span><a href="../../A/index.html#type-arr">A.arr</a> <span class="arrow">-></span></span> <a href="../../index.html#type-t">t</a> * <a href="../../index.html#type-t">t</a> * <a href="../../index.html#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-df"><a href="#val-df" class="anchor"></a><code><span><span class="keyword">val</span> df : <span><a href="../../index.html#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../index.html#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../index.html#type-t">t</a> <span class="arrow">-></span></span> <a href="../../index.html#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-dr"><a href="#val-dr" class="anchor"></a><code><span><span class="keyword">val</span> dr :
<span><a href="../../index.html#type-t">t</a> <span class="arrow">-></span></span>
<span><a href="../../index.html#type-t">t</a> <span class="arrow">-></span></span>
<span><span>(<span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span> * <span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span> * <span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span>)</span> <span class="arrow">-></span></span>
<span><span>(<span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span> * <span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span> * <span><a href="../../index.html#type-t">t</a> <span class="xref-unresolved">Stdlib</span>.ref</span>)</span> <span class="arrow">-></span></span>
<a href="../../index.html#type-t">t</a></span></code></div></div></div></body></html>
```
|
```go
package gpu
import (
"encoding/binary"
"math"
"gioui.org/internal/f32"
"gioui.org/internal/stroke"
)
type quadSplitter struct {
bounds f32.Rectangle
contour uint32
d *drawOps
// scratch space used by calls to stroke.SplitCubic
scratch []stroke.QuadSegment
}
func encodeQuadTo(data []byte, meta uint32, from, ctrl, to f32.Point) {
// inlined code:
// encodeVertex(data, meta, -1, 1, from, ctrl, to)
// encodeVertex(data[vertStride:], meta, 1, 1, from, ctrl, to)
// encodeVertex(data[vertStride*2:], meta, -1, -1, from, ctrl, to)
// encodeVertex(data[vertStride*3:], meta, 1, -1, from, ctrl, to)
// this code needs to stay in sync with `vertex.encode`.
bo := binary.LittleEndian
data = data[:vertStride*4]
// encode the main template
bo.PutUint32(data[4:8], meta)
bo.PutUint32(data[8:12], math.Float32bits(from.X))
bo.PutUint32(data[12:16], math.Float32bits(from.Y))
bo.PutUint32(data[16:20], math.Float32bits(ctrl.X))
bo.PutUint32(data[20:24], math.Float32bits(ctrl.Y))
bo.PutUint32(data[24:28], math.Float32bits(to.X))
bo.PutUint32(data[28:32], math.Float32bits(to.Y))
copy(data[vertStride*1:vertStride*2], data[vertStride*0:vertStride*1])
copy(data[vertStride*2:vertStride*3], data[vertStride*0:vertStride*1])
copy(data[vertStride*3:vertStride*4], data[vertStride*0:vertStride*1])
bo.PutUint32(data[vertStride*0:vertStride*0+4], math.Float32bits(nwCorner))
bo.PutUint32(data[vertStride*1:vertStride*1+4], math.Float32bits(neCorner))
bo.PutUint32(data[vertStride*2:vertStride*2+4], math.Float32bits(swCorner))
bo.PutUint32(data[vertStride*3:vertStride*3+4], math.Float32bits(seCorner))
}
const (
nwCorner = 1*0.25 + 0*0.5
neCorner = 1*0.25 + 1*0.5
swCorner = 0*0.25 + 0*0.5
seCorner = 0*0.25 + 1*0.5
)
func encodeVertex(data []byte, meta uint32, cornerx, cornery int16, from, ctrl, to f32.Point) {
var corner float32
if cornerx == 1 {
corner += .5
}
if cornery == 1 {
corner += .25
}
v := vertex{
Corner: corner,
FromX: from.X,
FromY: from.Y,
CtrlX: ctrl.X,
CtrlY: ctrl.Y,
ToX: to.X,
ToY: to.Y,
}
v.encode(data, meta)
}
func (qs *quadSplitter) encodeQuadTo(from, ctrl, to f32.Point) {
data := qs.d.writeVertCache(vertStride * 4)
encodeQuadTo(data, qs.contour, from, ctrl, to)
}
func (qs *quadSplitter) splitAndEncode(quad stroke.QuadSegment) {
cbnd := f32.Rectangle{
Min: quad.From,
Max: quad.To,
}.Canon()
from, ctrl, to := quad.From, quad.Ctrl, quad.To
// If the curve contain areas where a vertical line
// intersects it twice, split the curve in two x monotone
// lower and upper curves. The stencil fragment program
// expects only one intersection per curve.
// Find the t where the derivative in x is 0.
v0 := ctrl.Sub(from)
v1 := to.Sub(ctrl)
d := v0.X - v1.X
// t = v0 / d. Split if t is in ]0;1[.
if v0.X > 0 && d > v0.X || v0.X < 0 && d < v0.X {
t := v0.X / d
ctrl0 := from.Mul(1 - t).Add(ctrl.Mul(t))
ctrl1 := ctrl.Mul(1 - t).Add(to.Mul(t))
mid := ctrl0.Mul(1 - t).Add(ctrl1.Mul(t))
qs.encodeQuadTo(from, ctrl0, mid)
qs.encodeQuadTo(mid, ctrl1, to)
if mid.X > cbnd.Max.X {
cbnd.Max.X = mid.X
}
if mid.X < cbnd.Min.X {
cbnd.Min.X = mid.X
}
} else {
qs.encodeQuadTo(from, ctrl, to)
}
// Find the y extremum, if any.
d = v0.Y - v1.Y
if v0.Y > 0 && d > v0.Y || v0.Y < 0 && d < v0.Y {
t := v0.Y / d
y := (1-t)*(1-t)*from.Y + 2*(1-t)*t*ctrl.Y + t*t*to.Y
if y > cbnd.Max.Y {
cbnd.Max.Y = y
}
if y < cbnd.Min.Y {
cbnd.Min.Y = y
}
}
qs.bounds = unionRect(qs.bounds, cbnd)
}
// Union is like f32.Rectangle.Union but ignores empty rectangles.
func unionRect(r, s f32.Rectangle) f32.Rectangle {
if r.Min.X > s.Min.X {
r.Min.X = s.Min.X
}
if r.Min.Y > s.Min.Y {
r.Min.Y = s.Min.Y
}
if r.Max.X < s.Max.X {
r.Max.X = s.Max.X
}
if r.Max.Y < s.Max.Y {
r.Max.Y = s.Max.Y
}
return r
}
```
|
```java
/*******************************************************************************
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Contributors:
* Markus Alexander Kuppe - initial API and implementation
******************************************************************************/
package tlc2.tool;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import tlc2.output.EC;
import tlc2.output.EC.ExitStatus;
import tlc2.tool.liveness.ModelCheckerTestCase;
public class Github696bTest extends ModelCheckerTestCase {
public Github696bTest() {
super("Github696b", ExitStatus.ERROR);
}
@Test
public void testSpec() {
assertTrue(recorder.recorded(EC.TLC_FINISHED));
assertTrue(recorder.recordedWithStringValues(EC.GENERAL,
"TLC threw an unexpected exception.\n"
+ "This was probably caused by an error in the spec or model.\n"
+ "See the User Output or TLC Console for clues to what happened.\n"
+ "The exception was a java.lang.RuntimeException\n"
+ ": Attempted to compare the differently-typed model values B_a and A_a"));
}
}
```
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package openvpn
import (
"fmt"
"net"
"strings"
kubermaticv1 "k8c.io/kubermatic/v2/pkg/apis/kubermatic/v1"
"k8c.io/kubermatic/v2/pkg/resources"
"k8c.io/reconciler/pkg/reconciling"
corev1 "k8s.io/api/core/v1"
)
type serverClientConfigsData interface {
Cluster() *kubermaticv1.Cluster
NodeAccessNetwork() string
}
// ServerClientConfigsConfigMapReconciler returns a ConfigMap containing the ClientConfig for the OpenVPN server. It lives inside the seed-cluster.
func ServerClientConfigsConfigMapReconciler(data serverClientConfigsData) reconciling.NamedConfigMapReconcilerFactory {
return func() (string, reconciling.ConfigMapReconciler) {
return resources.OpenVPNClientConfigsConfigMapName, func(cm *corev1.ConfigMap) (*corev1.ConfigMap, error) {
cm.Labels = resources.BaseAppLabels(name, nil)
var iroutes []string
// iroute for pod network
if len(data.Cluster().Spec.ClusterNetwork.Pods.CIDRBlocks) < 1 {
return nil, fmt.Errorf("cluster.Spec.ClusterNetwork.Pods.CIDRBlocks must contain at least one entry")
}
_, podNet, err := net.ParseCIDR(data.Cluster().Spec.ClusterNetwork.Pods.CIDRBlocks[0])
if err != nil {
return nil, err
}
iroutes = append(iroutes, fmt.Sprintf("iroute %s %s",
podNet.IP.String(),
net.IP(podNet.Mask).String()))
// iroute for service network
if len(data.Cluster().Spec.ClusterNetwork.Services.CIDRBlocks) < 1 {
return nil, fmt.Errorf("cluster.Spec.ClusterNetwork.Services.CIDRBlocks must contain at least one entry")
}
_, serviceNet, err := net.ParseCIDR(data.Cluster().Spec.ClusterNetwork.Services.CIDRBlocks[0])
if err != nil {
return nil, err
}
iroutes = append(iroutes, fmt.Sprintf("iroute %s %s",
serviceNet.IP.String(),
net.IP(serviceNet.Mask).String()))
_, nodeAccessNetwork, err := net.ParseCIDR(data.NodeAccessNetwork())
if err != nil {
return nil, fmt.Errorf("failed to parse node access network %s: %w", data.NodeAccessNetwork(), err)
}
iroutes = append(iroutes, fmt.Sprintf("iroute %s %s",
nodeAccessNetwork.IP.String(),
net.IP(nodeAccessNetwork.Mask).String()))
if cm.Data == nil {
cm.Data = map[string]string{}
}
// trailing newline
iroutes = append(iroutes, "")
cm.Data["user-cluster-client"] = strings.Join(iroutes, "\n")
return cm, nil
}
}
}
```
|
Shred is a 2008 snowboarding comedy film starring Tom Green and Dave England, that was filmed at Big White Ski Resort and Silver Star Mountain Resort, two ski resorts in British Columbia, Canada.
The film is followed by a sequel entitled, Revenge of the Boarding School Dropouts (2009).
Plot
Shred is a motion picture that tells the story of two washed up pro snowboarders from the 1990s named Max (Dave England) and Eddy (Jason Bothe) who attempt to cash in on the fantastic growth of the sport by starting their own snowboard camp. Hoping to recapture their former glory, they begin by sharing their wacky wisdom with a group of up and coming young snowboarders. The story takes them from the run down ski hill where they grew up to a major event at one of the biggest resorts in the west.
The pair face off against Kingsley Brown (Tom Green), a deviously sleazy corporate snowboard rep and nemesis to Max and Eddy. With the assistance of his lackey Sphinx (Shane Meier), the underhanded Kingsley sets out to ruin the ambitions of Max and Eddy by any means necessary.
Cast
Tom Green as Kingsley Brown, a corporate snowboard rep
Carlo Marks as Chris James
Dave England as Max Fisher, Kingsley's arch-rival
Jason Bothe as Eddy the Yeti, Max's partner
Amber Borycki as Tracy
Alain Chanoine as Juice
Pascale Hutton as Danielle
Lindsay Maxwell as Lisa
Juan Riedinger as K-Dog, a wannabe snowboarder who tries to join Max and Eddy's team
Kyle Labine as Mikey, K-Dog's best friend and fellow wannabe snowboarder
Shane Meier as Sphinx, Kingsley's right-hand man
Patrick Gilmore as Lennox
Notes
External links
2008 films
2008 comedy films
English-language Canadian films
Canadian skiing films
Canadian sports comedy films
2000s English-language films
2000s Canadian films
|
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cellLink" rowHeight="73" id="qJF-Yc-gKE" customClass="NCShareLinkCell" customModule="Nextcloud" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="322" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qJF-Yc-gKE" id="3Oe-gU-3Nk">
<rect key="frame" x="0.0" y="0.0" width="322" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="qDs-UG-Mn7" userLabel="ImageItem">
<rect key="frame" x="6" y="10" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="8et-YH-T1D"/>
<constraint firstAttribute="width" constant="40" id="GNY-Va-SIJ"/>
</constraints>
<imageReference key="image" image="link.circle.fill" catalog="system" symbolScale="large" variableValue="0.0"/>
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="large"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="OQv-Vf-bvD">
<rect key="frame" x="242" y="20" width="70" height="20"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xaz-vY-Jzu" userLabel="ButtonCopy">
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="0JR-eM-oir"/>
<constraint firstAttribute="height" constant="20" id="HVo-ht-9m6"/>
</constraints>
<state key="normal">
<imageReference key="image" image="doc.on.doc" catalog="system" renderingMode="hierarchical">
<hierarchicalColors>
<color systemColor="labelColor"/>
<color systemColor="secondaryLabelColor"/>
<color systemColor="tertiaryLabelColor"/>
</hierarchicalColors>
</imageReference>
</state>
<connections>
<action selector="touchUpCopy:" destination="qJF-Yc-gKE" eventType="touchUpInside" id="s3f-6n-cKF"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="J1z-RG-U4A" userLabel="ButtonMenu">
<rect key="frame" x="50" y="0.0" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="G48-LB-BsD"/>
<constraint firstAttribute="width" constant="20" id="vLI-cJ-Jqx"/>
</constraints>
<state key="normal">
<imageReference key="image" image="ellipsis" catalog="system" renderingMode="hierarchical">
<hierarchicalColors>
<color systemColor="labelColor"/>
<color systemColor="secondaryLabelColor"/>
<color systemColor="tertiaryLabelColor"/>
</hierarchicalColors>
</imageReference>
</state>
<connections>
<action selector="touchUpMenu:" destination="qJF-Yc-gKE" eventType="touchUpInside" id="hFx-Ib-xay"/>
</connections>
</button>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" baselineRelativeArrangement="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wxr-1B-Czy">
<rect key="frame" x="54" y="0.0" width="173" height="56"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share link" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="otH-mT-7Z4" userLabel="labelTitle">
<rect key="frame" x="0.0" y="0.0" width="173" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" verticalCompressionResistancePriority="245" text="Only works for users with access to this file/folder" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WJj-9P-3bn">
<rect key="frame" x="0.0" y="24" width="173" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="OQv-Vf-bvD" firstAttribute="leading" secondItem="Wxr-1B-Czy" secondAttribute="trailing" constant="15" id="8QW-n0-4lO"/>
<constraint firstItem="qDs-UG-Mn7" firstAttribute="leading" secondItem="3Oe-gU-3Nk" secondAttribute="leading" constant="6" id="KOm-wo-CBa"/>
<constraint firstAttribute="bottom" secondItem="Wxr-1B-Czy" secondAttribute="bottom" constant="4" id="MM0-9i-BpF"/>
<constraint firstAttribute="trailing" secondItem="OQv-Vf-bvD" secondAttribute="trailing" constant="10" id="W3b-ww-vbQ"/>
<constraint firstItem="qDs-UG-Mn7" firstAttribute="centerY" secondItem="3Oe-gU-3Nk" secondAttribute="centerY" id="ZrD-Aw-xkx"/>
<constraint firstItem="OQv-Vf-bvD" firstAttribute="centerY" secondItem="3Oe-gU-3Nk" secondAttribute="centerY" id="eLc-gk-xAr"/>
<constraint firstItem="Wxr-1B-Czy" firstAttribute="leading" secondItem="qDs-UG-Mn7" secondAttribute="trailing" constant="8" id="nXI-b3-EJM"/>
<constraint firstItem="Wxr-1B-Czy" firstAttribute="top" secondItem="3Oe-gU-3Nk" secondAttribute="top" id="vxe-9X-O1f"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="copyButton" destination="xaz-vY-Jzu" id="pMt-Zu-ORX"/>
<outlet property="descriptionLabel" destination="WJj-9P-3bn" id="QC7-SX-O3M"/>
<outlet property="imageItem" destination="qDs-UG-Mn7" id="jxL-r7-BVs"/>
<outlet property="labelTitle" destination="otH-mT-7Z4" id="f9z-Oa-OiR"/>
<outlet property="menuButton" destination="J1z-RG-U4A" id="VCC-y1-LRK"/>
</connections>
<point key="canvasLocation" x="-124.8" y="268.51574212893553"/>
</tableViewCell>
</objects>
<resources>
<image name="doc.on.doc" catalog="system" width="116" height="128"/>
<image name="ellipsis" catalog="system" width="128" height="37"/>
<image name="link.circle.fill" catalog="system" width="128" height="123"/>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="secondaryLabelColor">
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="tertiaryLabelColor">
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.29803921570000003" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
```
|
```ruby
class Sbjson < Formula
desc "JSON CLI parser & reformatter based on SBJson v5"
homepage "path_to_url"
url "path_to_url"
sha256 your_sha256_hash
license "BSD-3-Clause"
head "path_to_url", branch: "trunk"
bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: your_sha256_hash
sha256 cellar: :any_skip_relocation, arm64_ventura: your_sha256_hash
sha256 cellar: :any_skip_relocation, arm64_monterey: your_sha256_hash
sha256 cellar: :any_skip_relocation, arm64_big_sur: your_sha256_hash
sha256 cellar: :any_skip_relocation, sonoma: your_sha256_hash
sha256 cellar: :any_skip_relocation, ventura: your_sha256_hash
sha256 cellar: :any_skip_relocation, monterey: your_sha256_hash
sha256 cellar: :any_skip_relocation, big_sur: your_sha256_hash
sha256 cellar: :any_skip_relocation, catalina: your_sha256_hash
sha256 cellar: :any_skip_relocation, mojave: your_sha256_hash
sha256 cellar: :any_skip_relocation, high_sierra: your_sha256_hash
end
depends_on xcode: :build
depends_on :macos
def install
xcodebuild "-project", "SBJson5.xcodeproj",
"-arch", Hardware::CPU.arch,
"-target", "sbjson",
"-configuration", "Release",
"clean",
"build",
"SYMROOT=build"
bin.install "build/Release/sbjson"
end
test do
(testpath/"in.json").write <<~EOS
[true,false,"string",42.001e3,[],{}]
EOS
(testpath/"unwrapped.json").write <<~EOS
true
false
"string"
42001
[]
{}
EOS
assert_equal shell_output("cat unwrapped.json"),
shell_output("#{bin}/sbjson --unwrap-root in.json")
end
end
```
|
Error-driven learning is a sub-area of machine learning concerned with how an agent ought to take actions in an environment so as to minimize some error feedback. It is a type of reinforcement learning.
Algorithms
GeneRec
Machine learning algorithms
|
```objective-c
/* $OpenBSD: kbd.h,v 1.19 2015/03/19 21:48:05 bcallah Exp $ */
/* This file is in the public domain. */
/*
* kbd.h: type definitions for symbol.c and kbd.c for mg experimental
*/
struct map_element {
KCHAR k_base; /* first key in element */
KCHAR k_num; /* last key in element */
PF *k_funcp; /* pointer to array of pointers */
/* to functions */
struct keymap_s *k_prefmap; /* keymap of ONLY prefix key in */
/* element */
};
/*
* Predefined keymaps are NOT type KEYMAP because final array needs
* dimension. If any changes are made to this struct, they must be reflected
* in all keymap declarations.
*/
#define KEYMAPE(NUM) { \
short map_num; /* elements used */ \
short map_max; /* elements allocated */\
PF map_default; /* default function */ \
struct map_element map_element[NUM]; /* really [e_max] */ \
}
typedef struct keymap_s KEYMAPE(1) KEYMAP;
/* Number of map_elements to grow an overflowed keymap by */
#define MAPGROW 3
#define MAPINIT (MAPGROW+1)
/* Max number of default bindings added to avoid creating new element */
#define MAPELEDEF 4
struct maps_s {
KEYMAP *p_map;
const char *p_name;
struct maps_s *p_next;
};
extern struct maps_s *maps;
extern struct maps_s fundamental_mode;
#define fundamental_map (fundamental_mode.p_map)
int dobindkey(KEYMAP *, const char *, const char *);
KEYMAP *name_map(const char *);
struct maps_s *name_mode(const char *);
PF doscan(KEYMAP *, int, KEYMAP **);
void maps_init(void);
int maps_add(KEYMAP *, const char *);
extern struct map_element *ele;
extern struct maps_s *defb_modes[];
```
|
Places
Majere (village) is a village in Slovakia.
Fiction
Majere, in the fictional world of Dragonlance, may refer to:
Raistlin Majere
Caramon Majere
Tika Waylan, also known as Tika Waylan Majere
Palin Majere
Tanin Majere
Ulin Majere
Sturm Majere
Usha Majere
Linsha Majere
Dezra Majere
Laura Majere
|
```xml
import {
MainStyleFormColumn as FormColumn,
MainStyleFormWrapper as FormWrapper,
MainStyleModalFooter as ModalFooter,
MainStyleScrollWrapper as ScrollWrapper,
} from "@erxes/ui/src/styles/eindex";
import { IButtonMutateProps, IFormProps } from "@erxes/ui/src/types";
import { ICloseInfo, IContract, IContractDoc } from "../../types";
import React, { useState } from "react";
import Button from "@erxes/ui/src/components/Button";
import { ChangeAmount } from "../../styles";
import ControlLabel from "@erxes/ui/src/components/form/Label";
import { DateContainer } from "@erxes/ui/src/styles/main";
import DateControl from "@erxes/ui/src/components/form/DateControl";
import Form from "@erxes/ui/src/components/form/Form";
import FormControl from "@erxes/ui/src/components/form/Control";
import FormGroup from "@erxes/ui/src/components/form/Group";
import SelectContracts from "../common/SelectContract";
import { __ } from "coreui/utils";
import client from "@erxes/ui/src/apolloClient";
import dayjs from "dayjs";
import { gql } from "@apollo/client";
import { queries } from "../../../transactions/graphql";
type Props = {
renderButton: (props: IButtonMutateProps) => JSX.Element;
contract: IContract;
closeInfo: ICloseInfo;
onChangeDate: (date: Date) => void;
closeModal: () => void;
invDate: Date;
type: string;
};
const InterestChangeForm = (props: Props) => {
const [type, setType] = useState(props.type || "stopInterest");
const [description, setDescription] = useState("");
const [interestAmount, setInterestAmount] = useState(0);
const [contractId, setContractId] = useState(undefined as any);
const [paymentInfo, setPaymentInfo] = useState(undefined as any);
const { contract } = props;
const generateDoc = (values: { _id: string } & IContractDoc) => {
const finalValues = values;
if (contract) {
finalValues._id = contract._id;
}
return {
contractId: finalValues._id,
paymentInfo,
interestAmount: Number(
type === "stopInterest"
? props.closeInfo.storedInterest
: interestAmount
),
description,
invDate: props.invDate,
type,
};
};
const onChangeField = (e) => {
const name = (e.target as HTMLInputElement).name;
const value = (e.target as HTMLInputElement).value;
if (name === "type") {
setType(value as any);
}
if (name === "contractId") {
setContractId(value as any);
}
if (name === "interestAmount") {
setInterestAmount(value as any);
}
if (name === "description") {
setDescription(value as any);
}
};
const renderRow = (label, fieldName) => {
const { closeInfo } = props;
const value = paymentInfo?.[fieldName] || closeInfo[fieldName] || 0;
return (
<FormWrapper>
<FormColumn>
<ChangeAmount>
<ControlLabel>{__(label)}</ControlLabel>
</ChangeAmount>
</FormColumn>
<FormColumn>
<ChangeAmount>{Number(value).toLocaleString()}</ChangeAmount>
</FormColumn>
</FormWrapper>
);
};
const renderCloseInfo = () => {
return (
<>
{renderRow("Payment", "payment")}
{renderRow("Interest", "storedInterest")}
{renderRow("Loss", "loss")}
</>
);
};
const renderContent = (formProps: IFormProps) => {
const { closeModal, renderButton, onChangeDate } = props;
const { values, isSubmitted } = formProps;
const onChangeinvDate = (value) => {
onChangeDate(value);
};
const getPaymentInfo = (
contractId,
payDate: any = dayjs().locale("en").format("MMM, D YYYY")
) => {
client
.mutate({
mutation: gql(queries.getPaymentInfo),
variables: { id: contractId, payDate: payDate },
})
.then(({ data }) => {
setPaymentInfo(data.getPaymentInfo);
});
};
return (
<>
<ScrollWrapper>
<FormWrapper>
<FormColumn>
<FormGroup>
<ControlLabel required={true}>{__("Change Date")}</ControlLabel>
<DateContainer>
<DateControl
{...formProps}
required={false}
name="invDate"
dateFormat="YYYY/MM/DD"
value={props.invDate}
onChange={onChangeinvDate}
/>
</DateContainer>
</FormGroup>
</FormColumn>
{!props.type && (
<FormColumn>
<FormGroup>
<ControlLabel required={true}>
{__("Change Type")}
</ControlLabel>
<FormControl
{...formProps}
name="type"
componentclass="select"
value={type}
required={true}
onChange={onChangeField}
>
{["stopInterest", "interestChange", "interestReturn"].map(
(typeName, index) => (
<option key={index} value={typeName}>
{typeName}
</option>
)
)}
</FormControl>
</FormGroup>
</FormColumn>
)}
{props.type && (
<FormColumn>
<FormGroup>
<ControlLabel>{__("Contract")}</ControlLabel>
<SelectContracts
label={__("Choose an contract")}
name="contractId"
initialValue={contractId}
onSelect={(v, n) => {
onChangeField({
target: { name: n, value: v },
} as any);
if (contractId !== v) getPaymentInfo(v, props.invDate);
}}
multi={false}
/>
</FormGroup>
</FormColumn>
)}
</FormWrapper>
{type !== "stopInterest" && (
<FormWrapper>
<FormColumn>
<FormGroup>
<ControlLabel>{__("Interest Change to")}</ControlLabel>
<FormControl
{...formProps}
name="interestAmount"
type="number"
useNumberFormat
value={interestAmount || ""}
onChange={onChangeField}
/>
</FormGroup>
</FormColumn>
</FormWrapper>
)}
<FormWrapper>
<FormColumn>
<FormGroup>
<ControlLabel>{__("Description")}</ControlLabel>
<FormControl
{...formProps}
max={140}
name="description"
componentclass="textarea"
value={description || ""}
onChange={onChangeField}
/>
</FormGroup>
</FormColumn>
</FormWrapper>
{renderCloseInfo()}
</ScrollWrapper>
<ModalFooter>
<Button btnStyle="simple" onClick={closeModal} icon="cancel-1">
{__("Close")}
</Button>
{renderButton({
name: "contract",
values: generateDoc(values),
isSubmitted,
object: props.contract,
})}
</ModalFooter>
</>
);
};
return <Form renderContent={renderContent} />;
};
export default InterestChangeForm;
```
|
The Kodak 35 Rangefinder is an improved version of the Kodak 35 that was launched by the Eastman Kodak Company in 1938 as their first 35mm camera manufactured in the USA. After some two years, the Company presented this improved Kodak 35 camera, with a new superstructure housing containing a viewfinder and a separate rangefinder, but without any addition to the identifying inscription on the body. It is generally referred to as the Kodak 35 Rangefinder model.
Description
The centrally positioned eyepiece is for the viewfinder. An external mechanism, hidden inside the protrusion at the left-hand side of the lens/shutter assembly, relays the front lens element extension to the rangefinder optics by sensing the height of a milled cam at the periphery of the lens barrel just behind the toothed rim. Both the separate viewfinder and rangefinder eyepieces and the lens coupling are in the style of the Leica camera. The difference is the way in which the lever operates on the lens barrel. Looking through the small rangefinder window at the left-hand side at the back reveals a clear view of a horizontally split image. The lower image part is shifted sideways by turning the focusing wheel at the front right-hand side of the lens. By aligning the vertical feature of any object in the motive that crosses the split in the rangefinder image may render it sharp on the film.
The Rangefinder model was made available with a variety of shutter and lens combinations during its production run, which ended in 1951:
1940-1948: Kodak Anastigmat Special f/3.5 51mm in KODAMATIC SHUTTER, or
1940-1948: Kodak Anastigmat Special f/3.5 51mm in FLASH KODAMATIC SHUTTER,
1947-1951: Kodak Anastar Special f/3.5 50mm in KODAMATIC SHUTTER, or
1947-1951: Kodak Anastar Special f/3.5 50mm in FLASH KODAMATIC SHUTTER.
Note: This model is often referred to as the "gear coupled RF version" due to the conspicuously placed gear next to the lens front element. The gear however, only provides a means of turning the front element using a finger on the edge of the wheel, and is not part of the link between the lens and the rangefinder.
The variations in finish and specifications
Some RF models have black knobs and some have black rangefinder protrusion next to the lens, but the majority have plated metal knobs. There was no civil production between 1942 and 1945. The post-war viewfinder and the rangefinder models were also black with bright-chromed metal features, and an accessory shoe was added to the viewfinder model next to the rewind knob. For a while during the period from 1947 to 1949, the knobs were also made of white plastic instead of metal. Both the metal- and the white rewind knobs have a film reminder dial in the hub.
A few minor modifications were also made to internal parts, notably to the film pressure plate spring that changes through a variety of shapes from rod to flat shape. Most, if not all shutters alternatives have a No. 5 Cable Release socket with a tiny removable coin-slotted screw plug, while the later ones also have a Kodak type flash synchroniser contact post. A metal band inscribed "Made in U.S.A." was attached to the top of the shutter housing cover plate, save for the last year or two of production. The milling pattern on the focusing wheel front goes through a variety of styles from flat to a pattern of several concentric circles.
The Kodak 35 came with a hard brown leather ever-ready case.
Year of manufacture
The serial number on a Kodak manufactured lens is always preceded by a code consisting of two capital letters that indicates the year of manufacture using a 10 letter key word, CAMEROSITY, in which each letter in the word represents a corresponding numeral in the sequence 1234567890. Of these, the C is substituted by 1, the A by 2 etc. through to the Y by 0. "ET" thus gives the number 49 for the year 1949. The Kodak 35 serial number is engraved on the front ring on the lens.
References
External links
Kodak Camera Collection - Private collection with free images of most Kodak models
135 film cameras
Kodak rangefinder cameras
|
```javascript
import React from 'react'
import ReactDOM from 'react-dom'
import SvgInCss from './SvgInCss'
describe('svg in css', () => {
it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render(<SvgInCss />, div)
})
})
```
|
```python
""" Enable signup per domain
Revision ID: 423155f8fc15
Revises: 77aa22ad72e2
Create Date: 2017-12-02 15:07:40.052320
"""
# revision identifiers, used by Alembic.
revision = '423155f8fc15'
down_revision = '77aa22ad72e2'
from alembic import op
import sqlalchemy as sa
def upgrade():
with op.batch_alter_table('domain') as batch:
batch.add_column(sa.Column('signup_enabled', sa.Boolean(), nullable=False, server_default=sa.sql.expression.false()))
def downgrade():
with op.batch_alter_table('domain') as batch:
batch.drop_column('signup_enabled')
```
|
```objective-c
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of NVIDIA CORPORATION nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#ifndef APEX_STRING_H
#define APEX_STRING_H
#include "ApexUsingNamespace.h"
#include "PsArray.h"
#include "PsString.h"
#include "PsArray.h"
#include "PsUserAllocated.h"
#include <PxFileBuf.h>
namespace nvidia
{
namespace apex
{
/**
* ApexSimpleString - a simple string class
*/
class ApexSimpleString : public physx::Array<char>, public UserAllocated
{
public:
ApexSimpleString() : physx::Array<char>(), length(0)
{
}
explicit ApexSimpleString(const char* cStr) : physx::Array<char>(), length(0)
{
if (cStr)
{
length = (uint32_t)strlen(cStr);
if (length > 0)
{
resize(length + 1);
nvidia::strlcpy(begin(), size(), cStr);
}
}
}
ApexSimpleString(const ApexSimpleString& other) : physx::Array<char>()
{
length = other.length;
if (length > 0)
{
resize(length + 1);
nvidia::strlcpy(begin(), capacity(), other.c_str());
}
else
{
resize(0);
}
}
ApexSimpleString(uint32_t number, uint32_t fixedLength = 0) : length(fixedLength)
{
if (fixedLength)
{
char format[5]; format[0] = '%'; format[1] = '0';
char buffer[10];
if (fixedLength > 9)
{
PX_ASSERT(fixedLength);
fixedLength = 9;
}
physx::shdfnd::snprintf(format + 2, 2, "%d", fixedLength);
format[3] = 'd'; format[4] = '\0';
physx::shdfnd::snprintf(buffer, 10, format, number);
resize(length + 1);
nvidia::strlcpy(begin(), size(), buffer);
}
else
{
char buffer[10];
physx::shdfnd::snprintf(buffer, 10, "%d", number);
length = 1;
while (number >= 10)
{
number /= 10;
length++;
}
resize(length + 1);
nvidia::strlcpy(begin(), size(), buffer);
}
}
ApexSimpleString& operator = (const ApexSimpleString& other)
{
length = other.length;
if (length > 0)
{
resize(length + 1);
nvidia::strlcpy(begin(), capacity(), other.c_str());
}
else
{
resize(0);
}
return *this;
}
ApexSimpleString& operator = (const char* cStr)
{
if (!cStr)
{
erase();
}
else
{
length = (uint32_t)strlen(cStr);
if (length > 0)
{
resize(length + 1);
nvidia::strlcpy(begin(), capacity(), cStr);
}
else
{
resize(0);
}
}
return *this;
}
void truncate(uint32_t newLength)
{
if (newLength < length)
{
length = newLength;
begin()[length] = '\0';
}
}
void serialize(physx::PxFileBuf& stream) const
{
stream.storeDword(length);
stream.write(begin(), length);
}
void deserialize(physx::PxFileBuf& stream)
{
uint32_t len = stream.readDword();
if (len > 0)
{
resize(len + 1);
stream.read(begin(), len);
begin()[len] = '\0';
length = len;
}
else
{
erase();
}
}
uint32_t len() const
{
return length;
}
/* PH: Cast operator not allowed by coding guidelines, and evil in general anyways
operator const char* () const
{
return capacity() ? begin() : "";
}
*/
const char* c_str() const
{
return capacity() > 0 ? begin() : "";
}
bool operator==(const ApexSimpleString& s) const
{
return nvidia::strcmp(c_str(), s.c_str()) == 0;
}
bool operator!=(const ApexSimpleString& s) const
{
return ! this->operator==(s);
}
bool operator==(const char* s) const
{
return nvidia::strcmp(c_str(), s) == 0;
}
bool operator!=(const char* s) const
{
return ! this->operator==(s);
}
bool operator < (const ApexSimpleString& s) const
{
return nvidia::strcmp(c_str(), s.c_str()) < 0;
}
ApexSimpleString& operator += (const ApexSimpleString& s)
{
expandTo(length + s.length);
nvidia::strlcpy(begin() + length, capacity() - length, s.c_str());
length += s.length;
return *this;
}
ApexSimpleString& operator += (char c)
{
expandTo(length + 1);
begin()[length++] = c;
begin()[length] = '\0';
return *this;
}
ApexSimpleString operator + (const ApexSimpleString& s)
{
ApexSimpleString sum = *this;
sum += s;
return sum;
}
ApexSimpleString& clear()
{
if (capacity())
{
begin()[0] = '\0';
}
length = 0;
return *this;
}
ApexSimpleString& erase()
{
resize(0);
return clear();
}
static PX_INLINE void ftoa(float f, ApexSimpleString& s)
{
char buf[20];
physx::shdfnd::snprintf(buf, sizeof(buf), "%g", f);
s = buf;
}
static PX_INLINE void itoa(uint32_t i, ApexSimpleString& s)
{
char buf[20];
physx::shdfnd::snprintf(buf, sizeof(buf), "%i", i);
s = buf;
}
private:
void expandTo(uint32_t stringCapacity)
{
if (stringCapacity + 1 > capacity())
{
resize(2 * stringCapacity + 1);
}
}
uint32_t length;
};
PX_INLINE ApexSimpleString operator + (const ApexSimpleString& s1, const ApexSimpleString& s2)
{
ApexSimpleString result = s1;
result += s2;
return result;
}
} // namespace apex
} // namespace nvidia
#endif // APEX_STRING_H
```
|
```objective-c
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#import "ZXAnyAIDecoder.h"
#import "ZXRSSExpandedGeneralAppIdDecoder.h"
const int ZX_ANY_AI_HEADER_SIZE = 2 + 1 + 2;
@implementation ZXAnyAIDecoder
- (NSString *)parseInformationWithError:(NSError **)error {
NSMutableString *buf = [NSMutableString string];
return [self.generalDecoder decodeAllCodes:buf initialPosition:ZX_ANY_AI_HEADER_SIZE error:error];
}
@end
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.