text:
<?xml version="1.0" encoding="utf-8"?>
<doc>
  <assembly>
    <name>Microsoft.Owin.Security.MicrosoftAccount</name>
  </assembly>
  <members>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.IMicrosoftAccountAuthenticationProvider">
      Especifica los métodos de devolución de llamada que el objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware" /> invoca para habilitar el control del desarrollador sobre el proceso de autenticación./&amp;gt;
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.IMicrosoftAccountAuthenticationProvider.Authenticated(Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext)">
      Se invoca cuando Microsoft autentica un usuario correctamente
      <returns>Un objeto <see cref="T:System.Threading.Tasks.Task" /> que representa la operación completada.</returns>
      <param name="context">Contiene información acerca de la sesión de inicio de sesión, así como el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> del usuario.</param>
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.IMicrosoftAccountAuthenticationProvider.ReturnEndpoint(Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountReturnEndpointContext)">
      Se invoca antes de que el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> se guarde en una cookie local y el explorador se redirija a la dirección URL solicitada originalmente.
      <returns>Un objeto <see cref="T:System.Threading.Tasks.Task" /> que representa la operación completada.</returns>
    </member>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext">
      Contiene información acerca de la sesión de inicio de sesión, así como el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> del usuario.
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.#ctor(Microsoft.Owin.IOwinContext,Newtonsoft.Json.Linq.JObject,System.String)">
      Inicializa un objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext" />
      <param name="context">El entorno OWIN.</param>
      <param name="user">El usuario serializado por JSON</param>
      <param name="accessToken">El token de acceso que proporciona el servicio de autenticación de Microsoft</param>
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.AccessToken">
      Obtiene token de acceso que proporciona el servicio de autenticación de Microsoft
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.Email">
      Obtiene la dirección de correo electrónico del usuario
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.FirstName">
      Obtiene el nombre del usuario
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.Id">
      Obtiene el identificador de usuario de la cuenta Microsoft
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.Identity">
      Obtiene el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> que representa el usuario
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.LastName">
      Obtiene el apellido del usuario
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.Name">
      Obtiene el nombre de usuario
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.Properties">
      Obtiene o establece un contenedor de propiedades para las propiedades de autenticación comunes
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext.User">
      Obtiene el usuario serializado por JSON
    </member>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware">
      Middleware de OWIN para la autenticación de usuarios mediante el servicio de cuenta Microsoft
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware.#ctor(Microsoft.Owin.OwinMiddleware,Owin.IAppBuilder,Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions)">
      Inicializa un objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware" />
      <param name="next">El siguiente middleware en la canalización OWIN que se debe invocar</param>
      <param name="app">La aplicación OWIN</param>
      <param name="options">Las opciones de configuración del middleware</param>
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware.CreateHandler">
      Proporciona el objeto <see cref="T:Microsoft.Owin.Security.Infrastructure.AuthenticationHandler" /> para el procesamiento de las solicitudes relacionadas con la autenticación.
      <returns>Un objeto <see cref="T:Microsoft.Owin.Security.Infrastructure.AuthenticationHandler" /> configurado con el objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions" /> que se proporciona al constructor.</returns>
    </member>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions">
      Opciones de configuración para <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware" />
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.#ctor">
      Inicializa un <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions" /> nuevo.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.BackchannelCertificateValidator">
      Obtiene o establece un validador de certificado anclado que se usará para validar los extremos que se usan en las comunicaciones de canal secundario que pertenecen a la cuenta Microsoft.
      <returns>El validador de certificado anclado.</returns>
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.BackchannelHttpHandler">
      El objeto HttpMessageHandler que se usa para comunicarse con Microsoft.Esto no puede establecerse al mismo tiempo que el objeto BackchannelCertificateValidator a menos que el valor se pueda convertir a tipo heredado de un objeto WebRequestHandler.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.BackchannelTimeout">
      Obtiene o establece un valor de tiempo de espera en milisegundos para las comunicaciones de canal secundario con Microsoft.
      <returns>El tiempo de espera del canal secundario.</returns>
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.CallbackPath">
      La ruta de acceso de la solicitud en la ruta de acceso base de la aplicación en la que se devolverá el agente de usuario.El middleware procesará esta solicitud cuando llegue.El valor predeterminados es "/signin-microsoft".
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.Caption">
      Obtiene o establece el texto que el usuario puede mostrar en una interfaz de usuario de inicio de sesión.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.ClientId">
      El identificador del cliente de aplicación que ha firmado el servicio de autenticación de Microsoft.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.ClientSecret">
      El secreto del cliente de aplicación que ha firmado el servicio de autenticación de Microsoft.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.Provider">
      Obtiene o establece el objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.IMicrosoftAccountAuthenticationProvider" /> que se utiliza para controlar los eventos de autenticación.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.Scope">
      Una lista de los permisos que se deben solicitar.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.SignInAsAuthenticationType">
      Obtiene o establece el nombre de otro middleware de autenticación que será responsable de emitir realmente un objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> de usuario.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions.StateDataFormat">
      Obtiene o establece el tipo que se usa para proteger los datos que controla el middleware.
    </member>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider">
      Implementación de <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.IMicrosoftAccountAuthenticationProvider" /> predeterminada.
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider.#ctor">
      Inicializa un objeto <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider" /> nuevo.
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider.Authenticated(Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticatedContext)">
      Se invoca cuando Microsoft autentica un usuario correctamente
      <returns>Un objeto <see cref="T:System.Threading.Tasks.Task" /> que representa la operación completada.</returns>
      <param name="context">Contiene información acerca de la sesión de inicio de sesión, así como el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> del usuario.</param>
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider.OnAuthenticated">
      Obtiene o establece la función que se invoca cuando se invoca el método Authenticated.
    </member>
    <member name="P:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider.OnReturnEndpoint">
      Obtiene o establece la función que se invoca cuando se invoca el método ReturnEndpoint.
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationProvider.ReturnEndpoint(Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountReturnEndpointContext)">
      Se invoca antes de que el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> se guarde en una cookie local y el explorador se redirija a la dirección URL solicitada originalmente.
      <returns>Un objeto <see cref="T:System.Threading.Tasks.Task" /> que representa la operación completada.</returns>
      <param name="context">Contiene información acerca de la sesión de inicio de sesión, así como el objeto <see cref="T:System.Security.Claims.ClaimsIdentity" /> del usuario</param>
    </member>
    <member name="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountReturnEndpointContext">
      Proporciona información de contexto a los proveedores de middleware.
    </member>
    <member name="M:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountReturnEndpointContext.#ctor(Microsoft.Owin.IOwinContext,Microsoft.Owin.Security.AuthenticationTicket)">
      Inicializa un <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountReturnEndpointContext" /> nuevo.
      <param name="context">Entorno OWIN</param>
      <param name="ticket">El vale de autenticación.</param>
    </member>
    <member name="T:Owin.MicrosoftAccountAuthenticationExtensions">
      Métodos de extensión para usar <see cref="T:Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationMiddleware" />
    </member>
    <member name="M:Owin.MicrosoftAccountAuthenticationExtensions.UseMicrosoftAccountAuthentication(Owin.IAppBuilder,Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions)">
      Autenticar usuarios mediante la cuenta Microsoft
      <returns>El objeto <see cref="T:Owin.IAppBuilder" /> actualizado</returns>
      <param name="app">El objeto <see cref="T:Owin.IAppBuilder" /> se pasa al método de configuración</param>
      <param name="options">Opciones de configuración de middleware</param>
    </member>
    <member name="M:Owin.MicrosoftAccountAuthenticationExtensions.UseMicrosoftAccountAuthentication(Owin.IAppBuilder,System.String,System.String)">
      Autenticar usuarios mediante la cuenta Microsoft
      <param name="app">El objeto <see cref="T:Owin.IAppBuilder" /> se pasa al método de configuración</param>
      <param name="clientId">El identificador del cliente de aplicación que ha firmado el servicio de autenticación de Microsoft</param>
      <param name="clientSecret">El secreto del cliente de aplicación que ha firmado el servicio de autenticación de Microsoft</param>
    </member>
  </members>
</doc>


text:
Install all needed gems to run the tests:

    appraisal install

The gems are installed into the global gem list.
The Gemfiles in the `gemfiles` folder are also re-generated.

## Run Tests

For all supported Rails/ActiveRecord versions:

    rake

Or for specific rails version:

    appraisal rails_4.2 rake

Or for one particular test file:

    appraisal rails_5.0 ruby test/controllers/articles_controller_test.rb

Or down to one test case:

    appraisal rails_5.0 ruby test/controllers/articles_controller_test.rb  -n "/shows new article/"

redpajama_set_name: RedPajamaGithub


text:
<?php
namespace Robo\Task\Docker;

class Result extends \Robo\Result
{

    /**
     * Do not print result, as it was already printed
     */
    protected function printResult()
    {
    }

    /**
     * @return null|string
     */
    public function getCid()
    {
        if (isset($this['cid'])) {
            return $this['cid'];
        }
        return null;
    }

    /**
     * @return null|string
     */
    public function getContainerName()
    {
        if (isset($this['name'])) {
            return $this['name'];
        }
        return null;
    }
}


text:
require 'rails_helper'

RSpec.describe MDRPI::UsagePolicy, type: :model do
  context 'Extends LocalizedName' do
    it { is_expected.to have_many_to_one :publication_info }
    it { is_expected.to validate_presence :publication_info }
  end
end


text:
<!doctype html>

