text:
---
author<EMAIL_ADDRESS>comments: true
date: 2014-12-12 19:02:12+00:00
layout: post
link: http://www.econpointofview.com/2014/12/one-semester-in-an-economics-phd/
slug: one-semester-in-an-economics-phd
title: One Semester In An Economics Ph.D.
wordpress_id: 1117
categories:
- Economics
- Grad School
tags:
- Courses
- Economics
- Minnesota
- Program
- Student
---

![](http://oilersnation.com/uploads/Image/chalkboard.jpg)

Everyone knows that feeling during a long drive where you don't remember the last few miles. You're almost in a trance.   That is what the last few months have felt like.

I can't believe it is already the end of my first semester as an economics Ph.D. student. While it feels like I've been here for a long time, it went by in a flash. It was all a blur. However, this post is a short reflection on the bit that hasn't slipped through my mind.

## A Flurry Of Math

Before the semester, I wrote down some of my thoughts on [what I was expecting](http://www.econpointofview.com/2014/08/almost-starting-phd/). While the specifics of this semester have varied, it has been what I expected overall. Lots of work. Lots of math.

Once I'd thought I'd learned more math than I could stomach, I learned some more. And that's great. It's has allowed me to better understand modern economics, even though I'm a skeptic of the [supremacy of math in economics](http://www.econpointofview.com/2013/09/the-heart-of-the-math-in-econ-debate/).

For better or worse, if I want to communicate as a professional economist (which I do), I need to speak the language. The language is math. (Actually it is only small subset of math that uses set theory and constrained maximization) and I have learned some of the language this semester. I'm at the point where I can identify the letters in the language, but not say anything intelligible. It's a start.

On top of my micro courses, which cover math topics like convex analysis and the classic fixed-point theorems for general equilibrium, I also took a math course in real analysis. Basically, I learned how to rigorously prove some things I took for granted in calculus. Coming from a physics undergrad, the math use was completely new. Again, it's not something I want to spend my life doing, but it was good to learn more about these topics. Whether they were the best use of my time...

Overall, the training I am receiving in mathematics helps. More importantly, it has opened my eyes to some of the possible tools that economics can use. I see no reason to restrict my tool set (or set of arrows in my quiver as [Pete Boettke calls them](http://www.coordinationproblem.org/2014/03/from-vienna-to-virginia-rae-27-1-march-2014.html)) to exclude advanced math, computers or econometrics. If I see an arrow that allows me to tackle a problem, I hope I'm the type of economist who grabs that arrow. Sorry to all Austrians who believe logical deduction = economics. Of course, proofs are not necessary nor sufficient for doing economics.

## Economics?

<!-- more -->

I'm in an economics department. I'm an economist and although these tools are interesting, the tools are not the end. Ultimately, this is about understanding society and the economy.

I'm not sure I've learned anything more about society. While this criticism of math as the end is not unique to me, it is important to sometimes comment on the emperors clothes.

Beyond that complaint, I have started to understand two main aspects of economic theory: general equilibrium and macro. (Yes, these are roughly the same thing.) I knew about neither before this year. My macro training was extremely thin, just one course, and I'd never seen a formal general equilibrium model. So it hasn't all been math. I have learned a few models. This year involves going into the heart of core macro models to better understand them. That's new to me and helpful for communicating with macro economics. So I can say I learned some economic models.

On price theory, what I believe is the core of economics, I have learned nothing. I do not better understand those things which got me excited about economics. Nothing. It makes for some boring parts of the year, but I had no expectations that this year would be exciting for me.

To keep me excited about price theory, I've listened to graduate lectures by Walter Williams. It is a style of class that is the opposite of what my courses are. I find the lectures refreshing. I've always had a weird interest in economics and have chosen a different [pedagogical approach.](http://www.econpointofview.com/2013/09/stigler-chapter-1-introduction-to-economic-analysis/)

This may seem like a deep complaint about first-year. It is not. The professors constantly tell us that first-year is not about applying anything. It is simply about learning tools that we can apply later. I'm holding out hope that I will be able to apply some of these tools, but I'm not going to bet my salary on it.

## Other Fun Times

Beyond the coursework, this semester has involved much exploring into fields of economics. Usually professors tell first-years to just keep their head in the coursework and not get distracted with other stuff.

That's not me. My interest in economics is wide and I need to feed that to keep going through the hard times. I can't solve general equilibrium models all day; a guy has to have some fun.

Luckily, I am an [Adam Smith Fellow](http://grad.mercatus.org/all-people/2454) at the Mercatus Center this year. This fall, the fellowship involved a long list of readings (mostly on Hayek and Mises), plus one weekend of discussions this fall. This allowed me to forget about the theorem-proof approach to economics for a bit.

We just received our reading list for the next meetings, so I need to start reading more on Buchanan and Tullock. These are the economists that excited me about economics, so I'm glad to have a constructive path for studying them. Plus, the fellowship connects me to people who are interested in the type of work that excites me.

Also, I've spent much of the last month studying agent-based modeling in economics. While slightly heterodox, it is another tool for studying economic problems that uses some tools from modern mathematics and computer science. However, the tools are not the same ones used in most of economics. Agent-based modeling looks at patterns that emerge from a model, compared to an equilibrium.

Agent-based modeling seems to incorporates many Austrian criticisms of standard Samuelsonian economics. However, I am extremely new to the field and don't understand enough to decide whether it is a useful tool for social scientists or just a fun game to play. For now, I'm enjoying learning about it, because it is fun. Whether it will be an area of research for me, we will see. For now, when I'm bored with classes I have something to learn about.

## Minnesota

The best part of my Ph.D. is that I am doing it at Minnesota. While I had heard horror stories about this place and people love to talk bad about the program, my experience has been phenomenal. That was a huge concern for me. As someone interested in Austrian economics, I was worried about being the black sheep and not being supported. That is not the case.

From day 1, the faculty, fellow first-years, and other years have shown me nothing but respect. They welcome everyone- even crazies like me- with open arms, which is huge when students are already stressed enough with work. I have no reservations about talking with students from other years or professors about problems I'm having.

Also, we first-years work together on problem sets with no sense of rivalry. We are a team trying to become the best economists possible. It leads to a fun atmosphere, but also a challenging experience.

If anyone reading this wants to an economics Ph.D., I urge you to apply to Minnesota. The atmosphere might not be for everyone, but after my first semester I'm sold.

While I could write 10,000 words on my first semester, I will leave this post right here. If people are interested in specific aspects, I'll say more about it.

For now, I'm excited for a break, but I'm excited to come back in January for semester 2. I'm extremely blessed to be an economist (in training).

repository: briancalbrecht/epv

gha_language: Vue

repo_name: briancalbrecht/epv


text:
# Sclerogaster compactus (Tul. & C. Tul.) Sacc., 1895 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syll. fung. (Abellini) 11: 170 (1895)

#### Original name
Octaviania compacta Tul. & C. Tul., 1845

### Remarks
null

repository: mdoering/backbone

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
<!-- MarkdownTOC -->

- [Stale cache policy](#stale-cache-policy)
  - [Summary](#summary)
  - [Comparison with Polly.Cache policy](#comparison-with-pollycache-policy)
  - [Roadmap](#roadmap)
  - [Operation](#operation)
  - [Syntax](#syntax)
    - [Onboard cache target](#onboard-cache-target)
      - [Using Newtonsoft based serialization](#using-newtonsoft-based-serialization)
      - [Using Protobuf-net and LZ4.Pickler based serialization](#using-protobuf-net-and-lz4pickler-based-serialization)
    - [Build policy](#build-policy)
      - [Builder overview](#builder-overview)
      - [Use builder](#use-builder)
        - [PlaintextCacheProvider](#plaintextcacheprovider)
        - [BinaryCacheProvider](#binarycacheprovider)
    - [Configure policy](#configure-policy)
      - [Configure cache policy with FixedAgingStrategy](#configure-cache-policy-with-fixedagingstrategy)
      - [Configure multiple cache policies](#configure-multiple-cache-policies)
    - [Use policy](#use-policy)
  - [Parameters](#parameters)
    - [CacheValue](#cachevalue)
    - [ICacheProvider](#icacheprovider)
    - [ILoggingProvider](#iloggingprovider)
    - [IAgingStrategy](#iagingstrategy)
    - [Serializers](#serializers)
      - [IPlaintextSerializer and IPlaintextCompressor](#iplaintextserializer-and-iplaintextcompressor)
      - [IBinarySerializer and IBinaryCompressor](#ibinaryserializer-and-ibinarycompressor)
  - [Usage recommendations](#usage-recommendations)
    - [Cache response selectively](#cache-response-selectively)
    - [Cache null value](#cache-null-value)
    - [Cache migration](#cache-migration)
    - [Test with chaos tools](#test-with-chaos-tools)

<!-- /MarkdownTOC -->

# Stale cache policy

## Summary

This policy originates from Microsoft Teams product. As of 05/2022, Microsoft Teams has 150M DAU and 200M MAU. Microsoft Teams is the third central communication hub for all Office products (After Lync / Skype/Yammer). As a mission critical product, its resilience is at the heart of Team services.

Teams services want to provide clients an elegant fallback experience during incident times. This policy elegantly fallbacks to stale cache value when downstream services return errors or throw exceptions.

For example, Teams services cache users' license information, with a fresh cache retention period of 1 day and stale cache retention period of 7 days. Normally, only the fresh cache is accessed. During incident times when services could not get latest license information from downstream services, it will use the stale cache value instead.

## Comparison with Polly.Cache policy
* Polly already has a Polly.Cache policy https://github.com/App-vNext/Polly/wiki/Cache. When compared with Polly.Cache, Polly.Contrib.Cache policy has the following additional capabilities:
  1. Stale cache: Fallback to cache based on customized exceptions or unexpected response code from downstream services.
  2. Various cache serialization strategy
  	* By default, the CachePolicy support Json-based serialization and protobuf-based serialization with LZ4Picker compression. You could also provide your own serializer if needed.
  	* When compared with Json, Protobuf with LZ4Pickler combined will result in
  	    - 65% reduction in object size
  		- 40% reduction in deserialization time
  		- 20% reduction in serialization time
* Due to its use case, Polly.Contrib.Cache mostly works with distributed cache, not in-memory cache.

## Roadmap
1. Support caching value types. Currently all onboarding targets need to extend from the base CacheValue abstract class, thus must be reference types.
2. Provide an implementation of ILoggingProvider based on ApplicationInsights.

## Operation
* This is a non-reactive policy with some reactive features (fallback option to return stale cache value). There are in total six conditions which could happen:
  1. When cache is fresh, it will directly return fresh cache value.
  2. When cache is stale and the operation to get backend value succeeds, fetched backend value will be returned and then a background job will be kicked off for refreshing cache.
  3. When cache is stale and the operation to get backend value fails and the error condition (error results or exception being thrown out) matches the predeclared error condition, stale cache value will be returned.
  4. When cache is stale and the operation to get backend value fails and the error condition (error results or exception being thrown out) does not match the predeclared error condition, the operation will fail (error results being returned or exception bubble up).
  5. When cache is missing and the operation to get backend value succeeds, fetched backend value will be returned and then a background job will be kicked off for adding cache.
  6. When cache is missing and the operation to get backend value fails, the operation will fail (null being returned or exception bubble up).

* Please see the following flow chart for more details.

![](imgs/AsyncCachePolicy.png)

## Syntax
### Onboard cache target
* Suppose that there is class TargetToCache needed to be onboarded to AsyncCache policy

```
class TargetClassToOnboard
{
  public string Property { get; set; }
}
```

#### Using Newtonsoft based serialization
* To onboard it to Cache policy, it needs to inherit the **CacheValue** abstract class

```
class TargetClassToOnboard : CacheValue
{
  public string Property { get; set; }
}
```

#### Using Protobuf-net and LZ4.Pickler based serialization
* To onboard it to AsyncCache policy, it needs to inherit the **CacheValue** abstract class

```
[ProtoContract]
class TargetClassToOnboard : CacheValue
{
  [ProtoMember(1)]
  public string Property { get; set; }

  [ProtoMember(2)]
  public override DateTimeOffset? GraceTimeStamp { get; set; }

  [ProtoMember(3)]
  public override bool IsNull { get; set; }
}
```

### Build policy

#### Builder overview

* To make creating AsyncCachePolicy fluent, a policy builder is created. This AsyncCachePolicyBuilder provides a guided way to create either a Polly cache policy or Polly cache policy with option to fall back to cache. More details could be identified from the chart below.

![](imgs/BuilderStepPatternUsage.png)

* A class hierarchy of builder step pattern.

![](imgs/BuilderStepPatternClassHierarchy.png)

#### Use builder
##### PlaintextCacheProvider

1. Build it from scratch approach.

```
// Changes within Startup.cs ConfigureServices() function

public void ConfigureServices(IServiceCollection services)
{
    ...

    // Set up
    services.Configure<FixedAgingStrategyOptions<TResult>>(typeof(TResult).Name, configuration.GetSection(configurationName));
    services.AddSingleton(typeof(IAgingStrategy<TResult>), typeof(FixedAgingStrategy<TResult>));
    services.AddSingleton<ILoggingProvider>(serviceProvider => PolicyBuilderUtilities.CreateLoggingProvider(configuration, serviceProvider));
    services.AddSingleton<IPlainTextSerializer, NewtonsoftJsonSerializer>();
    services.AddSingleton<IPlaintextCompressor, NoOpPlaintextCompressor>();

    var serviceProvider = services.BuildServiceProvider();
    var loggingProvier = new LoggingProvider(
                                       serviceProvider.GetService<IOperationalMetricLogger>(),
                                       serviceProvider.GetService<ILogger<LoggingProvider>>());
    var cacheProvider = new PlaintextCacheProvider<TargetClassToOnboard>(
                                       serviceProvider.GetService<IDistributedCache>(),
                                       serviceProvider.GetService<IPlainTextSerializer>(),
                                       serviceProvider.GetService<ILoggingProvider>());
    var agingStrategy = serviceProvider.GetService<IAgingStrategy<TargetClassToOnboard>>();

    // Build it from scratch
    var asyncCachePolicy = AsyncCachePolicy<TargetClassToOnboard>
             .CreateBuilder( // Create the builder
                true, // An overall policy enable/disable flag
                agingStrategy, // Cache aging strategy which controls when cache will become stale and expired.
                cacheProvider, // An instance of an implementation of ICacheProvider interface
                loggingProvider) // An instance of an implementation of ILoggingProvider interface
             .FallbackToCacheWhenThrows<TimeoutException>()
             .OrFallbackToCacheWhenReturns(result => result.Property.contains("error"))
             .Build();
    ...
```

2. A syntax sugar is provided within the package for ASP.NET CORE as an extension method for IServicesCollection.

```
// Changes within Startup.cs ConfigureServices() function

public void ConfigureServices(IServiceCollection services)
{
    ...
    // Set up
    services.Configure<FixedAgingStrategyOptions<TResult>>(typeof(TResult).Name, configuration.GetSection(configurationName));
    services.AddSingleton(typeof(IAgingStrategy<TResult>), typeof(FixedAgingStrategy<TResult>));
    services.Configure<FixedAgingStrategyOptions<TargetClassToOnboard>>(configuration.GetSection(PolicyBuilderUtilities.GetConfigKeyForFixedAgingStrategyOptions<TargetClassToOnboard>()));
    services.AddSingleton<IAgingStrategy<TargetClassToOnboard>, FixedAgingStrategy<TargetClassToOnboard>>();
    services.AddSingleton<ILoggingProvider>(serviceProvider => PolicyBuilderUtilities.CreateLoggingProvider(configuration, serviceProvider));
    services.AddSingleton<IPlainTextSerializer, NewtonsoftJsonSerializer>();
    services.AddSingleton<IPlaintextCompressor, NoOpPlaintextCompressor>();

    // Build it with syntactic sugar
    var cacheProvider = PolicyBuilderUtilities.CreateDefaultPlainTextCacheProvider<TResult>(serviceProvider);
    var asyncCachePolicy = PolicyBuilderUtilities.CreateAsyncCachePolicyBuilder<TResult>(configuration, serviceProvider, cacheProvider)
                .FallbackToCacheWhenThrows<ServiceException>(
                    exception => exception.HttpResponseMessage.StatusCode >= HttpStatusCode.InternalServerError)
                .OrFallbackToCacheWhenThrows<ServiceException>(
                    exception => (int)exception.HttpResponseMessage.StatusCode == 429)
                .Build();
    ...
}

```

##### BinaryCacheProvider
1. Build it from scratch approach.

```
// Changes within Startup.cs ConfigureServices() function

public void ConfigureServices(IServiceCollection services)
{
    ...

    // Set up
    services.Configure<FixedAgingStrategyOptions<TResult>>(typeof(TResult).Name, configuration.GetSection(configurationName));
    services.AddSingleton(typeof(IAgingStrategy<TResult>), typeof(FixedAgingStrategy<TResult>));
    services.AddSingleton<ILoggingProvider>(serviceProvider => PolicyBuilderUtilities.CreateLoggingProvider(configuration, serviceProvider));
    services.AddSingleton<IPlainTextSerializer, NewtonsoftJsonSerializer>();
    services.AddSingleton<IPlaintextCompressor, NoOpPlaintextCompressor>();

    var serviceProvider = services.BuildServiceProvider();
    var loggingProvier = new LoggingProvider<TargetClassToOnboard>(
                                       serviceProvider.GetService<IOperationalMetricLogger>(),
                                       serviceProvider.GetService<ILogger<LoggingProvider>>());
    var cacheProvider = new BinaryCacheProvider<TResult>(
                                        serviceProvider.GetService<IDistributedCache>(),
                                        serviceProvider.GetService<IBinarySerializer>(),
                                        loggingProvider);
    var agingStrategy = serviceProvider.GetService<IAgingStrategy<TargetClassToOnboard>>();

    // Build it from scratch
    var asyncCachePolicy = AsyncCachePolicy<TargetClassToOnboard>
             .CreateBuilder( // Create the builder
                true, // An overall policy enable/disable flag
                agingStrategy, // Cache aging strategy which controls when cache will become stale and expired.
                cacheProvider, // An instance of an implementation of ICacheProvider interface
                loggingProvider) // An instance of an implementation of ILoggingProvider interface
             .FallbackToCacheWhenThrows<TimeoutException>()
             .OrFallbackToCacheWhenReturns(result => result.Property.contains("error"))
             .Build();
    ...
```

2. A syntax sugar is provided within the package for ASP.NET CORE as an extension method for IServicesCollection.

```
// Changes within Startup.cs ConfigureServices() function

public void ConfigureServices(IServiceCollection services)
{
    ...
    // Set up
    services.Configure<FixedAgingStrategyOptions<TResult>>(typeof(TResult).Name, configuration.GetSection(configurationName));
    services.AddSingleton(typeof(IAgingStrategy<TResult>), typeof(FixedAgingStrategy<TResult>));
    services.Configure<FixedAgingStrategyOptions<TargetClassToOnboard>>(configuration.GetSection(PolicyBuilderUtilities.GetConfigKeyForFixedAgingStrategyOptions<TargetClassToOnboard>()));
    services.AddSingleton<IAgingStrategy<TargetClassToOnboard>, FixedAgingStrategy<TargetClassToOnboard>>();
    services.AddSingleton<ILoggingProvider>(serviceProvider => PolicyBuilderUtilities.CreateLoggingProvider(configuration, serviceProvider));
    services.AddSingleton<IPlainTextSerializer, NewtonsoftJsonSerializer>();
    services.AddSingleton<IPlaintextCompressor, NoOpPlaintextCompressor>();

    // Build it with syntactic sugar
    var cacheProvider = PolicyBuilderUtilities.CreateDefaultBinaryCacheProvider<TResult>(serviceProvider);
    var asyncCachePolicy = PolicyBuilderUtilities.CreateAsyncCachePolicyBuilder<TResult>(configuration, serviceProvider, cacheProvider, loggingProvider)
                .FallbackToCacheWhenThrows<ServiceException>(
                    exception => exception.HttpResponseMessage.StatusCode >= HttpStatusCode.InternalServerError)
                .OrFallbackToCacheWhenThrows<ServiceException>(
                    exception => (int)exception.HttpResponseMessage.StatusCode == 429)
                .Build();
    ...
}

```

### Configure policy

#### Configure cache policy with FixedAgingStrategy

```
// Changes within appsettings.*.json file

"AsyncCachePolicy": {
    "TargetClassToOnboard": { // The class type which inherit the CacheValue abstract class in the first step
        "Enabled": true, // An overall policy enable/disable flag
        "FixedAgingStrategy":
        {
            "GraceRelativeToNow": "00:30:00", // Grace duration relative to now after which the cached item will be considered stale and only applied in fallback condition
            "ExpirationRelativeToNow": "1.00:00:00" // Expiration duration relative to now after which the cached item will be removed
        }
    }
}

```

#### Configure multiple cache policies

```
// Changes within appsettings.*.json file

"AsyncCachePolicy": {
    "TargetClassToOnboard": { // The class type which inherit the CacheValue abstract class in the first step
        "Enabled": true, // An overall policy enable/disable flag
        "FixedAgingStrategy":
        {
            "GraceRelativeToNow": "00:30:00", // Grace duration relative to now after which the cached item will be considered stale and only applied in fallback condition
            "ExpirationRelativeToNow": "1.00:00:00" // Expiration duration relative to now after which the cached item will be removed
        }
    },
    "TargetClass2ToOnboard": { // The class type which inherit the CacheValue abstract class in the first step
        "Enabled": true, // An overall policy enable/disable flag
        "FixedAgingStrategy":
        {
            "GraceRelativeToNow": "00:30:00", // Grace duration relative to now after which the cached item will be considered stale and only applied in fallback condition
            "ExpirationRelativeToNow": "1.00:00:00" // Expiration duration relative to now after which the cached item will be removed
        }
    }
}

```

### Use policy
* The classic Polly syntax will be used
* The cache key and operation name are **required** to be set within the Polly execution context. Syntax sugars (WithCacheKey(string)/WithOperationName(string)) are provided to make setting these two properties more fluent.

```
public TargetClassToOnboard FetchFromBackend(...)
{
    ...
    var result = await asyncCachePolicy.ExecuteAsync(async (context) =>
    {
        ...
        return result;
    }, new Context().WithCacheKey(cacheKey)
                    .WithOperationName(operationName));
    ...
}
```

## Parameters

### CacheValue
* Purpose: Provides a unified data model for any object type T that needs to onboard to Async Cache Policy.
* When to extend: All classes onboarding to the policy need to extend from this abstract class

```
/// <summary>
/// Defines the data model required for async cache policy
/// </summary>
public abstract class CacheValue
{
    private DateTimeOffset? GraceTimeStamp;
    public virtual bool IsFresh();
    public virtual void SetGraceTimeStamp(TimeSpan graceTimeRelativeToNow);
    public virtual bool IsNull();
}
```

### ICacheProvider
* Purpose: Providing a generic cache layer for AsyncCache policy. The cache interface is build on top of common cache interfaces:
1. It applies a type constraint that the value to be cached should inherit from CacheValue
2. It exposes a higher level abstraction of class TResult rather than string/byte level operation which IDistributedCache offers.

```
    public interface ICacheProvider
    {
        Task<TResult> GetAsync<TResult>(string key, Context context)
            where TResult : CacheValue;
        Task SetAsync<TResult>(string key, TResult value, TimeSpan expirationRelativeToNow, TimeSpan graceRelativeToNow, Context context)
            where TResult : CacheValue;
    }
```

* When to override: The default cache provider does not log the cache metrics you cared about or the cache pattern does not match your case.
* Cache operations:
1. Cache set:
    1. The default cache set operation will refresh the cache in a fire and forget fashion.
    2. When using the fallback to stale cache option and retrieving from backend succeeds, the default set operation will always set the cache without comparing the equality of stale cache and retrieved backend values.
    3. All cache set exception will be captured and logged.
2. Cache get:
    1. All cache get exception will be captured and logged.

* There are two implementation of CacheProvider (PlaintextCacheProvider and BinaryCacheProvider) shipped with the package. Their cache operations are completely same. The only difference is that although both of them rely on [IDistributedCache](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.distributed.idistributedcache?view=dotnet-plat-ext-3.1), PlaintextCacheProvider is relying on plaintext interface and BinaryCacheProvider is relying on binary interface.

```
// PlaintextCacheProvider
public static Task<string> GetStringAsync(this IDistributedCache cache, string key, CancellationToken token = default);
public static Task SetStringAsync(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options, CancellationToken token = default)

// BinaryCacheProvider
public static Task<byte[]> GetAsync(string key, CancellationToken token = default);
public static Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default);

```

### ILoggingProvider
* Purpose: Providing a generic logging layer for all AsyncCache policy operations. A default LoggingProvider is provided within AsyncCachePolicy.
* When to override: A default LoggingProvider is provided which is based on IOperationalMetricLogger and ILogger. If you want to plug in other logging interfaces, please override this.
* Configuration: If not specified, default metric names and dimension names will be used; These default values could be overriden by having a LoggingProvider within the AsyncCachePolicy configuration section.

```
"AsyncCachePolicy": {
    "LoggingProvider":
    {
        "MetricNameCacheGetAsyncLatency": "Metric\DistributedCache\GetAsync\Latency",
        "MetricNameCacheSetAsyncLatency": "Metric\DistributedCache\SetAsync\Latency",
        "MetricNameBackendGetAsyncLatency": "Metric\Backend\GetAsync\Latency",
        "MetricNameCacheSerializeLatency": "Metric\DistributedCache\Serialize\Latency",
        "MetricNameCacheDeserializeLatency": "Metric\DistributedCache\Deserialize\Latency",
        "MetricNameCacheCompressLatency": "Metric\DistributedCache\Compress\Latency",
        "MetricNameCacheDecompressLatency": Metric\DistributedCache\Decompress\Latency",
        "MetricNameCacheSerializedSize": "Metric\DistributedCache\SerializedSize",
        "MetricNameCacheCompressedSerializedSize": "Metric\DistributedCache\CompressedSerializedSize",

        "DimensionNameOperationName": "OperationName",
        "DimensionNameIsSuccess": "IsSuccess",
        "DimensionNameIsCacheHit": "IsCacheHit",
        "DimensionNameIsCacheFallback": "IsCacheFallback"
        "DimensionNameSerializationStrategy": "SerializationStrategy",
        "DimensionNameCompressionStrategy": "CompressionStrategy",
    }
}
```

### IAgingStrategy
* Purpose: To provide a cache aging strategy controlling whne cache will become stale and expired.
* When to override: A default FixedAgingStrategy is provided if none if provided. This default implementation will take a relative fixed duration for cache item to become stale and expired. The idea is borrowed from Polly Cache policy's TtlStrategy https://github.com/App-vNext/Polly/wiki/Cache. Please refer to the "Cache response selectively" section within this README for an example.

### Serializers
#### IPlaintextSerializer and IPlaintextCompressor
* Purpose: Serialize an object into plaintext format to store inside cache storage.
* When to overide: There is a built-in Newtonsoft.Json and no compression based serialization shipped as the default implementation. If more customized serializer is needed, then please override it.

#### IBinarySerializer and IBinaryCompressor
* Purpose: Serialize an object into binary format to store inside cache storage.
* When to overide: There is a built-in Protobuf-net and LZ4.Pickler compression based serialization shipped as the default implementation. If more customized serializer is needed, then please override it.

## Usage recommendations

### Cache response selectively
* There can be occasions where you want to cache only certain responses of the execution and not others. For example, when a user's license is retrieved from AAD, we only want to cache licenses which have a teams license. By default, all responses will be cached.

```
    public class ResultAgingStrategy : IAgingStrategy
    {
        public TimeSpan GetGraceRelativeToNow<TResult>(TResult result)
        {
            if (ShouldCacheResult(result))
            {
                return default(Timespan);
            }
            else
            {
                return CalculateGrace(*);
            }
        }

        public TimeSpan GetExpirationRelativeToNow<TResult>(TResult result)
        {
            if (ShouldCacheResult(result))
            {
                return default(Timespan);
            }
            else
            {
                return CalculateExpiration(*);
            }
        }
    }

    // Changes within Startup.cs ConfigureServices() function

    public void ConfigureServices(IServiceCollection services)
    {
        ...
        services.AddSingleton<IAgingStrategy, ResultAgingStrategy>();

        var asyncCachePolicy = services
                .CreateAsyncCachePolicyBuilder<UserLicenseDetailsResponse>(configuration, agingStrategy) // Create the builder
                .Build();
    }
```

### Cache null value
* If null value needs to be cached, then the IsNull preoperty needs to be set to true in the onboarded class.

```
public TargetClassToOnboard FetchFromBackend(...)
{
    ...
    var result = await AsyncCachePolicy.ExecuteAsync(async (context) =>
    {
        ...
        var httpResponseMessage = await httpClient.SendAsync(httpRequestMessage);

        TargetClassToOnboard result = null;
        if (httpResponseMessage.StatusCode = HttpStatusCode.NotFound)
        {
            return new TargetClassToOnboard()
            {
                IsNull = true;
            };
        }
        else
        {
            result = JsonConvert.DeserializeObject<TargetClassToOnboard>(await responseMessage.Content.ReadAsStringAsync());
        }

        return result;
    }, new Context().WithCacheKey(cacheKey)
                    .WithOperationName(operationName));
    ...
}
```

### Cache migration
* Benefits: Consumers of this package are not required to deprecate their existing cache to onboard to the policy.
* Since onboarding this policy will not require a remapping of cache keys. There are three possible scenarios which could happen:
  1. Cache hit and an old cache item (which are set before onboarding and graceTimeStamp == null) is returned. The cache item will always be considered fresh until they get expired. This design is for avoiding massive volume of cache miss and requests to backend.
  2. Cache hit and a new cache item is returned, it's graceTimeStamp will be compared with the current timeStamp to determine whether to query backend and update cache.
  3. Cache miss, a query will be issued to backend and cache will be updated.

```
        /// <summary>
        /// Whether the cache item is still fresh.
        /// </summary>
        /// <returns>True, if fresh; Otherwise, false.</returns>
        public virtual bool IsFresh()
        {
            return !this.graceTimeStamp.HasValue
                || this.graceTimeStamp.Value.CompareTo(DateTimeOffset.Now) > 0;
        }
```

### Test with chaos tools
* Polly provides a chaos tool [Simmy](https://github.com/Polly-Contrib/Simmy) which could wrapped inside the AsyncCachePolicy to simulate dependency failures.

gha_language: C#

gha_license_id: NOASSERTION


text:
# Music Player by Vue Stack

## Clone it

```bash
$ git clone git@github.com:VioletDan/vue-music.git music-player
$ cd music-player
```

## Run it

### Install Dependencies

```bash
$ npm install
```

### Server Side

```bash
$ npm run serve
```

visit http://localhost:2080/music/list in browser

### Client Side

Open another Terminal and run:

```bash
$ npm run client
```

visit http://localhost:3000 in browser

license: ISC

repository: VioletDan/vue-music

repo_name: VioletDan/vue-music


text:
---
metaTitle: "Android - PorterDuff Mode"
description: "Creating a PorterDuff ColorFilter, Creating a PorterDuff XferMode, Apply a radial mask (vignette) to a bitmap using PorterDuffXfermode"
---

# PorterDuff Mode

PorterDuff is described as a way of combining images as if they were "irregular shaped pieces of cardboard" overlayed on each other, as well as a scheme for blending the overlapping parts

## Creating a PorterDuff ColorFilter

[`PorterDuff.Mode`](http://developer.android.com/reference/android/graphics/PorterDuff.Mode.html) is used to create a [`PorterDuffColorFilter`](http://developer.android.com/reference/android/graphics/PorterDuffColorFilter.html). A color filter modifies the color of each pixel of a visual resource.

```java
ColorFilter filter = new PorterDuffColorFilter(Color.BLUE, PorterDuff.Mode.SRC_IN);

```

The above filter will tint the non-transparent pixels to blue color.

The color filter can be applied to a [`Drawable`](http://developer.android.com/reference/android/graphics/drawable/Drawable.html#setColorFilter(android.graphics.ColorFilter)):

```java
drawable.setColorFilter(filter);

```

It can be applied to an [`ImageView`](http://developer.android.com/reference/android/widget/ImageView.html#setColorFilter(int)):

```java
imageView.setColorFilter(filter);

```

Also, it can be applied to a [`Paint`](http://developer.android.com/reference/android/graphics/Paint.html#setColorFilter(android.graphics.ColorFilter)), so that the color that is drawn using that paint, is modified by the filter:

```java
paint.setColorFilter(filter);

```

## Creating a PorterDuff XferMode

An [`Xfermode`](http://developer.android.com/reference/android/graphics/Xfermode.html) (think "transfer" mode) works as a transfer step in drawing pipeline. When an `Xfermode` is applied to a `Paint`, the pixels drawn with the paint are combined with underlying pixels (already drawn) as per the mode:

```java
paint.setColor(Color.BLUE);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));

```

Now we have a blue tint paint. Any shape drawn will tint the already existing, non-transparent pixels blue in the area of the shape.

## Apply a radial mask (vignette) to a bitmap using PorterDuffXfermode

```java
/**
 * Apply a radial mask (vignette, i.e. fading to black at the borders) to a bitmap
 * @param imageToApplyMaskTo Bitmap to modify
 */
public static void radialMask(final Bitmap imageToApplyMaskTo) {
    Canvas canvas = new Canvas(imageToApplyMaskTo);

    final float centerX = imageToApplyMaskTo.getWidth() * 0.5f;
    final float centerY = imageToApplyMaskTo.getHeight() * 0.5f;
    final float radius = imageToApplyMaskTo.getHeight() * 0.7f;

    RadialGradient gradient = new RadialGradient(centerX, centerY, radius,
            0x00000000, 0xFF000000, android.graphics.Shader.TileMode.CLAMP);

    Paint p = new Paint();
    p.setShader(gradient);
    p.setColor(0xFF000000);
    p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
    canvas.drawRect(0, 0, imageToApplyMaskTo.getWidth(), imageToApplyMaskTo.getHeight(), p);
}

```

#### Remarks

"Porter Duff" in itself is an [alpha compositing technique](https://en.wikipedia.org/wiki/Alpha_compositing) named after a [paper by Thomas Porter and Tom Duff.](http://keithp.com/%7Ekeithp/porterduff/p253-porter.pdf)

To summarize, the technique takes two images with alpha channel and generates the output image by combining pixels values of two images. The various combining modes result in different output image. For example, in following image, blue shape (source, existing pixels) is combined with Yellow shape (destination, new pixels) in different modes:

[<img src="https://i.stack.imgur.com/qjlRN.png" alt="Porter duff modes" />](https://i.stack.imgur.com/qjlRN.png)

license: MIT

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
---
author: roundcrisis
comments: true
date: 2008-11-30 17:56:00+00:00
layout: post
slug: linking-imges-in-monorail
title: Linking imges in Monorail
wordpress_id: 50
categories:
- monorail
- NVelocity
- urlhelper
tags:
- castle
- development
- monorail
---

A quick one

Say you have an image or god knows what and  you need to add a link to it, in html you ll do something like

    <a href="http://foo.bar/something.html">
    <img src="..." /> </a>

    in a view you can do this

    <a href=$UrlHelper.For("%{ controller='product'}")>
        <img src="$!Image.Path" alt="$!Name" />
    </a>

extension: markdown


text:
---
title: "185 - Editor"
menu:
  main:
    name: "Editor"
    identifier: "webfrontend/datamanagement/search/editor"
    parent: "webfrontend/datamanagement/search"
---
# Input

The input, modification, recreation etc. of records is done in easydb in the *Editor**. The size of the editor can be different, depending on where the editor is started from. The editors works in the same way, except for some functions that are intended for the respective type of editing.

|Editor|Call|File Preview|History|
|---|---|---|---|
|New editor| By clicking on [New records](/en/webfrontend/datamanagement/new_objects) in the main menu or by drag & drop of files from a local server.|X|-|
|Sidebar|Click on a record from the search result or from the folder preview. |X|-|
|Fullscreen|When using the context menu from the search result and *Lists* in the admin area. |X|X|
|Group Editor|Context menu after selecting multiple records in the search result. |-|-|
|Popover|Little editor accessible from expert search and other editors when searching linked records. |-|-|

The file preview in the editor can be activated and deactivated via . It presents all files of a data set (if specified in the mask) in a preview browser. It provides [Zoomer](../../features/datatypes) and [Office-Viewer](../../features/datatypes) .

> NOTE: Depending on the data type, there are different types of input fields. More information about this can be found [here](../../features/datatypes).

## Functions in the editor {#editor}

|Button|Explanation|Availability|
|---|---|---|
|Edit|Can be activated and deactivated to switch to the [detail view](../editor)|- Sidebar-Editor (Button)
- Context menu in search|
|Save|Saves the record(s) or updates the record(s) after changing or editing fields. The editor closes after saving, when it is used in fullscreen mode.|- Sidebar-Editor (Button)
- Full screen editor (Button)|
|Apply|Is currently only available in the simple full screen editor. Saves the changes to the record without closing the editor.|- Full screen editor|
|Mandatory Fields | must be filled in to save. If a mandatory field consists of several fields for multilingualism, it is sufficient to fill in one language (=field).|- Sidebar-Editor
- Full screen editor|
|Comment (Checkbox)|If set, a comment is requested before saving, which is then displayed in the history. Depending on whether the comment is optional or mandatory, the checkbox can be activated or deactivated or is grayed out.|- Sidebar-Editor
- Full screen editor|
|Copy|Open an unsaved copy of the current record for editing as a new record. |- Sidebar-Editor (Toolbar)
- Full screen editor (Button)
 - Context menu in search|
|Delete|Deletes the current record. Deleted records cannot be found again in easydb. However, old versions of the deleted data record can still be traced by direct access to the database. Currently it is not yet possible to restore them from the database. |- Sidebar-Editor (Toolbar)
- Full screen editor (Button)
 - Context menu in search|
| <  &  > |Appears below the preview for records for which multiple files can be saved. This allows you to browse through the attached files. |- Sidebar-Editor
- Full screen editor|
|File Preview|Turns the file preview on or off. |- Sidebar-Editor (Button)
- Full screen editor (Button)|
|Change History|Hide the modification history (see below). - Sidebar-Editor (Toolbar)
- Full screen editor (Button)||
|Mask|Turns the mask, you may have to save it first to avoid losing your data. |- Sidebar-Editor (Button)
- Full screen editor (Button)|
| |Use and create templates. If you have saved templates, this menu provides a list of your templates.
 *Save as template... *: A template is created based on this data record. A dialog opens in which a name for the template is assigned.
 *Customize*: Change the name of existing templates or delete templates. |- Sidebar-Editor (Toolbar)
- Full screen editor(Button)|
|Navigation|At the bottom of the editor, arrows are displayed to move to the next or previous record from the search result. By entering a position, you can jump to a specific record from the search result. |- Sidebar-Editor (Button)
- Full screen editor (Button)|
|Last Modification |A hint at the bottom of the fields shows when the record has been modified the last time.|- Sidebar-Editor|

The group editor is only available in full screen mode and has some additional functions in addition to the functions of the simple editor. See the section [Group Editor](#groupedit).

> NOTE: Templates can only be saved per user and per object type and/or mask. If a template is supposed to be available to several users, templates must be defined at pool level. Via a pool users have access to general templates and can add them to their own template list.

##  Change History

![Change History in Full Screen Editor](historie_en.png)

In the change history, you can display earlier versions of the data record. The system displays who changed the data record and when and the comment, if one has been created.

# Group Editor {#groupedit}

In the group editor, you can update up to 1000 data records for an object type at the same time. You can select one or more fields, then the update for every data record will be limited only to the specified fields, every other field will remain unaffected by this action.

The group editor is available in the context menu, when more than one record is selected. If the selection contains different object types, the context menu provides the option to select the object type.

![Group-Editor](group_editor_en.jpg)

Editing fields in the group editor works similar to all other editors. In addition to the general functions of the editor, the group editor also offers some special functions:

|Function|Explanation|
|---|---|
|Template|Is the first element on the left in the selection display. You can use the template to edit all records that are listed below the template.|
|Ckeckbox|In front of each field there is a checkbox that has to be activated to change it for all records when saving. Each field has different options for adding, replacing or removing entries.  |
|Search & Replace|For non multi language text fields, the "Find & Replace" checkbox is available. The text in the "Find" field will be replaced by the text in the "Replace" field in all records in the group editor after saving. |
| <  &  > |The pagination appears when more than 50 records have been selected for group editing.|
| | Removes the selected record from the group editor. Only one record at a time can be removed from the group editor. Selecting multiple records is not supported in this mode.|
| |Copies the entries of the selected record to the template.|
| |Saves the template. Saved templates are then available in the group editor at this point in the selection menu for new operations. Templates can only be saved per user and mask. See also [Functions in the Editor](/en/webfrontend/datamanagement/search/editor) |
|Chunk size|By default, the data records in the group editor are processed in 1,000 packets. With very complex data models, a timeout can occur in exceptional cases. In this case, the packet size can be reduced to 100 data sets, so that easydb can process smaller packets one after the other. |
|Comment|Offers the possibility to enter a comment when saving. This is displayed in the change history of the data records. |

## Rights Lists

|Settings|Explanation|
|---|---|
|Add permissions|Add permissions adds the newly entered permissions rows per record. |
|Replace permissions|Replaces the specified permission rows per record. Only the user or group is compared. If the who attribute is empty, its rights will be appended to all existing ACL entries
|Remove permissions|Removes the specified permissions rows per record. Only the user or group is compared. If the who attribute is empty, its rights will be appended to all existing ACL entries
|Remove all permissions|Removes all rights lines on each record. |

## Tags

|Setting|Explanation|
|---|---|
|Set tag(s) will be set for each record. |
|Replace tag(s)|The specified tags replace the existing tags for each record. |
|Remove tag(s)|Remove the specified tags. |
|Remove all Tags|All tags in each record will be removed. |

## Multiple Fields

|Setting|Explanation|
|---|---|
|Add to End|Add multiple field rows at the end of each record. |
|Add at the beginning|Add multiple field rows at the beginning of each record. |
|Replace all|Add the multiple field rows to each record, delete all existing records first. |
|Remove when set|Removes multiple fields from the record if the set fields are identical. |
|Remove All|Remove all multiple fields on the record.|

## Boolean (Yes/No-Fields)

Booleans with Yes/No option are set by a checkbox. You can use masks to define how entries of this field type are displayed in the detail view. See the settings in [Options](../../../administration/datamodel/mask) for Yes/No fields.

repository: programmfabrik/easydb-documentation

gha_language: Go

gha_license_id: MIT

repo_name: programmfabrik/easydb-documentation


text:
EntityFrameworkCore.VisualBasic
===============================

![build status](https://img.shields.io/github/actions/workflow/status/efcore/EFCore.VisualBasic/dotnet.yml?branch=master) [![latest version](https://img.shields.io/nuget/v/EntityFrameworkCore.VisualBasic)](https://www.nuget.org/packages/EntityFrameworkCore.VisualBasic) [![downloads](https://img.shields.io/nuget/dt/EntityFrameworkCore.VisualBasic)](https://www.nuget.org/packages/EntityFrameworkCore.VisualBasic) ![license](https://img.shields.io/github/license/efcore/EFCore.VisualBasic)

Adds VB design-time support to EF Core.

Installation
------------

The latest version is available on [NuGet](https://www.nuget.org/packages/EntityFrameworkCore.VisualBasic).

```sh
dotnet add package EntityFrameworkCore.VisualBasic
```

Usage
-----
After installing this package, you'll be able to [reverse engineer models](https://docs.microsoft.com/ef/core/managing-schemas/scaffolding) and [add migrations](https://docs.microsoft.com/ef/core/managing-schemas/migrations/) into VB projects.

Custom Templates
----------------
VB templates are also available to [customize the reverse engineered code](https://learn.microsoft.com/ef/core/managing-schemas/scaffolding/templates).

```sh
dotnet new install EntityFrameworkCore.VisualBasic.Templates
dotnet new ef-templates -lang VB
```

license: Unlicense

gha_language: Visual Basic .NET

gha_license_id: Unlicense


text:
# Getting Involved

New contributors are always welcome, and when in doubt please ask questions! We strive to be an open and welcoming community. Please be nice to one another.

I recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md) and having a look around as well.  It has information and context about the state of the `fog` project as a whole.

### Coding

* Pick a task:
  * Offer feedback on open [pull requests](https://github.com/fog/fog-google/pulls).
  * Review open [issues](https://github.com/fog/fog-google/issues) for things to help on.
  * [Create an issue](https://github.com/fog/fog-google/issues/new) to start a discussion on additions or features.
* Fork the project, add your changes and tests to cover them in a topic branch.
  * [Fork](https://github.com/fog/fog-google/fork)
  * Create your feature branch (`git checkout -b my-new-feature`)
  * Commit your changes (`git commit -am 'Add some feature'`)
  * Push to the branch (`git push origin my-new-feature`)
  * Create a new pull request
* Commit your changes and rebase against `fog/fog-google` to ensure everything is up to date.
* [Submit a pull request](https://github.com/fog/fog-google/compare/)

### Non-Coding

* Offer feedback on open [issues](https://github.com/fog/fog-google/issues).
* Organize or volunteer at events.

## Contributing Code

This document is very much a work in progress.  Sorry about that.

It's worth noting that, if you're looking through the code, and you'd like to know the history of a line, you may not find it in the history of this repository, since most of the code was extracted from [fog/fog](https://github.com/fog/fog).  So, you can look at the history from commit [fog/fog#c596e](https://github.com/fog/fog/tree/c596e710952aa9c90713da3fbfb3027db0608413) backward for more information.

### Development environment

If you're going to be doing any kind of modifications, I highly recommend using [rbenv](https://github.com/sstephenson/rbenv), [ruby-build](https://github.com/sstephenson/ruby-build), (don't forget the [dependencies](https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment)!) and [bundler](http://bundler.io/).

Once you've got that all installed, run

```shell
$ bundle install
```

to install the required gems.  You might have to [fight a bit](http://www.nokogiri.org/tutorials/installing_nokogiri.html) to get Nokogiri installed.

Then, you should be ready to go!  If you'd like to drop into an interactive shell, configured with your `:test` credential, use

```shell
rake console
```

### Testing

This module is tested with [Minitest](https://github.com/seattlerb/minitest).  Right now, the only tests that exist are live integration tests, found in `test/integration/`.  After completing the installation in the README, (including setting up your credentials and keys,) make sure you have a `:test` credential in `~/.fog`, something like:

```
test:
  google_project: my-project
  google_client_email<EMAIL_ADDRESS>  google_key_location: /path/to/my-project-xxxxxxxxxxxxx.p12
  google_json_key_location: /path/to/my-project-xxxxxxxxxxxxx.json
```

Note that you need both a `.p12` and a `.json` key file for all the tests to pass.

Then you can run all the live tests:

```shell
$ rake test
```

or just one:

```shell
$ rake test TEST=test/integration/compute/test_servers.rb TESTOPTS="--name=TestServers#test_bootstrap_ssh_destroy"
```

#### The transition from `shindo` to Minitest

Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework.  We've started moving away from it, and to Minitest, but some artifacts remain.

- The `test` directory contains the new Minitest tests, which currently only cover live integration testing for `compute`.
- The `tests` directory contains the old `shindo` tests, which generally pass if mocking is turned on.  No promises if mocking is off.
- Travis CI runs the mocked `shindo` tests, though hopefully in the long run it will run the unit and integration `Minitest` tests.  Currently, Google maintains its own Jenkins instance that runs the Minitest integraiton tests.

Follow [#50](https://github.com/fog/fog-google/issues/50) for the status of the transition from `shindo` to Minitest.

#### Some notes about the tests as they stand

The live integration tests for resources, (servers, disks, etc.,) have a few components:

- The `TestCollection` **mixin module** lives in `test/helpers/test_collection.rb` and contains the standard tests to run for all resources, (e.g. `test_lifecycle`).  It also calls `cleanup` on the resource's factory during teardown, to make sure that resources are getting destroyed before the next test run.
- The **factory**, (e.g. `ServersFactory`, in `test/integration/factories/servers_factory.rb`,) automates the creation of resources and/or supplies parameters for explicit creation of resources.  For example, `ServersFactory` initializes a `DisksFactory` to supply disks in order to create servers, and implements the `params` method so that tests can create servers with unique names, correct zones and machine types, and automatically-created disks.  `ServersFactory` inherits the `create` method from `CollectionFactory`, which allows tests to create servers on-demand.
- The **main test**, (e.g. `TestServers`, in `test/integration/compute/test_servers.rb`,) is the test that actually runs.  It mixes in the `TestCollection` module in order to run the tests in that module, it supplies the `setup` method in which it initializes a `ServersFactory`, and it includes any other tests specific to this collection, (e.g. `test_bootstrap_ssh_destroy`).

If you want to create another resource, you should add live integration tests; all you need to do is create a factory in `test/integration/factories/my_resource_factory.rb` and a main test in `test/integration/compute/test_my_resource.rb` that mixes in `TestCollection`.

repository: macressler/fog-google

repo_name: macressler/fog-google


text:
# CAM to WEB

This library may be used to re-stream camera feeds to a web page. It has been written to support live streaming from Unifi UVC G3 and UVC G3 Dome cameras. As of writing this there has been no other easy and open implementation, which **does not require Flash or Java**, to get a RTSP stream displayed on a web page.

## Installation

1. Clone this project to a local work directory
2. Open a terminal and change into the directory of the downloaded project
3. Install composer using the [installation description provided by getcomposer.org](https://getcomposer.org/download/)
4. Run `composer install`
5. You may now start re-streaming videos. See the usage section for details about how to run the library

## Usage

 To start re-streaming open a terminal, change into the src directory and execute the command `./ReStream.php <input_rtsp_url> <feed_number>`. It retrieves the RTSP stream, sends it through a parsing script and creates a new WebSocket server on port 809<feed_number> which will be used to distribute the image data to the clients.
Change the port in index.html to match your feed number and open the file in your browser.

### Command Description

ReStream

* ./ReStream.php ReStream server
* <input_rtsp_url> The stream url. Must be an rtsp url and start with 'rtsp://'
* <feed_number> The feed number. Specifies on which port the websocket server will be opened (809<feed_number>). Must be an integer between (incl.) 0 and 9

FFMPEG

* `-rtsp_transport tcp` Use the TCP protocol to retrieve data from the RTSP url. If you are able to retrieve a stable stream over UDP this option may be omitted
* `-an` Disable Audio
* `-q:v 1` Specify the video quality. 1 = Highest Quality -> higher number = less image quality
* `-b:v 1000k` Output Bitrate (May be omitted)
* `-vsync 0` Only send new frames to the client (Do not send duplicate images)
* `-vf fps=fps=15` Set the frame rate to 15 frames per second
* `-hide_banner` Hides ffmpeg banner
* `-f image2` Specifies the format of the images which will be sent to the streaming script

repository: bernhardbauer/cam-to-web

repo_name: bernhardbauer/cam-to-web


text:
# test-openshift

I am going to create a new repository within the Laboratory Environment for Wordpress project that I will call test-openshift where all the files referring to the tests in openshift will be.

The repository is part of a project ( "Laboratory Environment for Wordpress")  whose objective  is to create a laboratory environment to work through Openshit 3.11 on a website created with Wordpress. In this repository we create container image mysql database for Wordpress based on Centos7.

# Prerequisites
   - Openshift 3.11
   - git
   - github
   - you want

# Running the tests

 The tests are developed in openshitf and we will not show their development and performance. If we note that we will do individualized tests for each image and a global one with all the images at play (wordpress and mysql).

 I will create a directory for mysql, another for wordpress, another for the project (mysql and wordpress) in addition to another in which documentation is provided.

### Diferents deployments

- "wordpress/web-wp.v1.json5" Deployment one instance of wordpress and mysql. No persistence. Simple.

```
$ oc delete all --all -n image-wp
$ oc process -f wordpress/build/web-wp.v1.json  | oc apply -l 'build1 in (web-wp)' -f -

```

# Contributing

In principle it is a personal and public project.

# Versioning

We use [SemVer](https://semver.org/) for versioning. For the versions available, see the tags on this repository.

# Authors

    . jemiliolopez - Initial work - PurpleBooth

# License

This project is licensed under the MIT License original - see the LICENSE file for details

# Acknowledgments
 To all, who are many and anonymous, who have contributed their knowledge and experience by sharing it with people.

repository: devnely-org/test-openshift

repo_name: devnely-org/test-openshift


text:
# SAFE Mobile Browser

The SAFE Mobile Browser is a mobile web browser for the SAFE Network.

**Maintainer:** Ravinder Jangra<EMAIL_ADDRESS>
## Build Status

|CI service|Platform|Status|
|---|---|---|
|Azure DevOps|Android - MacOS| [![Build Status](https://dev.azure.com/maidsafe/SafeMobileBrowser/_apis/build/status/SafeMobileBrowser-%20Android%20-%20CI?branchName=master)](https://dev.azure.com/maidsafe/SafeMobileBrowser/_build/latest?definitionId=13&branchName=master) |
|Azure DevOps|iOS - MacOS| [![Build Status](https://dev.azure.com/maidsafe/SafeMobileBrowser/_apis/build/status/SafeMobileBrowser-%20iOS%20-%20CI?branchName=master)](https://dev.azure.com/maidsafe/SafeMobileBrowser/_build/latest?definitionId=14&branchName=master) |

## Table of Contents

1. [Overview](#Overview)
2. [Features](#Features)
3. [User Guide](#User-Guide)
4. [Development](#Development)
    * [Project Structure](#Project-structure)
    * [Tools required](#Tools-required)
5. [Contributing](#Contributing)
6. [Copyrights](#Copyrights)
7. [Further Help](#Further-Help)
8. [License](#License)

## Overview

The SAFE Mobile Browser is a cross-platform mobile (Android, iOS) browser, built to provide web browsing experience to the users on the SAFE Network.

The app currently uses the [MaidSafe.SafeApp](https://www.nuget.org/packages/MaidSafe.SafeApp/) NuGet package to fetch the content from the network.

## Features

* Fetch static websites from the SAFE Network.
* Bookmarks (sync with SAFE Desktop Browser).

## User Guide

### Installation

The latest version of the SAFE Mobile browser can be downloaded using following links and QR code for the Android and iOS devices.

|Platform|OS & Architecture |Downlaod Link| QR Code|
|-|-|-|-|
|Android| 5.1+ (armeabi-v7a, x86_64) | [AppCenter](https://install.appcenter.ms/orgs/maidsafe-apps/apps/safe-mobile-browser/distribution_groups/community%20releases), [GitHub](https://github.com/maidsafe/safe-mobile-browser/releases) |  |
|iOS    | iOS 11+ (ARM64, x64)       | [AppCenter](https://install.appcenter.ms/orgs/MaidSafe-Apps/apps/Safe-Mobile-Browser-1) |  |

_**Note:** We use Azure App Center to distribute iOS builds. Please register [here](https://forms.gle/Svp7PU6dcf4ywmu19) so we can add you in our testing group so you can download and install the app._

### Browsing SAFE websites

Once installed, mobile browser can be used to browse the websites hosted on Alpha-2 network.

***Note:** Make sure to whitelist/update your IP address on [invite server](https://invite.maidsafe.net) before you start browsering.*

| Browser launch page |Fetching website from the SAFE Network |
|:---:|:---:|
||  |

### Working with bookmarks

To use bookmarks feature in mobile browser, we need to authenticate the app using [SAFE mobile Authenticator app](https://github.com/maidsafe/safe-authenticator-mobile).

| Authenticate | Add bookmark | Remove bookmark | Manage bookmarks |
|:---:|:---:|:--:|:--:|
||  |  |  |

## Development

### Project structure

* **SafeMobileBrowser:**
  * Common UI code and SAFE logic for mobile browser
* **SafeMobileBrowser.Platform:**
  * Platform: Android, iOS
  * Platform specific/dependent code
    * Custom controls for native UI
    * Platform assets
    * Platform dependent service code

### Tools required

* [Visual Studio](https://visualstudio.microsoft.com/) 2017 or later editions with the following workloads:
  * [Mobile development with .NET (Xamarin)](https://visualstudio.microsoft.com/vs/visual-studio-workloads/)

## Contributing

As an open source project, we're excited to accept contributions to the code from outside of MaidSafe and are striving to make that as easy and clean as possible.

With enforced linting and commit style clearly laid out, as well as a list of more accessible issues for any project labelled with Help Wanted.

### Project board

GitHub project boards are used by the maintainers of this repository to keep track and organise development priorities.

There could be one or more active project boards for a repository. One main project will be used to manage all tasks corresponding to the main development stream (master branch). A separate project may be used to manage each PoC and/or prototyping development, and each of them will track a dedicated development branch.

New features which imply a big number of changes will be developed in a separate branch but tracked in the same main project board, re-basing it with master branch regularly and fully testing the feature on its branch before it's merged into the master branch after it was fully approved.

The main project contains the following Kanban columns to track the status of each development task:

* `Triage`: New issues which need to be reviewed and evaluated before taking the decision to implement it.
* `Low Priority`: Issues that will be picked up in the current milestone.
* `In Progress`: Task is assigned to a person and it's in progress.
* `Needs Review`: A Pull Request which completes the task has been sent and it needs to be reviewed.
* `Reviewer approved`: The PR sent was approved by reviewer/s and it's ready for merge.
* `Ready for QA`: The fix for the issue has been merged into master and is ready for final QA testing.
* `Done`: QA has verified that the fix is complete and does not affect anything else.

### Issues

Issues should clearly lay out the problem, platforms experienced on, as well as steps to reproduce the issue.

This aids in fixing the issues but also quality assurance, to check that the issue has indeed been fixed.

Issues are labelled in the following way depending on its type:

* `bug`: The issue is a bug in the product.
* `feature`: The issue is a new and inexistent feature to be implemented.
* `enhancement`: The issue is an enhancement to either an existing feature in the product or to the infrastructure around the development process.
* `blocked`: The issue cannot be resolved as it is blocked by another task. In this case, the task that it is blocked by should be referenced.
* `documentation`: A documentation-related task.
* `e/__`: Specifies the effort required for the task.
* `p/__`: Specifies the priority of the task.

### Commits and Pull Requests

Commit message should follow [these guidelines](https://github.com/autumnai/leaf/blob/master/CONTRIBUTING.md#git-commit-guidelines) and should therefore strive to tackle one issue/feature, and code should be pre-linted before commit.

PRs should clearly link to an issue to be tracked on the project board. A PR that implements/fixes an issue is linked using one of the [GitHub keywords](https://help.github.com/articles/closing-issues-using-keywords). Although these type of PRs will not be added themselves to a project board (just to avoid redundancy with the linked issue). However, PRs which were sent spontaneously and not linked to any existing issue will be added to the project and should go through the same process as any other tasks/issues.

Where appropriate, commits should _always_ contain tests for the code in question.

### Changelog and releases

The changelog is currently maintained manually, each PR sent is expected to have the corresponding modification in the CHANGELOG file, under the 'Not released' section.

The release process is triggered by the maintainers of the package once it is merged to master.

## Copyrights

Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.

## Further help

Get your developer related questions clarified on [SAFE Dev Forum](https://forum.safedev.org/). If you're looking to share any ideas or thoughts on the SAFE Network you can reach out on [SAFE Network Forum](https://safenetforum.org/)

## License

This SAFE Network library is dual-licensed under the Modified BSD ([LICENSE-BSD](LICENSE-BSD) https://opensource.org/licenses/BSD-3-Clause) or the MIT license ([LICENSE-MIT](LICENSE-MIT) https://opensource.org/licenses/MIT) at your option.

repository: ravinderjangra/safe-mobile-browser

repo_name: ravinderjangra/safe-mobile-browser


text:
# HUJI-Assistant
HUJI-Assistant for Android is designed for students in all years of the first degree, wanting to manage and build their curriculum with ease.
With HUJI-Assistant, choosing courses, scanning files, and planning a curriculum is easy!

## How to install the app:
* Install Android Studio: https://developer.android.com/studio/install.
* Clone this `github` repository: `git clone https://github.com/lotanaharoni/HUJI-Assistant.git`
* Open the project via Android Studio.
* (Optional): Install Android Emulator and Android Virtual Device
  * Install Android Emulator - follow the instructions in https://developer.android.com/studio/run/emulator
  * Install AVD - https://developer.android.com/studio/run/managing-avds
  * Note: For best results, we recommend running the app on your own android phone.
* Make sure to sync the 'build.gradle' files (in the app folder and in the main folder).

## Instructions for running the app:
* Sign up with a valid email.
* Enter your courses!

## Open-Source tools:
* [![License](https://img.shields.io/badge/License-MIT-red.svg)](https://www.mit.edu/~amini/LICENSE.md)
* The app is written in [Android Studio](https://developer.android.com/studio) (version 4.1??? at least) using Java - Supported from API level 19 and more.
* We are using [Firebase](https://firebase.google.com/) platform to store all relevant data about users and app data.
* The map service is Open-Street Map Package.

## How to contribute
* Open a new issue or reference an existing issue and assign yourself to the job.
* Go to the main branch, pull the latest version and from it open a new branch with an informative name (e.g. issue12).
* After finish working on the change, open a well documented pull request to merge the done branch.

**note** a pull request will only be accepted after being reviewed and approved by one or more of the authors of the project.

## Improvements and future goals:
### Short-Term goals
* Keep and show profile pictures for users.
### Long-Term goals
* Share courses with friends.
* Show average of each course.
* Finding partners for future courses.
#### Feel free to add whatever you like, we will be happy to see what you have thought of.

## Authors:
[Yuval Dellus](https://github.com/YuvalDellus)
 [Liora Itenberg](https://github.com/liorait)
[Lotan Aharoni](https://github.com/lotanaharoni)

repository: liorait/HujiAssistant

branch_name: refs/heads/main

repo_name: liorait/HujiAssistant


text:
---
layout: default
---

# 1996-04-26 - Welcome to cypherpunks

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: a75116173722fbb5d91b3f9ffd8a8b9b52a6d0adefaa3115b58a3769c0e8f8bf

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-04-26 01:25:40 UTC

Raw Date: Fri, 26 Apr 1996 09:25:40 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Fri, 26 Apr 1996 09:25:40 +0800
To<EMAIL_ADDRESS>Subject: Welcome to cypherpunks
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

--

Welcome to the cypherpunks mailing list!

If you ever want to remove yourself from this mailing list,
you can send mail to<EMAIL_ADDRESS>with the following command
in the body of your email message:

    unsubscribe cypherpunks Cypherpunks Mailing List<EMAIL_ADDRESS>
Here's the general information for the list you've
subscribed to, in case you don't already have it:

About cypherpunks
-----------------

I. Administrivia (please read, boring though it may be)

The cypherpunks list is a forum for discussing personal defenses for
privacy in the digital domain.  It is a high volume mailing list.  If
you don't know how to do something, like unsubscribe, send mail to

<EMAIL_ADDRESS>
and the software robot which answers that address will send you back
instructions on how to do what you want.  If you don't know the
majordomo syntax, an empty message to this address will get you a help
file, as will a command 'help' in the body.  Even with all this
automated help, you may still encounter problems.  If you get really
stuck, please feel free to contact me directly at the address I use
for mailing list management:

<EMAIL_ADDRESS>
Please use this address for all mailing list management issues.  Hint:
if you try to unsubscribe yourself from a different account than you
signed up for, it likely won't work.  Log back into your old account
and try again.  If you no longer have access to that account, mail me
at the list management address above.  Also, please realize that
there will be some cypherpunks messages "in transit" to you at the
time you unsubscribe.  If you get a response that says you are unsubscribed,
but the messages keep coming, wait a day and they should stop.

For other questions, my list management address is not the best place,
since I don't read it every day.  To reach me otherwise, send mail to

<EMAIL_ADDRESS>
This address is appropriate for emergencies (and wanting to get off
the list is never an emergency), such as the list continuously spewing
articles.  Please don't send me mail to my regular mailbox asking to
be removed; I'll just send you back a form letter.

Do not mail to the whole list asking to be removed.  It's rude.  The
-request address is made exactly for this purpose.

To post to the whole list, send mail to

<EMAIL_ADDRESS>
If your mail bounces repeatedly, you will be removed from the list.
Nothing personal, but I have to look at all the bounce messages.

There is no digest version available.

There is an announcements list which is moderated and has low volume.
Announcements for physical cypherpunks meetings, new software and
important developments will be posted there.  Mail to

<EMAIL_ADDRESS>
if you want to be added or removed to the announce list.  All
announcements also go out to the full cypherpunks list, so there is no
need to subscribe to both.

II. About cypherpunks

The cypherpunks list is not designed for beginners, although they are
welcome.  If you are totally new to crypto, please get and read the
crypto FAQ referenced below.  This document is a good introduction,
although not short.  Crypto is a subtle field and a good understanding
will not come without some study.  Please, as a courtesy to all, do
some reading to make sure that your question is not already frequently
asked.

There are other forums to use on the subject of cryptography.  The
Usenet group sci.crypt deals with technical cryptography; cypherpunks
deals with technical details but slants the discussion toward their
social implications.  The Usenet group talk.politics.crypto, as is
says, is for political theorizing, and cypherpunks gets its share of
that, but cypherpunks is all pro-crypto; the debates on this list are
about how to best get crypto out there.  The Usenet group
alt.security.pgp is a pgp-specific group, and questions about pgp as
such are likely better asked there than here.  Ditto for
alt.security.ripem.

The cypherpunks list has its very own net.loon, a fellow named L.
Detweiler.  The history is too long for here, but he thinks that
cypherpunks are evil incarnate.  If you see a densely worded rant
featuring characteristic words such as "medusa", "pseudospoofing",
"treachery", "poison", or "black lies", it's probably him, no matter
what the From: line says.  The policy is to ignore these postings.
Replies have never, ever, not even once resulted in anything
constructive and usually create huge flamewars on the list.  Please,
please, don't feed the animals.

III. Resources.

A. The sci.crypt FAQ

anonymous ftp to rtfm.mit.edu:pub/usenet-by-group/sci.crypt

The cryptography FAQ is good online intro to crypto.  Very much worth
reading.  Last I looked, it was in ten parts.

B. cypherpunks ftp site

anonymous ftp to ftp.csua.berkeley.edu:pub/cypherpunks

This site contains code, information, rants, and other miscellany.
There is a glossary there that all new members should download and
read.  Also recommended for all users are Hal Finney's instructions on
how to use the anonymous remailer system; the remailer sources are
there for the perl-literate.

C. Bruce Schneier's _Applied Cryptography_, published by Wiley

This is required reading for any serious technical cypherpunk.  An
excellent overview of the field, it describes many of the basic
algorithms and protocols with their mathematical descriptions.  Some
of the stuff at the edges of the scope of the book is a little
incomplete, so short descriptions in here should lead to library
research for the latest papers, or to the list for the current
thinking.  All in all, a solid and valuable book.  It's even got
the cypherpunks-request address.

IV. Famous last words

My preferred email address for list maintenance topics only is
<EMAIL_ADDRESS> All other mail, including emergency mail, should go
to<EMAIL_ADDRESS>where I read mail much more regularly.

Enjoy and deploy.

Eric

-----------------------------------------------------------------------------

Cypherpunks assume privacy is a good thing and wish there were more
of it.  Cypherpunks acknowledge that those who want privacy must
create it for themselves and not expect governments, corporations, or
other large, faceless organizations to grant them privacy out of
beneficence.  Cypherpunks know that people have been creating their
own privacy for centuries with whispers, envelopes, closed doors, and
couriers.  Cypherpunks do not seek to prevent other people from
speaking about their experiences or their opinions.

The most important means to the defense of privacy is encryption. To
encrypt is to indicate the desire for privacy.  But to encrypt with
weak cryptography is to indicate not too much desire for privacy.
Cypherpunks hope that all people desiring privacy will learn how best
to defend it.

Cypherpunks are therefore devoted to cryptography.  Cypherpunks wish
to learn about it, to teach it, to implement it, and to make more of
it.  Cypherpunks know that cryptographic protocols make social
structures.  Cypherpunks know how to attack a system and how to
defend it.  Cypherpunks know just how hard it is to make good
cryptosystems.

Cypherpunks love to practice.  They love to play with public key
cryptography.  They love to play with anonymous and pseudonymous mail
forwarding and delivery.  They love to play with DC-nets.  They love
to play with secure communications of all kinds.

Cypherpunks write code.  They know that someone has to write code to
defend privacy, and since it's their privacy, they're going to write
it.  Cypherpunks publish their code so that their fellow cypherpunks
may practice and play with it.  Cypherpunks realize that security is
not built in a day and are patient with incremental progress.

Cypherpunks don't care if you don't like the software they write.
Cypherpunks know that software can't be destroyed.  Cypherpunks know
that a widely dispersed system can't be shut down.

Cypherpunks will make the networks safe for privacy.

[Last updated Mon Feb 21 13:18:25 1994]

{% endraw %}
```

## Thread

+ Return to [April 1996](/archive/1996/04)

+ Return to "[Majordomo@toad.com](/authors/majordomo_at_toad_com)"

+ 1996-04-26 (Fri, 26 Apr 1996 09:25:40 +0800) - Welcome to cypherpunks -<EMAIL_ADDRESS>


text:
+++
widget = "blank"
headless = true  # This file represents a page section.
title = "Teaching"
weight = 20

[design]
  # Choose how many columns the section has. Valid values: 1 or 2.
  columns = "2"

[design.spacing]
  # Customize the section spacing. Order is top, right, bottom, left.
   padding = ["20px", "0", "0px", "0"]
+++

I have been teaching a number of [courses](#courses) at the undergraduate
and graduate programs of the [Dpt. of Computer Engineering and
Informatics](http://www.ceid.upatras.gr/), University of Patras, [Dpt.
of Computer Science in Administration and
Economy](http://www.amaliada.teipat.gr/), [Dpt. of Business Planning and
Information Systems](http://bpis.teipat.gr/), [Dpt. of Bussiness
Administration](http://ba.teiwest.gr/), ATEI of Western Greece and
[Business
Administration](http://www.eap.gr/en/courses/114-business-administration/1308-e8b437893d7dfd1b22186d733d9ccaed),
Hellenic Open University. I have also taught postgraduate courses at the
[Computer Science and Engineering
program](https://www.ceid.upatras.gr/en/programma-metaptyhiakon-spoydon-me-titlo-epistimi-kai-tehnologia-ypologiston)
and the [Informatics for Life Sciences Masters
program](http://www.pez.upatras.gr/), joint with the Departments of
Biology, Medicine, Pharmacy and Physics. I have supervised several
student dissertations and masters theses at the departments above. I have recently finished
co-supervising 2 Ph.D. theses on semantic interoperability and
the evolution of the Web.

repository: koutsomi/academic-homepage

repo_name: koutsomi/academic-homepage


text:
# Rooibos CHANGELOG

## 2.3.0

### Added

  - prints ms duration of each test in the output

### Changed

### Deprecated

### Removed

### Fixed

## 2.2.0

### Added

  - sets the node property on non-node test suites. This allows you to access the global namespace, in case you are testing mixin methods, or other non-scoped code (i.e. the equivalent of accessing `method` as opposed to `m.method` or `myObject.method`)

### Changed

### Deprecated

### Removed

### Fixed

## 2.1.4

### Added

  - adds new Parameter arg directive #RBSNode, to allow creation of nodes in the parameterized args

### Changed

### Deprecated

### Removed

### Fixed

## 2.1.3

### Added

### Changed

 - improves documentation, explaining how to use rooibos-preprocessor from gulp/js toolchains

### Deprecated

### Removed

### Fixed

## 2.1.2

### Added

### Changed

### Deprecated

### Removed

### Fixed

  - collision on overloaded expect calls that on same method name on different objects
  - https://github.com/georgejecook/rooibos/issues/36

## 2.1.1

### Added

### Changed

### Deprecated

### Removed

### Fixed

  - removes debug logging for fake calls
  - https://github.com/georgejecook/rooibos/issues/25
  - https://github.com/georgejecook/rooibos/issues/30
  - https://github.com/georgejecook/rooibos/issues/29

## 2.1.0

### Added
  - Multiple overloads for expectOnce, allowing for easy definition of multi params and return values from the same method invocation

### Changed

### Deprecated

### Removed

### Fixed

  - Potential crash when passing wrong type of arg value into a fake

## 2.0.0

### Added

  - Leverage rooibosC preprocessor
  - Better examples
  - Faster parsing

### Changed

  - Now requires rooibosC to create the test metadata structures

### Deprecated

### Removed

  - Legacy framework support

### Fixed

  - various runtime error scenarios

## 0.2.0 Initial feedback release
 - Compatability with Roku unit test framework
 - Fix issues submitted by initial users
 - Add `'@OnlyParams` tag
 - Add `AssertArrayContainsOnlyValuesOfType` assertion
 - Documentation tweaks
 - Improvements to various assertions
 - Adds more unit testing of assertions
 - Improves test report to show ignored tests
 - Annotations are more flexible, allowing spaces/blank lines and comments between `'@Test`, `'@Only`, `'@Ignore` and function definitions

## 0.1.0 Initial release
 - Core framework
 - Documentation
 - API documentation
 - Build scripts

repository: mcrowson/rooibos

repo_name: mcrowson/rooibos


text:
# Flutter-Dart Test Driven Architecture boilerplate

A Starting project for future TDD projects in Flutter-Dart and representation of Uncle Bob's Clean Architecture.

# Final Architecture

## Features

- **Auth**: Auth Feature.

## Required Folder Structure.
```
├───lib/
│   ├───core/
│   ├───features/
│   │   └───auth/
│   │       ├───data/
│   │       │   ├───datasources/
│   │       │   ├───models/
│   │       │   └───repositories/
│   │       ├───domain/
│   │       │   ├───entities/
│   │       │   ├───repositories/
│   │       │   └───usecases/
│   │       └───presentation/
│   │           ├───bloc/
│   │           ├───pages/
│   │           └───widgets/
.   └───main.dart
```

Simple Demonstration of Folder Structure as per Clean Architecture.
All thanks to [ResoCoder](https://resocoder.com/)

repository: dotlenter/flutter-dart-tdd-boilerplate

repo_name: dotlenter/flutter-dart-tdd-boilerplate


text:
# react-inlinesvg

[![NPM version](https://badge.fury.io/js/react-inlinesvg.svg)](https://www.npmjs.com/package/react-inlinesvg)
[![build status](https://travis-ci.org/gilbarbara/react-inlinesvg.svg)](https://travis-ci.org/gilbarbara/react-inlinesvg)
[![Maintainability](https://api.codeclimate.com/v1/badges/c7e42fe511b80cc25760/maintainability)](https://codeclimate.com/github/gilbarbara/react-inlinesvg/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c7e42fe511b80cc25760/test_coverage)](https://codeclimate.com/github/gilbarbara/react-inlinesvg/test_coverage)

One of the reasons SVGs are awesome is because you can style them with CSS.
Unfortunately, this winds up not being too useful in practice because the style
element has to be in the same document. This leaves you with three bad options:

1. Embed the CSS in the SVG document
    * Can't use your CSS preprocessors (LESS, SASS)
    * Can't target parent elements (button hover, etc.)
    * Makes maintenance difficult
2. Link to a CSS file in your SVG document
    * Sharing styles with your HTML means duplicating paths across your project,
      making maintenance a pain
    * Not sharing styles with your HTML means extra HTTP requests (and likely
      duplicating paths between different SVGs)
    * Still can't target parent elements
    * Your SVG becomes coupled to your external stylesheet, complicating reuse.
3. Embed the SVG in your HTML
    * Bloats your HTML
    * SVGs can't be cached by browsers between pages.
    * A maintenance nightmare

But there's an alternative that sidesteps these issues: load the SVG with an XHR
request and then embed it in the document. That's what this component does.

### Note

The SVG [`<use>`][svg-use-external-source] element can be used to achieve
something similar to this component. See [this article][use-article] for more
information and [this table][use-support] for browser support and caveats.

[![Code Sponsor](https://app.codesponsor.io/embed/aVyak7F2JA5ZCo4usjUoY8he/gilbarbara/react-inlinesvg.svg)](https://app.codesponsor.io/link/aVyak7F2JA5ZCo4usjUoY8he/gilbarbara/react-inlinesvg)

Usage
----

```jsx
import SVG  from 'react-inlinesvg';

<SVG
    src="/path/to/myfile.svg"
    preload={<Loader />}
    onLoad={(src) => {
        myOnLoadHandler(src);
    }}
>
  Here's some optional content for browsers that don't support XHR or inline
  SVGs. You can use other React components here too. Here, I'll show you.
  <img src="/path/to/myfile.png" />
</SVG>
```

Props
----

**src** `string`
The SVG file you want to load. It can be an `url` or a string (base64 or encoded)

**wrapper** `function`
A React class or a function that returns a component instance to be used as the wrapper component. Defaults to `React.createFactory('span')`

**preloader** `node`
A component to be shown while the SVG is loading.

**cacheGetRequests** `boolean`
A boolean to only request SVGs once. Default is `false`.

**uniquifyIDs** `boolean`
A boolean that create unique IDs for each icon by hashing it. Default is `true`.

**uniqueHash** `string`
A string to use with `uniquifyIDs`. Default to a random 8 characters string `[A-Za-z0-9]`

**onLoad** `function`
A callback to be invoked upon successful load.
This will receive 2 arguments: the `src` prop and a `isCached` boolean

**onError** `function`
A callback to be invoked if loading the SVG fails.
This will receive a single argument:

- a xhr `RequestError` with:

```js
{
    ...,
    isHttpError: bool,
    status: number
}
```

- or an `InlineSVGError`, which has the following properties:

```js
{
    name: 'InlineSVGError',
    isSupportedBrowser: bool,
    isConfigurationError: bool,
    isUnsupportedBrowserError: bool,
    message: string
}
```

Browser Support
----

Any browsers that support inlining SVGs and XHR will work. The component goes out of its way to handle IE9's weird XHR support so, IE9 and up get your SVG;
lesser browsers get the fallback.
We use [httpplease](https://github.com/matthewwithanm/httpplease.js) for XHR requests.

CORS
----

If loading SVGs from another domain, you'll need to make sure it allows [CORS].

XSS Warning
----

This component places the loaded file into your DOM, so you need to be careful
about XSS attacks. Only load trusted content, and don't use unsanitized user
input to generate the `src`!

[CORS]: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
[svg-use-external-source]: http://css-tricks.com/svg-use-external-source
[use-article]: http://taye.me/blog/svg/a-guide-to-svg-use-elements/
[use-support]: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use#Browser_compatibility

Credits
----
Thanks to [@matthewwithanm](https://github.com/matthewwithanm) for creating this component and so kindly transfer it to me.
I'll definitely keep the good work! ❤

repository: Diogomartf/react-inlinesvg

repo_name: Diogomartf/react-inlinesvg


text:
# Advent 2018
Solutions to Advent of Code 2018, in Scala

## What is this?

These are my solutions to some of the Advent of Code 2018 problems, written in the Scala programming language.
The aim is to have type-safe, correct, thoroughly tested solutions that work with any input. Brewity and raw speed are secondary concerns.

## Usage

- Each day is a separate [sbt](https://www.scala-sbt.org/) project with its own directory.
- Type `sbt run` to run the solution, or `sbt test` to run the corresponding test suite.

## Contributing

These are *my* solutions. Please don't contribute your own solutions here.
However, if you find or fix a bug, I welcome a report or a pull request!