Class GlobalConfiguration
Data object holding Silo global configuration parameters.
Inheritance
System.Object
GlobalConfiguration
Assembly: Orleans.Core.Legacy.dll
Syntax
public class GlobalConfiguration : MessagingConfiguration
Constructors
|
Improve this Doc
View Source
GlobalConfiguration()
Declaration
public GlobalConfiguration()
Fields
|
Improve this Doc
View Source
DEFAULT_MULTICLUSTER_REGISTRATION_STRATEGY
Declaration
public static readonly string DEFAULT_MULTICLUSTER_REGISTRATION_STRATEGY
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ENFORCE_MINIMUM_REQUIREMENT_FOR_AGE_LIMIT
Declaration
public static bool ENFORCE_MINIMUM_REQUIREMENT_FOR_AGE_LIMIT
Field Value
| Type |
Description |
| System.Boolean |
|
Properties
|
Improve this Doc
View Source
ActivationCountBasedPlacementChooseOutOf
Declaration
public int ActivationCountBasedPlacementChooseOutOf { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
AdoInvariant
When using ADO, identifies the underlying data provider for liveness and reminders. This three-part naming syntax is also used
when creating a new factory and for identifying the provider in an application configuration file so that the provider name,
along with its associated connection string, can be retrieved at run time. https://msdn.microsoft.com/en-us/library/dd0w4a2z%28v=vs.110%29.aspx
In order to override this value for reminders set AdoInvariantForReminders
Declaration
public string AdoInvariant { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
AdoInvariantForReminders
Declaration
public string AdoInvariantForReminders { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
AllowCallChainReentrancy
Declaration
public bool AllowCallChainReentrancy { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Application
Declaration
public ApplicationConfiguration Application { get; }
Property Value
|
Improve this Doc
View Source
AssumeHomogenousSilosForTesting
Declaration
public bool AssumeHomogenousSilosForTesting { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
BackgroundGossipInterval
The time between background gossips.
Declaration
public TimeSpan BackgroundGossipInterval { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
CacheSize
The CacheSize attribute specifies the maximum number of grains to cache directory information for.
Declaration
public int CacheSize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
CacheTTLExtensionFactor
The TTLExtensionFactor attribute specifies the factor by which cache entry TTLs should be extended when they are found to be stable.
Declaration
public double CacheTTLExtensionFactor { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ClientRegistrationRefresh
Declaration
public TimeSpan ClientRegistrationRefresh { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
ClusterId
Cluster identity. Silos with the same cluster identity will join together.
When deploying different versions of the application simultaneously, be sure to change the ID if they should not join the same logical cluster.
In a multi-cluster network, the cluster ID must be unique for each cluster.
Declaration
public string ClusterId { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
CollectionQuantum
Declaration
public TimeSpan CollectionQuantum { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
DataConnectionString
Connection string for the underlying data provider for liveness and reminders. eg. Azure Storage, ZooKeeper, SQL Server, ect.
In order to override this value for reminders set DataConnectionStringForReminders
Declaration
public string DataConnectionString { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
DataConnectionStringForReminders
Declaration
public string DataConnectionStringForReminders { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
DeathVoteExpirationTimeout
Expiration time in seconds for death vote in the membership table.
Declaration
public TimeSpan DeathVoteExpirationTimeout { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
DefaultCompatibilityStrategy
Declaration
public CompatibilityStrategy DefaultCompatibilityStrategy { get; set; }
Property Value
|
Improve this Doc
View Source
DefaultMultiCluster
A list of cluster ids, to be used if no multicluster configuration is found in gossip channels.
Declaration
public IReadOnlyList<string> DefaultMultiCluster { get; set; }
Property Value
| Type |
Description |
| IReadOnlyList<System.String> |
|
|
Improve this Doc
View Source
DefaultPlacementStrategy
Declaration
public string DefaultPlacementStrategy { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
DefaultVersionSelectorStrategy
Declaration
public VersionSelectorStrategy DefaultVersionSelectorStrategy { get; set; }
Property Value
|
Improve this Doc
View Source
DeploymentId
Deployment Id. This is the same as ClusterId and has been deprecated in favor of it.
Declaration
public string DeploymentId { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
DeploymentLoadPublisherRefreshTime
Declaration
public TimeSpan DeploymentLoadPublisherRefreshTime { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
DirectoryCachingStrategy
The DirectoryCachingStrategy attribute specifies the caching strategy to use.
The options are None, which means don't cache directory entries locally;
LRU, which indicates that a standard fixed-size least recently used strategy should be used; and
Adaptive, which indicates that an adaptive strategy with a fixed maximum size should be used.
The Adaptive strategy is used by default.
Declaration
public GlobalConfiguration.DirectoryCachingStrategyType DirectoryCachingStrategy { get; set; }
Property Value
|
Improve this Doc
View Source
DirectoryLazyDeregistrationDelay
The time span between when we have added an entry for an activation to the grain directory and when we are allowed
to conditionally remove that entry.
Conditional deregistration is used for lazy clean-up of activations whose prompt deregistration failed for some reason (e.g., message failure).
This should always be at least one minute, since we compare the times on the directory partition, so message delays and clcks skues have
to be allowed.
Declaration
public TimeSpan DirectoryLazyDeregistrationDelay { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
ExpectedClusterSize
The expected size of a cluster. Need not be very accurate, can be an overestimate.
Declaration
public int ExpectedClusterSize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
GlobalSingleInstanceNumberRetries
The number of quick retries before going into DOUBTFUL state.
Declaration
public int GlobalSingleInstanceNumberRetries { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
GlobalSingleInstanceRetryInterval
The time between the slow retries for DOUBTFUL activations.
Declaration
public TimeSpan GlobalSingleInstanceRetryInterval { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
GossipChannels
A list of connection strings for gossip channels.
Declaration
public IReadOnlyList<GlobalConfiguration.GossipChannelConfiguration> GossipChannels { get; set; }
Property Value
|
Improve this Doc
View Source
GrainServiceConfigurations
Configuration for grain services.
Declaration
public GrainServiceConfigurations GrainServiceConfigurations { get; set; }
Property Value
|
Improve this Doc
View Source
HasMultiClusterNetwork
Whether this cluster is configured to be part of a multicluster network
Declaration
public bool HasMultiClusterNetwork { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IAmAliveTablePublishTimeout
The number of seconds to periodically write in the membership table that this silo is alive. Used ony for diagnostics.
Declaration
public TimeSpan IAmAliveTablePublishTimeout { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
InitialCacheTTL
The InitialTTL attribute specifies the initial (minimum) time, in seconds, to keep a cache entry before revalidating.
Declaration
public TimeSpan InitialCacheTTL { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
LivenessEnabled
Global switch to disable silo liveness protocol (should be used only for testing).
The LivenessEnabled attribute, if provided and set to "false", suppresses liveness enforcement.
If a silo is suspected to be dead, but this attribute is set to "false", the suspicions will not propagated to the system and enforced,
This parameter is intended for use only for testing and troubleshooting.
In production, liveness should always be enabled.
Default is true (eanabled)
Declaration
public bool LivenessEnabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
LivenessType
Declaration
public GlobalConfiguration.LivenessProviderType LivenessType { get; set; }
Property Value
|
Improve this Doc
View Source
MaximumCacheTTL
The MaximumTTL attribute specifies the maximum time, in seconds, to keep a cache entry before revalidating.
Declaration
public TimeSpan MaximumCacheTTL { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
MaxJoinAttemptTime
The number of seconds to attempt to join a cluster of silos before giving up.
Declaration
public TimeSpan MaxJoinAttemptTime { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
MaxMultiClusterGateways
The maximum number of silos per cluster should be designated to serve as gateways.
Declaration
public int MaxMultiClusterGateways { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
MaxRequestProcessingTime
Specifies the maximum time that a request can take before the activation is reported as "blocked"
Declaration
public TimeSpan MaxRequestProcessingTime { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
MaxStorageBusyRetries
Retry count for Azure Table operations.
Declaration
public int MaxStorageBusyRetries { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
MembershipTableAssembly
Assembly to use for custom MembershipTable implementation
Declaration
public string MembershipTableAssembly { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
MockReminderTableTimeout
Declaration
public TimeSpan MockReminderTableTimeout { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
NumMissedProbesLimit
The number of missed "I am alive" heartbeat messages from a silo or number of un-replied probes that lead to suspecting this silo as dead.
Declaration
public int NumMissedProbesLimit { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
NumMissedTableIAmAliveLimit
The number of missed "I am alive" updates in the table from a silo that causes warning to be logged. Does not impact the liveness protocol.
Declaration
public int NumMissedTableIAmAliveLimit { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
NumProbedSilos
The number of silos each silo probes for liveness.
Declaration
public int NumProbedSilos { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
NumVirtualBucketsConsistentRing
Declaration
public int NumVirtualBucketsConsistentRing { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
NumVotesForDeathDeclaration
The number of non-expired votes that are needed to declare some silo as dead (should be at most NumMissedProbesLimit)
Declaration
public int NumVotesForDeathDeclaration { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public bool PerformDeadlockDetection { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
PrimaryNodeIsRequired
Determines if primary node is required to be configured as a seed node.
True if LivenessType is set to MembershipTableGrain, false otherwise.
Declaration
public bool PrimaryNodeIsRequired { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ProbeTimeout
The number of seconds to periodically probe other silos for their liveness or for the silo to send "I am alive" heartbeat messages about itself.
Declaration
public TimeSpan ProbeTimeout { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
ProviderConfigurations
Configuration for various runtime providers.
Declaration
public IDictionary<string, ProviderCategoryConfiguration> ProviderConfigurations { get; set; }
Property Value
| Type |
Description |
| IDictionary<System.String, ProviderCategoryConfiguration> |
|
|
Improve this Doc
View Source
ReminderServiceType
Declaration
public GlobalConfiguration.ReminderServiceProviderType ReminderServiceType { get; set; }
Property Value
|
Improve this Doc
View Source
ReminderTableAssembly
Assembly to use for custom ReminderTable implementation
Declaration
public string ReminderTableAssembly { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
SeedNodes
SeedNodes are only used in local development setting with LivenessProviderType.MembershipTableGrain
SeedNodes are never used in production.
Declaration
public IList<IPEndPoint> SeedNodes { get; }
Property Value
| Type |
Description |
| IList<IPEndPoint> |
|
|
Improve this Doc
View Source
ServiceId
Declaration
public Guid ServiceId { get; set; }
Property Value
|
Improve this Doc
View Source
Subnet
The subnet on which the silos run.
This option should only be used when running on multi-homed cluster. It should not be used when running in Azure.
Declaration
public byte[] Subnet { get; set; }
Property Value
| Type |
Description |
| System.Byte[] |
|
|
Improve this Doc
View Source
TableRefreshTimeout
The number of seconds to periodically fetch updates from the membership table.
Declaration
public TimeSpan TableRefreshTimeout { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
TypeMapRefreshInterval
The number of seconds to refresh the cluster grain interface map
Declaration
public TimeSpan TypeMapRefreshInterval { get; set; }
Property Value
| Type |
Description |
| TimeSpan |
|
|
Improve this Doc
View Source
UseAdoNetSystemStore
Determines if ADO should be used for storage of Membership and Reminders info.
True if either or both of LivenessType and ReminderServiceType are set to SqlServer, false otherwise.
Declaration
public bool UseAdoNetSystemStore { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
UseAzureSystemStore
Determines if Azure Storage should be used for storage of Membership and Reminders info.
True if either or both of LivenessType and ReminderServiceType are set to AzureTable, false otherwise.
Declaration
public bool UseAzureSystemStore { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
UseGlobalSingleInstanceByDefault
Whether to use the global single instance protocol as the default
multicluster registration strategy.
Declaration
public bool UseGlobalSingleInstanceByDefault { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
UseLivenessGossip
Whether to use the gossip optimization to speed up spreading liveness information.
Declaration
public bool UseLivenessGossip { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
UseVirtualBucketsConsistentRing
Declaration
public bool UseVirtualBucketsConsistentRing { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ValidateInitialConnectivity
Whether new silo that joins the cluster has to validate the initial connectivity with all other Active silos.
Declaration
public bool ValidateInitialConnectivity { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
|
Improve this Doc
View Source
GetAllProviderConfigurations()
Retrieves an enumeration of all currently configured provider configurations.
Declaration
public IEnumerable<IProviderConfiguration> GetAllProviderConfigurations()
Returns
| Type |
Description |
| IEnumerable<IProviderConfiguration> |
An enumeration of all currently configured provider configurations.
|
|
Improve this Doc
View Source
RegisterGrainService(String, String, IDictionary<String, String>)
Declaration
public void RegisterGrainService(string serviceName, string serviceType, IDictionary<string, string> properties = null)
Parameters
| Type |
Name |
Description |
| System.String |
serviceName |
|
| System.String |
serviceType |
|
| IDictionary<System.String, System.String> |
properties |
|
|
Improve this Doc
View Source
RegisterLogConsistencyProvider(String, String, IDictionary<String, String>)
Registers a given log-consistency provider.
Declaration
public void RegisterLogConsistencyProvider(string providerTypeFullName, string providerName, IDictionary<string, string> properties = null)
Parameters
| Type |
Name |
Description |
| System.String |
providerTypeFullName |
Full name of the log-consistency provider type
|
| System.String |
providerName |
Name of the log-consistency provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to the log-consistency provider upon initialization
|
|
Improve this Doc
View Source
RegisterLogConsistencyProvider<T>(String, IDictionary<String, String>)
Registers a given type of T
where T
is a log-consistency provider
Declaration
public void RegisterLogConsistencyProvider<T>(string providerName, IDictionary<string, string> properties = null)where T : ILogConsistencyProvider
Parameters
| Type |
Name |
Description |
| System.String |
providerName |
Name of the log-consistency provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to log-consistency provider upon initialization
|
Type Parameters
| Name |
Description |
| T |
Non-abstract type which implements a log-consistency storage interface
|
|
Improve this Doc
View Source
RegisterStorageProvider(String, String, IDictionary<String, String>)
Registers a given storage provider.
Declaration
public void RegisterStorageProvider(string providerTypeFullName, string providerName, IDictionary<string, string> properties = null)
Parameters
| Type |
Name |
Description |
| System.String |
providerTypeFullName |
Full name of the storage provider type
|
| System.String |
providerName |
Name of the storage provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to the storage provider upon initialization
|
|
Improve this Doc
View Source
RegisterStorageProvider<T>(String, IDictionary<String, String>)
Registers a given type of T
where T
is storage provider
Declaration
public void RegisterStorageProvider<T>(string providerName, IDictionary<string, string> properties = null)where T : IStorageProvider
Parameters
| Type |
Name |
Description |
| System.String |
providerName |
Name of the storage provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to storage provider upon initialization
|
Type Parameters
| Name |
Description |
| T |
Non-abstract type which implements storage
|
|
Improve this Doc
View Source
RegisterStreamProvider(String, String, IDictionary<String, String>)
Registers a given stream provider.
Declaration
public void RegisterStreamProvider(string providerTypeFullName, string providerName, IDictionary<string, string> properties = null)
Parameters
| Type |
Name |
Description |
| System.String |
providerTypeFullName |
Full name of the stream provider type
|
| System.String |
providerName |
Name of the stream provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to the stream provider upon initialization
|
|
Improve this Doc
View Source
RegisterStreamProvider<T>(String, IDictionary<String, String>)
Registers a given type of T
where T
is stream provider
Declaration
public void RegisterStreamProvider<T>(string providerName, IDictionary<string, string> properties = null)where T : IStreamProvider
Parameters
| Type |
Name |
Description |
| System.String |
providerName |
Name of the stream provider
|
| IDictionary<System.String, System.String> |
properties |
Properties that will be passed to stream provider upon initialization
|
Type Parameters
| Name |
Description |
| T |
Non-abstract type which implements IStreamProvider stream
|
|
Improve this Doc
View Source
Remap(GlobalConfiguration.GossipChannelType)
Declaration
public static string Remap(GlobalConfiguration.GossipChannelType type)
Parameters
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
TryGetProviderConfiguration(String, String, out IProviderConfiguration)
Retrieves an existing provider configuration
Declaration
public bool TryGetProviderConfiguration(string providerTypeFullName, string providerName, out IProviderConfiguration config)
Parameters
| Type |
Name |
Description |
| System.String |
providerTypeFullName |
Full name of the stream provider type
|
| System.String |
providerName |
Name of the stream provider
|
| IProviderConfiguration |
config |
The provider configuration, if exists
|
Returns
| Type |
Description |
| System.Boolean |
True if a configuration for this provider already exists, false otherwise.
|
Extension Methods


Json.NET supports error handling during serialization and deserialization. Error handling lets you catch an error and choose whether to handle it and continue with serialization or let the error bubble up and be thrown in your application.
Error handling is defined through two methods: the Error event on JsonSerializer and the OnErrorAttribute.
Error Event
The Error event is an event handler found on JsonSerializer. The error event is raised whenever an exception is thrown while serializing or deserialing JSON. Like all settings found on JsonSerializer it can also be set on JsonSerializerSettings and passed to the serialization methods on JsonConvert.
List<string> errors = new List<string>();
List<DateTime> c = JsonConvert.DeserializeObject<List<DateTime>>(@"[
""2009-09-09T00:00:00Z"",
""I am not a date and will error!"",
[
1
],
""1977-02-20T00:00:00Z"",
null,
""2000-12-01T00:00:00Z""
]",
new JsonSerializerSettings
{
Error = delegate(object sender, ErrorEventArgs args)
{
errors.Add(args.ErrorContext.Error.Message);
args.ErrorContext.Handled = true;
},
Converters = { new IsoDateTimeConverter() }
});
// 2009-09-09T00:00:00Z
// 1977-02-20T00:00:00Z
// 2000-12-01T00:00:00Z
// The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
// Unexpected token parsing date. Expected String, got StartArray.
// Cannot convert null value to System.DateTime.
In this example we are deserializing a JSON array to a collection of DateTimes. On the JsonSerializerSettings a handler has been assigned to the Error event which will log the error message and mark the error as handled.
The result of deserializing the JSON is three successfully deserialized dates and three error messages: one for the badly formatted string, "I am not a date and will error!", one for the nested JSON array and one for the null value since the list doesn't allow nullable DateTimes. The event handler has logged these messages and Json.NET has continued on deserializing the JSON because the errors were marked as handled.
One thing to note with error handling in Json.NET is that an unhandled error will bubble up and raise the event on each of its parents, e.g. an unhandled error when serializing a collection of objects will be raised twice, once against the object and then again on the collection. This will let you handle an error either where it occurred or on one of its parents.
JsonSerializer serializer = new JsonSerializer();
serializer.Error += delegate(object sender, ErrorEventArgs args)
{
// only log an error once
if (args.CurrentObject == args.ErrorContext.OriginalObject)
errors.Add(args.ErrorContext.Error.Message);
};
If you aren't immediately handling an error and only want to perform an action against it once then you can check to see whether the ErrorEventArg's CurrentObject is equal to the OriginalObject. OriginalObject is the object that threw the error and CurrentObject is the object that the event is being raised against. They will only equal the first time the event is raised against the OriginalObject.
OnErrorAttribute
The OnErrorAttribute works much like the other .NET serialization attributes that Json.NET supports. To use it you simply place the attribute on a method which takes the correct parameters: a StreamingContext and a ErrorContext. The name of the method doesn't matter.
public class PersonError
{
private List<string> _roles;
public string Name { get; set; }
public int Age { get; set; }
public List<string> Roles
{
get
{
if (_roles == null)
throw new Exception("Roles not loaded!");
return _roles;
}
set { _roles = value; }
}
public string Title { get; set; }
[OnError]
internal void OnError(StreamingContext context, ErrorContext errorContext)
{
errorContext.Handled = true;
}
}
In this example accessing the the Roles property will throw an exception when no roles have been set. The HandleError method will set the error when serializing Roles as handled and allow Json.NET to continue serializing the class.
PersonError person = new PersonError
{
Name = "George Michael Bluth",
Age = 16,
Roles = null,
Title = "Mister Manager"
};
string json = JsonConvert.SerializeObject(person, Formatting.Indented);
Console.WriteLine(json);
//{
// "Name": "George Michael Bluth",
// "Age": 16,
// "Title": "Mister Manager"
//}


Basic Button
Enabled
Disabled
Cancel
Approve
Decline
Subscribe
Enabled
Disabled
Cancel
Approve
Decline
Subscribe
Button with Icon
Add
Download
Active Icon
Add
Remove
Accept
Add
Download
Active Icon
Add
Remove
Transparent
Icon Only Button
Add
Alert
Away
Accept
Bookmark
Camera
Call
Cart
Cancel
Settings
Add
Button with Type
Submit
Agree
Decline
Disabled
Transparent
Submit
Agree
Decline
Disabled
Transparent


All Classes
| Class | Description |
|---|---|
| AbstractCommandHandler |
An abstract implementation of CommandHandler.
|
| AbstractOutputFormat |
Abstract OutputFormat.
|
| AnsiConsoleOutputFormat |
OutputFormat for a table-like but borderless format.
|
| Application |
Defines the configuration of a SQLLine application.
|
| BuiltInDialect |
Pre-defined one-line comments, sql identifier quotes for different databases.
|
| BuiltInProperty |
Built-in properties of SqlLine.
|
| BuiltInTableOutputFormatStyles | |
| ClassNameCompleter |
An implementation of
Completer that completes
java class names. |
| CommandHandler |
A generic command to be executed.
|
| Commands |
Collection of available commands.
|
| ConnectionCompleter |
Suggests completions for connection names.
|
| ConnectionMetadata |
Provides information about database connection
and its metadata without exposing internal API.
|
| DispatchCallback |
Callback.
|
| DriverInfo |
Description of a JDBC driver.
|
| HighlightStyle |
Class to specify colors and styles while highlighting.
|
| JsonOutputFormat |
Implementation of
OutputFormat that formats rows as JSON. |
| OutputFile |
Output file.
|
| OutputFormat |
Converts a collection of rows into text.
|
| PromptHandler |
Default prompt handler class which allows customization
for the prompt shown at the start of each line.
|
| ReflectiveCommandHandler |
A
CommandHandler implementation that
uses reflection to determine the method to dispatch the command. |
| SqlLine |
A console SQL shell with command completion.
|
| SqlLine.Status |
Exit status returned to the operating system.
|
| SqlLineExpander |
SQLLine expander class for live templates.
|
| SqlLineHighlighter |
Highlighter class to implement logic of sql
and command syntax highlighting in sqlline.
|
| SqlLineOpts |
Session options.
|
| SqlLineParser |
SqlLineParser implements multi-line
for sql, !sql, !all while it's not ended with a non-commented ';'.
|
| SqlLineParser.SqlParserState | |
| SqlLineProperty |
Definition of property that may be specified for SqlLine.
|
| SqlLineProperty.Type |
Data type of property.
|
| SqlLineProperty.Writer |
Property writer.
|
| SqlLineSignalHandler |
A signal handler for SQLLine that interprets Ctrl-C as a request to cancel
the currently executing query.
|


$var title: API
Learn the rules of Robot Game.
You'll create your first robot and figure out how to command it.
Robot Game comes with a module to make life easier.
Make sure your robot is in top shape before making it compete.
A few things we do to make sure mean people don't kill the server.


23 using string = std::string;
34 SrReporter(
const string &server,
const string &xid,
const string &auth,
37 http(server +
"/s", xid, auth), out(out),
38 in(in), _cap(cap), sleeping(false) {}
87 static void *
func(
void *arg);
90 std::deque<string> buffer;
void setCapacity(uint16_t cap)
Set the capacity of the request buffer.
Definition: srreporter.h:53
int start()
Start the SrReporter thread.
void srNotice(const std::string &msg)
Log a message in NOTICE level.
uint16_t capacity() const
Get the current capacity of the request buffer.
Definition: srreporter.h:44
void resume()
Resume a sleeping SrReporter. Resume a non-sleeping SrReporter has no effect.
Definition: srreporter.h:77
void sleep()
Put the SrReporter to sleep.
Definition: srreporter.h:69
bool isSleeping() const
Check if the SrReporter is sleeping.
Definition: srreporter.h:62
The reporter thread for sending all requests to Cumulocity.
Definition: srreporter.h:20
Tailored HTTP implementation for Cumulocity SmartREST protocol. Supports both HTTP and HTTPS...
Definition: srnethttp.h:10
SmartREST logging facility with rotation feature.
SrReporter(const string &server, const string &xid, const string &auth, SrQueue< SrNews > &out, SrQueue< SrOpBatch > &in, uint16_t cap=1000)
SrReporter constrcutor.
Definition: srreporter.h:34
static void * func(void *arg)
pthread routine function.


Select an item
Categorize and Move
Done
Flag & Move
Forward
Move to Folder
New E-mail
New Meeting
Reply & Delete


|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.encog.engine.network.train.prop.TrainFlatNetworkOpenCL
public class TrainFlatNetworkOpenCL
Train a flat network using OpenCL.
| Field Summary | |
|---|---|
static int |
LEARN_BPROP
Learn backpropagation. |
static int |
LEARN_MANHATTAN
Learn Manhattan update rule. |
static int |
LEARN_RPROP
Learn RPROP. |
| Constructor Summary | |
|---|---|
TrainFlatNetworkOpenCL(FlatNetwork network,
EngineDataSet training,
OpenCLTrainingProfile profile)
Train a flat network multithreaded. |
| Method Summary | |
|---|---|
void |
finishTraining()
Training is to stop, free any resources. |
double |
getError()
|
int |
getIteration()
|
double[] |
getLastGradient()
|
double |
getLearningRate()
|
int |
getLearningType()
|
double |
getMaxStep()
|
double |
getMomentum()
|
FlatNetwork |
getNetwork()
|
int |
getNumThreads()
|
EngineDataSet |
getTraining()
|
double[] |
getUpdateValues()
|
void |
iteration()
Perform one training iteration. |
void |
iteration(int iterations)
Perform one training iteration. |
void |
learnBPROP(double learningRate,
double momentum)
Learn using backpropagation. |
void |
learnManhattan(double learningRate)
Learn using the Manhattan update rule. |
void |
learnRPROP()
Learn using RPROP. |
void |
learnRPROP(double initialUpdate,
double maxStep)
Learn using RPROP with a custom initial update and max step. |
void |
setIteration(int iteration)
Set the iteration. |
void |
setNumThreads(int numThreads)
Set the number of threads to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEARN_RPROP
public static final int LEARN_BPROP
public static final int LEARN_MANHATTAN
| Constructor Detail |
|---|
public TrainFlatNetworkOpenCL(FlatNetwork network, EngineDataSet training, OpenCLTrainingProfile profile)
network
- The network to train.training
- The training data to use.profile
- The OpenCL training profile.| Method Detail |
|---|
public void finishTraining()
finishTraining
in interface TrainFlatNetwork
public double getError()
getError
in interface TrainFlatNetwork
public int getIteration()
getIteration
in interface TrainFlatNetwork
public double[] getLastGradient()
public double getLearningRate()
public int getLearningType()
public double getMaxStep()
public double getMomentum()
public FlatNetwork getNetwork()
getNetwork
in interface TrainFlatNetwork
public int getNumThreads()
getNumThreads
in interface TrainFlatNetwork
public EngineDataSet getTraining()
getTraining
in interface TrainFlatNetwork
public double[] getUpdateValues()
public void iteration()
iteration
in interface TrainFlatNetwork
public void iteration(int iterations)
iteration
in interface TrainFlatNetwork
public void learnBPROP(double learningRate, double momentum)
learningRate
- The learning rate.momentum
- The momentum.public void learnManhattan(double learningRate)
learningRate
- The learning rate.public void learnRPROP()
public void learnRPROP(double initialUpdate, double maxStep)
initialUpdate
- The initial update value.maxStep
- The max step.public void setIteration(int iteration)
setIteration
in interface TrainFlatNetwork
iteration
- The iteration.public void setNumThreads(int numThreads)
setNumThreads
in interface TrainFlatNetwork
numThreads
- The number of threads to use.
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Syrian troops launch offensive to retake rebel-held Christian village, activists say
BEIRUT — Syrian troops launched an offensive Monday against rebel-held positions on hills overlooking a mainly Christian village as they moved to regain control of the ancient community near the capital, Damascus, activists said.
The battle for Maaloula, has stoked fears among Syrian Christians that the alternative to Assad’s regime — which is made up mostly of Alawites, followers of an offshoot of Shiite Islam — would not tolerate minority religions. Such concerns have helped Assad retain the support of large chunks of Syria’s minority communities, including Christians, Alawites, Druze and ethnic Kurds. Most of the rebels and their supporters are Sunni Muslims.
Diplomatic efforts to end the 2 ½ year conflict gained momentum as Syrian Foreign Minister Walid al-Moallem welcomed a call from Russia, its close ally, to place the country’s chemical arsenals under international control to avert a U.S. strike, but he did not offer a time frame or any other specifics.
Al-Moallem’s remarks, made during a visit to Moscow, appeared to mark the first official acknowledgment by Damascus that it possesses chemical weapons. But it remained to be seen whether the statement represented a genuine goodwill gesture by Syria or simply an attempt to buy time.
The United States has been seeking international support for limited strikes against Assad’s government, which it accuses of using chemical weapons in an Aug. 21 assault near the Damascus. The U.S. cites intelligence reports as saying the attack killed at least 1,429 people, including more than 400 children, though other estimates are much lower. President Barack Obama is also seeking authorization from Congress for the strikes.
Assad’s regime denies the allegations and blames rebels, whom it calls terrorists, for staging strikes to gain international sympathy.
U.S. Secretary of State John Kerry said earlier Monday that Assad could resolve the crisis by surrendering control of “every single bit” of his arsenal to the international community by the end of the week. Kerry reiterated the U.S. position that there is very compelling evidence that the Syrian regime used chemical weapons against his own people.
Assad warned in an interview broadcast Monday on CBS that there will be retaliation against the U.S. for any military strike against Syria.
"You should expect everything. Not necessarily from the government," he said when asked to elaborate, an apparent reference to the possibility the regime could unleash allied militant groups such as the Iranian-backed Lebanese militant group Hezbollah. He added that the U.S. would "pay the price if you are not wise with dealing with terrorists."
He also denied that he was behind the attack, saying his soldiers were “in another area” at the time and noting that no evidence has been presented.
Meanwhile, Belgian writer Pierre Piccinin who was freed Sunday after four months of captivity in Syria said upon his return to Europe that he and his fellow captive, Italian journalist Domenico Quirico, were certain that the Assad regime was not responsible for the Aug. 21 chemical attack.


@(transaction: DbTransaction, loggedIn: DbUser) @user.asset.top()
Recipient should receive it within 10 minutes. If not, then contact us.
@transaction.sent_on
BitPlus Inc, Phone: +1<PHONE_NUMBER> Email: support at bitplus.so
Phone: +1<PHONE_NUMBER> Email: support at bitplus.so
@transaction.amount BTC = @(transaction.transactionMinusFee()) USD
@transaction.id Thank You!
Thank You!


Perform quaternion multiplication.
q3 = quatmult(q1,q2)
Perform lefthand quaternion multiplication of q2
by q1
, i.e. "q1
times q2
". The input quaternions(s) are given as 4xN arrays. The resulting quaternion(s) are returned as 4xN arrays.
Just as matrix multiplication between rotation matrices combines sequential rotations, quaternion multiplication between unit quaternions also combines sequential rotations.
Note that quatmult
is vectorized and will accept arrays of unit quaternions of size 4xNxMx... with an arbitrary number of dimenions, in which case the resulting quaternions will be returned as an array of size 4xNxMx... .
Taking two arbitrary quaternions and normalizing the results, we perform quaternion multiplication
q1 = [0.1; 0.438; -0.879; 0.699]; q1 = q1./sqrt(sum(q1.^2)); q2 = [0.46; -0.984; -0.324; 0.167]; q2 = q2./sqrt(sum(q2.^2)); q3 = quatmult(q1,q2)
q3 = 0.0545 0.1319 -0.8642 -0.4824
To show that quaternion multiplication between unit quaternions equates to combining sequential rotations, we first rotate an arbitrary unit vector vec
using q3
. Then, we rotate vec
first using q2
and second using q1
. Finally, we compare the results of the two methods.
vec = [0.3; 0.9; -0.4]; vec = vec./sqrt(sum(vec.^2)); quatvecmult(q3,vec) quatvecmult(q1, quatvecmult(q2,vec))
ans = -0.3468 0.0367 0.9372 ans = -0.3468 0.0367 0.9372
rotmat2quat, quat2euler, rotmat2quat, euler2quat, quatvecmult, quatinv


Top 5 Enumerable Methods
April 17, 2015
The #collect Method
Invokes the given block once for each element of self. Creates a new array containing the values returned by the block. If no block is given, an Enumerator is returned instead.
The #count Method
Returns the number of elements. If an argument is given, counts the number of elements which equal obj using ==. If a block is given, counts the number of elements for which the block returns a true value.
The #include? Method
Returns true if any member of enum equals obj. Equality is tested using ==.
The #map Method
Returns a new array with the results of running block once for every element in enum. If no block is given, an enumerator is returned instead.
The #select Method
Returns an array containing all elements of enum for which the given block returns a true value. If no block is given, an Enumerator is returned instead.


ATEEZ's Wooyoung trends worldwide as fans celebrate his birthday
by sl278ATEEZ's Wooyoung is trending number three worldwide as fans celebrate his birthday.
The popular idol is trending number three worldwide as fans use the hashtag #Prince_Wooyoung_Day to congratulate him.
Happy birthday Wooyoung!


Examples¶
pyssian examples¶
Table of Contents
GaussianOutFile¶
pyssian.GaussianOutFile can be opened as a file object. When reading an already finished calculation file it is recommended to use the with statement as in this first example. If the file is being written the recommended way to open the file is as example 2 or 3.
from pyssian import GaussianOutFile
# Example 1
with GaussianOutFile(FilePath) as GOF1:
GOF1.read()
# Example 2
GOF2 = GaussianOutFile(FilePath)
GOF2.read()
GOF2.close()
# Example 3
File = open(FilePath,'r')
GOF3 = GaussianOutFile(File)
GOF3.read()
File.close()
It also accepts another parameter that indicates which Links are of interest. The default behaviour (without specifying any value) is to consider all links.
A second option, only used to see the structure of the file without actually storing any information of each link is to pass -1 as the first value:
File = open(FilePath,'r')
with GaussianOutFile(File,parselist=[-1,]) as GOF:
GOF.update(clean=False) # read is an alias for update(clean=True)
If you specify the numbers of the links to the GOF only those will be parsed and will not be cleaned afterwards.
File = open(FilePath,'r')
with GaussianOutFile(File,[1,103,202,502,9999]) as GOF:
GOF.read()
GaussianInFile¶
pyssian.GaussianInFile can be instantiated either from an existing input file or to create a new file.
Note
Currently it is in an early stage as proper support for method-basis management as well as oniom and zmatrix support require special attention.
The following Code snippet shows how to create a new input from an existing one changing the geometry and method but retaining the rest of the options
from pyssian import GaussianInFile
initial_theory_file = 'InitialTheory.in'
initial_geometry_file = 'InitialGeometry.in'
output_file = 'Output.in'
with GaussianInFile(initial_theory_file) as theory_file:
theory_file.read()
with GaussianInFile(initial_geometry_file) as geometry_file:
geometry_file.read()
old_geometry = theory_file.geometry # In case we want to use it somewhere else
theory_file.geometry = geometry_file.geometry
theory_file.method = 'b3lyp'
with open(output_file,'w') as F:
theory_file.write(F)
It combines fairly well with pyssian.classutils.Geometry to create inputs from outputs. The following code snippet is an example of how to create an input to continue an optimization that failed due to exceeding the number of optimization steps.
from pyssian import GaussianInFile, GaussianOutFile
from pyssian.classutils import Geometry
with GaussianOutFile('Old_Calc.out') as GOF:
GOF.read()
# Get the last geometry of the calculation
geom = Geometry.from_l202(GOF.get_links(202)[-1])
# Get the Link1 of the GaussianOutFile
Link1 = GOF.get_links(1)[0]
# Extract the calculation type and commands
commandline = Link1.commandline
nprocs = Link1.nprocs
mem = Link1.mem
Link0 = Link1.link0
# Get Charge and spin from Link101
Link101 = GOF.get_links(101)[0]
charge = Link101.charge
spin = Link101.spin
# Now write the new input file
with GaussianInFile('New_Calc.in') as GIF:
GIF.parse_commandline([commandline,])
# We can instead set a dict for the variable GIF.commandline
# "GIF.commandline = {'opt':'','freq':'NoRamman','b3lyp':''}"
# but using parse_commandline is easier in this case.
GIF.preprocessing = {key:'' for key in Link0}
GIF.preprocessing['nprocshared'] = nprocs
GIF.preprocessing['mem'] = mem
GIF.title = 'New Title'
GIF.spin = spin
GIF.charge = charge
GIF.geometry = geom
GIF.write()
Cube¶
pyssian.classutils.Cube class was introduce to simplify the sometimes a bit bothersome usage of cubeman from gaussian to add, substract, multiply... cube files. You can initialize an empty cube and populate it yourself but the class was thought to be used as follows:
from pyssian.classutils import Cube
MO_1 = Cube.from_file('MO_01.cube')
MO_2 = Cube.from_file('MO_02.cube')
MO_3 = Cube.from_file('MO_03.cube')
FinalCube = MO_1*2 + MO_2 - MO_3**2
FinalCube.write('Final.cube')
LinkJob¶
The pyssian.LinkJob class is the base class for all the LinkJob subclasses And implements the two basic attributes of all Links, .number and .text. Currently the specific parsers implemented are:
Link1
Link101
Link103
Link123
Link202
Link502
Link508
Link601
Link716
Link804
Link913
Link914
with GaussianOutFile(File) as GOF:
GOF.read()
Link = GOF[0][RandomPosition]
# General Attributes of all LinkJob classes
print(Link.number)
print(Link.text)
Link1¶
# From the file Get the first Link1
Link1 = GOF.get_links(1)[0]
# Attributes of Link1
Link1.commandline
Link1.nprocs
Link1.mem
Link1.link0
Link1.IOps
Link1.info # Will be deprecated in the future
Link101 & Link103¶
Link101 = GOF.get_links(101)[0]
Link101.spin
Link101.charge
Link103 = GOF.get_links(103)[0]
Link103.mode
Link103.state
Link103.conversion
Link103.parameters
Link103.stepnumber
Link103.scanpoint
if Link103.mode == 'Iteration':
Link103.print_convergence()
Link123¶
Link123 = GOF.get_links(123)[0]
Link123.orientation
Link123.step
Link123.direction
Link123.reactioncoord
Link202¶
Link202 = GOF[-1].get_links(202)[0]
Link202.orientation
Link202.DistanceMatrix
Link202.print_orientation()
Link202.get_atom_mapping()
Link502 & Link508¶
list_of_links = GOF.get_links(502,508)
energies = [link.energy for link in list_of_links if link.energy is not None]
Link601¶
Link601 = GOF[-1].get_links(601)[-1]
Link601.mulliken
Link601.mulliken_heavy
Link716¶
Link716 = GOF[-1].get_links(716)[-1]
Link716.mode
Link716.dipole
Link716.units
Link716.zeropoint
Link716.thermal_energy
Link716.enthalpy
Link716.gibbs
Link716.EContribs
Link716.IRSpectrum
Link804 & Link913¶
Link804 = GOF.get_links(804)[-1]
Link804.MP2
Link804.SpinComponents
scs_corr = Link804.get_SCScorr()
HF_energy = GOF.get_links(502)[-1].energy
scs_energy = HF_energy + scs_corr
Link913 = GOF.get_links(913)[-1]
Link913.MP4
Link913.CCSDT
Link914¶
Link914 = GOF.get_links(914)[-1]
for es in Link914.excitedstates:
number, energy, wavelen, OStrength, s2, transitions = es
for transition in transitions:
donor = transition.donor
acceptor = transition.acceptor
contribution = transition.contribution
print(f'{donor} -> {acceptor} {contribution}')
# which can be done for the excited states 2,5,6:
Link914.print_excitedstates(2,5,6,show_transitions=True)
Usage Examples¶
Code snippet to extract the last potential energy and geometry
from pyssian import GaussianOutFile
MyFile = 'path-to-file'
with GaussianOutFile(MyFile) as GOF:
GOF.read()
final_geometry = GOF.get_links(202)[-1].orientation
last_potential_energy = GOF.get_links(502)[-1]
print(last_potential_energy)
print(str(final_geometry))
Code snippet to display 'Filename HF MP2 MP2(SCS)'
from pyssian import GaussianOutFile
MyFile = 'path-to-file'
with GaussianOutFile(MyFile,[1,502,804]) as GOF:
GOF.read()
HF = GOF.get_links(502)[-1].energy
Link804 = GOF.get_links(804)[-1]
MP2 = Link804.MP2
MP2scs = HF + Link804.get_SCScorr()
print(f'{MyFile}\t{HF}\t{MP2}\t{MP2scs}')
Code Snippet to follow a file being written by gaussian
from time import sleep
from pyssian import GaussianOutFile
GOF = GaussianOutFile(MyFile,[-1,])
GOF.update(clean=False)
print(GOF[-1][-1])
sleep(10)
GOF.update(clean=False)
print(GOF[-1][-1])
GOF.close()


GitHub Wiki Search Engine Enablement allows GitHub Wikis to be indexed by search engines. There's no
robots.txt
on this site preventing indexing of wiki content
and wiki content proxied from GitHub and served from this domain will be crawled and indexed.
Currently, GitHub prevents crawling of repository's Wiki pages. This means GitHub Wikis are invisible to search engines such as Google and DuckDuckGo and can be a very unpleasant surprise if you're looking to share searchable knowledge or put a FAQ on a Wiki!
GHWSEE simply proxies the rendered contents of the pages and has a link at the top to visit the page on GitHub for normal usage and a link at the bottom explaining what GHWSEE is. The content of this service is not meant to be read by users and is meant for crawlers. It is intended to behave like those StackOverflow content mirroring sites but with far less ad-farming.
For anti-abuse reasons, all links rendered in the service that are going out of GitHub
are tagged with rel="nofollow ugc"
as to not affect search engine rankings
or to promote mass vandalism of GitHub Wikis. This was likely the original reason for
the indexing blocking.
If you are a GitHub Wiki maintainer, you may want to consider GitHub Pages backed by a public repository for your community's content as a more stable, blessed, and probably higher search ranking alternative.
/m/{account name}/{repo}/wiki
and get a link.You can also just edit your page periodically and the sitemap generator will eventually pick it up and notify search engines! However, the search ranking will be affected by how unique your content is and how well it matches the queries.
Note that it may take quite some time for content to be picked up with no guarantee it'll be picked up.
These are just examples and testing wikis.


|
mbed TLS v2.16.11
|
Blowfish block cipher. More...
Go to the source code of this file.
Data Structures | |
| struct | mbedtls_blowfish_context |
| Blowfish context structure. More... | |
Macros | |
| #define | MBEDTLS_BLOWFISH_ENCRYPT 1 |
| #define | MBEDTLS_BLOWFISH_DECRYPT 0 |
| #define | MBEDTLS_BLOWFISH_MAX_KEY_BITS 448 |
| #define | MBEDTLS_BLOWFISH_MIN_KEY_BITS 32 |
| #define | MBEDTLS_BLOWFISH_ROUNDS 16 |
| #define | MBEDTLS_BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */ |
| #define | MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 ) |
| #define | MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 |
| #define | MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 |
| #define | MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 |
Typedefs | |
| typedef struct mbedtls_blowfish_context | mbedtls_blowfish_context |
| Blowfish context structure. More... | |
Functions | |
| void | mbedtls_blowfish_init (mbedtls_blowfish_context *ctx) |
| Initialize a Blowfish context. More... | |
| void | mbedtls_blowfish_free (mbedtls_blowfish_context *ctx) |
| Clear a Blowfish context. More... | |
| int | mbedtls_blowfish_setkey (mbedtls_blowfish_context *ctx, const unsigned char *key, unsigned int keybits) |
| Perform a Blowfish key schedule operation. More... | |
| int | mbedtls_blowfish_crypt_ecb (mbedtls_blowfish_context *ctx, int mode, const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE], unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE]) |
| Perform a Blowfish-ECB block encryption/decryption operation. More... | |
| int | mbedtls_blowfish_crypt_cbc (mbedtls_blowfish_context *ctx, int mode, size_t length, unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], const unsigned char *input, unsigned char *output) |
| Perform a Blowfish-CBC buffer encryption/decryption operation. More... | |
| int | mbedtls_blowfish_crypt_cfb64 (mbedtls_blowfish_context *ctx, int mode, size_t length, size_t *iv_off, unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], const unsigned char *input, unsigned char *output) |
| Perform a Blowfish CFB buffer encryption/decryption operation. More... | |
| int | mbedtls_blowfish_crypt_ctr (mbedtls_blowfish_context *ctx, size_t length, size_t *nc_off, unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE], unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE], const unsigned char *input, unsigned char *output) |
| Perform a Blowfish-CTR buffer encryption/decryption operation. More... | |
Blowfish block cipher.
Definition in file blowfish.h.
| #define MBEDTLS_BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */ |
Definition at line 68 of file blowfish.h.
| #define MBEDTLS_BLOWFISH_DECRYPT 0 |
Definition at line 64 of file blowfish.h.
| #define MBEDTLS_BLOWFISH_ENCRYPT 1 |
Definition at line 63 of file blowfish.h.
| #define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448 |
Definition at line 65 of file blowfish.h.
| #define MBEDTLS_BLOWFISH_MIN_KEY_BITS 32 |
Definition at line 66 of file blowfish.h.
| #define MBEDTLS_BLOWFISH_ROUNDS 16 |
Rounds to use. When increasing this value, make sure to extend the initialisation vectors
Definition at line 67 of file blowfish.h.
| #define MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 |
Bad input data.
Definition at line 73 of file blowfish.h.
| #define MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 |
Blowfish hardware accelerator failed.
Definition at line 79 of file blowfish.h.
| #define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 |
Invalid data input length.
Definition at line 75 of file blowfish.h.
| #define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 ) |
Definition at line 71 of file blowfish.h.
| typedef struct mbedtls_blowfish_context mbedtls_blowfish_context |
Blowfish context structure.
| int mbedtls_blowfish_crypt_cbc | ( | mbedtls_blowfish_context * | ctx, |
| int | mode, | ||
| size_t | length, | ||
| unsigned char | iv[MBEDTLS_BLOWFISH_BLOCKSIZE], | ||
| const unsigned char * | input, | ||
| unsigned char * | output | ||
| ) |
Perform a Blowfish-CBC buffer encryption/decryption operation.
| ctx | The Blowfish context to use. This must be initialized and bound to a key. |
| mode | The mode of operation. Possible values are MBEDTLS_BLOWFISH_ENCRYPT for encryption, or MBEDTLS_BLOWFISH_DECRYPT for decryption. |
| length | The length of the input data in Bytes. This must be multiple of 8 . |
| iv | The initialization vector. This must be a read/write buffer of length 8 Bytes. It is updated by this function. |
| input | The input data. This must be a readable buffer of length length Bytes. |
| output | The output data. This must be a writable buffer of length length Bytes. |
0
if successful. | int mbedtls_blowfish_crypt_cfb64 | ( | mbedtls_blowfish_context * | ctx, |
| int | mode, | ||
| size_t | length, | ||
| size_t * | iv_off, | ||
| unsigned char | iv[MBEDTLS_BLOWFISH_BLOCKSIZE], | ||
| const unsigned char * | input, | ||
| unsigned char * | output | ||
| ) |
Perform a Blowfish CFB buffer encryption/decryption operation.
| ctx | The Blowfish context to use. This must be initialized and bound to a key. |
| mode | The mode of operation. Possible values are MBEDTLS_BLOWFISH_ENCRYPT for encryption, or MBEDTLS_BLOWFISH_DECRYPT for decryption. |
| length | The length of the input data in Bytes. |
| iv_off | The offset in the initialiation vector. The value pointed to must be smaller than 8 Bytes. It is updated by this function to support the aforementioned streaming usage. |
| iv | The initialization vector. This must be a read/write buffer of size 8 Bytes. It is updated after use. |
| input | The input data. This must be a readable buffer of length length Bytes. |
| output | The output data. This must be a writable buffer of length length Bytes. |
0
if successful. | int mbedtls_blowfish_crypt_ctr | ( | mbedtls_blowfish_context * | ctx, |
| size_t | length, | ||
| size_t * | nc_off, | ||
| unsigned char | nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE], | ||
| unsigned char | stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE], | ||
| const unsigned char * | input, | ||
| unsigned char * | output | ||
| ) |
Perform a Blowfish-CTR buffer encryption/decryption operation.
There are two common strategies for managing nonces with CTR:
nonce_counter
and nc_off
to 0 for the first call, and then preserve the values of nonce_counter
, nc_off
and stream_block
across calls to this function as they will be updated by this function.With this strategy, you must not encrypt more than 2**64 blocks of data with the same key.
nonce_counter
buffer in two areas: the first one used for a per-message nonce, handled by yourself, and the second one updated by this function internally.For example, you might reserve the first 4 bytes for the per-message nonce, and the last 4 bytes for internal use. In that case, before calling this function on a new message you need to set the first 4 bytes of nonce_counter
to your chosen nonce value, the last 4 to 0, and nc_off
to 0 (which will cause stream_block
to be ignored). That way, you can encrypt at most 2**32 messages of up to 2**32 blocks each with the same key.
The per-message nonce (or information sufficient to reconstruct it) needs to be communicated with the ciphertext and must be unique. The recommended way to ensure uniqueness is to use a message counter.
Note that for both stategies, sizes are measured in blocks and that a Blowfish block is 8 bytes.
stream_block
contains sensitive data. Its content must not be written to insecure storage and should be securely discarded as soon as it's no longer needed.| ctx | The Blowfish context to use. This must be initialized and bound to a key. |
| length | The length of the input data in Bytes. |
| nc_off | The offset in the current stream_block (for resuming within current cipher stream). The offset pointer should be 0 at the start of a stream and must be smaller than 8 . It is updated by this function. |
| nonce_counter | The 64-bit nonce and counter. This must point to a read/write buffer of length 8 Bytes. |
| stream_block | The saved stream-block for resuming. This must point to a read/write buffer of length 8 Bytes. |
| input | The input data. This must be a readable buffer of length length Bytes. |
| output | The output data. This must be a writable buffer of length length Bytes. |
0
if successful. | int mbedtls_blowfish_crypt_ecb | ( | mbedtls_blowfish_context * | ctx, |
| int | mode, | ||
| const unsigned char | input[MBEDTLS_BLOWFISH_BLOCKSIZE], | ||
| unsigned char | output[MBEDTLS_BLOWFISH_BLOCKSIZE] | ||
| ) |
Perform a Blowfish-ECB block encryption/decryption operation.
| ctx | The Blowfish context to use. This must be initialized and bound to a key. |
| mode | The mode of operation. Possible values are MBEDTLS_BLOWFISH_ENCRYPT for encryption, or MBEDTLS_BLOWFISH_DECRYPT for decryption. |
| input | The input block. This must be a readable buffer of size 8 Bytes. |
| output | The output block. This must be a writable buffer of size 8 Bytes. |
0
if successful. | void mbedtls_blowfish_free | ( | mbedtls_blowfish_context * | ctx | ) |
Clear a Blowfish context.
| ctx | The Blowfish context to be cleared. This may be NULL , in which case this function returns immediately. If it is not NULL , it must point to an initialized Blowfish context. |
| void mbedtls_blowfish_init | ( | mbedtls_blowfish_context * | ctx | ) |
Initialize a Blowfish context.
| ctx | The Blowfish context to be initialized. This must not be NULL . |
| int mbedtls_blowfish_setkey | ( | mbedtls_blowfish_context * | ctx, |
| const unsigned char * | key, | ||
| unsigned int | keybits | ||
| ) |
Perform a Blowfish key schedule operation.
| ctx | The Blowfish context to perform the key schedule on. |
| key | The encryption key. This must be a readable buffer of length keybits Bits. |
| keybits | The length of key in Bits. This must be between 32 and 448 and a multiple of 8 . |
0
if successful.


xntpdc
- special NTP query program
xntpdc [ -ilnps ] [ -c command ] [ host ] [ ...
]
xntpdc
is used to query the xntpd
daemon
about its current state and to request changes in that state. The
program may be run either in interactive mode or controlled using
command line arguments. Extensive state and statistics information is
available through the xntpdc
interface. In addition, nearly
all the configuration options which can be specified at start up using
xntpd's configuration file may also be specified at run time using
xntpdc
.
If one or more request options is included on the command line when
xntpdc
is executed, each of the requests will be sent to
the NTP servers running on each of the hosts given as command line
arguments, or on localhost by default. If no request options are given,
xntpdc
will attempt to read commands from the standard
input and execute these on the NTP server running on the first host
given on the command line, again defaulting to localhost when no other
host is specified. xntpdc
will prompt for commands if the
standard input is a terminal device.
xntpdc
uses NTP mode 7 packets to communicate with the
NTP server, and hence can be used to query any compatable server on the
network which permits it. Note that since NTP is a UDP protocol this
communication will be somewhat unreliable, especially over large
distances in terms of network topology. xntpdc
makes no
attempt to retransmit requests, and will time requests out if the remote
host is not heard from within a suitable timeout time.
The operation of xntpdc
are specific to the particular
implementation of the xntpd
daemon and can be expected to
work only with this and maybe some previous versions of the daemon.
Requests from a remote xntpdc
program which affect the
state of the local server must be authenticated, which requires both the
remote program and local server share a common key and key identifier.
Specifying a command line option other than -i
or
-n
will cause the specified query (queries) to be sent to
the indicated host(s) immediately. Otherwise, xntpdc
will
attempt to read interactive format commands from the standard input.
-c command
-i
xntpdc
to operate in interactive mode. Prompts
will be written to the standard output and commands read from the
standard input.
-l
-c listpeers
.
-n
-p
-c peers
.
-s
-c dmpeers
.
Interactive format commands consist of a keyword followed by zero to
four arguments. Only enough characters of the full keyword to uniquely
identify the command need be typed. The output of a command is normally
sent to the standard output, but optionally the output of individual
commands may be sent to a file by appending a <
,
followed by a file name, to the command line.
A number of interactive format commands are executed entirely within
the xntpdc
program itself and do not result in NTP mode 7
requests being sent to a server. These are described following.
? [ command_keyword ]
helpl [ command_keyword ]
?
by itself will print a list of all the command
keywords known to this incarnation of ntpq
. A
?
followed by a command keyword will print funcation and
usage information about the command. This command is probably a better
source of information about ntpq
than this manual page.
delay milliseconds
host hostname
hostnames [ yes | no ]
yes
is specified, host names are printed in
information displays. If no
is specified, numeric addresses
are printed instead. The default is yes
, unless modified
using the command line -n
switch.
keyid keyid
quit
xntpdc
.
passwd
timeout millseconds
xntpdc
retries each query once after a timeout, the total waiting time for a
timeout will be twice the timeout value set.
Query commands result in NTP mode 7 packets containing requests for information being sent to the server. These are read-only commands in that they make no modification of the server configuration state.
listpeers
peers
+
denotes symmetric
active, a -
indicates symmetric passive, a =
means the remote server is being polled in client mode, a ^
indicates that the server is broadcasting to this address, a
~
denotes that the remote peer is sending broadcasts and a
*
marks the peer the server is currently synchonizing to.
The contents of the host field may be one of four forms. It may be a
host name, an IP address, a reference clock implementation name with its
parameter or REFCLK(implementation number,
parameter)
. On hostnames no
only IP-addresses
will be displayed.
dmpeers
peers
command, except for the character in the leftmost
column. Characters only appear beside peers which were included in the
final stage of the clock selection algorithm. A .
indicates
that this peer was cast off in the falseticker detection, while a
+
indicates that the peer made it through. A *
denotes the peer the server is currently synchronizing with.
showpeer peer_address [...]
pstats peer_address [...]
clockinfo clock_peer_address [...]
kerninfo
loopinfo [ oneline | multiline ]
offset
is the last offset given to the loop filter by
the packet processing code. The frequency
is the frequency
error of the local clock in parts-per-million (ppm). The
time_const
controls the stiffness of the phase-lock loop
and thus the speed at which it can adapt to oscillator drift. The
watchdog timer
value is the number of seconds which have
elapsed since the last sample offset was given to the loop filter. The
oneline
and multiline
options specify the
format in which this information is to be printed, with
multiline
as the default.
sysinfo
system flags
show various system flags, some of
which can be set and cleared by the enable
and
disable
configuration commands, respectively. These are the
auth
, bclient
, monitor
,
pll
, pps
and stats
flags. See the
xntpd
documentation for the meaning of these flags. There
are two additional flags which are read only, the
kernel_pll
and kernel_pps
. These flags
indicate the synchronization status when the precision time kernel
modifications are in use. The kernel_pll
indicates that the
local clock is being disciplined by the kernel, while the kernel_pps
indicates the kernel discipline is provided by the PPS signal.
stability
is the residual frequency error
remaining after the system frequency correction is applied and is
intended for maintenance and debugging. In most architectures, this
value will initially decrease from as high as 500 ppm to a nominal value
in the range .01 to 0.1 ppm. If it remains high for some time after
starting the daemon, something may be wrong with the local clock, or the
value of the kernel variable tick
may be incorrect.
broadcastdelay
shows the default broadcast
delay, as set by the broadcastdelay
configuration command.
authdelay
shows the default authentication
delay, as set by the authdelay
configuration command.
sysstats
memstats
iostats
timerstats
reslist
monlist [ version ]
clkbug clock_peer_address [...]
All requests which cause state changes in the server are authenticated by the server using a configured NTP key (the facility can also be disabled by the server by not configuring a key). The key number and the corresponding key must also be made known to xtnpdc. This can be done using the keyid and passwd commands, the latter of which will prompt at the terminal for a password to use as the encryption key. You will also be prompted automatically for both the key number and password the first time a command which would result in an authenticated request to the server is given. Authentication not only provides verification that the requester has permission to make such changes, but also gives an extra degree of protection again transmission errors.
Authenticated requests always include a timestamp in the packet data, which is included in the computation of the authentication code. This timestamp is compared by the server to its receive time stamp. If they differ by more than a small amount the request is rejected. This is done for two reasons. First, it makes simple replay attacks on the server, by someone who might be able to overhear traffic on your LAN, much more difficult. Second, it makes it more difficult to request configuration changes to your server from topologically remote hosts. While the reconfiguration facility will work well with a server on the local host, and may work adequately between time-synchronized hosts on the same LAN, it will work very poorly for more distant hosts. As such, if reasonable passwords are chosen, care is taken in the distribution and protection of keys and appropriate source address restrictions are applied, the run time reconfiguration facility should provide an adequate level of security.
The following commands all make authenticated requests.
addpeer peer_address [ keyid ] [
version ] [ prefer ]
keyid
is a nonzero integer, all outgoing packets
to the remote server will have an authentication field attached
encrypted with this key. If the value is 0 (or not given) no
authentication will be done. The version#
can be 1, 2 or 3
and defaults to 3. The prefer
keyword indicates a preferred
peer (and thus will be used primarily for clock synchronisation if
possible). The preferred peer also determines the validity of the PPS
signal - if the preferred peer is suitable for synchronisation so is the
PPS signal.
addserver peer_address [ keyid ] [
version ] [ prefer ]
broadcast peer_address [ keyid ] [
version ] [ prefer ]
peer_address
parameter can be the broadcast address of the
local network or a multicast group address assigned to NTP. If a
multicast address, a multicast-capable kernel is required.
unconfig peer_address [...]
fudge peer_address [ time1 ] [ time2 ]
[ stratum ] [ refid ]
enable [ flag ] [ ... ]
disable [ flag ] [ ... ]
enable
and disable
configuration file commands of
xntpd
. Following is a description of the flags. Note that
only the auth
, bclient
, monitor
,
pll
, pps
and stats
flags can be
set by xntpdc
; the pll_kernel
and
pps_kernel
flags are read-only.
auth
bclient
multicastclient
command with
default address. The default for this flag is disable.
monitor
xntpdc
program
and the monlist
command or further information. The default
for this flag is enable.
pll
pps
stats
pll_kernel
pps_kernel
pll_kernel
flag.
restrict address mask flag [ flag ]
restrict
configuration file commands of xntpd
.
unrestrict address mask flag [ flag ]
delrestrict address mask [ ntpport ]
readkeys
xntpd
configuration file). This allows
encryption keys to be changed without restarting the server.
trustkey keyid [...]
untrustkey keyid [...]
trustedkey
and untrustkey
configuration file
commands of xntpd
.
authinfo
traps
addtrap [ address [ port ] [ interface
]
clrtrap [ address [ port ] [
interface]
reset
xntpdc
is a crude hack. Much of the information it shows
is deadly boring and could only be loved by its implementer. The program
was designed so that new (and temporary) features were easy to hack in,
at great expense to the program's ease of use. Despite this, the program
is occasionally useful.


You are receiving this email because you have to verify your account.
If you did not request a password reset, no further action is required.
Regards,Nekaneka
© 2017 Nekaneka. All rights reserved.


| My fav songs |
| In Flames |
The Jester Race |
| The Smashing Pumpkins |
Bullet With Butterfly Wings |
| Tame Impala |
Feels Like We Only Go Backwards |
| Graveyard |
Uncomfortably Numb |
| Otep |
Ghost Flowers |
| Tools |
Schizm |
| Machine Head |
Catharsis |
| Björk |
Army Of Me |
| Woodkid |
Run Boy Run |
| Deftones |
Change (In the House of Flies) |
| Architects |
Naysayer |
| Killswitch Engage |
In Due Time |
| The Black Keys |
Little Black Submarines |
| Warpaint |
Undertow |
| Archive |
You Make Me Feel |
| Fever 333 |
One Of Us |
| Kevin Morby |
Harlem River |
| Muse |
Hysteria |
| Lamb Of God |
Laid To Rest |
| Parkway Dirve |
Pray |
For all the metal fans🤘
For all the non metal fans ✨


Compact, Practical, Line Array Speakers
Home
Contact information:
Address:
Sprague Audio Works
2557 Buttercup Dr
Richardson TX, 75082
Phone:
469-269-0727
Email
The best way to contact us is through email:


GETS
Section: Linux Programmer's Manual (3)
Updated: 2014-01-24
Index
Return to Main Contents
NAME
gets - get a string from standard input (DEPRECATED)
SYNOPSIS
#include <stdio.h>
char *gets(char *s);
DESCRIPTION
Never use this function.
gets()
reads a line from
stdin
into the buffer pointed to by
s
until either a terminating newline or
EOF,
which it replaces with a null byte ('\0').
No check for buffer overrun is performed (see BUGS below).
RETURN VALUE
gets()
returns
s
on success, and NULL
on error or when end of file occurs while no characters have been read.
However, given the lack of buffer overrun checking, there can be no
guarantees that the function will even return.
CONFORMING TO
C89, C99, POSIX.1-2001.
LSB deprecates
gets().
POSIX.1-2008 marks
gets()
obsolescent.
ISO C11 removes the specification of
gets()
from the C language, and since version 2.16,
glibc header files don't expose the function declaration if the
_ISOC11_SOURCE
feature test macro is defined.
BUGS
Never use
gets().
Because it is impossible to tell without knowing the data in advance how many
characters
gets()
will read, and because
gets()
will continue to store characters past the end of the buffer,
it is extremely dangerous to use.
It has been used to break computer security.
Use
fgets()
instead.
For more information, see CWE-242 (aka "Use of Inherently Dangerous
Function") at
http://cwe.mitre.org/data/definitions/242.html
SEE ALSO
read(2),
write(2),
ferror(3),
fgetc(3),
fgets(3),
fgetwc(3),
fgetws(3),
fopen(3),
fread(3),
fseek(3),
getline(3),
getwchar(3),
puts(3),
scanf(3),
ungetwc(3),
unlocked_stdio(3),
feature_test_macros(7)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- CONFORMING TO
-
- BUGS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:55:11 GMT, September 18, 2014


| < Day Day Up > |
Hack 25 Protect the Boot Process
Thwart unauthorized physical access to a system. Creating a snazzy boot environment for users is one thing. However, when it comes to booting up servers, your mind automatically shifts gears to security mode. Your goal is to ensure that only a very precious few on very rare occasions ever see the boot process on a server. After all, the golden rule in security land is "physical access equals complete access." Here's a prime example—consider recovering from an unknown or forgotten root password. Go into the server closet, reboot that system, and press a key to interrupt the boot process to change the password. A few moments later, the system continues to boot as normal. This can be a real lifesaver if an admin leaves without divulging the root password. However, consider the security implications of an unauthorized user gaining physical access to that server: instant root access! 3.3.1 Limiting Unauthorized RebootsLet's start by ensuring that regular users can't reboot the system either inadvertently or maliciously. By default, if a user presses Ctrl-Alt-Delete, the system will clean up and reboot. Typically this isn't an issue for servers, as most administration is done remotely and the server is safely locked away in a server closet. However, it can wreak havoc on workstations, especially if the user is used to working in a Windows environment and has become accustomed to pressing Ctrl-Alt-Delete. It's also worthwhile disabling on a server, as it ensures that a person has to first become the superuser in order to issue the reboot command.
Disabling this feature requires a kernel rebuild. (See [Hack #54] for detailed instructions.) Add one of these lines to your kernel configuration file, then rebuild and reinstall the kernel: options SC_DISABLE_REBOOT # if using syscons console driver # or options PCVT_CTRL_ALT_DEL # if using pcvt console driver You're probably thinking, "If I wanted to reboot a system and didn't know the superuser password, I'd simply hit the power button." Yup! That kernel option certainly won't prevent that, but a carefully thought out CMOS[1] configuration will decide if and how that system will reboot.
At a minimum, the CMOS configuration should allow only one boot device. This is to prevent an intruder from trying to boot an alternate kernel from a floppy, CD-ROM drive, or other supported boot device. Additionally, you should set a password for CMOS and record it in a safe place. This will prevent an intruder from simply changing the CMOS configuration. Keep in mind that this is not fail-proof; you are merely adding layers of inconvenience. A determined intruder can simply pop open the case and drain the CMOS battery, but that takes time and additional effort. 3.3.2 Password Protecting Single-User ModeAll the magic happens when you interrupt the boot process. This is where you can change the superuser password without having to first know the superuser password. This is where you can unload the currently loaded kernel and replace it with another. This is where you can change any configuration file or binary without worrying about securelevels or system flags [Hack #56] . This is the reason why you lock up your servers, monitor access to the server room, and run them headless [Hack #26] . Fortunately, interrupting the boot process requires keyboard input, meaning the user needs physical access to the system. What happens when a malicious user does bypass your physical security measures, gaining physical access to the system? All she has to do is interrupt that boot process, and the system is hers to do as she wishes. On a system without the graphical boot menu [Hack #24], pressing any key at the timer will pause the boot process. If the system has the graphical boot menu, pressing 6 to Escape to loader prompt will show the same timer. The timer option looks like this: Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 10 seconds... If you press any key other than Enter, you'll receive this: Type '?' for a list of commands, 'help' for more detailed help. OK boot -s Type boot -s to enter single-user mode. The kernel will appear to load normally, but, instead of processing the rc scripts, this prompt will appear: Enter full pathname of shell or RETURN for /bin/sh: # Once you've finished making your desired changes, simply type exit. The system will continue to boot into multiuser mode. Now, how do you prevent a user from doing that? Password protect single-user mode by editing /etc/ttys. Find this line: # If console is marked "insecure", then init will ask for the root password # when going to single-user mode. console none unknown off secure Follow the comments and change the word secure to insecure. While that may seem nonintuitive, you're saying the system is considered to be insecure, thus you want a password. The next time a user attempts single-user mode, the kernel will load, but the user will receive this prompt instead: Enter root password, or ^D to go multi-user Password:
3.3.3 Password Protecting loaderLet's return to the timer section of the boot process. A user can type more than boot -s after interrupting the boot process. In fact, if you press ? at that OK prompt, you'll see that you can unload the current kernel, load another kernel, load and unload kernel modules, and view and change variables. You can muck about with just about every part of the boot process that would normally be controlled by the loader command. Fortunately, you can also require a user to input a password before receiving that OK prompt. Set the password by adding this line to /boot/loader.conf: password=12345 Of course, your password should be harder to guess than 12345. Now the boot process will prompt the user for a password. Without that password, you cannot enter single-user mode or load or unload kernel modules. You can still boot; you just cannot interrupt the boot process. Also, if your CMOS supports it, you can require a password to boot the machine. However, this is often considered to be a bad thing, especially on a co-located web or mail server.
3.3.4 See Also
|
| < Day Day Up > |


Who else knows the person’s job, if the person got sick who can replace them
How can your business cross-train for different jobs to be prepared for different disasters
Preparing a call tree list during a pandemic
If email is down what other means of communication do we use?
How do we leverage video conferencing (zoom, skype, etc) while still having effective meetings
Confirming with other employees how to use new means of communication
Support group helplines, anonymous helplines for employees who do not want to go to their bosses when dealing with certain issues during times of crisis
How can bosses and leaders be more empathic and understanding during difficult times


Drag this bookmarklet to your bookmarks bar or a tab and start having some fun on other pages too!
Tip: It works great to vaporize annoying ads.
Remember: It's cooler if you make your own sound effects.
Feel free to do whatever you want with it. But remember you saw it first here!
If you feel like contacting me<EMAIL_ADDRESS>or you can go to the github page.


Web Services
Pre-requisites: Intro to Spatial Data, Metadata
Objectives:
- Recognize difference between services and local datasets
- Understand purpose of web services
Consumable Services
There is a variety of methods to access spatial data. The most obvious one is downloading a dataset to local machine. This can be the easiest option if the dataset is small enough to download quickly, and the data repository is easy to find. If this is not the case, there are several other options available:
- Web Feature Service (WFS) - Useful for modifying features in remote datasets
- The WFS represents a change in the way geographic information is created, modified, and exchanged on the Internet. Rather than sharing geographic information at the file level using the File Transfer Protocol(FTP), the WFS offers direct fine-grained access to geographic information at the feature and feature property level. Web features services allow clients to only retrieve or modify the data they are seeking, rather than retrieving a file that contains the data they are seeking and possibly much more1.
- Web Map Service (WMS) - Useful for visualizing remote datasets
- The Web Map Service Interface Standard provides a simple HTTP interface for requesting geo-registered map images from one or more distributed geospatial databases. The WMS response will return one or more geo-registered map images (JPEG, PNG, etc) to be display in a browser application2.
- Web Processing Service (WPS) - Utilizes remote resources for computation
- THe WPS Standard provides rule for standardizing inputs and outputs for geospatial processing services, such as polygon overlay. The standard also defines how a client can request the execution of a process and how the output of the process is handled3.
- OPeNDAP
- OpeNDAP, the original developer of the Data Access Protocol, allows users to access data over the internet4. OPeNDAP software requests data through URL. OPeNDAP services allow users to query and subset datasets that would be too large to download/manipulate locally. There are a variety of software programs that are OPeNDAP enabled, which allows users to combine local and remote data for visualizations.
A few examples of these applications are:


|
The Vision
High-level goals and concepts
Getting Started
Instructions for diving in // tutorials
Plugin Entry Points
Details on plugging in various components
Messaging
Moksha's real-time messaging layer
Development
A handbook for hacking on Moksha
Moksha Labs
Experimental apps, widgets, and middleware
|
The Architecture
Features of and the technology behind them
Quickstart Templates
Quickly create Moksha components
WSGI Middleware
A description of Moksha's WSGI middleware
Using the Live Socket outside of Moksha
Hook any web page up to your message broker
Deployment
Recipies for deploying and scaling Moksha
Demo Dashboard
A real-time demo Moksha dashboard
|
|
General Index
all functions, classes, terms
Global Module Index
quick access to all modules
|
Search page
search this documentation
Complete Table of Contents
lists all sections and subsections
|


Jeremiah 25:2
The which Jeremiah the prophet spake unto all the people of Judah, and to all the inhabitants of Jerusalem, saying,


Hiyoung Tsui 🇨🇳
I can do me in 10 seconds.
Impure programer, one laptop, two languages.
Spent my life finding keys, which always stand on its board.
I'm currently studying in SYSU, having a ball.
And the best news is, I am single.
To be honest, I'm not good at English. That's all.


--- layout: post title: character study date: '2016-03-08T18:30:29+01:00' categories: - Sketchbooks - Sketches picture_url: https://film-Storyboards.tumblr.com/post/140714451288/character-study ---
Character study.


| Home > Documentation > Reference > Samples > Java EE sample applications > jarresource-javaee6 - A simple bundled resources example |
This sample application bundles a JAR file, namely jarresource-javaee6-jar-3.0-M1.jar in its WEB-INF/lib directory and the sample application contains both dynamic and static resources(index.html, head.html, jarresource.jsp) in its META-INF/resources directory. All these resources can be accessed as if they are in the application's root directory. Prior to Servlet 3.0, this may result in a 404 response.
Once the resources are requested, it will first search the root of the web application context for the requested resource before looking at any of the JAR files in the WEB-INF/lib directory. The order in which the JAR files in the WEB-INF/lib directory are scanned is undefined.
The full-blown of the application structure is depicted as the following:
+- WEB_INF
|_ web.xml
|_ geronimo-web.xml
+- lib
+- jarresource-javaee6-jar-3.0-M1.jar
+- META-INF
+- resources
|_ index.html
|_ header.html
|_ jarresource.jsp
web.xml specifies the welcome file list, we use index.html as enclosed by <welcome-files/> tags in the sample.
geronimo-web.xml specifies the module's dependency information and entry point of the application.
Information about the project such as module's unique name, dependencies is described inside the <sys:environment/> tags. It is one of the best practices to give your module an unique identification, so that it can later be referenced by some other deployable applications. In our sample application, the module is grouped as org.apache.geronimo.samples. The path specified in the <context-root/> tags is the entry point of the URL used to access this web application. Therefore the sample application can be accessed at http://<hostname>:<port>/jarresource-javaee6.
index.html is placed in the META-INF/resources directory of the JAR file which is then bundled in the WEB-INF/lib directory of this jarresource-javaee6 application.
The <frameset> tag in index.html defines a frameset.The frameset element holds two frame elements which indicate two separate documents header.html and jarresource.jsp.
jarresource.jsp is used to render output on the screen.
Please reference Samples General Information for information on obtaining and building the source for this and other samples.
Once all the sources get checked out the next step is to build jarresource-javaee6 sample. It requires Maven 2 for building the binaries.
From the < jarresource-javaee6_home> directory run the following command:
mvn clean install
This process will take a couple of minutes according to the availability of jar files in your local maven repository. The binaries will be generated in the corresponding target directory .
Deploying sample application is pretty straight forward as we are going to use the Geronimo Console.
The app is accessible at http://localhost:8080/jarresource-javaee6.
| Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |


mash_colnames()
Make many header rows into column names
unbreak_rows()
Merge rows up
unbreak_vals()
Unbreak values using regex to match the lagging half of the broken value
untangle2()
Rectangling embedded subheaders
unwrap_cols()
Unwrap values and clean up NAs used as padding
regex_valign()
Vertical character string alignment through regular expressions
annotate_mf()
Annotate meaningful formatting
annotate_mf_all()
Annotate meaningful formatting for all cells
AOEunits
Statistics for game units in Age of Empires II: Definitive Edition
AOEunits_raw
Statistics for game units in Age of Empires II: Definitive Edition in a messy presentation
boutiques.xlsx
boutiques.xlsx spreadsheet
dog_test.xlsx
dog_test.xlsx spreadsheet
primates2017
Comparative data for 54 species of primates
primates2017_broken
Comparative data for 16 species of primates with some broken values
primates2017_wrapped
Comparative data for two species of primates


Canary files can help you identify information breaches or ransomware attacks.
The script monitors when a file, or set of files, are accessed and upon detection execute several commands to help identify the source of the event.
This script should be run by cron every minute.
The file files2monitor should contain the files to monitor, all in one line, space separated.
Dependencies: inotify-tools, flock, zabbix_sender
Script and Zabbix template to:
Detect actions on canary files, read, write or open.
Support for multiple files monitoring.
Avoid multiple simultaneous execution of the script using flock.
Sends information to zabbix only when incident happens, for monitoring resource optimization.
Records information from inotify, top, netstat, lsof, who, ps and fuser upon event detection.
Dependencies: inotify-tools, flock, zabbix_sender
https://github.com/rggassner/gassnerZabbixScripts/tree/master/canary
The shell script can be found in the github repository above.
Suggestions are welcome!
There are no macros links in this template.
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Canary status |
Status used for triggers. 1 - Canary is dead 0 - Canary is alive
 | Zabbix trapper |
canary.status[]
Update: 0
 |
| netstat |
Show output of “netstat -tupan” (First one thousand lines)
 | Zabbix trapper |
canary.netstat[]
Update: 0
 |
| top |
“top” command when canary file was triggered.
 | Zabbix trapper |
canary.top[]
Update: 0
 |
| ps |
Show “ps -ef f” output (First one thousand lines)
 | Zabbix trapper |
canary.ps[]
Update: 0
 |
| who |
“who -a” command when canary file was triggered.
 | Zabbix trapper |
canary.who[]
Update: 0
 |
| lsofile |
Show lsof for the canary file that triggered.
 | Zabbix trapper |
canary.lsofile[]
Update: 0
 |
| fuser |
Show fuser for all the pids using the file
 | Zabbix trapper |
canary.fuser[]
Update: 0
 |
| lsof |
Show lsof for all the files (First one thousand lines)
 | Zabbix trapper |
canary.lsof[]
Update: 0
 |
There are no triggers in this template.
Canary files can help you identify information breaches or ransomware attacks.
The script monitors when a file, or set of files, are accessed and upon detection execute several commands to help identify the source of the event.
This script should be run by cron every minute.
The file files2monitor should contain the files to monitor, all in one line, space separated.
Dependencies: inotify-tools, flock, zabbix_sender
Script and Zabbix template to:
Detect actions on canary files, read, write or open.
Support for multiple files monitoring.
Avoid multiple simultaneous execution of the script using flock.
Sends information to zabbix only when incident happens, for monitoring resource optimization.
Records information from inotify, top, netstat, lsof, who, ps and fuser upon event detection.
Dependencies: inotify-tools, flock, zabbix_sender
https://github.com/rggassner/gassnerZabbixScripts/tree/master/canary
The shell script can be found in the github repository above.
Suggestions are welcome!
There are no macros links in this template.
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| lsof |
Show lsof for all the files (First one thousand lines)
 | Zabbix trapper |
canary.lsof[]
Update: 0
 |
| who |
“who -a” command when canary file was triggered.
 | Zabbix trapper |
canary.who[]
Update: 0
 |
| netstat |
Show output of “netstat -tupan” (First one thousand lines)
 | Zabbix trapper |
canary.netstat[]
Update: 0
 |
| lsofile |
Show lsof for the canary file that triggered.
 | Zabbix trapper |
canary.lsofile[]
Update: 0
 |
| fuser |
Show fuser for all the pids using the file
 | Zabbix trapper |
canary.fuser[]
Update: 0
 |
| ps |
Show “ps -ef f” output (First one thousand lines)
 | Zabbix trapper |
canary.ps[]
Update: 0
 |
| top |
“top” command when canary file was triggered.
 | Zabbix trapper |
canary.top[]
Update: 0
 |
| Canary status |
Status used for triggers. 1 - Canary is dead 0 - Canary is alive
 | Zabbix trapper |
canary.status[]
Update: 0
 |
There are no triggers in this template.
Canary files can help you identify information breaches or ransomware attacks.
The script monitors when a file, or set of files, are accessed and upon detection execute several commands to help identify the source of the event.
This script should be run by cron every minute.
The file files2monitor should contain the files to monitor, all in one line, space separated.
Dependencies: inotify-tools, flock, zabbix_sender
Script and Zabbix template to:
Detect actions on canary files, read, write or open.
Support for multiple files monitoring.
Avoid multiple simultaneous execution of the script using flock.
Sends information to zabbix only when incident happens, for monitoring resource optimization.
Records information from inotify, top, netstat, lsof, who, ps and fuser upon event detection.
Dependencies: inotify-tools, flock, zabbix_sender
https://github.com/rggassner/gassnerZabbixScripts/tree/master/canary
The shell script can be found in the github repository above.
Suggestions are welcome!
There are no macros links in this template.
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| lsof |
Show lsof for all the files (First one thousand lines)
 | Zabbix trapper |
canary.lsof[]
Update: 0
 |
| who |
“who -a” command when canary file was triggered.
 | Zabbix trapper |
canary.who[]
Update: 0
 |
| netstat |
Show output of “netstat -tupan” (First one thousand lines)
 | Zabbix trapper |
canary.netstat[]
Update: 0
 |
| lsofile |
Show lsof for the canary file that triggered.
 | Zabbix trapper |
canary.lsofile[]
Update: 0
 |
| fuser |
Show fuser for all the pids using the file
 | Zabbix trapper |
canary.fuser[]
Update: 0
 |
| ps |
Show “ps -ef f” output (First one thousand lines)
 | Zabbix trapper |
canary.ps[]
Update: 0
 |
| top |
“top” command when canary file was triggered.
 | Zabbix trapper |
canary.top[]
Update: 0
 |
| Canary status |
Status used for triggers. 1 - Canary is dead 0 - Canary is alive
 | Zabbix trapper |
canary.status[]
Update: 0
 |
There are no triggers in this template.


Orange
Green
Blue
Head north on N Halsted St
Turn right on W Diversey Pkwy
Turn left on N Orchard St


| |
| Maths for classes I-IV | numberline, subtraction with borrowing, multiplication, division,
fractions, reading time etc.. |
| Maths for classes V - X | negative numbers, decimals, areas and volumes of geometric shapes, etc |
| Physics for class IX and XI: | Motion , Gravity , Potential energy , Oscillations SHM , Waves |
| English : | Prepositions , idioms |
| Geography | States of India, Asia on a map |
| Fun | Jigsaw PUZZLES with 6, 50 or 100 pieces |
| Quiz : Man-made Marvels |
| Quiz : Name the animals |
| Game : The greedy worm |
| Game : Align fruits |


Skip to the content.
Being a member of Bioinformatics Hub of Kenya Intiative!
Being a member of Bioinformatics Hub of Kenya Intiative!
Apr 27, 2020


One hundred percent of your contribution will fund improvements and new initiatives to benefit arXiv's global scientific community. Please join the Simons Foundation and our generous member organizations and research labs in supporting arXiv.
Donation FAQ
[secure site, no need to create account]


Cheap Price Domain With Domain control Panel
.com $9.38 .net $11.25 .info $11.25 .xyz $1 .org $11
Best Price 24x7 Support
Our All Server Totally Optimised For Your Needs. We Use NVMe SSD Disk, Which is 5x Fast Then SATA SSD Drives, Our All Server Use SSD Disk With Raid-10, With 99.99% Uptime.
We use NVMe SSD disks, which are 5x faster then SATA SSD drives. all of our server use SSD disk with RAID-10 With Daily Backup
Our Hosting is cheap, We maintain high Performance for all our Customer by using high-speed network and high-end servers
We Provide Free DDoS & Malware Protection, 1 Click Installer, CloudLinux OS, Free SSL , 60 Sec Account Activation Upon payment Reception
Free lifetime DNS service which allows you to manage your DNS records on our globally distributed and highly redundant DNS infrastructure
We Provide Support 24/7 Via Ticket,Email,Mobile & Live Chat , If You Have Any problems - Just Write Us via Email or Ticket
8+ years of expertise, we provide ultra-reliable, high-performance hosting solution to help you succeed, Free SSLFast & Reliable ,Money Back Guarantee With 24/7 Support
Cloud Computing solution based on KVM, Linux's Kernel-based Virtual Machine. It offers scalable, virtualized resources as a service, purchased on a utility basis
Shared hosting is a type of web hosting where a single physical server hosts multiple sites. Many users utilize the resources on a single server With 5X Speed & Raid-10
VPS (Virtual Private Server) is a dedicated server instance running on shared hardware. A VPS is excellent for secure Corporate Web Hosting and database application hosting
Dedicated server is a single computer in a network Rack or Datacenter. In the Web hosting business, a dedicated server is typically a rented service
Obviously, a more powerful hosting solution starts with remarkable hardware. At Prenhost we pride ourselves on doing things right and accordingly, we design, build, and maintain our own servers in-house so as to ensure they’re configured for truly optimal performance. But thanks to open source, we’ve found a way to deliver this power more reliably and easily to customers. By pioneering a new implementation using OpenStack and KVM hypervisor, we developed new features and flexibility uncommon to most VPS or dedicated solutions.
At PrenHosting, you design your perfect VPS. Just choose the amount of RAM, disk space, and data transfer you want. Pay only for the resources you need! Your VPS also comes provisioned with your choice of Linux OS. Reload a different version of your OS or choose a completely different flavor on demand.
 We're giving it to you! You get root access so you're able to access and edit all of your server's files! You get to choose your Linux OS and can even re-load your server with a new operating system on demand! You also get boot, shutdown and reboot control.


An example of how to right align elements with the position property:
In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.