<!---
Copyright 2017 The AMP Start Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain magna copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{{#lune}}

<html ⚡>
  {{> ../../utils/amp-page-head.snip.html}}
  <body class="lune lune-noir lune-theme-dark">
    {{> ../../components/navbar/navbar.snip.html }}

    {{> partials/product/product.snip.html }}
  </body>
</html>
{{/lune}}


text:
import sys

low, high = int(sys.argv[1]), int(sys.argv[2])

def sum_extras(mlt, extra):
    hump  = mlt if low % mlt else 0   # Don't double count first multiple
    soff  = low - (low % mlt) + hump  # Offset starting point for counting no. of multiples
    count = (high - soff) / mlt + 1   # No. of multiples between offset start and max
    total = count * extra             # Add the extra value for each multiple
    return total

print high - low + 1 + sum_extras(3, 2) + sum_extras(5, 4) + sum_extras(15, 8)


text:
package org.apache.hadoop.hbase.regionserver.wal;

import java.util.concurrent.atomic.AtomicLong;

public class HLogMetrics {

  public static class Metric {
    public long min = Long.MAX_VALUE;
    public long max = 0;
    public long total = 0;
    public int count = 0;

    synchronized void inc(final long val) {
      min = Math.min(min, val);
      max = Math.max(max, val);
      total += val;
      ++count;
    }

    synchronized Metric get() {
      Metric copy = new Metric();
      copy.min = min;
      copy.max = max;
      copy.total = total;
      copy.count = count;
      this.min = Long.MAX_VALUE;
      this.max = 0;
      this.total = 0;
      this.count = 0;
      return copy;
    }
  }

  // For measuring latency of writes
  static Metric writeTime = new Metric();
  static Metric writeSize = new Metric();
  // For measuring latency of syncs
  static Metric syncTime = new Metric();
  //For measuring slow HLog appends
  static AtomicLong slowHLogAppendCount = new AtomicLong();
  static Metric slowHLogAppendTime = new Metric();

  public static Metric getWriteTime() {
    return writeTime.get();
  }

  public static Metric getWriteSize() {
    return writeSize.get();
  }

  public static Metric getSyncTime() {
    return syncTime.get();
  }

  public static long getSlowAppendCount() {
    return slowHLogAppendCount.get();
  }

  public static Metric getSlowAppendTime() {
    return slowHLogAppendTime.get();
  }
}


text:
package com.nikita.recipiesapp.views.steps;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;

import com.facebook.drawee.view.SimpleDraweeView;
import com.nikita.recipiesapp.App;
import com.nikita.recipiesapp.R;
import com.nikita.recipiesapp.actions.AddSelectedRecipeToWidget;
import com.nikita.recipiesapp.actions.SelectStep;
import com.nikita.recipiesapp.common.AppState;
import com.nikita.recipiesapp.common.models.Recipe;
import com.nikita.recipiesapp.common.models.Step;
import com.nikita.recipiesapp.common.redux.Renderer;

/**
 * An activity representing a list of Steps. This activity
 * has different presentations for handset and tablet-size devices. On
 * handsets, the activity presents a list of items, which when touched,
 * lead to a {@link StepDetailActivity} representing
 * item details. On tablets, the activity presents the list of items and
 * item details side-by-side using two vertical panes.
 */
public class StepListActivity extends AppCompatActivity implements Renderer<AppState> {
  private final StepListController stepListController = new StepListController(this::changeStep, v -> addToWidgetClick());
  private boolean shouldOpenDetailsActivity = true;
  private ActionBar actionBar;
  private SimpleDraweeView headerImageView;
  private Toolbar toolbar;
  private CollapsingToolbarLayout collapsingToolbarLayout;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.step_list_activity);

    toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    actionBar = getSupportActionBar();
    //noinspection ConstantConditions
    actionBar.setDisplayHomeAsUpEnabled(true);

    FloatingActionButton fab = findViewById(R.id.fab);
    if (fab != null) {
      fab.setOnClickListener(view -> StepDetailActivity.start(this));
    }
    headerImageView = findViewById(R.id.header_image);
    collapsingToolbarLayout = findViewById(R.id.toolbar_layout);

    RecyclerView recyclerView = findViewById(R.id.step_list);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(stepListController.getAdapter());

    shouldOpenDetailsActivity = findViewById(R.id.step_detail_container) == null;

    App.appStore.subscribe(this);
  }

  @Override
  public void render(@NonNull AppState appState) {
    Recipe recipe = appState.selectedRecipe();
    if (headerImageView != null) {
      headerImageView.setImageURI(recipe.image);
    }
    if (collapsingToolbarLayout != null) {
      collapsingToolbarLayout.setTitle(recipe.name);
    }
    toolbar.setTitle(recipe.name);
    actionBar.setTitle(recipe.name);
    stepListController.setData(recipe.ingredients, recipe.steps, appState.selectedStep());
  }

  private void changeStep(Step step) {

    App.appStore.dispatch(new SelectStep(step));

    if (shouldOpenDetailsActivity) {
      StepDetailActivity.start(this);
    }
  }

  private void addToWidgetClick() {
    App.appStore.dispatch(new AddSelectedRecipeToWidget());
  }
}


text:
namespace VotingApplication.Data.Migrations
{
    using System.Data.Entity.Migrations;

    public partial class Unique_Ballot_Choice : DbMigration
    {
        public override void Up()
        {
            Sql(@"
                set nocount on;
                WITH grouping AS (
                    SELECT
                        v.Id,
                        row_number() over (PARTITION BY v.Ballot_Id, v.Choice_Id ORDER BY v.Choice_Id) AS [num]
                    FROM
                        Votes v
                )

                DELETE v from Votes v JOIN grouping g ON g.Id = v.Id
                WHERE g.num > 1
            ");
            CreateIndex("Votes", new string[2] { "Choice_Id", "Ballot_Id" }, true, "IX_ChoiceBallot");
        }

        public override void Down()
        {
            DropIndex("Votes", "IX_ChoiceBallot");
        }
    }
}


text:
ACCEPTED

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

#### Published in
J. Fac. Sci. Univ. Tokyo, Sect. 3, Bot. 6:383. 1956

#### Original name
null

### Remarks
null


text:
package natlab.tame.tamerplus.analysis;

import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;

import natlab.tame.tamerplus.utils.NodePrinter;
import natlab.tame.tir.TIRNode;
import ast.ASTNode;

import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;

public class UDDUWeb implements TamerPlusAnalysis
{
    public static boolean DEBUG = false;

    private UDChain fUDChain;
    private DUChain fDUChain;
    private Table<String, TIRNode, Integer> fUDWeb = HashBasedTable.create();
    private Table<String, TIRNode, Integer> fDUWeb = HashBasedTable.create();

    public UDDUWeb(ASTNode<?> tree) {}

    @Override
    public void analyze(AnalysisEngine engine)
    {
        fUDChain = engine.getUDChainAnalysis();
        fDUChain = engine.getDUChainAnalysis();

        if (DEBUG) System.out.println("\nUse Definition Definition Use Web analysis results");
        constructUDDUWeb();
    }

    private void constructUDDUWeb()
    {
        int color = 0;

        for (TIRNode visitedStmt : fUDChain.getVisitedStmtsOrderedList())
        {
            HashMap<String, HashSet<TIRNode>> duMap = fDUChain.getUsesMapForDefinitionStmt(visitedStmt);
            if (duMap != null && !duMap.isEmpty())
            {
                for (String variableName : duMap.keySet())
                {
                    if (!isMarkedInDUWeb(visitedStmt, variableName))
                    {
                        markDefinition(visitedStmt, variableName, color);
                        color++;
                    }
                }
            }
        }
    }

    private void markDefinition(TIRNode visitedStmt, String variableName, Integer color)
    {
        fDUWeb.put(variableName, visitedStmt, color);

        if(DEBUG) {
          System.out.format("Def of %s colored with\t%s in \t%s\n", variableName, color,
              NodePrinter.printNode(visitedStmt));
        }

        HashSet<TIRNode> useSet = fDUChain.getUsesMapForDefinitionStmt(visitedStmt).get(variableName);

        if (useSet == null)
        {
            return;
        }

        for (TIRNode use : useSet)
        {
            if (!isMarkedInUDWeb(use, variableName))
            {
                markUse(use, variableName, color);
            }
        }
    }

    private void markUse(TIRNode visitedStmt, String variableName, Integer color)
    {
        fUDWeb.put(variableName, visitedStmt, color);

        if(DEBUG) {
          System.out.format("Use of %s colored with\t%s in \t%s\n", variableName, color,
              NodePrinter.printNode(visitedStmt));
        }

        Set<TIRNode> definitionSet = fUDChain.getDefinitionsMapFoUseStmt(visitedStmt).get(variableName);

        if (definitionSet == null)
        {
            return;
        }

        for (TIRNode definition : definitionSet)
        {
            if (!isMarkedInDUWeb(definition, variableName))
            {
                markDefinition(definition, variableName, color);
            }
        }
    }

    private boolean isMarkedInDUWeb(TIRNode visitedStmt, String variableName)
    {
       return fDUWeb.get(variableName, visitedStmt) != null;
    }

    private boolean isMarkedInUDWeb(TIRNode visitedStmt, String variableName)
    {
       return fUDWeb.get(variableName, visitedStmt) != null;
    }

    /**
     * Returns the coloring of a variable in all the statements where it's used
     * @param variableName
     * @return map - key: use statement of the variable, value: color
     */
    public Map<TIRNode, Integer> getNodeAndColorForUse(String variableName)
    {
        return fUDWeb.row(variableName);
    }

    /**
     * Returns the coloring of a variable in all the statements where it's defined
     * @param variableName
     * @return map - key: definition statement of the variable, value: color
     */
    public Map<TIRNode, Integer> getNodeAndColorForDefinition(String variableName)
    {
      return fDUWeb.row(variableName);
    }

    public LinkedList<TIRNode> getVisitedStmtsLinkedList()
    {
        return fUDChain.getVisitedStmtsOrderedList();
    }

    public UDChain getUDChain(){
    	return fUDChain;
    }

    public DUChain getDUChain(){
    	return fDUChain;
    }
}


text:
package uk.nhs.hdn.common.reflection.toString.toStringGenerators;

import org.jetbrains.annotations.NotNull;

import static java.util.Arrays.deepToString;

public final class ObjectArrayToStringGenerator extends AbstractToStringGenerator<Object[]>
{
	@NotNull
	public static final ToStringGenerator<?> ObjectArrayToStringGeneratorInstance = new ObjectArrayToStringGenerator();

	private ObjectArrayToStringGenerator()
	{
	}

	@SuppressWarnings("MethodCanBeVariableArityMethod")
	@NotNull
	@Override
	public String toString(@NotNull final Object[] value)
	{
		return deepToString(value);
	}
}


text:
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { ListsFacade } from '../../../modules/list/+state/lists.facade';
import { List } from '../../../modules/list/model/list';
import { ProgressPopupService } from '../../../modules/progress-popup/progress-popup.service';
import { NzMessageService, NzModalRef } from 'ng-zorro-antd';
import { debounceTime, filter, first, map, skip, switchMap, tap } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest, concat, Observable } from 'rxjs';
import { WorkshopDisplay } from '../../../model/other/workshop-display';
import { WorkshopsFacade } from '../../../modules/workshop/+state/workshops.facade';

@Component({
  selector: 'app-merge-lists-popup',
  templateUrl: './merge-lists-popup.component.html',
  styleUrls: ['./merge-lists-popup.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class MergeListsPopupComponent implements OnInit {

  lists$: Observable<List[]>;

  workshops$: Observable<WorkshopDisplay[]>;

  selectedLists: List[] = [];

  merging = false;

  deleteAfter = false;

  constructor(private listsFacade: ListsFacade, private progressService: ProgressPopupService,
              private modalRef: NzModalRef, private message: NzMessageService,
              private translate: TranslateService, private workshopsFacade: WorkshopsFacade) {
  }

  public setSelection(list: List, selected: boolean): void {
    if (selected) {
      this.selectedLists.push(list);
      this.listsFacade.load(list.$key);
    } else {
      this.selectedLists = this.selectedLists.filter(l => l.$key !== list.$key);
    }
  }

  ngOnInit(): void {
    this.workshops$ = combineLatest([this.workshopsFacade.myWorkshops$, this.listsFacade.allListDetails$]).pipe(
      debounceTime(100),
      map(([workshops, lists]) => {
        return workshops
          .map(workshop => {
            return {
              workshop: workshop,
              lists: workshop.listIds
                .map(key => {
                  const list = lists.find(c => c.$key === key);
                  if (list !== undefined) {
                    list.workshopId = workshop.$key;
                  }
                  return list;
                })
                .filter(l => l !== undefined && l.name)
                .filter((l: List) => !l.isLarge())
            };
          })
          .filter(display => display.lists.length > 0)
          .sort((a, b) => a.workshop.index - b.workshop.index);
      })
    );
    this.lists$ = combineLatest([this.listsFacade.myLists$, this.workshops$]).pipe(
      debounceTime(100),
      map(([lists, workshops]) => {
        // lists category shows only lists that have no workshop.
        return lists
          .filter(l => {
            return workshops.find(w => w.workshop.listIds.indexOf(l.$key) > -1) === undefined;
          })
          .map(l => {
            delete l.workshopId;
            return l;
          });
      }),
      map(lists => {
        return lists.sort((a, b) => b.index - a.index).filter((l: List) => !l.isLarge() && l.name);
      })
    );
  }

  public merge(): void {
    concat(...this.selectedLists.map(list => this.listsFacade.loadAndWait(list.$key)))
      .pipe(
        skip(this.selectedLists.length - 1),
        switchMap(() => this.listsFacade.newList()),
        switchMap(list => {
          this.merging = true;
          return this.listsFacade.allListDetails$.pipe(
            filter(listsDetails => {
              return this.selectedLists.reduce((res, l) => res && listsDetails.find(ld => ld.$key === l.$key) !== undefined, true);
            }),
            first(),
            map((listsDetails) => [listsDetails.filter(ld => this.selectedLists.find(l => l.$key === ld.$key) !== undefined), list])
          );
        }),
        map(([lists, resultList]: [List[], List]) => {
          lists.forEach(list => resultList.merge(list));
          return resultList;
        }),
        tap(resultList => this.listsFacade.addList(resultList)),
        switchMap((list) => {
          return this.progressService.showProgress(this.listsFacade.myLists$.pipe(
            map(lists => lists.find(l => l.createdAt.toMillis() === list.createdAt.toMillis() && l.$key !== undefined)),
            filter(l => l !== undefined),
            first()
          ), 1, 'Saving_in_database');
        }),
        first(),
        tap(() => {
          if (this.deleteAfter) {
            this.selectedLists.forEach(list => {
              this.listsFacade.deleteList(list.$key, list.offline);
            });
          }
        })
      ).subscribe(() => {
      this.message.success(this.translate.instant('LISTS.Lists_merged'));
      this.modalRef.close();
    });
  }

}


text:
SYSTEMID_NES=25
ABBREV_SYSTEMNAME_NES="NES"
SYSTEMNAME_NES="Nintendo - Nintendo Entertainment System"

GEN_DEVELOPER_NES='{"game":{"rom":{"crc":"romHashCRC"},"name":"romExtensionlessFileName","developer":"releaseDeveloper"}}'
GEN_PUBLISHER_NES='{"game":{"rom":{"crc":"romHashCRC"},"name":"romExtensionlessFileName","publisher":"releasePublisher"}}'
GEN_RELEASEYEAR_NES='{"game":{"rom":{"crc":"romHashCRC"},"name":"romExtensionlessFileName","releaseyear":"Year"}}'
GEN_RELEASEMONTH_NES='{"game":{"rom":{"crc":"romHashCRC"},"name":"romExtensionlessFileName","releasemonth":"Month"}}'

_gen_developer_nes() {
   echo "--- ${2} - DAT Developer"
   $PYTHON ./generate-dat.py -s ${3} ${GEN_DEVELOPER_NES} "${1}"
   mv "${1}.dat" "metadat/developer/${2}.dat"
}

gen_developer_nes() {
   _gen_developer_nes "${ABBREV_SYSTEMNAME_NES}" "${SYSTEMNAME_NES}" ${SYSTEMID_NES}
}

_gen_publisher_nes() {
   echo "--- ${2} - DAT Publisher"
   $PYTHON ./generate-dat.py -s ${3} ${GEN_PUBLISHER_NES} "${1}"
   mv "${1}.dat" "metadat/publisher/${2}.dat"
}

gen_publisher_nes() {
   _gen_publisher_nes "${ABBREV_SYSTEMNAME_NES}" "${SYSTEMNAME_NES}" ${SYSTEMID_NES}
}

_gen_releaseyear_nes() {
   echo "--- ${2} - DAT Releaseyear"
   $PYTHON ./generate-dat.py -s ${3} ${GEN_RELEASEYEAR_NES} "${1}"
   mv "${1}.dat" "metadat/releaseyear/${2}.dat"
}

gen_releaseyear_nes() {
   _gen_releaseyear_nes "${ABBREV_SYSTEMNAME_NES}" "${SYSTEMNAME_NES}" ${SYSTEMID_NES}
}

_gen_releasemonth_nes() {
   echo "--- ${2} - DAT Releasemonth"
   $PYTHON ./generate-dat.py -s ${3} ${GEN_RELEASEMONTH_NES} "${1}"
   mv "${1}.dat" "metadat/releasemonth/${2}.dat"
}

gen_releasemonth_nes() {
   _gen_releasemonth_nes "${ABBREV_SYSTEMNAME_NES}" "${SYSTEMNAME_NES}" ${SYSTEMID_NES}
}

_gen_nes() {
   $PYTHON ./generate-dat.py -s ${3} "${GEN_DEVELOPER_NES}" "${GEN_PUBLISHER_NES}" "${GEN_RELEASEYEAR_NES}" "${GEN_RELEASEMONTH_NES}" "${1}"
   mv "${1}_1.dat" "metadat/developer/${2}.dat"
   mv "${1}_2.dat" "metadat/publisher/${2}.dat"
   mv "${1}_3.dat" "metadat/releaseyear/${2}.dat"
   mv "${1}_4.dat" "metadat/releasemonth/${2}.dat"
}

gen_nes() {
   #gen_dat_nes
   _gen_nes "${ABBREV_SYSTEMNAME_NES}" "${SYSTEMNAME_NES}" ${SYSTEMID_NES}
}


text:
title: Jordan Jennings Guide to Brewing in Chemiz
date: 2017-01-04T15:04:10.000Z
description: >-
  Brewing with a Chemex probably seems like a complicated, time-consuming
  ordeal, but once you get used to the process, it becomes a soothing ritual
  that's worth the effort every time.
image: /img/blog/chemex.jpg
---

This [week](/wdwdw) we'll **take** a look at all the steps required to make astonishing coffee with a Chemex at home. The Chemex Coffeemaker is a manual, pour-over style glass-container coffeemaker that Peter Schlumbohm invented in 1941, and which continues to be manufactured by the Chemex Corporation in Chicopee, Massachusetts\*.

In 1958, designers at the [Illinois Institute of Technology](https://www.spacefarm.digital) said that the Chemex Coffeemaker is *"one of the best-designed products of modern times"*, and so is included in the collection of the Museum of Modern Art in New York City.

## The little secrets of Chemex brewing

The Chemex Coffeemaker consists of an hourglass-shaped glass flask with a conical funnel-like neck (rather than the cylindrical neck of an Erlenmeyer flask) and uses proprietary filters, made of bonded paper (thicker-gauge paper than the standard paper filters for a drip-method coffeemaker) that removes most of the coffee oils, brewing coffee with a taste that is different than coffee brewed in other coffee-making systems; also, the thicker paper of the Chemex coffee filters may assist in removing cafestol, a cholesterol-containing compound found in coffee oils. Here's three important tips newbies forget about:

1. Always buy dedicated Chemex filters.
2. Use a scale, don't try to eyeball it.
3. Never skip preheating the glass.
4. Timing is key, don't forget the clock.

The most visually distinctive feature of the Chemex is the heatproof wooden collar around the neck, allowing it to be handled and poured when full of hot water. This is turned, then split in two to allow it to fit around the glass neck. The two pieces are held loosely in place by a tied leather thong. The pieces are not tied tightly and can still move slightly, retained by the shape of the conical glass.

For a design piece that became popular post-war at a time of Modernism and precision manufacture, this juxtaposition of natural wood and the organic nature of a hand-tied knot with the laboratory nature of glassware was a distinctive feature of its appearance.


text:
#ifndef FIXED_POINT_COORDINATE_H_
#define FIXED_POINT_COORDINATE_H_

#include "../DataStructures/MercatorUtil.h"
#include "../Util/StringUtil.h"

#include <boost/assert.hpp>
#include <cmath>
#include <climits>

#include <iostream>

static const double COORDINATE_PRECISION = 1000000.;

struct FixedPointCoordinate {
    int lat;
    int lon;
    FixedPointCoordinate () : lat(INT_MIN), lon(INT_MIN) {}
    explicit FixedPointCoordinate (int lat, int lon) : lat(lat) , lon(lon) {}

    void Reset() {
        lat = INT_MIN;
        lon = INT_MIN;
    }
    bool isSet() const {
        return (INT_MIN != lat) && (INT_MIN != lon);
    }
    inline bool isValid() const {
        if(
            lat >   90*COORDINATE_PRECISION ||
            lat <  -90*COORDINATE_PRECISION ||
            lon >  180*COORDINATE_PRECISION ||
            lon < -180*COORDINATE_PRECISION
        ) {
            return false;
        }
        return true;
    }
    bool operator==(const FixedPointCoordinate & other) const {
        return lat == other.lat && lon == other.lon;
    }
};

inline std::ostream & operator<<(std::ostream & out, const FixedPointCoordinate & c){
    out << "(" << c.lat << "," << c.lon << ")";
    return out;
}

inline double ApproximateDistance( const int lat1, const int lon1, const int lat2, const int lon2 ) {
    BOOST_ASSERT(lat1 != INT_MIN);
    BOOST_ASSERT(lon1 != INT_MIN);
    BOOST_ASSERT(lat2 != INT_MIN);
    BOOST_ASSERT(lon2 != INT_MIN);
    double RAD = 0.017453292519943295769236907684886;
    double lt1 = lat1/COORDINATE_PRECISION;
    double ln1 = lon1/COORDINATE_PRECISION;
    double lt2 = lat2/COORDINATE_PRECISION;
    double ln2 = lon2/COORDINATE_PRECISION;
    double dlat1=lt1*(RAD);

    double dlong1=ln1*(RAD);
    double dlat2=lt2*(RAD);
    double dlong2=ln2*(RAD);

    double dLong=dlong1-dlong2;
    double dLat=dlat1-dlat2;

    double aHarv= pow(sin(dLat/2.0),2.0)+cos(dlat1)*cos(dlat2)*pow(sin(dLong/2.),2);
    double cHarv=2.*atan2(sqrt(aHarv),sqrt(1.0-aHarv));
    //earth's radius from wikipedia varies between 6,356.750 km — 6,378.135 km (˜3,949.901 — 3,963.189 miles)
    //The IUGG value for the equatorial radius of the Earth is 6378.137 km (3963.19 mile)
    const double earth=6372797.560856;//I am doing miles, just change this to radius in kilometers to get distances in km
    double distance=earth*cHarv;
    return distance;
}

inline double ApproximateDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2) {
    return ApproximateDistance( c1.lat, c1.lon, c2.lat, c2.lon );
}

inline double ApproximateEuclideanDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2) {
    BOOST_ASSERT(c1.lat != INT_MIN);
    BOOST_ASSERT(c1.lon != INT_MIN);
    BOOST_ASSERT(c2.lat != INT_MIN);
    BOOST_ASSERT(c2.lon != INT_MIN);
    const double RAD = 0.017453292519943295769236907684886;
    const double lat1 = (c1.lat/COORDINATE_PRECISION)*RAD;
    const double lon1 = (c1.lon/COORDINATE_PRECISION)*RAD;
    const double lat2 = (c2.lat/COORDINATE_PRECISION)*RAD;
    const double lon2 = (c2.lon/COORDINATE_PRECISION)*RAD;

    const double x = (lon2-lon1) * cos((lat1+lat2)/2.);
    const double y = (lat2-lat1);
    const double earthRadius = 6372797.560856;
    const double d = sqrt(x*x + y*y) * earthRadius;
    return d;
}

static inline void convertInternalLatLonToString(const int value, std::string & output) {
    char buffer[100];
    buffer[11] = 0; // zero termination
    char* string = printInt< 11, 6 >( buffer, value );
    output = string;
}

static inline void convertInternalCoordinateToString(const FixedPointCoordinate & coord, std::string & output) {
    std::string tmp;
    convertInternalLatLonToString(coord.lon, tmp);
    output = tmp;
    output += ",";
    convertInternalLatLonToString(coord.lat, tmp);
    output += tmp;
    output += " ";
}
static inline void convertInternalReversedCoordinateToString(const FixedPointCoordinate & coord, std::string & output) {
    std::string tmp;
    convertInternalLatLonToString(coord.lat, tmp);
    output = tmp;
    output += ",";
    convertInternalLatLonToString(coord.lon, tmp);
    output += tmp;
    output += " ";
}

/* Get angle of line segment (A,C)->(C,B), atan2 magic, formerly cosine theorem*/
template<class CoordinateT>
static inline double GetAngleBetweenThreeFixedPointCoordinates (
    const CoordinateT & A,
    const CoordinateT & C,
    const CoordinateT & B
) {
    const double v1x = (A.lon - C.lon)/COORDINATE_PRECISION;
    const double v1y = lat2y(A.lat/COORDINATE_PRECISION) - lat2y(C.lat/COORDINATE_PRECISION);
    const double v2x = (B.lon - C.lon)/COORDINATE_PRECISION;
    const double v2y = lat2y(B.lat/COORDINATE_PRECISION) - lat2y(C.lat/COORDINATE_PRECISION);

    double angle = (atan2(v2y,v2x) - atan2(v1y,v1x) )*180/M_PI;
    while(angle < 0)
        angle += 360;
    return angle;
}
#endif /* FIXED_POINT_COORDINATE_H_ */


text:
package com.amazonaws.services.simpleemailv2.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Represents the body of the email message.
 *

 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Body implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that don't support HTML,
     * or clients where the recipient has disabled HTML rendering.
     *

     */
    private Content text;
    /**
     *

     * An object that represents the version of the message that is displayed in email clients that support HTML. HTML
     * messages can include formatted text, hyperlinks, images, and more.
     *

     */
    private Content html;

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that don't support HTML,
     * or clients where the recipient has disabled HTML rendering.
     *

     *
     * @param text
     *        An object that represents the version of the message that is displayed in email clients that don't support
     *        HTML, or clients where the recipient has disabled HTML rendering.
     */

    public void setText(Content text) {
        this.text = text;
    }

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that don't support HTML,
     * or clients where the recipient has disabled HTML rendering.
     *

     *
     * @return An object that represents the version of the message that is displayed in email clients that don't
     *         support HTML, or clients where the recipient has disabled HTML rendering.
     */

    public Content getText() {
        return this.text;
    }

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that don't support HTML,
     * or clients where the recipient has disabled HTML rendering.
     *

     *
     * @param text
     *        An object that represents the version of the message that is displayed in email clients that don't support
     *        HTML, or clients where the recipient has disabled HTML rendering.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Body withText(Content text) {
        setText(text);
        return this;
    }

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that support HTML. HTML
     * messages can include formatted text, hyperlinks, images, and more.
     *

     *
     * @param html
     *        An object that represents the version of the message that is displayed in email clients that support HTML.
     *        HTML messages can include formatted text, hyperlinks, images, and more.
     */

    public void setHtml(Content html) {
        this.html = html;
    }

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that support HTML. HTML
     * messages can include formatted text, hyperlinks, images, and more.
     *

     *
     * @return An object that represents the version of the message that is displayed in email clients that support
     *         HTML. HTML messages can include formatted text, hyperlinks, images, and more.
     */

    public Content getHtml() {
        return this.html;
    }

    /**
     *

     * An object that represents the version of the message that is displayed in email clients that support HTML. HTML
     * messages can include formatted text, hyperlinks, images, and more.
     *

     *
     * @param html
     *        An object that represents the version of the message that is displayed in email clients that support HTML.
     *        HTML messages can include formatted text, hyperlinks, images, and more.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Body withHtml(Content html) {
        setHtml(html);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getText() != null)
            sb.append("Text: ").append(getText()).append(",");
        if (getHtml() != null)
            sb.append("Html: ").append(getHtml());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof Body == false)
            return false;
        Body other = (Body) obj;
        if (other.getText() == null ^ this.getText() == null)
            return false;
        if (other.getText() != null && other.getText().equals(this.getText()) == false)
            return false;
        if (other.getHtml() == null ^ this.getHtml() == null)
            return false;
        if (other.getHtml() != null && other.getHtml().equals(this.getHtml()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode());
        hashCode = prime * hashCode + ((getHtml() == null) ? 0 : getHtml().hashCode());
        return hashCode;
    }

    @Override
    public Body clone() {
        try {
            return (Body) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.simpleemailv2.model.transform.BodyMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
void import_3_4_long()
{
	NumpyEigenConverter<Eigen::Matrix< boost::int64_t, 3, 4 > >::register_converter();
}


text:
package org.opensingular.lib.wicket.util.model;

import org.apache.wicket.model.IModel;
import org.opensingular.lib.commons.lambda.IConsumer;
import org.opensingular.lib.commons.lambda.ISupplier;

public class GetSetFunctionalModel<T> implements IModel<T> {
    private final ISupplier<T> getter;
    private final IConsumer<T> setter;

    public GetSetFunctionalModel(ISupplier<T> getter, IConsumer<T> setter) {
        this.getter = getter;
        this.setter = setter;
    }

    @Override
    public T getObject() {
        return getter.get();
    }

    @Override
    public void setObject(T object) {
        setter.accept(object);
    }

    @Override
    public void detach() {

    }
}


text:
ecommerce-website
=================

Design for Interactive e-commerce site project for the year.

---

© 2014 Marta Traczyk

Code licensed under the [MIT License](LICENSE).


text:
<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "services".
 *
 * @property integer $services_id
 * @property string $services_name
 * @property string $services_created_date
 * @property string $status
 */
class Services extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'services';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['services_created_date'], 'safe'],
            [['status'], 'string'],
            [['services_name'], 'string', 'max' => 45]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'services_id' => 'Services ID',
            'services_name' => 'Services Name',
            'services_created_date' => 'Services Created Date',
            'status' => 'Status',
        ];
    }
}


text:
/*
 *  Basic test utilities in a global 'Test' binding.
 */

(function initTest() {
    var GLOBAL = new Function('return this')();
    var Test = GLOBAL.Test;
    if (typeof Test !== 'object') {
        Test = {};
        Object.defineProperty(GLOBAL, 'Test', {
            value: Test, writable: false, enumerable: false, configurable: false
        });
    }

    // Summarize any value to a printable string, avoiding side effects where
    // possible, preserving details like zero sign.
    function valueToString(x) {
        if (x === void 0) {
            return 'undefined';
        } else if (x === null) {
            return 'null';
        } else if (typeof x === 'boolean') {
            return String(x);
        } else if (typeof x === 'number') {
            if (x !== 0) {
                return String(x);
            } else {
                return (1 / x > 0) ? '0' : '-0';
            }
        } else if (typeof x === 'string') {
            return JSON.stringify(x);
        } else if (typeof x === 'symbol') {
            return String(x);
        } else if (typeof x === 'object') {
            return Object.prototype.toString.call(x);
        } else if (typeof x === 'function') {
            var pd = Object.getOwnPropertyDescriptor(x, 'name');
            if (pd && typeof pd.value === 'string') {
                return 'function:' + pd.value;
            } else {
                return 'function';
            }
        } else if (typeof x === 'pointer') {
            if (String(x) === 'null') {
                return 'pointer:null';
            } else {
                return 'pointer:non-null';  // specific pointer is very rarely interesting for tests
            }
        } else if (typeof x === 'buffer') {
            // No longer used in Duktape 2.x.
            return 'buffer:' + x.length;
        } else {
            return 'unknown:' + String(x);
        }
    }

    // Get property descriptor string for arbitrary object and key.
    function getPropDescString(obj, key) {
        var strkey = String(key);  // handle symbols
        if (obj === void 0) {
            return 'propdesc ' + strkey + ': undefined object';
        } else if (obj === null) {
            return 'propdesc ' + strkey + ': null object';
        } else {
            try {
                var pd = Object.getOwnPropertyDescriptor(obj, key);
                var parts = [];
                if (pd) {
                    if (typeof pd.value !== 'undefined') {
                        parts.push('value=' + valueToString(pd.value));
                    }
                    if (typeof pd.writable !== 'undefined') {
                        parts.push('writable=' + valueToString(pd.writable));
                    }
                    if (typeof pd.enumerable !== 'undefined') {
                        parts.push('enumerable=' + valueToString(pd.enumerable));
                    }
                    if (typeof pd.configurable !== 'undefined') {
                        parts.push('configurable=' + valueToString(pd.configurable));
                    }
                    if (typeof pd.get !== 'undefined') {
                        parts.push('get=' + valueToString(pd.get));
                    }
                    if (typeof pd.set !== 'undefined') {
                        parts.push('set=' + valueToString(pd.set));
                    }
                    return 'propdesc ' + strkey + ': ' + parts.join(', ');
                } else {
                    return 'propdesc ' + strkey + ': no such property';
                }
            } catch (e) {
                return 'propdesc ' + strkey + ': ' + String(e);
            }
        }
    }

    // Permute array.
    function permuteArray(arr) {
        var res = [];
        var len = arr.length;
        for (var i = 0; i < len; i++) {
            var idx = Math.floor(Math.random() * arr.length);
            res.push(arr.splice(idx, 1)[0]);
        }
        return res;
    }

    Test.valueToString = valueToString;
    Test.getPropDescString = getPropDescString;
    Test.permuteArray = permuteArray;
}());


text:
figure.highlight .hll { background-color: #404040 }
figure.highlight  { background: #202020; color: #d0d0d0 }
figure.highlight .c { color: #999999; font-style: italic } /* Comment */
figure.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
figure.highlight .esc { color: #d0d0d0 } /* Escape */
figure.highlight .g { color: #d0d0d0 } /* Generic */
figure.highlight .k { color: #6ab825; font-weight: bold } /* Keyword */
figure.highlight .l { color: #d0d0d0 } /* Literal */
figure.highlight .n { color: #d0d0d0 } /* Name */
figure.highlight .o { color: #d0d0d0 } /* Operator */
figure.highlight .x { color: #d0d0d0 } /* Other */
figure.highlight .p { color: #d0d0d0 } /* Punctuation */
figure.highlight .ch { color: #999999; font-style: italic } /* Comment.Hashbang */
figure.highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */
figure.highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
figure.highlight .cpf { color: #999999; font-style: italic } /* Comment.PreprocFile */
figure.highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */
figure.highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
figure.highlight .gd { color: #d22323 } /* Generic.Deleted */
figure.highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
figure.highlight .gr { color: #d22323 } /* Generic.Error */
figure.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
figure.highlight .gi { color: #589819 } /* Generic.Inserted */
figure.highlight .go { color: #cccccc } /* Generic.Output */
figure.highlight .gp { color: #aaaaaa } /* Generic.Prompt */
figure.highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
figure.highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
figure.highlight .gt { color: #d22323 } /* Generic.Traceback */
figure.highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */
figure.highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */
figure.highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */
figure.highlight .kp { color: #6ab825 } /* Keyword.Pseudo */
figure.highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */
figure.highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */
figure.highlight .ld { color: #d0d0d0 } /* Literal.Date */
figure.highlight .m { color: #3677a9 } /* Literal.Number */
figure.highlight .s { color: #ed9d13 } /* Literal.String */
figure.highlight .na { color: #bbbbbb } /* Name.Attribute */
figure.highlight .nb { color: #24909d } /* Name.Builtin */
figure.highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */
figure.highlight .no { color: #40ffff } /* Name.Constant */
figure.highlight .nd { color: #ffa500 } /* Name.Decorator */
figure.highlight .ni { color: #d0d0d0 } /* Name.Entity */
figure.highlight .ne { color: #bbbbbb } /* Name.Exception */
figure.highlight .nf { color: #447fcf } /* Name.Function */
figure.highlight .nl { color: #d0d0d0 } /* Name.Label */
figure.highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */
figure.highlight .nx { color: #d0d0d0 } /* Name.Other */
figure.highlight .py { color: #d0d0d0 } /* Name.Property */
figure.highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */
figure.highlight .nv { color: #40ffff } /* Name.Variable */
figure.highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */
figure.highlight .w { color: #666666 } /* Text.Whitespace */
figure.highlight .mb { color: #3677a9 } /* Literal.Number.Bin */
figure.highlight .mf { color: #3677a9 } /* Literal.Number.Float */
figure.highlight .mh { color: #3677a9 } /* Literal.Number.Hex */
figure.highlight .mi { color: #3677a9 } /* Literal.Number.Integer */
figure.highlight .mo { color: #3677a9 } /* Literal.Number.Oct */
figure.highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */
figure.highlight .sc { color: #ed9d13 } /* Literal.String.Char */
figure.highlight .sd { color: #ed9d13 } /* Literal.String.Doc */
figure.highlight .s2 { color: #ed9d13 } /* Literal.String.Double */
figure.highlight .se { color: #ed9d13 } /* Literal.String.Escape */
figure.highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */
figure.highlight .si { color: #ed9d13 } /* Literal.String.Interpol */
figure.highlight .sx { color: #ffa500 } /* Literal.String.Other */
figure.highlight .sr { color: #ed9d13 } /* Literal.String.Regex */
figure.highlight .s1 { color: #ed9d13 } /* Literal.String.Single */
figure.highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */
figure.highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */
figure.highlight .vc { color: #40ffff } /* Name.Variable.Class */
figure.highlight .vg { color: #40ffff } /* Name.Variable.Global */
figure.highlight .vi { color: #40ffff } /* Name.Variable.Instance */
figure.highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */


text:
My Work

Check out some of the work I've done.

Preach

I love to study God's Word, and bring it to life.

Hear now »

Creative

I'm passionate about expressing myself is through visual media.

View now »

Websites

I've thrown together a handful of websites over the years.

Surf now »


text:
package nl.tudelft.watchdog.eclipse.ui.util;

import nl.tudelft.watchdog.core.util.WatchDogLogger;
import nl.tudelft.watchdog.eclipse.Activator;
import nl.tudelft.watchdog.eclipse.ui.WatchDogView;
import nl.tudelft.watchdog.eclipse.ui.util.CommandExecuterBase.CommandExecuter;
import nl.tudelft.watchdog.eclipse.ui.util.CommandExecuterBase.CommandRefresher;
import nl.tudelft.watchdog.eclipse.util.WatchDogUtils;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;

/** Utility methods for the UI. */
public class UIUtils {

	/** The command to show the WatchDog info. */
	public static final String COMMAND_SHOW_INFO = "nl.tudelft.watchdog.commands.showWatchDogInfo";

	/**
	 * Creates and returns a label whose text is wrapped inside the supplied
	 * {@link Composite}. Be careful: The width calculation on the parent
	 * composite only works when called after the parent has already been
	 * created on the screen, i.e. its client area is known.
	 */
	public static Label createWrappingLabel(String text, Composite parent) {
		Label label = createLabel(text, SWT.WRAP, parent);
		GridData labelData = new GridData();
		labelData.widthHint = parent.getParent().getClientArea().width - 30;
		label.setLayoutData(labelData);
		return label;
	}

	/** Creates and returns a bold text label. */
	public static Label createBoldLabel(String text, Composite parent) {
		Label label = createLabel(text, parent);
		label.setFont(JFaceResources.getFontRegistry().getBold(""));
		return label;
	}

	/** Creates and returns a bold text label with associated SWT-Style. */
	public static Label createBoldLabel(String text, int swtStyle,
			Composite parent) {
		Label label = createLabel(text, swtStyle, parent);
		label.setFont(JFaceResources.getFontRegistry().getBold(""));
		return label;
	}

	/** Creates and returns an italic text label. */
	public static Label createItalicLabel(String text, Composite parent) {
		Label label = createLabel(text, parent);
		label.setFont(JFaceResources.getFontRegistry().getItalic(""));
		return label;
	}

	/** Creates and returns a label with the given text. */
	public static Label createLabel(String text, Composite parent) {
		return createLabel(text, SWT.NONE, parent);
	}

	/** Creates and returns a label with a given style and text. */
	public static Label createLabel(String text, int style, Composite parent) {
		Label label = new Label(parent, style);
		label.setText(text);
		return label;
	}

	/** Creates and returns a user text input field. */
	public static Text createTextInput(Composite parent) {
		Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
		text.setLayoutData(createFullGridUsageData());
		return text;
	}

	/** Creates uneditable text field. */
	public static Text createTextField(Composite parent, String content) {
		Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
		text.setLayoutData(new GridData(SWT.BOTTOM, SWT.BEGINNING, true, false));
		text.setText(content);
		text.setEditable(false);
		return text;
	}

	/** Creates and returns a radio button with the given text. */
	public static Button createRadioButton(Composite parent, String text) {
		Button button = new Button(parent, SWT.RADIO);
		button.setText(text);
		return button;
	}

	/**
	 * Creates and returns a grided composite, that fills out its parent to the
	 * fullest extent.
	 */
	public static Composite createFullGridedComposite(Composite parent,
			int columns) {
		Composite composite = UIUtils.createGridedComposite(parent, columns);
		composite.setLayoutData(UIUtils.createFullGridUsageData());
		return composite;
	}

	/**
	 * @return A {@link GridLayout}ed composite with the given number of
	 *         columns.
	 */
	public static Composite createZeroMarginGridedComposite(Composite parent,
			int columns) {
		Composite composite = createGridedComposite(parent, columns);
		GridLayout layout = (GridLayout) composite.getLayout();
		layout.marginBottom = 0;
		layout.marginHeight = 0;
		layout.marginLeft = 0;
		layout.marginRight = 0;
		layout.marginTop = 0;
		layout.marginWidth = 0;
		composite.setLayout(layout);
		return composite;
	}

	/**
	 * @return A {@link GridLayout}ed composite with the given number of
	 *         columns.
	 */
	public static Composite createGridedComposite(Composite parent, int columns) {
		Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayout(new GridLayout(columns, false));
		return composite;
	}

	/** @return A fully horizontally greedy Grid. */
	public static GridData createFullGridUsageData() {
		// Has to create new instances because the existing instance are altered
		// once passed into an object.
		return new GridData(SWT.FILL, SWT.NONE, true, false);
	}

	/**
	 * Creates a pair of a linked Label and text input field.
	 *
	 * @param labelText
	 *            The text of the label associated with the input.
	 * @param toolTip
	 *            The tooltip displayed on both the label and the input.
	 * @param composite
	 *            The composite on which both should be put.
	 * @return input The linked input.
	 */
	public static Text createLinkedFieldInput(String labelText, String toolTip,
			Composite composite) {
		Label label = UIUtils.createLabel(labelText, composite);
		label.setToolTipText(toolTip);
		Text input = UIUtils.createTextInput(composite);
		input.setLayoutData(UIUtils.createFullGridUsageData());
		input.setToolTipText(toolTip);
		UIUtils.attachListenerOnLabelClickFocusTextElement(label, input);
		return input;
	}

	/**
	 * Attaches a listener to the specified label that directs the focus to the
	 * supplied text (resulting in an HTML form-like connection of the label and
	 * its input field).
	 */
	private static void attachListenerOnLabelClickFocusTextElement(Label label,
			final Text text) {
		label.addMouseListener(new MouseListener() {

			@Override
			public void mouseUp(MouseEvent e) {
				// intentionally left empty
			}

			@Override
			public void mouseDown(MouseEvent e) {
				focusAccompanyingInput();
			}

			@Override
			public void mouseDoubleClick(MouseEvent e) {
				focusAccompanyingInput();
			}

			private void focusAccompanyingInput() {
				text.forceFocus();
			}
		});

	}

	/** The TU Logo. */
	public static final ImageDescriptor TU_DELFT_LOGO = Activator
			.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
					"resources/images/tudelft_with_frame.png");

	/** The WatchDog Icon. */
	public static final ImageDescriptor WATCHDOG_ICON = Activator
			.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
					"resources/images/watchdog_icon.png");

	/** The WatchDog Icon Disabled. */
	public static final ImageDescriptor WATCHDOG_ICON_DISABLED = Activator
			.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
					"resources/images/watchdog_icon_disabled.png");

	/** The WatchDog Icon Warning. */
	public static final ImageDescriptor WATCHDOG_ICON_WARNING = Activator
			.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
					"resources/images/watchdog_icon_warning.png");

	/** Creates and returns a label with the given text and color. */
	public static Label createLabel(String text, Composite parent, Color color) {
		Label label = createLabel(text, parent);
		label.setForeground(color);
		return label;
	}

	/** Creates a centered label containing the WatchDogLogo. */
	public static Label createWatchDogLogo(Composite logoContainer) {
		return createLogo(logoContainer, "resources/images/watchdog_small.png");
	}

	/** Creates a logo from the given image url. */
	public static Label createLogo(Composite logoContainer, String imageLocation) {
		Label watchdogLogo = new Label(logoContainer, SWT.NONE);
		ImageDescriptor watchdogLogoImageDescriptor = Activator
				.imageDescriptorFromPlugin(Activator.PLUGIN_ID, imageLocation);
		Image watchdogLogoImage = watchdogLogoImageDescriptor.createImage();
		watchdogLogo.setImage(watchdogLogoImage);
		watchdogLogo.setLayoutData(new GridData(SWT.CENTER, SWT.BEGINNING,
				true, false));
		return watchdogLogo;
	}

	/** Invokes the supplied command. */
	public static void invokeCommand(final String command) {
		new CommandExecuter(command).execute();
	}

	/** Refreshes the supplied command's ui elements. */
	public static void refreshCommand(final String command) {
		new CommandRefresher(command).execute();
	}

	/** Updates WatchDog. */
	public static void updateWatchDog() {
		invokeCommand("org.eclipse.equinox.p2.ui.sdk.update");
	}

	/**
	 * Returns the WatchDog view, or null if it cannot launch or
	 * find it.
	 */
	public static WatchDogView getWatchDogView() {
		try {
			return (WatchDogView) PlatformUI.getWorkbench()
					.getActiveWorkbenchWindow().getActivePage()
					.findViewReference(WatchDogView.ID).getView(false);
		} catch (NullPointerException npe) {
			WatchDogLogger.getInstance().logSevere(npe);
			return null;
		}
	}

	/** Creates a clickable link with the given description text. */
	public static Link createLinkedLabel(Composite parent,
			SelectionListener listener, String description, String url) {
		Link link = new Link(parent, SWT.WRAP);
		link.setText("" + description + "");
		link.addSelectionListener(listener);
		return link;
	}

	/** Creates a Combo List of String items. */
	public static Combo createComboList(Composite parent,
			SelectionListener listener, String[] items, int defaultSelection) {
		Combo comboList = new Combo(parent, SWT.DROP_DOWN | SWT.BORDER
				| SWT.READ_ONLY);
		comboList.setItems(items);
		comboList.select(defaultSelection);
		comboList.addSelectionListener(listener);
		return comboList;
	}

	/** Creates a linked label that opens the project report in a browser. */
	public static void createOpenReportLink(Composite container) {
		String projectReport = "http://www.testroots.org/reports/project/"
				+ WatchDogUtils.getProjectSetting().projectId + ".html";
		UIUtils.createLinkedLabel(container, new BrowserOpenerSelection(),
				"Open Report.", projectReport);
	}
}


text:
{% extends 'base.html' %}
{% load staticfiles i18n %}

{% block head_title %}{% trans 'Política de Privacidad' %}{% endblock %}

{% block content %}

Política de Privacidad

Los usuarios tienen derechos de acceder,
  cancelar y actualizar su Información Personal, incluyendo su dirección de e-mail.

¿Qué van a hacer con mis datos?

  Utilizamos Google Analytics para estadísticas, y los datos provistos por Google OAuth, Facebook Authentication y Windows Live Connect
  para tu cuenta de Fiubar.

  Nuestra política de privacidad es la siguiente:
  en ningún caso tus datos serán proporcionados a terceros ni
  utilizados para otros fines.

¿Quién tiene acceso a mi contraseña?

  Por seguridad, tu contraseña es guardada en la base de datos utilizando el algoritmo de hash provisto por
  Django, haciendo
  imposible que cualquier persona, incluído el administrador, pueda descifrarla. Para más información,
  podés leer la documentación.

¿Cómo borro mi cuenta?

  Si querés borrar tu cuenta junto a tus datos, podés hacerlo fácilmente desde
  tu página de configuración.

{% endblock %}


text:
class Musterb::ObjectExtractor
  attr_reader :parent, :value

  def initialize(value, parent)
    @value = value
    @parent = parent
  end

  def [](symbol)
    if @value.respond_to? symbol
      @value.send(symbol)
    else
      @parent[symbol]
    end
  end
end


text:
package io.reactivex.netty.protocol.tcp.server;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPipeline;
import io.reactivex.netty.channel.AbstractConnectionToChannelBridge;
import io.reactivex.netty.channel.Connection;
import io.reactivex.netty.channel.ConnectionSubscriberEvent;
import io.reactivex.netty.channel.EmitConnectionEvent;
import io.reactivex.netty.events.Clock;
import io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func1;

import java.nio.channels.ClosedChannelException;

import static java.util.concurrent.TimeUnit.*;

/**
 * An implementation of {@link AbstractConnectionToChannelBridge} for servers.
 *
 * @param <R> The type of objects read from the server using this bridge.
 * @param <W> The type of objects written to this server using this bridge.
 */
public class TcpServerConnectionToChannelBridge<R, W> extends AbstractConnectionToChannelBridge<R, W> {

    private static final Logger logger = LoggerFactory.getLogger(TcpServerConnectionToChannelBridge.class);
    private static final String HANDLER_NAME = "server-conn-channel-bridge";

    private final ConnectionHandler<R, W> connectionHandler;
    private final TcpServerEventPublisher eventPublisher;
    private final boolean isSecure;
    private final ConnectionSubscriberEvent<R, W> connectionSubscriberEvent;

    private TcpServerConnectionToChannelBridge(ConnectionHandler<R, W> connectionHandler,
                                               TcpServerEventPublisher eventPublisher, boolean isSecure) {
        super(HANDLER_NAME, eventPublisher, eventPublisher);
        this.connectionHandler = connectionHandler;
        this.eventPublisher = eventPublisher;
        this.isSecure = isSecure;
        connectionSubscriberEvent = new ConnectionSubscriberEvent<>(new NewConnectionSubscriber());
    }

    @Override
    public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
        userEventTriggered(ctx, connectionSubscriberEvent);
        if (!isSecure) {/*When secure, the event is triggered post SSL handshake via the SslCodec*/
            userEventTriggered(ctx, EmitConnectionEvent.INSTANCE);
        }
        super.channelRegistered(ctx);
    }

    public static <R, W> TcpServerConnectionToChannelBridge<R, W> addToPipeline(ChannelPipeline pipeline,
                                                                             ConnectionHandler<R, W> connectionHandler,
                                                                             TcpServerEventPublisher eventPublisher,
                                                                             boolean isSecure) {
        TcpServerConnectionToChannelBridge<R, W> toAdd = new TcpServerConnectionToChannelBridge<>(connectionHandler,
                                                                                eventPublisher, isSecure);
        pipeline.addLast(HANDLER_NAME, toAdd);
        return toAdd;
    }

    private final class NewConnectionSubscriber extends Subscriber<Connection<R, W>> {

        @Override
        public void onCompleted() {
            // No Op.
        }

        @Override
        public void onError(Throwable e) {
            logger.error("Error while listening for new client connections.", e);
        }

        @Override
        public void onNext(final Connection<R, W> connection) {
            final long startTimeNanos = eventPublisher.publishingEnabled() ? Clock.newStartTimeNanos() : -1;
            if (eventPublisher.publishingEnabled()) {
                eventPublisher.onNewClientConnected();
            }
            Observable<Void> handledObservable;
            try {
                if (eventPublisher.publishingEnabled()) {
                    eventPublisher.onConnectionHandlingStart(Clock.onEndNanos(startTimeNanos), NANOSECONDS);
                }
                handledObservable = connectionHandler.handle(connection);
            } catch (Throwable throwable) {
                handledObservable = Observable.error(throwable);
            }

            if (null == handledObservable) {
                handledObservable = Observable.empty();
            }

            handledObservable
                    .doOnCompleted(new Action0() {
                        @Override
                        public void call() {
                            if (eventPublisher.publishingEnabled()) {
                                eventPublisher.onConnectionHandlingSuccess(Clock.onEndNanos(startTimeNanos),
                                                                           NANOSECONDS);
                            }
                        }
                    })
                    .concatWith(connection.close())
                    .onErrorResumeNext(
                            new Func1<Throwable, Observable<? extends Void>>() {
                                @Override
                                public Observable<? extends Void> call(Throwable throwable) {
                                    if (eventPublisher.publishingEnabled()) {
                                        eventPublisher.onConnectionHandlingFailed(Clock.onEndNanos(startTimeNanos),
                                                                                NANOSECONDS,
                                                                                throwable);
                                    }

                                    if (throwable instanceof ClosedChannelException) {
                                        return Observable.empty();
                                    } else {
                                        /*Since, this is always reading input for new requests, it will always get a
                                        closed channel exception on connection close from client. No point in logging
                                        that error.*/
                                        logger.error("Error processing connection.", throwable);
                                        return connection.close();
                                    }
                                }
                            })
                    .ambWith(connection.closeListener())
                    .subscribe();
        }
    }
}


text:
//
//  WBDiscoverTableViewController.m
//  WeiBo
//
//  Created by qingyun on 16/1/16.
//  Copyright © 2016年 hnqingyun. All rights reserved.
//

#import "WBDiscoverTableViewController.h"

#import "WBSearchBar.h"

#import "Public.h"

@interface WBDiscoverTableViewController ()

@end

@implementation WBDiscoverTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setNavigationBar];
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;

    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

#pragma mark - setup
- (void)setNavigationBar
{
    WBSearchBar *searchBar = [WBSearchBar searchBarWithPlaceholder:@"大家都在搜"];
    searchBar.width = 320;
    searchBar.height = 33;
    self.navigationItem.titleView = searchBar;
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#warning Incomplete implementation, return the number of sections
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
#warning Incomplete implementation, return the number of rows
    return 0;
}

/*
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];

    // Configure the cell...

    return cell;
}
*/

/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
package com.imsweb.seerapi.client.shared;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Version {

    @JsonProperty("version")
    protected String _version;
    @JsonProperty("count")
    protected Long _count;

    /**
     * Returns the version
     * @return version number
     */
    public String getVersion() {
        return _version;
    }

    public void setVersion(String version) {
        _version = version;
    }

    /**
     * Returns the count
     * @return count
     */
    public Long getCount() {
        return _count;
    }

    public void setCount(Long count) {
        _count = count;
    }
}


text:
import { baseUniDriverFactory } from '../../test/utils/unidriver';
import { DATA_HOOKS } from './constants';

export const carouselWIPUniDriverFactory = base => {
  return {
    ...baseUniDriverFactory(base),

    /**
     * Checks whether the carousel is loading
     * @return {Promise<boolean>}
     */
    isLoading: async () =>
      (await base.$$(`[data-hook="${DATA_HOOKS.loader}"]`).count()) > 0,

    /**
     * Gets children list elements
     * @return {UniDriverList}
     */
    getChildren: () =>
      base.$$(`[data-hook="${DATA_HOOKS.child}"]`).map(child => child),

    /**
     * Get a list of the carousel images
     * @return {Promise<Array<string | null>>}
     */
    getImages: () =>
      base
        .$$(`[data-hook="${DATA_HOOKS.carouselImage}"]`)
        .map(img => img.attr('src')),

    /**
     * Click on the previous item button
     * @return {Promise<void>}
     */
    clickPrevious: () =>
      base.$(`[data-hook="${DATA_HOOKS.prevButton}"]`).click(),

    /**
     * Click on the next item button
     * @return {Promise<void>}
     */
    clickNext: () => base.$(`[data-hook="${DATA_HOOKS.nextButton}"]`).click(),
  };
};


text:
from roman_numerals import Roman
from expects import *

with describe(Roman):
    with it("translates 1 to I"):
        expect(Roman.translate(1)).to(equal('I'))

    with it("translates 2 to II"):
        expect(Roman.translate(2)).to(equal('II'))

    with it("translates 3 to III"):
        expect(Roman.translate(3)).to(equal('III'))

    with it("translates 4 to IV"):
        expect(Roman.translate(4)).to(equal('IV'))

    with it("translates 5 to V"):
        expect(Roman.translate(5)).to(equal('V'))

    with it("translates 6 to VI"):
        expect(Roman.translate(6)).to(equal('VI'))

    with it("translates 7 to VII"):
        expect(Roman.translate(7)).to(equal('VII'))

    with it("translates 8 to VIII"):
        expect(Roman.translate(8)).to(equal('VIII'))

    with it("translates 9 to IX"):
        expect(Roman.translate(9)).to(equal('IX'))

    with it("translates 10 to X"):
        expect(Roman.translate(10)).to(equal('X'))

    with it("translates 11 to XI"):
        expect(Roman.translate(11)).to(equal('XI'))

    with it("translates 12 to XII"):
        expect(Roman.translate(12)).to(equal('XII'))

    with it("translates 13 to XIII"):
        expect(Roman.translate(13)).to(equal('XIII'))

    with it("translates 14 to XIV"):
        expect(Roman.translate(14)).to(equal('XIV'))

    with it("translates 15 to XV"):
        expect(Roman.translate(15)).to(equal('XV'))

    with it("translates 16 to XVI"):
        expect(Roman.translate(16)).to(equal('XVI'))

    with it("translates 19 to XIX"):
        expect(Roman.translate(19)).to(equal('XIX'))

    with it("translates 20 to XX"):
        expect(Roman.translate(20)).to(equal('XX'))

    with it("translates 24 to XXIV"):
        expect(Roman.translate(24)).to(equal('XXIV'))

    with it("translates 39 to XXXIX"):
        expect(Roman.translate(39)).to(equal('XXXIX'))

    with it("translates 40 to XL"):
        expect(Roman.translate(40)).to(equal('XL'))

    with it("translates 44 to XLIV"):
        expect(Roman.translate(44)).to(equal('XLIV'))

    with it("translates 50 to L"):
        expect(Roman.translate(50)).to(equal('L'))

    with it("translates 89 to LXXXIX"):
        expect(Roman.translate(89)).to(equal('LXXXIX'))

    with it("translates 99 to XCIX"):
        expect(Roman.translate(99)).to(equal('XCIX'))

    with it("translates 100 to C"):
        expect(Roman.translate(100)).to(equal('C'))

    with it("translates 399 to CCCXCIX"):
        expect(Roman.translate(399)).to(equal('CCCXCIX'))


text:
import React from 'react';
import { expect } from 'chai';
import { Surface, Dot } from 'recharts';
import { mount, render } from 'enzyme';

describe('<Dot />', () => {
  it('Render 1 circle in simple Dot', () => {
    const wrapper = render(
      <Surface width={400} height={400}>
        <Dot cx={100} cy={100} r={5} fill="#ff7300"/>
      </Surface>
    );

    expect(wrapper.find('.recharts-dot').length).to.equal(1);
  });

  it("Don't Render any circle when cx is invalid", () => {
    const wrapper = render(
      <Surface width={400} height={400}>
        <Dot cy={100} r={5} fill="#ff7300"/>
      </Surface>
    );

    expect(wrapper.find('.recharts-dot').length).to.equal(0);
  });
});


text:
> Count npm user packages from [npmjs.com](http://npm.im) website profile. API and CLI.

## Install
```
npm i --save npm-pkgs-count
npm test
npm-pkgs-count --help
```

## API
> For more use-cases see the [tests](./test.js)

### [npmPkgsCount](./index.js#L41)
> Count packages of the given [npmjs.com](http://npm.im) user

- `<username>` **{String}**  non emptry string, npm username
- `<callback>` **{Function}** node-style callback `(err, res)`

**Example**
```js
var npmPkgsCount = require('npm-pkgs-count');

npmPkgsCount('tunnckocore', function _cb(err, cnt) {
  if (err) {
    console.error(err);
    return;
  }
  console.log(cnt);
  //=> 96

  console.log(typeof cnt);
  //=> number
});
```

## CLI
> run `npm-pkgs-count --help` or try this one

```
npm i -g npm-pkgs-count

npm-pkgs-count tunnckocore

  Aloha, master!

  ℹ Please wait a moment...
  ℹ We fetching data from https://www.npmjs.com

  ✔ 96 packages by tunnckocore

```

## Related
- [npm-related](https://github.com/tunnckoCore/npm-related): Thin wrapper on top of `helper-related` for generating a list of links to the homepages of related NPM projects.
- [npm-pkgs](https://github.com/tunnckoCore/npm-pkgs): List user npm packages from the [npmjs.com](http://npm.im)!
- [npm-pkgs-cli](https://github.com/tunnckoCore/npm-pkgs-cli): CLI for listing and filtering user npm packages from the npmjs.com! Using `tunnckoCore/npm-pkgs-filter`
- [npm-pkgs-filter](https://github.com/tunnckoCore/npm-pkgs-filter): Filter the list of user npm packages from the [npmjs.com](https://npmjs.com) using glob pattern, function, array or regex.
- [is-missing](https://github.com/tunnckoCore/is-missing): Check that given `name` or `user/repo` exists in npm registry or in github as organization/user repository.
- [online-branch-exist](https://github.com/tunnckoCore/online-branch-exist): Check that given branch/tag/release exist in github repo, using `user/repo#branch` pattern.

## Author
**Charlike Mike Reagent**
+ [gratipay/tunnckoCore][author-gratipay]
+ [twitter/tunnckoCore][author-twitter]
+ [github/tunnckoCore][author-github]
+ [npmjs/tunnckoCore][author-npmjs]
+ [more ...][contrib-more]

## License [![MIT license][license-img]][license-url]
Copyright (c) 2015 [Charlike Mike Reagent][contrib-more], [contributors][contrib-graf].
Released under the [`MIT`][license-url] license.

[npmjs-url]: http://npm.im/npm-pkgs-count
[npmjs-img]: https://img.shields.io/npm/v/npm-pkgs-count.svg?style=flat&label=npm-pkgs-count

[coveralls-url]: https://coveralls.io/r/tunnckoCore/npm-pkgs-count?branch=master
[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/npm-pkgs-count.svg?style=flat

[license-url]: https://github.com/tunnckoCore/npm-pkgs-count/blob/master/license.md
[license-img]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat

[travis-url]: https://travis-ci.org/tunnckoCore/npm-pkgs-count
[travis-img]: https://img.shields.io/travis/tunnckoCore/npm-pkgs-count.svg?style=flat

[daviddm-url]: https://david-dm.org/tunnckoCore/npm-pkgs-count
[daviddm-img]: https://img.shields.io/david/tunnckoCore/npm-pkgs-count.svg?style=flat

[author-gratipay]: https://gratipay.com/tunnckoCore
[author-twitter]: https://twitter.com/tunnckoCore
[author-github]: https://github.com/tunnckoCore
[author-npmjs]: https://npmjs.org/~tunnckocore

[contrib-more]: http://j.mp/1stW47C
[contrib-graf]: https://github.com/tunnckoCore/npm-pkgs-count/graphs/contributors

***

_Proudly generated by [docks(1)](https://github.com/tunnckoCore), April 18, 2015_


text:
package org.greencheek.related.searching.responseprocessing.resultsconverter;

import org.greencheek.related.api.searching.FrequentlyRelatedSearchResult;
import org.junit.Test;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.mockito.Mockito.mock;

/**
 * Created by dominictootell on 05/01/2014.
 */
public class ExplicitSearchResultsConverterFactoryTest {
    @Test
    public void testGetConverter() throws Exception {
        SearchResultsConverter converter = mock(SearchResultsConverter.class);
        SearchResultsConverterFactory factory = new FrequentlyRelatedSearchResultsArrayConverterFactory(converter);

        SearchResultsConverter c = factory.getConverter(FrequentlyRelatedSearchResult[].class);

        assertNotNull(c);

        assertSame(c,converter);

        SearchResultsConverter con = factory.getConverter(String.class);

        assertNull(con);

    }

}


text:
package api_test

import (
	"archive/zip"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/http/httptest"
	"os"
	"path/filepath"
	"runtime"
	"sort"

	"github.com/cloudfoundry/cli/cf/appfiles"
	"github.com/cloudfoundry/cli/cf/configuration/coreconfig"
	"github.com/cloudfoundry/cli/cf/models"
	testconfig "github.com/cloudfoundry/cli/testhelpers/configuration"
	testnet "github.com/cloudfoundry/cli/testhelpers/net"

	. "github.com/cloudfoundry/cli/cf/api"
	"github.com/cloudfoundry/cli/testhelpers/cloudcontrollergateway"
	. "github.com/cloudfoundry/cli/testhelpers/matchers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("BuildpackBitsRepository", func() {
	var (
		buildpacksDir     string
		configRepo        coreconfig.Repository
		repo              CloudControllerBuildpackBitsRepository
		buildpack         models.Buildpack
		testServer        *httptest.Server
		testServerHandler *testnet.TestHandler
	)

	BeforeEach(func() {
		configRepo = testconfig.NewRepositoryWithDefaults()
		gateway := cloudcontrollergateway.NewTestCloudControllerGateway(configRepo)
		pwd, _ := os.Getwd()

		buildpacksDir = filepath.Join(pwd, "../../fixtures/buildpacks")
		repo = NewCloudControllerBuildpackBitsRepository(configRepo, gateway, appfiles.ApplicationZipper{})
		buildpack = models.Buildpack{Name: "my-cool-buildpack", GUID: "my-cool-buildpack-guid"}

		testServer, testServerHandler = testnet.NewServer([]testnet.TestRequest{uploadBuildpackRequest()})
		configRepo.SetAPIEndpoint(testServer.URL)
	})

	AfterEach(func() {
		testServer.Close()
	})

	Describe("#UploadBuildpack", func() {
		It("fails to upload a buildpack with an invalid directory", func() {
			apiErr := repo.UploadBuildpack(buildpack, "/foo/bar")
			Expect(apiErr).NotTo(BeNil())
			Expect(apiErr.Error()).To(ContainSubstring("Error opening buildpack file"))
		})

		It("uploads a valid buildpack directory", func() {
			buildpackPath := filepath.Join(buildpacksDir, "example-buildpack")

			os.Chmod(filepath.Join(buildpackPath, "bin/compile"), 0755)
			os.Chmod(filepath.Join(buildpackPath, "bin/detect"), 0755)
			err := os.Chmod(filepath.Join(buildpackPath, "bin/release"), 0755)
			Expect(err).NotTo(HaveOccurred())

			apiErr := repo.UploadBuildpack(buildpack, buildpackPath)
			Expect(testServerHandler).To(HaveAllRequestsCalled())
			Expect(apiErr).NotTo(HaveOccurred())
		})

		It("uploads a valid zipped buildpack", func() {
			buildpackPath := filepath.Join(buildpacksDir, "example-buildpack.zip")

			apiErr := repo.UploadBuildpack(buildpack, buildpackPath)
			Expect(testServerHandler).To(HaveAllRequestsCalled())
			Expect(apiErr).NotTo(HaveOccurred())
		})

		Describe("when the buildpack is wrapped in an extra top-level directory", func() {
			It("uploads a zip file containing only the actual buildpack", func() {
				buildpackPath := filepath.Join(buildpacksDir, "example-buildpack-in-dir.zip")

				apiErr := repo.UploadBuildpack(buildpack, buildpackPath)
				Expect(testServerHandler).To(HaveAllRequestsCalled())
				Expect(apiErr).NotTo(HaveOccurred())
			})
		})

		Describe("when given the URL of a buildpack", func() {
			var buildpackFileServerHandler = func(buildpackName string) http.HandlerFunc {
				return func(writer http.ResponseWriter, request *http.Request) {
					Expect(request.URL.Path).To(Equal(fmt.Sprintf("/place/%s", buildpackName)))
					f, err := os.Open(filepath.Join(buildpacksDir, buildpackName))
					Expect(err).NotTo(HaveOccurred())
					io.Copy(writer, f)
				}
			}

			Context("when the downloaded resource is not a valid zip file", func() {
				It("fails gracefully", func() {
					fileServer := httptest.NewServer(buildpackFileServerHandler("bad-buildpack.zip"))
					defer fileServer.Close()

					apiErr := repo.UploadBuildpack(buildpack, fileServer.URL+"/place/bad-buildpack.zip")
					Expect(testServerHandler).NotTo(HaveAllRequestsCalled())
					Expect(apiErr).To(HaveOccurred())
				})
			})

			It("uploads the file over HTTP", func() {
				fileServer := httptest.NewServer(buildpackFileServerHandler("example-buildpack.zip"))
				defer fileServer.Close()

				apiErr := repo.UploadBuildpack(buildpack, fileServer.URL+"/place/example-buildpack.zip")

				Expect(testServerHandler).To(HaveAllRequestsCalled())
				Expect(apiErr).NotTo(HaveOccurred())
			})

			It("uploads the file over HTTPS", func() {
				fileServer := httptest.NewTLSServer(buildpackFileServerHandler("example-buildpack.zip"))
				defer fileServer.Close()

				repo.TrustedCerts = fileServer.TLS.Certificates
				apiErr := repo.UploadBuildpack(buildpack, fileServer.URL+"/place/example-buildpack.zip")

				Expect(testServerHandler).To(HaveAllRequestsCalled())
				Expect(apiErr).NotTo(HaveOccurred())
			})

			It("fails when the server's SSL cert cannot be verified", func() {
				fileServer := httptest.NewTLSServer(buildpackFileServerHandler("example-buildpack.zip"))
				defer fileServer.Close()

				apiErr := repo.UploadBuildpack(buildpack, fileServer.URL+"/place/example-buildpack.zip")

				Expect(testServerHandler).NotTo(HaveAllRequestsCalled())
				Expect(apiErr).To(HaveOccurred())
			})

			Describe("when the buildpack is wrapped in an extra top-level directory", func() {
				It("uploads a zip file containing only the actual buildpack", func() {
					fileServer := httptest.NewTLSServer(buildpackFileServerHandler("example-buildpack-in-dir.zip"))
					defer fileServer.Close()

					repo.TrustedCerts = fileServer.TLS.Certificates
					apiErr := repo.UploadBuildpack(buildpack, fileServer.URL+"/place/example-buildpack-in-dir.zip")

					Expect(testServerHandler).To(HaveAllRequestsCalled())
					Expect(apiErr).NotTo(HaveOccurred())
				})
			})

			It("returns an unsuccessful response when the server cannot be reached", func() {
				apiErr := repo.UploadBuildpack(buildpack, "https://domain.bad-domain:223453/no-place/example-buildpack.zip")
				Expect(testServerHandler).NotTo(HaveAllRequestsCalled())
				Expect(apiErr).To(HaveOccurred())
			})
		})
	})
})

func uploadBuildpackRequest() testnet.TestRequest {
	return testnet.TestRequest{
		Method: "PUT",
		Path:   "/v2/buildpacks/my-cool-buildpack-guid/bits",
		Response: testnet.TestResponse{
			Status: http.StatusCreated,
			Body:   `{ "metadata":{ "guid": "my-job-guid" } }`,
		},
		Matcher: func(request *http.Request) {
			err := request.ParseMultipartForm(4096)
			defer request.MultipartForm.RemoveAll()
			Expect(err).NotTo(HaveOccurred())

			Expect(len(request.MultipartForm.Value)).To(Equal(0))
			Expect(len(request.MultipartForm.File)).To(Equal(1))

			files, ok := request.MultipartForm.File["buildpack"]
			Expect(ok).To(BeTrue(), "Buildpack file part not present")
			Expect(len(files)).To(Equal(1), "Wrong number of files")

			buildpackFile := files[0]
			file, err := buildpackFile.Open()
			Expect(err).NotTo(HaveOccurred())

			Expect(buildpackFile.Filename).To(ContainSubstring(".zip"))

			zipReader, err := zip.NewReader(file, 4096)
			Expect(err).NotTo(HaveOccurred())

			actualFileNames := []string{}
			actualFileContents := []string{}
			for _, f := range zipReader.File {
				actualFileNames = append(actualFileNames, f.Name)
				c, _ := f.Open()
				content, _ := ioutil.ReadAll(c)
				actualFileContents = append(actualFileContents, string(content))
			}
			sort.Strings(actualFileNames)

			Expect(actualFileNames).To(Equal([]string{
				"bin/",
				"bin/compile",
				"bin/detect",
				"bin/release",
				"lib/",
				"lib/helper",
			}))
			Expect(actualFileContents).To(Equal([]string{
				"",
				"the-compile-script\n",
				"the-detect-script\n",
				"the-release-script\n",
				"",
				"the-helper-script\n",
			}))

			if runtime.GOOS != "windows" {
				for i := 1; i < 4; i++ {
					Expect(zipReader.File[i].Mode()).To(Equal(os.FileMode(0755)))
				}
			}
		},
	}
}


text:
layout: default
format: blog-index
---

{% comment %}
*
* First check, if widget is empty or not by checking if there is a title
*
{% endcomment %}

	{% if page.widget1.title %}
		{% include videopage-widget widget=page.widget1 %}
	{% endif %}

	{% if page.widget2.title %}
		{% include videopage-widget widget=page.widget2 %}
	{% endif %}

	{% if page.widget3.title %}
		{% include videopage-widget widget=page.widget3 %}
	{% endif %}

	{% if page.widget4.title %}
		{% include videopage-widget widget=page.widget4 %}
	{% endif %}

	{% if page.widget5.title %}
		{% include videopage-widget widget=page.widget5 %}
	{% endif %}

	{% if page.widget6.title %}
		{% include videopage-widget widget=page.widget6 %}
	{% endif %}

	{% if page.widget7.title %}
		{% include videopage-widget widget=page.widget7 %}
	{% endif %}

	{% if page.widget8.title %}
		{% include videopage-widget widget=page.widget8 %}
	{% endif %}

	{% if page.widget9.title %}
		{% include videopage-widget widget=page.widget9 %}
	{% endif %}

{% comment %}
*
* Finally, if there is content, spit it out.
*
{% endcomment %}

    {{ content }}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarWRPG.Models
{
    public class CharacterDuty : CharacterMotivationBase
    {
        public CharacterDuty() : base("Duty") { }

    }
}


text: Here's where I keep hacker rank, interview questions and other random programming problems.  It's here for others to learn from me.