text:
using UnityEditor;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class LineChart {

	/// <summary>
	/// The data driving the chart.
	/// </summary>
	public List <float>[] data;

	/// <summary>
	/// The labels of the data items.
	/// </summary>
	public List <string> dataLabels;

	/// <summary>
	/// The labels on the axis.
	/// </summary>
	public List <string> axisLabels;

	/// <summary>
	/// The distance between each bar.
	/// </summary>
	public float barSpacer = 0.5f;

	/// <summary>
	/// The x border.
	/// </summary>
	public float xBorder = 30;

	/// <summary>
	/// The y border.
	/// </summary>
	public float yBorder = 20;

	/// <summary>
	/// The format string for the values.
	/// </summary>
	public string formatString = "{0:0}";

	/// <summary>
	/// The format string for the axis values.
	/// </summary>
	public string axisFormatString = "{0:0}";

	/// <summary>
	/// The colors to draw the bar in. Colors will cycle if there aren't enough to draw each stack. The first
	/// color will be used by a single bar chart.
	/// </summary>
	public List<Color> colors = new List<Color>{Color.magenta, Color.cyan * 2.0f, Color.green};

	/// <summary>
	/// The color of the selected bar.
	/// </summary>
	public Color selectedColor = Colors.PastelOrange;

	/// <summary>
	/// The depth of the bars, larger than zero will make this a 3D bar graph.
	/// </summary>
	public float depth = 0.0f;

	/// <summary>
	/// The value view mode. Do we see the values, NEVER, ALWAYS or only ON_SELECT.
	/// </summary>
	public ViewMode valueViewMode = ViewMode.ON_SELECT;

	/// <summary>
	/// The label view mode. Do we see the labels, NEVER, ALWAYS or only ON_SELECT.
	/// </summary>
	public ViewMode labelViewMode = ViewMode.ALWAYS;

	/// <summary>
	/// How many horizontal grid lines to draw.
	/// </summary>
	public int gridLines = 4;

	/// <summary>
	/// What level should values on the axis be rounded too?
	/// </summary>
	public float axisRounding = 10f;
	/// <summary>
	/// The ClickReponder that recieves click events.
	/// </summary>
	public ClickResponder clickResponder;

	/// <summary>
	/// The color of the axis.
	/// </summary>
	public Color axisColor = Color.white;

	/// <summary>
	/// The color of the label and value font.
	/// </summary>
	public Color fontColor = Color.white;

	/// <summary>
	/// Additional GUI style drawn in the background. Use this to add a backgroudn image or background box.
	/// </summary>
	public GUIStyle boxStyle;

	/// <summary>
	/// Size of the pips that occur at each data point. Use 1 or smaller to draw straight lines.
	/// </summary>
	public float pipRadius = 3.0f;

	/// <summary>
	/// If true draw small lines along the x axis at each data point.
	/// </summary>
	public bool drawTicks = true;

	private float barFloor ;
	private float barTop;
	private	float lineWidth;
	private float dataMax;

	private EditorWindow window;
	private Editor editor;
	private float windowHeight;

	/// <summary>
	/// Initializes a new instance of the <see cref="LineChart"/> class from an Editor (Inspector).
	/// </summary>
	/// <param name='editor'>
	/// Editor.
	/// </param>
	/// <param name='windowHeight'>
	/// Window height.
	/// </param>
	public LineChart(Editor editor, float windowHeight){
		this.editor = editor;
		this.windowHeight = windowHeight;
		dataLabels = new List<string>();
		axisLabels = new List<string>();
	}

	/// <summary>
	/// Initializes a new instance of the <see cref="LineChart"/> class from an Editor Window.
	/// </summary>
	/// <param name='window'>
	/// Window.
	/// </param>
	/// <param name='windowHeight'>
	/// Window height.
	/// </param>
	public LineChart(EditorWindow window, float windowHeight){
		this.window = window;
		this.windowHeight = windowHeight;
		dataLabels = new List<string>();
		axisLabels = new List<string>();
	}

	/// <summary>
	/// Draws the chart.
	/// </summary>
	public void DrawChart() {

		if (data.Length > 0) {

			Rect rect = GUILayoutUtility.GetRect(Screen.width, windowHeight);
			barTop = rect.y + yBorder;
			lineWidth = (float) (Screen.width - (xBorder * 2)) / data[0].Count;
			barFloor = rect.y + rect.height - yBorder;
			dataMax = 0.0f;
			foreach (List<float> row in data) {
				if (row != null && row.Count > 0) {
					if (row.Max() > dataMax) {
						dataMax = row.Max();
					}
				}
			}

			// Box/border
			if (boxStyle != null) {
				GUI.Box(new Rect(rect.x + boxStyle.margin.left, rect.y + boxStyle.margin.top,
					rect.width - (boxStyle.margin.right + boxStyle.margin.left) ,
					rect.height - (boxStyle.margin.top + boxStyle.margin.bottom)),"", boxStyle);
			}

			// Clean up variables
			if (dataMax % axisRounding != 0){
				dataMax = dataMax + axisRounding - (dataMax % axisRounding);
			}

			// Text to Left
			GUIStyle labelTextStyle = new GUIStyle();
	    	labelTextStyle.alignment = TextAnchor.UpperRight;
			labelTextStyle.normal.textColor = fontColor;

			// Draw grid lines
			if (gridLines > 0) {
				Handles.color = Color.grey;
				float lineSpacing = (barFloor - barTop) / (gridLines + 1);
				for (int i = 0; i <= gridLines; i++) {
					if (i > 0) Handles.DrawLine(new Vector2(xBorder, barTop + (lineSpacing * i)), new Vector2(Screen.width - xBorder, barTop + (lineSpacing * i)));
					if ((dataMax * (1 - ((lineSpacing * i) / (barFloor - barTop)))) > 0)
					GUI.Label(new Rect(0, barTop + (lineSpacing * i) - 8, xBorder - 2, 50), string.Format(axisFormatString, (dataMax * (1 - ((lineSpacing * i) / (barFloor - barTop))))) , labelTextStyle);
				}
				Handles.color = Color.white;
			}

			int c = 0;
			for (int i = 0; i < data.Length; i++) {
				if (data[i] != null) {
					DrawLine (data[i], colors[c++], i < dataLabels.Count ? dataLabels[i] : "");
					if (c > colors.Count - 1) c = 0;
				}
			}

			// Draw Axis
			Handles.color = axisColor;
	    	Handles.DrawLine(new Vector2(xBorder, barTop), new Vector2(xBorder, barFloor));
			Handles.DrawLine(new Vector2(xBorder, barFloor), new Vector2(Screen.width - xBorder, barFloor));

			GUIStyle centeredStyle = new GUIStyle();
			centeredStyle.alignment = TextAnchor.UpperCenter;
			centeredStyle.normal.textColor = fontColor;

			// Draw ticks and labels
			for (int i = 0; i < data[0].Count; i++) {
				if (i > 0 && drawTicks) Handles.DrawLine(new Vector2(xBorder + (lineWidth * i), barFloor - 3), new Vector2(xBorder + (lineWidth * i), barFloor + 3));
				if (i < axisLabels.Count) {
					Rect labelRect = new Rect(xBorder + (lineWidth * i) - lineWidth / 2.0f, barFloor + 5, lineWidth, 16);
					GUI.Label(labelRect, axisLabels[i], centeredStyle);
				}
			}

			Handles.color = Color.white;
		}
	}

	private void DrawLine(List<float> data, Color color, string label) {
		Vector2 previousLine = Vector2.zero;
		Vector2 newLine;
		Handles.color = color;

		for (int i = 0; i < data.Count; i++) {
			float lineTop = barFloor - ((barFloor - barTop) * (data[i] / dataMax));
			newLine = new Vector2(xBorder + (lineWidth * i), lineTop);
			if (i > 0) {
				Handles.DrawAAPolyLine(previousLine, newLine);
			}
			previousLine = newLine;
			Rect selectRect = new Rect((previousLine - (Vector2.up * 0.5f)).x - pipRadius * 3, (previousLine - (Vector2.up * 0.5f)).y - pipRadius * 3, pipRadius * 6, pipRadius * 6);
			if (selectRect.Contains(Event.current.mousePosition)) {
				GUIStyle centeredStyle = new GUIStyle();
				centeredStyle.alignment = TextAnchor.UpperCenter;
				centeredStyle.normal.textColor = fontColor;
				Handles.DrawSolidDisc(previousLine - (Vector2.up * 0.5f), Vector3.forward, pipRadius * 2);
				if (valueViewMode == ViewMode.ON_SELECT) {
					selectRect.y -= 16; selectRect.width += 50; selectRect.x -= 25;
					GUI.Label(selectRect, string.Format(formatString, data[i]), centeredStyle);
				}
				// Listen for click
				if (clickResponder != null &&  Event.current.button == 0 && Event.current.isMouse && Event.current.type == EventType.MouseDown) {
					clickResponder.Click(this, dataLabels[i], data[i]);
				}
				if (window != null) window.Repaint();
				if (editor != null) editor.Repaint();
			} else {
				Handles.DrawSolidDisc(previousLine - (Vector2.up * 0.5f), Vector3.forward, pipRadius);
			}
		}
		if (label != null) {
			GUIStyle colorStyle = new GUIStyle();
			colorStyle.normal.textColor = color;
			Rect labelRect = new Rect(previousLine.x + 8, previousLine.y - 8, 100, 16);
			GUI.Label(labelRect, label, colorStyle);
		}
	}

}

#endif


text:
$ErrorActionPreference = 'Stop'
$packageName = 'instantclient-jdbc-12_1'
$version = '12.1.0.2'
$versionFolder = 'instantclient_12_1'
$parentPackageName = 'instantclient-12_1'
$filename = 'instantclient-jdbc-nt-12.1.0.2.0.zip'
$filename64 = 'instantclient-jdbc-windows.x64-12.1.0.2.0.zip'
$checksum = 'ad07e0a267adf41e745c2e0cda0bace6'
$checksum64 = 'd5936f27f5a19cc0b1708d56f7571468'
$checksumType = 'md5'
$FROM_LOCATION = "$env:Temp"
$PROD_HOME = "$env:ChocolateyInstall\lib\$parentPackageName"
$machine = $false
$url = ''
$pathType = 'User'

$packageParameters = $env:chocolateyPackageParameters

if ($packageParameters) {

    $packageParameters = (ConvertFrom-StringData $packageParameters.Replace("\","\\").Replace("'","").Replace('"','').Replace(";","`n"))

    if ($packageParameters.ContainsKey("FROM_LOCATION")) { $FROM_LOCATION = $packageParameters.FROM_LOCATION }

    if ($packageParameters.ContainsKey("PROD_HOME")) { $PROD_HOME = $packageParameters.PROD_HOME }

    if ($packageParameters.ContainsKey("MACHINE")) { $machine = [System.Convert]::ToBoolean($($packageParameters.MACHINE)) }
}

if ($machine) { $pathType = 'Machine' }

if ((Get-ProcessorBits 64) -and !$env:chocolateyForceX86) {
    $checksum = $checksum64
    $filename = $filename64
}

if ($FROM_LOCATION.Contains('/')) { $url = "$FROM_LOCATION/$filename" }
else  { $url = "$FROM_LOCATION\$filename" }

write-host "url: $url"

Install-ChocolateyZipPackage -packageName $packageName -url "$url" -unzipLocation "$PROD_HOME" -checksum $checksum -checksumType $checksumType

#Setting path variable instead of using shims. Generate .ignore files for unwanted .exe files
$files = get-childitem "$PROD_HOME\$versionFolder" -include *.exe -recurse
foreach ($file in $files) {
    New-Item "$file.ignore" -type file -force | Out-Null
}

Install-ChocolateyPath -pathToInstall $(join-path $PROD_HOME $versionFolder) -pathType $pathType

redpajama_set_name: RedPajamaGithub


text:
int rank;
int numprocs;

using namespace std;

void passive_pattern(double *sendbuf, double *recvbuf, int &n) {
  MPI_Allreduce(sendbuf,recvbuf,n,MPI_DOUBLE,MPI_PROD,MPI_COMM_WORLD);
}

void adjoint_forward_pattern(double *sendbuf, double *recvbuf, int &n) {
  MPI_Allreduce(sendbuf,recvbuf,n,MPI_DOUBLE,MPI_PROD,MPI_COMM_WORLD);
  MPI_Alltoall(sendbuf,n,MPI_DOUBLE,recvbuf,n,MPI_DOUBLE,MPI_COMM_WORLD);
}

void adjoint_reverse_pattern(double *sendbuf, double *recvbuf, int &n) {
  MPI_Allreduce(sendbuf,recvbuf,n,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
}

int main(int argc, char *argv[]) {
  MPI_Init(&argc, &argv);
  MPI_Comm_rank(MPI_COMM_WORLD,&rank);
  MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
  int n=atoi(argv[1]);
  double *sendbuf=new double[n];
  double *recvbuf=new double[n*numprocs];
  double t0=MPI_Wtime();
  passive_pattern(sendbuf,recvbuf,n);
  double t1=MPI_Wtime();
  cout << "Passive pattern: " << t1-t0 << " s." << endl;
  delete [] sendbuf; delete [] recvbuf;

  sendbuf=new double[n];
  recvbuf=new double[n*numprocs];
  double t2=MPI_Wtime();
  adjoint_forward_pattern(sendbuf,recvbuf,n);
  double t3=MPI_Wtime();
  cout << "Active forward pattern: " << t3-t2 << " s." << endl;
  delete [] sendbuf; delete [] recvbuf;

  sendbuf=new double[n];
  recvbuf=new double[n];
  double t4=MPI_Wtime();
  adjoint_reverse_pattern(sendbuf,recvbuf,n);
  double t5=MPI_Wtime();
  cout << "Active reverse pattern: " << t5-t4 << " s." << endl;
  delete [] sendbuf; delete [] recvbuf;

  cout << "Ratio:" << (t5-t4+t3-t2)/(t1-t0) << endl;
  MPI_Finalize();
  return 0;
}


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

namespace XComponent.SlackProxy.TriggeredMethod.SlackApi
{
    internal class SlackMessage
    {
        /// <summary>
        /// This is the text that will be posted to the channel
        /// </summary>
        public string Text { get; set; }
        /// <summary>
        /// Optional override of destination channel
        /// </summary>
        public string Channel { get; set; }
        /// <summary>
        /// Optional override of the username that is displayed
        /// </summary>
        public string Username { get; set; }
        /// <summary>
        /// Optional emoji displayed with the message
        /// </summary>
        public string IconEmoji { get; set; }
        /// <summary>
        /// Optional attachment collection
        /// </summary>
        public List<SlackAttachment> Attachments { get; set; }
    }
}


text:
public class SplashActivity extends Activity {

	private static final long SPLASH_DISPLAY_LENGHT = 2 * 1000;

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

		/* New Handler to start the Menu-Activity
         * and close this Splash-Screen after some seconds.*/
        new Handler().postDelayed(new Runnable(){
            @Override
            public void run() {
                /* Create an Intent that will start the Menu-Activity. */
                Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);
                SplashActivity.this.startActivity(mainIntent);
                SplashActivity.this.finish();
            }
        }, SPLASH_DISPLAY_LENGHT);
	}
}


text:
import { Component, OnInit } from '@angular/core';
import {OidcSilentObtainService, TokenService, Token, TokenContainer, RefreshStrategyRefreshToken} from '@elderbyte/ngx-auth';
import {LoggerFactory} from '@elderbyte/ts-logger';
import {interval} from 'rxjs';

@Component({
  selector: 'starter-demo-public-dashboard',
  templateUrl: './public-dashboard.component.html',
  styleUrls: ['./public-dashboard.component.scss']
})
export class PublicDashboardComponent implements OnInit {

  private readonly logger = LoggerFactory.getLogger('PublicDashboardComponent');

  public tokenContainer: TokenContainer;
  public accessTokenTtl: string;
  public idTokenTtl: string;
  public refreshTokenTtl: string;

  constructor(
      private silentObtainService: OidcSilentObtainService,
      private tokenService: TokenService,
      private refreshToken: RefreshStrategyRefreshToken
  ) { }

  public ngOnInit(): void {
    this.tokenService.tokenObservable.subscribe(
        tokens => this.tokenContainer = tokens
    );

    interval(500).subscribe(
      iv => {
        if (this.tokenContainer) {
          this.accessTokenTtl = this.formatTtl(this.tokenContainer.accessToken);
          this.idTokenTtl =  this.formatTtl(this.tokenContainer.idToken);
          this.refreshTokenTtl =  this.formatTtl(this.tokenContainer.refreshToken);
        } else {
          this.accessTokenTtl = '';
          this.idTokenTtl =  '';
          this.refreshTokenTtl =  '';
        }
      }
    );
  }

  private formatTtl(token: Token<any>): string {
    if (token) {
      return this.timeDuration(token.ttl / 1000);
    } else {
      return '';
    }
  }

  public performSilentLogin(): void {
    this.silentObtainService.silentObtainTokens().subscribe(
        success => this.logger.info('Silent obtain got tokens ', success),
        err => this.logger.error('Silent obtain failed!', err),
    );
  }

  public emitTokenExpiresSoon(): void {
    this.tokenService.emitAccessTokenExpiresSoon();
  }

  public performRefreshToken(): void {
    this.refreshToken.tryRefresh().toPromise();
  }

  public stringify(obj: any): string {
    return JSON.stringify(obj, null, 2);
  }

  private timeDuration(totalSeconds: number): string {

    const seconds = Math.floor(totalSeconds % 60);
    const minutes = Math.floor((totalSeconds / 60) % 60);
    const hours = Math.floor((totalSeconds / 60 / 60));

    const minutesStr = minutes + ':' + seconds;

    if (hours) {
      return hours + ':' + minutesStr;
    }

    return minutesStr;
  }

}


text:
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: Apache License, Version 2.0
 * See the LICENSE file in the root directory or visit http://www.apache.org/licenses/LICENSE-2.0
 */
package org.hibernate.sqm.query;

/**
 * Used to more easily identifier non-SELECT (DML) statements by gross type.
 *
 * @author Steve Ebersole
 */
public interface NonSelectStatement extends Statement {
}


text:
namespace ngtk {

class Box : public Container {
public:
  static void SetPrototypeMethods (v8::Handle<v8::FunctionTemplate> constructor_template);

private:
  static v8::Handle<v8::Value> PackStart      (const v8::Arguments &args);
  static v8::Handle<v8::Value> PackEnd        (const v8::Arguments &args);
  static v8::Handle<v8::Value> GetHomogeneous (const v8::Arguments &args);
  static v8::Handle<v8::Value> SetHomogeneous (const v8::Arguments &args);
  static v8::Handle<v8::Value> GetSpacing     (const v8::Arguments &args);
  static v8::Handle<v8::Value> SetSpacing     (const v8::Arguments &args);
  static v8::Handle<v8::Value> ReorderChild   (const v8::Arguments &args);
};

} // namespace ngtk

#endif


text:
package org.lamport.tla.toolbox.tool.tlc.output.data;

import static org.junit.Assert.*;

import org.junit.Test;

public class ActionInformationItemTest {

	@Test
	public void testParseInit() {
		final ActionInformationItem item = ActionInformationItem
				.parseInit("<Init line 13, col 1 to line 14, col 5 of module H>: 3:15", "Model");
		assertNotNull(item);
		assertNull(item.getDefinition());

		assertEquals("H", item.getModule());
		assertEquals("Model", item.getModelName());

		assertEquals("Init", item.getName());

		assertEquals(13, item.getModuleLocation().beginLine());
		assertEquals(1, item.getModuleLocation().beginColumn());
		assertEquals(14, item.getModuleLocation().endLine());
		assertEquals(5, item.getModuleLocation().endColumn());

		assertEquals(3, item.getCost());
		assertEquals(15, item.getCount());
	}

	@Test
	public void testParseInit2() {
		final ActionInformationItem item = ActionInformationItem
				.parseInit("<Init line 13, col 1 to line 17, col 5 of module H (14 16 15 28)>: 3:15", "Model");
		assertNotNull(item);

		assertEquals(14, item.getDefinition().beginLine());
		assertEquals(16, item.getDefinition().beginColumn());
		assertEquals(15, item.getDefinition().endLine());
		assertEquals(28, item.getDefinition().endColumn());

		assertEquals("H", item.getModule());
		assertEquals("Model", item.getModelName());

		assertEquals("Init", item.getName());

		assertEquals(13, item.getModuleLocation().beginLine());
		assertEquals(1, item.getModuleLocation().beginColumn());
		assertEquals(17, item.getModuleLocation().endLine());
		assertEquals(5, item.getModuleLocation().endColumn());

		assertEquals(3, item.getCost());
		assertEquals(15, item.getCount());
	}

	@Test
	public void testParseNext() {
		final ActionInformationItem item = ActionInformationItem
				.parseNext("<BandC line 13, col 1 to line 14, col 5 of module H>: 2:15", "Model");
		assertNotNull(item);
		assertNull(item.getDefinition());

		assertEquals("H", item.getModule());
		assertEquals("Model", item.getModelName());

		assertEquals("BandC", item.getName());

		assertEquals(13, item.getModuleLocation().beginLine());
		assertEquals(1, item.getModuleLocation().beginColumn());
		assertEquals(14, item.getModuleLocation().endLine());
		assertEquals(5, item.getModuleLocation().endColumn());

		assertEquals(2, item.getCost());
		assertEquals(15, item.getCount());
	}

	@Test
	public void testParseNextWithDefinition() {
		final ActionInformationItem item = ActionInformationItem
				.parseNext("<BandC line 13, col 1 to line 17, col 5 of module H (14 16 15 28)>: 2:15", "Model");
		assertNotNull(item);

		assertEquals(14, item.getDefinition().beginLine());
		assertEquals(16, item.getDefinition().beginColumn());
		assertEquals(15, item.getDefinition().endLine());
		assertEquals(28, item.getDefinition().endColumn());

		assertEquals("H", item.getModule());
		assertEquals("Model", item.getModelName());

		assertEquals("BandC", item.getName());

		assertEquals(13, item.getModuleLocation().beginLine());
		assertEquals(1, item.getModuleLocation().beginColumn());
		assertEquals(17, item.getModuleLocation().endLine());
		assertEquals(5, item.getModuleLocation().endColumn());

		assertEquals(2, item.getCost());
		assertEquals(15, item.getCount());
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>BiBiGrid-gui</artifactId>
    <version>0.1.0</version>

    <parent>
        <groupId>de.unibi.cebitec.bibiserv</groupId>
        <artifactId>BiBiGrid</artifactId>
        <version>1.0</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>de.unibi.cebitec.bibiserv</groupId>
            <artifactId>BiBiGrid-core</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.BiBiServ.bibiserv</groupId>
            <artifactId>bibiservabstraction</artifactId>
            <version>2.1.0.alpha.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>1.4.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>1.4.2.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>LATEST</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <version>1.4.2.RELEASE</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
                    <createDependencyReducedPom>true</createDependencyReducedPom>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/spring.handlers</resource>
                                </transformer>
                                <transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                                    <resource>META-INF/spring.factories</resource>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/spring.schemas</resource>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>bibigrid_gui.Application</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
        <repository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </pluginRepository>
    </pluginRepositories>
</project>


text:
import * as React from 'react';
import { IPropertyFieldColorPickerPropsInternal } from './PropertyFieldColorPicker';
import { ColorPicker } from 'office-ui-fabric-react/lib/ColorPicker';
import { Label } from 'office-ui-fabric-react/lib/Label';
import { Async } from 'office-ui-fabric-react/lib/Utilities';

/**
 * @interface
 * PropertyFieldColorPickerHost properties interface
 *
 */
export interface IPropertyFieldColorPickerHostProps extends IPropertyFieldColorPickerPropsInternal {
}

export interface IPropertyFieldColorPickerHostState {
  color?: string;
  errorMessage?: string;
}

/**
 * @class
 * Renders the controls for PropertyFieldColorPicker component
 */
export default class PropertyFieldColorPickerHost extends React.Component<IPropertyFieldColorPickerHostProps, IPropertyFieldColorPickerHostState> {

  private latestValidateValue: string;
  private async: Async;
  private delayedValidate: (value: string) => void;

  /**
   * @function
   * Constructor
   */
  constructor(props: IPropertyFieldColorPickerHostProps) {
    super(props);

    //Inits state
    var defaultColor: string = '#FFFFFF';
    if (this.props.initialColor && this.props.initialColor != '')
      defaultColor = this.props.initialColor;
    this.state = {
        color: defaultColor,
        errorMessage: ''
    };

    this.async = new Async(this);
    this.validate = this.validate.bind(this);
    this.notifyAfterValidate = this.notifyAfterValidate.bind(this);
    this.delayedValidate = this.async.debounce(this.validate, this.props.deferredValidationTime);

    //Bind the current object to the external called onSelectDate method
    this.onColorChanged = this.onColorChanged.bind(this);
  }

  /**
   * @function
   * Function called when the ColorPicker Office UI Fabric component selected color changed
   */
  private onColorChanged(color: string): void {
    this.state.color = color;
    this.setState(this.state);
    this.delayedValidate(color);
  }

  /**
   * @function
   * Validates the new custom field value
   */
  private validate(value: string): void {
    if (this.props.onGetErrorMessage === null || this.props.onGetErrorMessage === undefined) {
      this.notifyAfterValidate(this.props.initialColor, value);
      return;
    }

    if (this.latestValidateValue === value)
      return;
    this.latestValidateValue = value;

    var result: string | PromiseLike<string> = this.props.onGetErrorMessage(value || '');
    if (result !== undefined) {
      if (typeof result === 'string') {
        if (result === undefined || result === '')
          this.notifyAfterValidate(this.props.initialColor, value);
        this.state.errorMessage = result;
        this.setState(this.state);
      }
      else {
        result.then((errorMessage: string) => {
          if (errorMessage === undefined || errorMessage === '')
            this.notifyAfterValidate(this.props.initialColor, value);
          this.state.errorMessage = errorMessage;
          this.setState(this.state);
        });
      }
    }
    else {
      this.notifyAfterValidate(this.props.initialColor, value);
    }
  }

  /**
   * @function
   * Notifies the parent Web Part of a property value change
   */
  private notifyAfterValidate(oldValue: string, newValue: string) {
    if (this.props.onPropertyChange && newValue != null) {
      this.props.properties[this.props.targetProperty] = newValue;
      this.props.onPropertyChange(this.props.targetProperty, oldValue, newValue);
      if (!this.props.disableReactivePropertyChanges && this.props.render != null)
        this.props.render();
    }
  }

  /**
   * @function
   * Called when the component will unmount
   */
  public componentWillUnmount() {
    this.async.dispose();
  }

  /**
   * @function
   * Renders the control
   */
  public render(): JSX.Element {
    //Renders content
    return (

        {this.props.label}
        <ColorPicker
          color={this.state.color}
          onColorChanged={this.onColorChanged}
        />
        { this.state.errorMessage != null && this.state.errorMessage != '' && this.state.errorMessage != undefined ?

{  this.state.errorMessage }

{ this.state.errorMessage }

            : ''}

    );
  }
}


text:
import Carousel from './carousel.vue';
export default Carousel;


text:
/* global bp, plupload, BP_Uploader, _, JSON, Backbone */

window.wp = window.wp || {};
window.bp = window.bp || {};

( function( exports, $ ) {

	// Bail if not set
	if ( typeof BP_Uploader === 'undefined' ) {
		return;
	}

	/**
	 * Extend the bp global with what we need from the wp one.
	 * and make sure previously defined BuddyPress attributes
	 * are not removed (eg: bp.mentions)
	 */
	_.extend( bp, _.pick( wp, 'Backbone', 'ajax', 'template' ) );

	// Init Models, Collections, Views and the BuddyPress Uploader
	bp.Models      = bp.Models || {};
	bp.Collections = bp.Collections || {};
	bp.Views       = bp.Views || {};
	bp.Uploader    = {};

	/**
	 * BuddyPress Uploader.
	 *
	 * This is an adapted version of wp.Uploader
	 */
	bp.Uploader.uploader = function() {
		var self = this,
			isIE = navigator.userAgent.indexOf('Trident/') !== -1 || navigator.userAgent.indexOf('MSIE ') !== -1;

		this.params  = BP_Uploader.settings;
		this.strings = BP_Uploader.strings;

		this.supports = {
			upload: this.params.browser.supported
		};

		this.supported = this.supports.upload;

		if ( ! this.supported ) {
			/*jshint -W020 */
			BP_Uploader = undefined;
			return;
		}

		// Make sure flash sends cookies (seems in IE it does without switching to urlstream mode)
		if ( ! isIE && 'flash' === plupload.predictRuntime( this.params.defaults ) &&
			( ! this.params.defaults.required_features || ! this.params.defaults.required_features.hasOwnProperty( 'send_binary_string' ) ) ) {

			this.params.defaults.required_features = this.params.defaults.required_features || {};
			this.params.defaults.required_features.send_binary_string = true;
		}

		this.uploader = new plupload.Uploader( this.params.defaults );

		/**
		 * After the Uploader has been initialized, initialize some behaviors for the dropzone.
		 *
		 * @event Init
		 * @param {plupload.Uploader} uploader Uploader instance.
		 */
		this.uploader.bind( 'Init', function( uploader ) {
			var container    = $( '#' + self.params.defaults.container ),
			    drop_element = $( '#' + self.params.defaults.drop_element );

			if ( 'html4' === uploader.runtime ) {
				uploader.settings.multipart_params.html4 = true;
			}

			/**
			 * Avatars need to be cropped, by default we are using an original
			 * max width of 450px, but there can be cases when this max width
			 * is larger than the one of the Avatar UI (eg: on mobile). To avoid any
			 * difficulties, we're adding a ui_available_width argument to the bp_params
			 * object and set it according to the container width. This value will be
			 * checked during the upload process to eventually adapt the resized avatar.
			 */
			if ( 'bp_avatar_upload' ===  uploader.settings.multipart_params.action ) {
				 uploader.settings.multipart_params.bp_params.ui_available_width = container.width();
			}

			if ( uploader.features.dragdrop && ! self.params.browser.mobile ) {
				container.addClass( 'drag-drop' );
				drop_element.bind( 'dragover.wp-uploader', function() {
					container.addClass( 'drag-over' );
				} ).bind( 'dragleave.wp-uploader, drop.wp-uploader', function() {
					container.removeClass( 'drag-over' );
				} );
			} else {
				container.removeClass( 'drag-drop' );
				drop_element.unbind( '.wp-uploader' );
			}

		} );

		// See https://core.trac.wordpress.org/ticket/37039
		this.uploader.bind( 'postinit', function( up ) {
			up.refresh();
		});

		// Init BuddyPress Uploader
		this.uploader.init();

		/**
		 * Feedback callback.
		 *
		 * Add a new message to the errors collection, so it's possible
		 * to give some feedback to the user
		 *
		 * @param  {string}        message
		 * @param  {object}        data
		 * @param  {plupload.File} file     File that was uploaded.
		 */
		this.feedback = function( message, data, file ) {
			if ( ! _.isNull( file ) && file.item ) {
				file.item.clear();
			}

			bp.Uploader.filesError.unshift( {
				message: message,
				data:    data,
				file:    file
			} );
		};

		/**
		 * After files were filtered and added to the queue, create a model for each.
		 *
		 * @event FilesAdded
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {Array}             files    Array of file objects that were added to queue by the user.
		 */
		this.uploader.bind( 'FilesAdded', function( uploader, files ) {
			var hundredmb = 100 * 1024 * 1024, max = parseInt( uploader.settings.max_file_size, 10 ),
			    _this = this;

			/**
			 * In case the multiple selection is false (eg: avatar) stop the process and send
			 * and event containing a warning
			 */
			if ( ! uploader.settings.multi_selection && files.length > 1 ) {
				for ( var i in files ) {
					uploader.removeFile( files[i] );
				}

				$( self ).trigger( 'bp-uploader-warning', self.strings.unique_file_warning );
				return;
			}

			_.each( files, function( file ) {
				var attributes;

				// Ignore failed uploads.
				if ( plupload.FAILED === file.status ) {
					return;
				}

				if ( max > hundredmb && file.size > hundredmb && uploader.runtime !== 'html5' ) {
					_this.uploadSizeError( uploader, file, true );
				} else {
					attributes = _.extend( {
						id:        file.id,
						file:      file,
						uploading: true,
						date:      new Date(),
						filename:  file.name
					}, _.pick( file, 'loaded', 'size', 'percent' ) );

					file.item = new bp.Models.File( attributes );
					bp.Uploader.filesQueue.add( file.item );
				}

			} );

			uploader.refresh();
			uploader.start();
		} );

		/**
		 * Update each file item on progress
		 *
		 * @event UploadProgress
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {Object}            file
		 */
		this.uploader.bind( 'UploadProgress', function( uploader, file ) {
			file.item.set( _.pick( file, 'loaded', 'percent' ) );
		} );

		/**
		 * After a file is successfully uploaded, update its model.
		 *
		 * @event FileUploaded
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {plupload.File}     file     File that was uploaded.
		 * @param {Object}            response Object with response properties.
		 * @return {mixed}
		 */
		this.uploader.bind( 'FileUploaded', function( uploader, file, response ) {
			var message = self.strings.default_error;

			try {
				response = JSON.parse( response.response );
			} catch ( e ) {
				return self.feedback( message, e, file );
			}

			if ( ! _.isObject( response ) || _.isUndefined( response.success ) ) {
				return self.feedback( message, null, file );
			} else if ( ! response.success ) {
				if ( response.data && response.data.message ) {
					message = response.data.message;
				}

				return self.feedback( message, response.data, file );
			}

			_.each(['file','loaded','size','percent'], function( key ) {
				file.item.unset( key );
			} );

			file.item.set( _.extend( response.data, { uploading: false } ) );

			//  Add the file to the Uploaded ones
			bp.Uploader.filesUploaded.add( file.item );

		} );

		/**
		 * Trigger an event to inform a new upload is being processed
		 *
		 * Mainly used to remove an eventual warning
		 *
		 * @event BeforeUpload
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {Array}             files    Array of file objects that were added to queue by the user.
		 */
		this.uploader.bind( 'BeforeUpload', function( uploader, files ) {
			$( self ).trigger( 'bp-uploader-new-upload', uploader, files );
		} );

		/**
		 * Reset the filesQueue once the upload is complete
		 *
		 * @event BeforeUpload
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {Array}             files    Array of file objects that were added to queue by the user.
		 */
		this.uploader.bind( 'UploadComplete', function( uploader, files ) {
			$( self ).trigger( 'bp-uploader-upload-complete', uploader, files );
			bp.Uploader.filesQueue.reset();
		} );

		/**
		 * Map Plupload errors & Create a warning when plupload failed
		 *
		 * @event Error
		 * @param {plupload.Uploader} uploader Uploader instance.
		 * @param {Object}            pluploadError Plupload error
		 */
		this.uploader.bind( 'Error', function( uploader, pluploadError ) {
			var message = self.strings.default_error,
				key,
				errors = {
					'FAILED':                 self.strings.upload_failed,
					'FILE_EXTENSION_ERROR':   self.strings.invalid_filetype,
					'IMAGE_FORMAT_ERROR':     self.strings.not_an_image,
					'IMAGE_MEMORY_ERROR':     self.strings.image_memory_exceeded,
					'IMAGE_DIMENSIONS_ERROR': self.strings.image_dimensions_exceeded,
					'GENERIC_ERROR':          self.strings.upload_failed,
					'IO_ERROR':               self.strings.io_error,
					'HTTP_ERROR':             self.strings.http_error,
					'SECURITY_ERROR':         self.strings.security_error,
					'FILE_SIZE_ERROR':        self.strings.file_exceeds_size_limit.replace( '%s' , $( '<span />' ).text( pluploadError.file.name ).html() )
				};

			// Check for plupload errors.
			for ( key in errors ) {
				if ( pluploadError.code === plupload[ key ] ) {
					message = errors[ key ];
					break;
				}
			}

			$( self ).trigger( 'bp-uploader-warning', message );
			uploader.refresh();
		} );
	};

	// Create a very generic Model for files
	bp.Models.File = Backbone.Model.extend( {
		file: {}
	} );

	// Add Collections to store queue, uploaded files and errors
	$.extend( bp.Uploader, {
		filesQueue    : new Backbone.Collection(),
		filesUploaded : new Backbone.Collection(),
		filesError    : new Backbone.Collection()
	} );

	// Extend wp.Backbone.View with .prepare() and .inject()
	bp.View = bp.Backbone.View.extend( {
		inject: function( selector ) {
			this.render();
			$(selector).html( this.el );
			this.views.ready();
		},

		prepare: function() {
			if ( ! _.isUndefined( this.model ) && _.isFunction( this.model.toJSON ) ) {
				return this.model.toJSON();
			} else {
				return {};
			}
		}
	} );

	// BuddyPress Uploader main view
	bp.Views.Uploader = bp.View.extend( {
		className: 'bp-uploader-window',
		template: bp.template( 'upload-window' ),

		defaults: _.pick( BP_Uploader.settings.defaults, 'container', 'drop_element', 'browse_button' ),

		initialize: function() {
			this.warnings = [];
			this.model    = new Backbone.Model( this.defaults );
			this.on( 'ready', this.initUploader );
		},

		initUploader: function() {
			this.uploader = new bp.Uploader.uploader();
			$( this.uploader ).on( 'bp-uploader-warning', _.bind( this.setWarning, this ) );
			$( this.uploader ).on( 'bp-uploader-new-upload', _.bind( this.resetWarning, this ) );
		},

		setWarning: function( event, message ) {
			if ( _.isUndefined( message ) ) {
				return;
			}

			var warning = new bp.Views.uploaderWarning( {
				value: message
			} ).render();

			this.warnings.push( warning );

			this.$el.after( warning.el );
		},

		resetWarning: function() {
			if ( 0 === this.warnings.length ) {
				return;
			}

			// Remove all warning views
			_.each( this.warnings, function( view ) {
				view.remove();
			} );

			// Reset Warnings
			this.warnings = [];
		}
	} );

	// BuddyPress Uploader warning view
	bp.Views.uploaderWarning = bp.View.extend( {
		tagName: 'p',
		className: 'warning',

		initialize: function() {
			this.value = this.options.value;
		},

		render: function() {
			this.$el.html( this.value );
			return this;
		}
	} );

	// BuddyPress Uploader Files view
	bp.Views.uploaderStatus = bp.View.extend( {
		className: 'files',

		initialize: function() {
			_.each( this.collection.models, this.addFile, this );
			this.collection.on( 'change:percent', this.progress, this );
			bp.Uploader.filesError.on( 'add', this.feedback, this );
		},

		addFile: function( file ) {
			this.views.add( new bp.Views.uploaderProgress( { model: file } ) );
		},

		progress:function( model ) {
			if ( ! _.isUndefined( model.get( 'percent' ) ) ) {
				$( '#' + model.get('id') + ' .bp-progress .bp-bar' ).css( 'width', model.get('percent') + '%' );
			}
		},

		feedback: function( model ) {
			if ( ! _.isUndefined( model.get( 'message' ) ) && ! _.isUndefined( model.get( 'file' ) ) ) {
				$( '#' + model.get( 'file' ).id ).html( model.get( 'message' ) ).addClass( 'error' );
			}
		}
	} );

	// BuddyPress Uploader File progress view
	bp.Views.uploaderProgress = bp.View.extend( {
		className: 'bp-uploader-progress',
		template: bp.template( 'progress-window' )
	} );

})( bp, jQuery );


text:
package de.omnikryptec.old.resource.loader;

import de.codemakers.io.file.AdvancedFile;
import de.omnikryptec.old.resource.loader.annotations.DefaultLoader;
import de.omnikryptec.old.resource.model.Model;

import java.util.Properties;

/**
 * DefaultModelLoader
 *
 * @author Panzer1119
 */
@DefaultLoader
public class DefaultModelLoader implements Loader {

    @Override
    public boolean load(AdvancedFile advancedFile, AdvancedFile superFile, Properties properties,
	    ResourceLoader resourceLoader) {
	final String name = generateName(advancedFile, superFile);
	final Model model = Model.newModel(advancedFile);
	// Logger.log(String.format("Loaded Model \"%s\" from \"%s\" (in \"%s\")%s",
	// name, advancedFile, superFile, (properties == null || properties.isEmpty()) ?
	// "" : String.format(" (with properties %s)", properties))); //TOD- Only for
	// testing!!! DELETE THIS!
	return resourceLoader.addRessourceObject(name, model);
    }

    @Override
    public LoadingType accept(AdvancedFile advancedFile, AdvancedFile superFile, Properties properties,
	    ResourceLoader resourceLoader) {
	return advancedFile.getExtension().equalsIgnoreCase("obj") ? LoadingType.OPENGL : LoadingType.NOT; // TOD- Kann
													   // das hier
													   // auch
													   // Normal
													   // geloaded
													   // werden?
    }

}


text:
namespace Macabre2D.UI.Controls.ValueEditors {

    public partial class StringEditor : NamedValueEditor<string> {

        public StringEditor() {
            this.InitializeComponent();
        }
    }
}


text:
package v1

// ImageRegistryConfigStorageIBMCOSApplyConfiguration represents an declarative configuration of the ImageRegistryConfigStorageIBMCOS type for use
// with apply.
type ImageRegistryConfigStorageIBMCOSApplyConfiguration struct {
	Bucket             *string `json:"bucket,omitempty"`
	Location           *string `json:"location,omitempty"`
	ResourceGroupName  *string `json:"resourceGroupName,omitempty"`
	ResourceKeyCRN     *string `json:"resourceKeyCRN,omitempty"`
	ServiceInstanceCRN *string `json:"serviceInstanceCRN,omitempty"`
}

// ImageRegistryConfigStorageIBMCOSApplyConfiguration constructs an declarative configuration of the ImageRegistryConfigStorageIBMCOS type for use with
// apply.
func ImageRegistryConfigStorageIBMCOS() *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	return &ImageRegistryConfigStorageIBMCOSApplyConfiguration{}
}

// WithBucket sets the Bucket field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Bucket field is set to the value of the last call.
func (b *ImageRegistryConfigStorageIBMCOSApplyConfiguration) WithBucket(value string) *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	b.Bucket = &value
	return b
}

// WithLocation sets the Location field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Location field is set to the value of the last call.
func (b *ImageRegistryConfigStorageIBMCOSApplyConfiguration) WithLocation(value string) *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	b.Location = &value
	return b
}

// WithResourceGroupName sets the ResourceGroupName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceGroupName field is set to the value of the last call.
func (b *ImageRegistryConfigStorageIBMCOSApplyConfiguration) WithResourceGroupName(value string) *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	b.ResourceGroupName = &value
	return b
}

// WithResourceKeyCRN sets the ResourceKeyCRN field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceKeyCRN field is set to the value of the last call.
func (b *ImageRegistryConfigStorageIBMCOSApplyConfiguration) WithResourceKeyCRN(value string) *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	b.ResourceKeyCRN = &value
	return b
}

// WithServiceInstanceCRN sets the ServiceInstanceCRN field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ServiceInstanceCRN field is set to the value of the last call.
func (b *ImageRegistryConfigStorageIBMCOSApplyConfiguration) WithServiceInstanceCRN(value string) *ImageRegistryConfigStorageIBMCOSApplyConfiguration {
	b.ServiceInstanceCRN = &value
	return b
}


text:
export class Department {
	deptHead = '';
	deptName = '';
}


text:
/*
  To do imports on external files
  import * as testpic from './testpic.png';
*/
declare module '*.png'
declare module '*.jpg'
declare module '*.json'
declare module 'react-social-icons';


text:
package jetbrains.buildServer.nuget.server.toolRegistry.tab;

import jetbrains.buildServer.nuget.server.toolRegistry.NuGetTool;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Eugene Petrenko (eugene.petrenko@gmail.com)
 *         Date: 14.06.12 14:02
 */
public class InstallToolBean {
  private final WhatToDo myWhatToDo;
  private String myErrorText = null;
  private final Collection<NuGetTool> myTools = new ArrayList<NuGetTool>();

  public InstallToolBean(@NotNull WhatToDo whatToDo) {
    myWhatToDo = whatToDo;
  }

  public void setErrorText(@NotNull String errorText) {
    myErrorText = errorText;
  }

  public void setTools(@NotNull Collection<? extends NuGetTool> tools) {
    myTools.clear();
    myTools.addAll(tools);
  }

  @Nullable
  public String getErrorText() {
    return myErrorText;
  }

  @NotNull
  public Collection<NuGetTool> getTools() {
    return myTools;
  }

  public boolean isShowErrors() {
    return getErrorText() != null || getTools().isEmpty();
  }

  @NotNull
  public String getWhatToDo() {
    return myWhatToDo.getName();
  }

  @NotNull
  public String getView() {
    switch (myWhatToDo) {
      case INSTALL: return "tool/installTool.jsp";
      case UPLOAD: return "tool/uploadTool.jsp";
      default:
        throw new RuntimeException("Unexpected action: " + getWhatToDo());
    }
  }
}


text:
module BancBox
  class Error < StandardError

    attr_reader :data

    def initialize(data)
      @data = data
      super(@data.inspect)
    end
  end
end


text:
#Install dependencies
sudo apt-get update
sudo apt-get install -y build-essential g++ wget git openjdk-8-jdk

wget http://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
tar -zxf apache-maven-3.3.3-bin.tar.gz
sudo cp -R apache-maven-3.3.3 /usr/local
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
#Build and test retrying
git clone https://github.com/undertow-io/undertow.git
cd undertow/
mvn install


text:
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require railgun/datepicker
 *= require railgun/optimus/bootstrap
 *= require railgun/optimus/bootstrap-responsive.min
 *= require railgun/optimus/style
 *= require railgun/optimus/style-responsive
 *= require railgun/optimus/jquery-ui-1.8.21.custom
 *= require railgun/optimus/fullcalendar
 *= require railgun/optimus/chosen
 *= require railgun/optimus/uniform.default
 *= require railgun/optimus/jquery.cleditor
 *= require railgun/optimus/jquery.noty
 *= require railgun/optimus/noty_theme_default
 *= require railgun/optimus/elfinder.min
 *= require railgun/optimus/elfinder.theme
 *= require railgun/optimus/jquery.iphone.toggle
 *= require railgun/optimus/uploadify
 *= require railgun/optimus/jquery.gritter
 */

.modal > form{
  margin-bottom:0;
}

.control-group .controls .hint{
  display: block;
  font-size:90%;
}

footer{
  margin-bottom:20px;
  overflow: hidden;
}

footer img.logo{
  height:15px;
  margin-left:5px;
}


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

using rho.protocol.server;

using PrintingService;

namespace rho
{
namespace server
{
    public interface IClientsManager
    {
        void registerClient(string clientGuid);

        void unregisterClient(string clientGuid);
    }

    public class ClientsManager : PrintingThread, IClientsManager
    {
        private const string serviceQueueName = "printing-service-0B77E505-1745-4cfc-9A26-3B5B6AFB9377";

        private P2PMessageQueue m_serviceClientQueue = null;

        private MethodSelector<NullCommand> m_methodSelector = new MethodSelector<NullCommand>("rho.protocol.server");

        private Dictionary<string, ClientThread> m_clients = new Dictionary<string, ClientThread>();

        public ClientsManager(MainForm appForm) : base(appForm)
        {
            m_serviceClientQueue = new P2PMessageQueue(true, serviceQueueName);
        }

        protected override void checkForMessage()
        {
            Message         message = new Message();
            ReadWriteResult result = m_serviceClientQueue.Receive(message);
            //ReadWriteResult result = ReadWriteResult.OK;
            IServerCommand  clMethod = null;

            if (result == ReadWriteResult.OK)
            {
                string data = Encoding.UTF8.GetString(message.MessageBytes, 0, message.MessageBytes.GetLength(0));
                //string data = "{ \"Name\": \"registerClient\", \"PrinterID\": \"\", \"rhoString\": \"manual_common_spec\" }";

                Logger.Write("[manager] receive data from client: " + data);

                clMethod = (IServerCommand)m_methodSelector.selectMethod(data);
            }

            processMessage(clMethod);
        }

        public void processMessage(IServerCommand clMethod)
        {
            clMethod.executeCommand(this);
        }

        public void registerClient(string clientGuid)
        {
            Logger.Write("[manager] register new client: " + clientGuid);

            if (m_clients != null && !m_clients.ContainsKey(clientGuid))
            {
                Logger.Write("start register [manager]: " + clientGuid);

                ClientThread newClient = new ClientThread(clientGuid, m_applicationForm);

                newClient.startThread();
                m_clients.Add(clientGuid, newClient);
            }
            else
            {
                Logger.Write("[manager] register new client repeatedly");
            }
        }

        public void unregisterClient(string clientGuid)
        {
            Logger.Write("[manager] unregister new client: " + clientGuid);

            if (m_clients != null && m_clients.ContainsKey(clientGuid))
            {
                Logger.Write("[manager] start unregister: " + clientGuid);

                ClientThread newClient = m_clients[clientGuid];

                newClient.stopThread();
                newClient.joinThread();
                newClient.closeQueues();

                m_clients.Remove(clientGuid);
            }
            else
            {
                Logger.Write("[manager] unregister new client repeatedly");
            }
        }

        protected override void finalizeThread()
        {
        }
    }
}
}


text:
_G.bootaddr = computer.getBootAddress() -- get boot address, from Lua BIOS
local bootfs = component.proxy(_G.bootaddr) -- assign that FS to local bootfs
local handle = bootfs.open("/system/kernel.lua","r") -- open a handle for boot/kernel.lua on that drive

-- read magics
c=""
s=bootfs.read(handle,math.huge)
repeat
 c=c..s
 s=bootfs.read(handle,math.huge)
until s==nil -- tl;dr this loop reads the contents of the file into variable c

bootfs.close(handle) -- close the handle, as there is a limit (and memory!)

load(c)() -- load and execute boot/kernel.lua


text:
namespace AdminPanel.Client.Shared.Components;

public partial class AppComponentBase : ComponentBase
{
    [AutoInject] protected IExceptionHandler ExceptionHandler { get; set; } = default!;

    [AutoInject] protected IStateService StateService = default!;

    [AutoInject] protected AppAuthenticationStateProvider AuthenticationStateProvider = default!;

    [AutoInject] protected IStringLocalizer<AppStrings> Localizer = default!;

    [AutoInject] protected HttpClient HttpClient = default!;

    [AutoInject] protected IAuthTokenProvider AuthTokenProvider = default!;

    [AutoInject] protected IConfiguration Configuration = default!;

    [AutoInject] protected NavigationManager NavigationManager = default!;

    [AutoInject] protected IAuthenticationService AuthenticationService = default!;

    [AutoInject] protected IJSRuntime JsRuntime = default!;

    protected async sealed override Task OnInitializedAsync()
    {
        try
        {
            await OnInitAsync();
            await base.OnInitializedAsync();
        }
        catch (Exception exp)
        {
            ExceptionHandler.Handle(exp);
        }
    }

    protected async sealed override Task OnParametersSetAsync()
    {
        try
        {
            await OnParamsSetAsync();
            await base.OnParametersSetAsync();
        }
        catch (Exception exp)
        {
            ExceptionHandler.Handle(exp);
        }
    }

    /// <summary>
    /// Replacement for <see cref="OnInitializedAsync"/> which catches all possible exceptions in order to prevent app crash.
    /// </summary>
    protected virtual Task OnInitAsync()
    {
        return Task.CompletedTask;
    }

    protected async override Task OnAfterRenderAsync(bool firstRender)
    {
        if (firstRender)
        {
            try
            {
                await OnAfterFirstRenderAsync();
            }
            catch (Exception exp)
            {
                ExceptionHandler.Handle(exp);
            }
        }

        await base.OnAfterRenderAsync(firstRender);
    }

    protected sealed override void OnInitialized()
    {
        base.OnInitialized();
    }

    /// <summary>
    /// Replacement for <see cref="OnParametersSetAsync"/> which catches all possible exceptions in order to prevent app crash.
    /// </summary>
    protected virtual Task OnParamsSetAsync()
    {
        return Task.CompletedTask;
    }

    /// <summary>
    /// Method invoked after first time the component has been rendered.
    /// </summary>
    protected virtual Task OnAfterFirstRenderAsync()
    {
        return Task.CompletedTask;
    }

    /// <summary>
    /// Executes passed action while catching all possible exceptions to prevent app crash.
    /// </summary>
    public virtual Action WrapHandled(Action action)
    {
        return () =>
        {
            try
            {
                action();
            }
            catch (Exception exp)
            {
                ExceptionHandler.Handle(exp);
            }
        };
    }

    /// <summary>
    /// Executes passed action while catching all possible exceptions to prevent app crash.
    /// </summary>
    public virtual Action<T> WrapHandled<T>(Action<T> func)
    {
        return (e) =>
        {
            try
            {
                func(e);
            }
            catch (Exception exp)
            {
                ExceptionHandler.Handle(exp);
            }
        };
    }

    /// <summary>
    /// Executes passed function while catching all possible exceptions to prevent app crash.
    /// </summary>
    public virtual Func<Task> WrapHandled(Func<Task> func)
    {
        return async () =>
        {
            try
            {
                await func();
            }
            catch (Exception exp)
            {
                ExceptionHandler.Handle(exp);
            }
        };
    }

    /// <summary>
    /// Executes passed function while catching all possible exceptions to prevent app crash.
    /// </summary>
    public virtual Func<T, Task> WrapHandled<T>(Func<T, Task> func)
    {
        return async (e) =>
        {
            try
            {
                await func(e);
            }
            catch (Exception exp)
            {
                ExceptionHandler.Handle(exp);
            }
        };
    }
}


text: from .canque import Submission  # NOQA


text:
<?php
session_start();
require '../config/dbconnect.php';

$userid=$_SESSION['username'];
$oldpass=$_POST['oldpass'];
$newpass=$_POST['newpass'];
$confnewpass=$_POST['confnewpass'];
$insertpass=md5($userid.$newpass);

$sql="SELECT * FROM user_account WHERE user_id='".$userid."'";
$result=mysqli_query($conn,$sql);
$row=mysqli_fetch_array($result);

if ($row['user_passwd']!=md5($userid.$oldpass)) {
	$status=0;
	$pesan="Your old pass is wrong";
}
elseif ($newpass!=$confnewpass) {
	$status=0;
	$pesan="Your password did not match";
}
else {
	$sql2="UPDATE user_account SET user_passwd='".$insertpass."' WHERE userid='".$userid."'";
	$result2=mysqli_query($conn,$sql2);
	$status=1;
	$pesan="Your password has been changed";
}

if ($row['role_id']==1) {
	header("Location: ../view/editprofile.php?status=$status&pesan=$pesan");
}
elseif ($row['role_id']==2) {
	header("Location: ../view/editprofile.php?status=$status&pesan=$pesan");
}
elseif ($row['role_id']==3) {
	header("Location: ../view/editprofile.php?status=$status&pesan=$pesan");
}
elseif ($row['role_id']==4) {
	header("Location: ../view/editprofile.php?status=$status&pesan=$pesan");
}
elseif ($row['role_id']==5) {
	header("Location: ../viewguest/editprofile.php?status=$status&pesan=$pesan");
}

?>


text:
require('../../modules/esnext.reflect.define-metadata');

module.exports = require('../../internals/path').Reflect.defineMetadata;


text:
<?php

namespace PROCERGS\LoginCidadao\CoreBundle\Form\Type;

use Symfony\Component\Form\FormBuilderInterface;
use FOS\UserBundle\Form\Type\ChangePasswordFormType as BaseType;
use Symfony\Component\Security\Core\SecurityContextInterface;

class ChangePasswordFormType extends BaseType
{
    private $context;

    public function __construct($class, SecurityContextInterface $context)
    {
        parent::__construct($class);
        $this->context = $context;
    }

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $user = $this->context->getToken()->getUser();

        $emptyPassword = strlen($user->getPassword()) == 0;
        if (!$emptyPassword) {
            parent::buildForm($builder, $options);
            $builder->get('plainPassword')->setAttribute('autocomplete', 'off');
            $builder->get('current_password')->setAttribute('autocomplete', 'off');
        } else {
            $builder->add('plainPassword', 'repeated',
                array(
                'type' => 'password',
                'attr' => array('autocomplete' => 'off'),
                'options' => array('translation_domain' => 'FOSUserBundle'),
                'first_options' => array('label' => 'form.new_password'),
                'second_options' => array('label' => 'form.new_password_confirmation'),
                'invalid_message' => 'fos_user.password.mismatch',
            ));
        }
    }

    public function getName()
    {
        return 'procergs_change_password';
    }
}


text:
bold="\e[1m"
off="\e[0m"

section "#{bold}Command line one-liners#{off}

Arturo Herrero
 github/arturoherrero
twitter/arturoherrero

Socrates UK 2013" do
end

center <<-EOS
  Run the last command

  $ #{bold}!!#{off}
EOS

center <<-EOS
  Run the last command as root

  $ #{bold}sudo !!#{off}
EOS

center <<-EOS
  Create a script of the last executed command

  $ #{bold}echo "!!" > script.sh#{off}
EOS

block <<-EOS
  Reuse all parameter of the previous command line

  $ echo cd .
  $ #{bold}!*#{off}#{off}
EOS

block <<-EOS
  Run the last command with some argument

  $ echo a b c d e
  $ #{bold}echo !!:2#{off}
  $ #{bold}echo !!:3-$#{off}
EOS

block <<-EOS
  Insert the last argument of the previous command

  $ cp script.sh /usr/bin/
  $ #{bold}cd <ESC> .#{off}
EOS

center <<-EOS
  Runs previous command but replacing

  $ echo no typos
  $ #{bold}^typos^errors#{off}
EOS

block <<-EOS
  Escape any command aliases

  $ alias ls="ls -a"
  $ #{bold}\\ls#{off}
EOS

center <<-EOS
  Quickly rename a file

  $ #{bold}mv filename.{old,new}#{off}
  $ #{bold}mv filename.{png,jpg}#{off}
EOS

center <<-EOS
  Create a quick back-up copy of a file

  $ #{bold}cp file.txt{,.bak}#{off}
EOS

block <<-EOS
  Run a command from the history

  $ history
   ...
   1225  ls -l
   1226  git status
   1227  history
  $ #{bold}!-3#{off}
  $ #{bold}!1225#{off}
EOS

center <<-EOS
  Search the history for the most recent command beginning with 'text'

  $ #{bold}!text#{off}
EOS

center <<-EOS
  List of commands you use most often

  $ #{bold}history | awk '{print $2}' | sort | uniq -c | sort -rn | head#{off}
EOS

center <<-EOS
  Execute a command without saving it in the history

  $ #{bold}<space>command#{off}
EOS

center <<-EOS
  Make directory including intermediate directories

  $ #{bold}mkdir -p a/long/directory/path#{off}
EOS

center <<-EOS
  Create a directory and change into it

  $ #{bold}mkdir dir && cd $_#{off}
EOS

center <<-EOS
  Change to the previous working directory

  $ #{bold}cd -#{off}
EOS

center <<-EOS
  Jump to a directory
  Execute a command
  Jump back to current directory

  $ #{bold}(cd /tmp && ls)#{off}
EOS

center <<-EOS
  Create simple text file from command line

  $ #{bold}cat > file.txt#{off}
  {your text here}
  {your text here}
  #{bold}<ctrl-d>#{off}
EOS

center <<-EOS
  Empty a file

  $ #{bold}> file.txt#{off}
EOS

block <<-EOS
  Show PATH in a human-readable way

  $ #{bold}echo $PATH | tr ':' '\\n'#{off}
  $ #{bold}tr ':' '\\n' <<< $PATH#{off}
EOS

center <<-EOS
  Make 'less' behave like 'tail -f'

  $ #{bold}less +F somelogfile#{off}
EOS

block <<-EOS
  Redirect standard input to a file
  Print it to standard output

  $ #{bold}command | tee file.txt | less#{off}

  ┌─────────┐  ┌─────────┐  ┌─────────┐
  │ command │─▸│   tee   │─▸│ stdout  │
  └─────────┘  └────┬────┘  └─────────┘
                    │
                    ▾
              ┌───────────┐
              │   file    │
              └───────────┘
EOS

center <<-EOS
  Search for a <pattern> string inside all files in the current directory

  $ #{bold}grep -RnsI --color=auto <pattern> *#{off}
EOS

block <<-EOS
  Beyond grep

  _   /|
  \\'o.O'
  =(___)=
     U    ack!

  $ #{bold}ack <pattern>#{off}

EOS

center <<-EOS
  Recursively remove all empty directories

  $ #{bold}find . -type d -empty -delete#{off}
EOS

center <<-EOS
  Count your commits

  $ #{bold}git shortlog -sn#{off}
EOS

center <<-EOS
  Serve current directory tree at http://$HOSTNAME:8000/

  $ #{bold}python -m SimpleHTTPServer#{off}
EOS

block <<-EOS
  Share a file between two computers

  $ #{bold}nc -l 5566 > data-dump.sql#{off}
  $ #{bold}nc <his-ip-address> 5566 < data-dump.sql#{off}
EOS

center <<-EOS
  Download an entire website

  $ #{bold}wget -m http://website.com#{off}
EOS

center <<-EOS
  Clear the terminal screen

  #{bold}<ctrl-l>#{off}
EOS

center <<-EOS
  Salvage a borked terminal

  $ #{bold}reset#{off}
EOS

center <<-EOS
  Close shell keeping all subprocess running

  $ #{bold}disown -a && exit#{off}
EOS

center <<-EOS
  Run a command immune to hangups

  $ #{bold}nohup command &#{off}
EOS

center <<-EOS
  Attach screen over ssh

  $ #{bold}ssh user@host -t screen -r#{off}
EOS

center <<-EOS
  Compare a remote file with a local file

  $ #{bold}ssh user@host cat /path/to/remotefile | diff /path/to/localfile -#{off}
EOS

center <<-EOS
  Get your public IP address

  $ #{bold}curl ifconfig.me#{off}
EOS

center <<-EOS
  Set audible alarm when an IP address comes online

  $ #{bold}ping -a IP_address#{off}
EOS

center <<-EOS
  List programs with open ports and connections

  $ #{bold}lsof -i#{off}
EOS

center <<-EOS
  Currently mounted filesystems in nice layout

  $ #{bold}mount | column -t#{off}
EOS

center <<-EOS
  Display free disk space

  $ #{bold}df -h#{off}
EOS

center <<-EOS
  Display disk usage statistics for the current directory

  $ #{bold}du -sh *#{off}
EOS

center <<-EOS
  Display 10 biggest files/folders for the current directory

  $ #{bold}du -s * | sort -nr | head#{off}
EOS

center <<-EOS
  Execute a command at a given time

  $ #{bold}echo "ls -l" | at midnight#{off}
EOS

center <<-EOS
  Simple stopwatch

  $ #{bold}time read#{off}
  #{bold}<ctrl-d>#{off}
EOS

center <<-EOS
  Put a console clock in top right corner

  $ #{bold}while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &#{off}
EOS

center <<-EOS
  Display the top ten running processes
  (Sorted by memory usage)

  $ #{bold}ps aux | sort -nk +4 | tail#{off}
EOS

block <<-EOS
  Kill all Ruby processes

  $ #{bold}ps aux | grep ruby | awk '{ print $2 }' | xargs kill -9#{off}
  $ #{bold}ps aux | awk '/ruby/ && ! /awk/ { system("kill -9 "$2) }'#{off}
EOS

center <<-EOS
  32 bits or 64 bits?

  $ #{bold}getconf LONG_BIT#{off}
EOS

center <<-EOS
  Displays a calendar

  $ #{bold}cal 12 1984#{off}
EOS

block <<-EOS
  What day is today?

  $ #{bold}cal | sed "s/.*/ & /;s/ $(date +%d) / [] /"#{off}
  $ #{bold}cal | sed "s/.*/ & /;s/ $(date +%d) / $(printf '\\e[0;31m\e[0;31m[]\e[0m\\e[0m') /"#{off}
EOS

center <<-EOS
  Show File System Hierarchy

  $ #{bold}man hier#{off}
EOS

center <<-EOS
  Quick access to the ascii table

  $ #{bold}man ascii#{off}
EOS

center <<-EOS
  Russian Roulette in Bash

  $ #{bold}[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live"#{off}
EOS

center <<-EOS
  Watch Star Wars via telnet

  $ #{bold}telnet towel.blinkenlights.nl#{off}
EOS

section "That's all, thanks!" do
end

__END__


text:
<?php

namespace Evgit\Bundle\WidgetBundle\Tests\Sevice;

use Evgit\Bundle\WidgetBundle\Service\Parser;
use Evgit\Bundle\WidgetBundle\Service\WidgetCollection;
use Evgit\Bundle\WidgetBundle\Widget\WidgetInterface;

class ParserTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider processGetProperWidgetsProvider
     */
    public function testParseNestedWidgets($count, $string)
    {
        $parser = new Parser();

        $widgetCollection = $this->getMockBuilder(WidgetCollection::class)->setMethods(['getWidget'])->getMock();
        $widgetCollection->expects($this->exactly($count))->method("getWidget")->with($this->equalTo('test'));
        $parser->setWidgetCollection($widgetCollection);
        $parser->process($string, true);
    }

    /**
     * @dataProvider parserContentProvider
     */
    public function testParserContent($stringOut, $stringIn) {
        $parser = new Parser();
        $collection = new WidgetCollection();
        $mockWidget =  $this->getMockBuilder(WidgetInterface::class)->getMock();
        $mockWidget->method("process")->will($this->returnCallback( function($options) {return implode(",",$options);}));
        $mockWidget->method("getName")->will($this->returnValue("mocker"));
        $collection->addWidget($mockWidget);
        $parser->setWidgetCollection($collection);

        $this->assertEquals($parser->process($stringIn), $stringOut);
    }

    public function parserContentProvider()
    {
        return  [
            ["1", "[[mocker? &param1=`1`]]"],
            ["1,2", "[[mocker? &param1=`1` &param2=`2`]]"],
            ["1,1,2", "[[mocker? &param1=`1` &param2=`[[mocker? &param1=`1` &param2=`2`]]`]]"],
            ["1,2,3,4", "[[mocker? &param1=`1` &param3=`2` &param2=`[[mocker? &param1=`3` &param2=`[[mocker? &param1=`4`]]`]]`]]"],
            ["===1===", "===[[mocker? &param1=`1`]]==="],
        ];
    }

    public function processGetProperWidgetsProvider() {

        return [
            [0, ""],
            [1, "test[[test]]test test"],
            [1, "test[[test?]]"],
            [1, "test[[test? &content=``]]test"],
            [2, "test[[test? &content=`some text[[test? &content=``]]some text`]]test"],
            [3, "test[[test? &content=`some text[[test? &content=`[[test]]`]]some text`]]test"],
            [4, "test[[test? &content=`[[test?&content=`[[test?&content=`[[test?&content=`test` ]]1` ]]` ]]` ]]test"],
            [5, "some test[[test? &content=`some text[[test? &content=`[[test]]` &test=`[[test?&content=`[[test]]`]]`]]some text`]]"],
            [7, "[[test? &content=`[[test? &content=`[[test? &content=`[[test? &content=`[[test? &content=`[[test? &content=`[[test? &content=``]]`]]`]]`]]`]]`]]`]]"],
        ];
    }
}


text:
angular.module('openshiftConsole')
  .directive('selectOnFocus', function() {
    return {
      restrict: 'A',
      link: function($scope, element, attrs) {
        $(element).focus(function () {
          $(this).select();
        });
      }
    };
  })
  .directive('tileClick', function() {
    return {
      restrict: 'AC',
      link: function($scope, element, attrs) {
        $(element).click(function (evt) {
          var t = $(evt.target);
          if (t && t.is('a')){
            return;
          }
          $('a.tile-target', element).trigger("click");
        });
      }
    };
  })
  .directive('clickToReveal', function() {
    return {
      restrict: 'A',
      transclude: true,
      scope: {
        linkText: "@"
      },
      templateUrl: 'views/directives/_click-to-reveal.html',
      link: function($scope, element, attrs) {
        $('.reveal-contents-link', element).click(function (evt) {
          $(this).hide();
          $('.reveal-contents', element).show();
        });
      }
    };
  })
  .directive('copyToClipboardButton', function() {
    return {
      restrict: 'E',
      scope: {
        clipboardText: "="
      },
      templateUrl: 'views/directives/_copy-to-clipboard.html',
      link: function($scope, element, attrs) {
        if (ZeroClipboard.isFlashUnusable()) {
          $(element).hide();
        }
        else {
          new ZeroClipboard( $('button', element) );
          $("#global-zeroclipboard-html-bridge").tooltip({title: "Copy to clipboard", placement: 'bottom'});
        }
      }
    }
  })
  .directive('shortId', function() {
    return {
      restrict:'E',
      scope: {
        id: '@'
      },
      template: '{{id.substring(0, 6)}}'
    }
  });


text:
**Kod Saati 2014 etkinliği için gönderilecek eğitici rehber için son gönderim tarihi geçmiştir. Hazırladığınız rehberi yine de gönderebilirsiniz. Zaman bulabilirsek rehberinizi gözden geçireceğiz.**

Code.org sayfasında Kod Saati gibi çeşitli aktiviteler düzenleyecektir. Güncel liste aşağıdaki gibidir;[<%= codeorg_url() %>](http://<%= codeorg_url() %>/learn).

We'd like to host a variety of engaging options, but the primary goal is to optimize the experience for students and teachers who are new to computer science. Please use this document to guide the creation of your activity, targeted to the user who has no background in coding, computer programming, and computer science.

## İçindekiler:

  * [Öğreticiler eğitime dahil edilmesi için nasıl değerlendirilecek](#inclusion)
  * [Bir Kodlama Saati aktivitesi yaratmak için genel bilgiler](#guidelines)
  * [Nasıl gönderilir (1 Ekim 2014'e kadar)](#submit)
  * [Aktivitenizi tasarlamak için öneriler](#design)
  * [Marka patenti ile ilgili bilgiler](#tm)
  * [Takip Pikseli](#pixel)
  * [Öğreticilerinizi desteklemek, Bilgisayar Bilimi Eğitimi Haftası ve Kodlama Saati](#promote)
  * [Engelli öğrenciler için küçük bir not](#disabilities)

## Öğreticiler eğitime dahil edilmesi için nasıl değerlendirilecek

A committee of computer science educators will rank submissions based on qualitative and quantitative metrics, including survey results from a broader set of educators.

**Tutorials will be listed higher if they are:**

  * Yüksek kaliteli
  * Kendinden yönlendirmeli, hiçbir anlatıma ihtiyaç duymayan
  * Yeni başlayanlar için tasarlanmış
  * Yaklaşık 1 saat sürecek şekilde yapılmış
  * Birçok işletim sisteminde çalışacak şekilde yaratılmış (mobil ve tablet ortamları da dahil)
  * Birçok dilde çalışan
  * Her nüfus grubunda öğrenime dahil olma isteğini uyandıracak (özellikle azınlık gruplarında)
  * Sadece HTML+CSS web tasarımı odağında olmayan - (hedefimiz bilgisayar bilimi, sadece HTML kodlaması değil)

**Tutorials will be listed lower if they are:**

  * Düşük kaliteli
  * Daha ileri düzeyde eğitime uygun (başlangıç düzeyine uygun olmayan)
  * Kısıtlı işletim sistemi platformlarında çalışabilen - İnternet platformlarında IE9+ ve en son sürüm Chrome, Firefox ve Safari'yi desteklemesi gerekir
  * Sadece İngilizce çalışan
  * Tek bir cinsiyete hitap eden (örneğin, tema olarak sadece erkekler için tasarlanmış)
  * Paralı bir eğitim sistemine yönlendirme amacıyla çalışan

**Tutorials will NOT be listed if they:**

  * Öğretmenin yüksek bir seviyede katılımını ve önceden hazırlığını gerektirecek olan (diğer bir deyişle, öğrenciler için kendinden yönlendirmeli olmayan)
  * Bir saatten fazla uzun veya fazla kısa olan
  * Kaydolmayı gerektiren
  * Ödeme gerektiren
  * Yükleme gerektiren
  * Sadece HTML + CSS web tasarımına odaklanmış
  * Son gönderim tarihinden sonra veya eksik bilgiyle gönderilmiş (detaylar aşağıda)

Ultimately, the goal of the Hour of Code campaign is to broaden participation in computer science by students and teachers, and to help show that computer science is accessible to all, and "easier than you think." In many ways, this goal is better achieved by giving students and teachers fewer and simpler choices, with a focus on the highest quality options for a first-time user.

Note also, that the 2013 CSEdWeek was a fantastic success as measured by the responses from teachers and students - 20M participants from Dec 9 - 23, and 97% said they enjoyed it and want to repeat the campaign!!

As a result, the existing listings are certainly "good enough," and the driving reason to add tutorials to the Hour of Code listings isn't to broaden the choices, but to raise the quality (or freshness) for students, or to expand the options for non-English speakers given the global nature of the 2014 campaign.

[**Back to the top**](#top)

## Bir Kodlama Saati aktivitesi yaratmak için genel bilgiler

  * **Konu:** Bilgisayar bilimine veya programlamaya giriş (HTML'e değil).
  * **Amaç:** Yeni başlayanlara programlamanın ilk aşamasını tanıtmak.
  * **Tarz:**
      * Bilgisayar bilimi sadece dahiler için değildir. Yaş, cinsiyet, ırk fark etmez. Herkes öğrenebilir!
      * Bilgisayar bilimi çeşitli ilgi alanlarını içinde barındırır. Herkes öğrenmeli!
      * Öğrencileri internet üzerinden arkadaşlarıyla paylaşabilecekleri bir şey yaratmaları için teşvik edin.
  * **Aktivite Çeşitleri:**
      * **En iyi:** İnternetten yapılabilen, akıllı telefon uyumlu veya internetsiz de çalışabilen, bilgisayar olmadan bilgisayar bilimi konseptlerini öğretebilecek aktiviteler. (bakınız <http://csunplugged.com/>).
      * **Uygun, ama tercih edilmeyen:** Yüklenebilir uygulamalar, masaüstü uygulamaları veya oyun konsolu aktiviteleri.
  * **Format:** Kendinden yönlendirmeli öğreticiler veya dersler, tercihen bir öğretmen tarafından yönetilebilir. Bir saatlik ucu açık bir aktivitenin aksine, bu aktivitede yönlendirmeler olmalıdır. En iyisi, anlatımların ve öğreticilerin programlama platformuyla birleştirilmesidir. Böylelikle ayrı sayfa veya pencerelerde açık olan öğretici ve programlama platformu arasında sürekli gidip gelme sorunu ortadan kalkmış olur.

[**Back to the top**](#top)

## Nasıl gönderilir (1 Ekim 2014'e kadar)

Visit the [Hour of Code Activity Submission page](https://docs.google.com/a/code.org/forms/d/16FZ2a24YsZzhoCiThzUf1DI7nkuYG5sJURMEPd3wDvU/viewform) and follow the steps to submit your tutorial.

**What you'll need:**

  * İsminiz, logonuz (jpg, png, vs.)
  * Kodlama Saati aktiviteniz için pazarlama görselinizin URL'si. Görseller tam olarak 446 x 335 çözünürlükte olmalıdır. Eğer uygun bir fotoğraf sağlanamazsa, biz sizin için öğreticinizin ekran görüntüsünü çekebiliriz VEYA öğreticinizi listeye koymayabiliriz.
  * Logonun URL linki
  * Aktivitenin adı
  * Aktivitenin URL linki
  * Öğretmen notlarının URL linki (isteğe bağlı, detaylar aşağıda)
  * Aktivitenin açıklaması (hem masaüstü hem mobil görüntülemeye uyumlu)
      * **Masaüstü görünümü için maksimum karakter sayısı:** 384
      * **Mobil görünümü için maksimum karakter sayısı:** 74
      * Lütfen açıklamanızda etkinliğin genel anlamda öğrenci tarafından mı yoksa öğretmen tarafından mı yönlendirildiğine yer verin. Ek olarak, bazı okullar Kodlama Saati aktivitelerinin Common Core veya Next Generation Science Standards uyumlu olup olmadığını bilmek isteyebilirler. Eğer aktivite bu standartlardaysa, bunu da açıklamanıza eklemeyi unutmayın.
  * Test edilmiş/uyumlu platformların listesi:
      * **İnternet merkezli:**
          * İşletim sistemleri - Mac, Win ve versiyonları
          * Tarayıcılar - IE8, IE9, IE10, Firefox, Chrome, Safari
          * iOS mobil Safari (mobile uyarlanmış)
          * Android Chrome (mobile uyarlanmış)
      * **İnternet merkezli olmayan:** Yerli kod için platform belirtin (Mac, Win, iOS, Android, xBox ve diğerleri)
      * İnternetsiz
  * Desteklenen diller listesi ve uygun format:
      * Öğreticiler 2 karakterli dil kodu kullanarak hangi dilleri desteklediğini belirtmelidir. Örneğin, EN - İngilizce; TR - Türkçe
      * Eğer dille ilgili daha fazla bilgi vermek gerekliyse, kısa çizgi kullanılabilir. Örneğin, FR-BE - Fransızca (Belçika) veya FR-CA - Fransızca (Kanada)
      * ***Not: Dil saptaması öğreticiyi yapan kişinin görevidir, biz sadece elimize ulaşan URL'yi kullanıcılara yönlendireceğiz.***
  * Eğer çevrimiçi bir öğretici gönderirseniz, bunun [COPPA uyumlu](http://en.wikipedia.org/wiki/Children's_Online_Privacy_Protection_Act) olup olmadığını bilmemiz gerekir.
  * Belirli sınıflar için önerilen seviyeler. Bunun için [Bilgisayar Bilimi Öğretmenleri Derneği K-12 Standartları](http://csta.acm.org/Curriculum/sub/K12Standards.html) 'nı referans göstererek sınıflara uygun seviyeleri saptayabilirsiniz. Örnek sınıf seviyeleri aşağıdaki gibidir:
      * İlkokul: K-2 veya 3-5 seviyeleri
      * Ortaokul: 6-8 seviyeleri
      * Lise: 9-12 seviyeleri
      * Her yaş için
  * Lütfen önerilen bilgisayar bilimi bilgi düzeyini seçilen seviyede belirtin: Başlangıç, Orta veya İleri. Kodlama Saati websitesi Başlangıç seviyesi aktivitelerini göze çarpacak şekilde renklendirecektir. Eğer orta ve ileri düzey Kodlama Saati Aktiviteleri düzenlemek isterseniz, lütfen önceden edinilmiş olması gereken bilgi düzeyini aktivitenizin açıklamasına yazın.
  * Teknik gereklilikler:
      * Daha net bir şekilde katılımı takip edebilmek için, her üçüncü parti öğretici ortağının Kodlama Saati öğreticilerinin başına ve sonuna 1-piksel takip görüntüsü yerleştirmelerini istiyoruz. Başlangıç sayfasına bir başlangıç piksel-görüntüsü ve son sayfaya da son bir piksel-görüntüsü yerleştirin. Ara sayfalara piksel yerleştirmeyin. Daha fazla detay için Takip Pikseli bölümüne göz atın.
      * Aktiviteyi bitirirken, kullanıcılar <http://code.org/api/hour/finish> sayfasına yönlendirilmelidirler. Bu sayfada aşağıda sıralananları yapabilirler:
          * Kodlama Saatini bitirdiklerini sosyal medyada paylaşabilirler
          * Kodlama Saatini bitirdiklerine dair bir sertifika alabilirler
          * Hangi ülkelerin/şehirlerin Kodlama Saatinde en yüksek katılım oranlarına sahip olduğunu görebilirler
          * Aktivitenizde bir saat geçiren ancak aktiviteyi tamamlamamış kullanıcılar için, lütfen "Ben bir Kodlama Saatimi bitirdim" diyen bir buton bulundurun. Bu buton yine <http://code.org/api/hour/finish> sayfasına yönlenmelidir.
  * ***(Tercihe bağlı)*** Çevrimiçi yapılan ve haftanın (8 Aralık 12:01'den 14 Aralık 23:59'a kadar) aktivite ölçümlerini soran bir devam anketi/formu linki ile devam edeceğiz.
      * Çevrimiçi aktiviteler için (özellikle akıllı telefon/tablet uygulamaları):
          * Kullanıcı sayısı
          * Görevi tamamlayanların sayısı
          * Ortalama görev tamamlama süresi
          * Tüm kullanıcıların yazdığı kodların satır sayısı toplamı
          * Daha fazla öğrenim için devam edenlerin sayısı (görevi bitirdikten sonra sitenizde diğer görevlere de gidenlerin sayısıyla ölçülür)
      * Çevrimdışı aktiviteler için
          * Aktivitenin kağıt versiyonunun indirilme sayısı (uygulanabiliyorsa)

[**Back to the top**](#top)

## Aktivitenizi tasarlamak için öneriler

**Include the CSEdWeek logo in your tutorial.** You can include the CSEdWeek logo ([small](https://www.dropbox.com/s/ojlltuegr7ruvx1/csedweek-logo-final-small.jpg) or [big](https://www.dropbox.com/s/yolheibpxapzpp1/csedweek-logo-final-big.png)) in your tutorial, but this is not required. You may also contact us to request specific permission to use the "In Partnership with Code.org" logo. ***This logo can only be used if specific permission is granted in writing by Code.org.*** We may end up creating an Hour of Code logo, but at this time we do not have one. Under no circumstances can the Code.org logo and name be used. Both are trademarked, and can't be co-mingled with a 3rd party brand name.

**Make sure that the average student can finish comfortably in an hour.** Consider adding an open-ended activity at the end for students who move more quickly through the lesson. Remember that most kids will be absolute beginners to computer science and coding.

**Include teacher notes.** Most activities should be student-directed, but if an activity is facilitated or managed by a teacher, please include clear and simple directions for the teacher in the form of teacher-notes at a separate URL submitted with your activity. Not only are the students novices, some of the teachers are as well. Include info such as:

  * Öğreticimiz en iyi aşağıdaki platform ve tarayıcılarda çalışır
  * Akıllı telefonlarda çalışır mı? Peki ya tablerlerde?
  * Takım çalışmasını öneriyor musunuz?
  * Sınıf için kullanım ile ilgili dikkat edilmesi gerekenler nelerdir? Örneğin, eğer videolar varsa, öğretmene videoları projeksiyon kullanarak tüm sınıfın görebileceği şekilde izletmesini tavsiye edin

**Incorporate feedback at the end of the activity.** (E.g.: "You finished 10 levels and learned about loops! Great job!")

**Incorporate social media.** Encourage students to post to social media (where appropriate) when they've finished, for example "I've done an Hour of Code with ________ Have you? #HourOfCode" or "I've done an #HourofCode as a part of #CSEdWeek. Have you? @Scratch." Use the hashtag **#HourOfCode** (with capital letters H, O, C)

**Create your activity in languages besides English.** We're focusing this campaign internationally this year and would like to have a number of activities to offer non-English speaking participants.

**Explain or connect the activity to a socially significant context.** Computer programming becomes a superpower when students see how it can change the world for the better!

**Do not require signup or payment before students can try your tutorial.** Tutorials that require signup or payment will not be listed

**Make sure your tutorial can be used in a [Pair Programming paradigm](http://www.ncwit.org/resources/pair-programming-box-power-collaborative-learning).**

The three rules of pair programming in a school setting:

  * Sürücü fare ve klavyeyi kontrol eder.
  * Yol gösterici öneri yapar, hataları gösterir ve sorular sorar.
  * Öğrenciler rollerini bir öğreticide en az iki kez değiştirmelidir.

Benefits of Pair Programming:

  * Öğrenciler, öğretmene güvenmek yerine birbirlerine yardımcı olabilirler
  * Kodlamanın yalnız yapılan bir aktivite olmadığını, aslında sosyal iletişim gerektirdiğini görürler
  * Her sınıfta veya laboratuvarda birebir ders için yeterince bilgisayar bulunmayabilir

[**Back to the top**](#top)

## Marka patenti ile ilgili bilgiler

With ~40 million students having tried the Hour of Code, and over 97% of participating teachers asking us to repeat the event annually, we are taking steps to make sure we set up the Hour of Code as a movement that can repeat annually with greater fidelity and without confusion.

One piece of this is to protect the trademark "Hour of Code" to prevent confusion. Many of our tutorial partners have used "Hour of Code" on your web sites. We don't want to prevent this usage, but we want to make sure it fits within a few limits:

  1. "Hour of Code"'a yapılan bir referans marka isminden çok, bu isim altında gelişen köklü harekete hitap etmelidir. Doğru kullanım: "ACMECorp.com'daki Kodlama Saatine (Hour of Code) katılın". Yanlış kullanım: "ACME Corp'un Kodlama Saatini (Hour of Code) deneyin."
  2. "TM" işaretini "Hour of Code" yazdığınız her yerde kullanın, hem web sitenizde hem uygulama açıklamalarınızda
  3. Web sitenizin içeriğinde (veya alt kısımdaki bilgi alanında) Bilgisayar Bilimi Eğitimi Haftası ve Code.org web sitelerinin linklerini paylaşın ve onlardan şu şekilde bahsedin:

    ***"'Hour of Code' ülke çapında Bilgisayar Bilimi Eğitimi Haftası [csedweek.org] ve Code.org [code.org] tarafından düzenlenen, milyonlarca öğrenciyi bir saat süresince bilgisayar bilimi ve kodlama ile tanıştırmayı amaçlayan bir girişimdir."***

  4. "Hour of Code"'u uygulama isimlerinde kullanmayın

[**Back to the top**](#top)

## Takip Pikseli

In order to more accurately track participation we ask every third party tutorial partners to include 1-pixel tracking images on the first and last page of their Hour of Code tutorials (A starting pixel-image on the start page and a final pixel-image on the end page. And not on interim pages).

This will allow us to count users who you directly recruit to visit your website to do their Hour of Code, or users who visit when a teacher types your URL directly on their whiteboard. It will lead to more accurate participation counts for your tutorial, which will help you attract users. If you integrate the pixel at the end it will also allow us to measure tutorial completion rates.

If your tutorial is approved and included on the final tutorial page, Code.org will provide you with a unique tracking pixel for you to integrate into your tutorial. See example below.

***NOTE: this isn't important to do for installable apps (iOS/Android apps, or desktop-install apps)***

**Example tracking pixels for AppInventor:**

IMG SRC="http://code.org/api/hour/begin_appinventor.png/"

IMG SRC="http://code.org/api/hour/finish_appinventor.png/"

[**Back to the top**](#top)

## Öğreticilerinizi desteklemek, Bilgisayar Bilimi Eğitimi Haftası ve Kodlama Saati

We are asking everyone to promote their own 1-hour tutorial to your users. Please direct them to your Hour of Code page. Your users are much more likely to react to a mailing from you about your tutorial. Use the international Hour of Code campaign for Computer Science Education Week as an excuse to encourage users to invite others to join in, help us reach 100 million total participants.

  * Kodlama Saati ve Bilgisayar Bilimi Eğitimi Haftasına websitenizde yer verin.
    Örneğin: <http://www.tynker.com/hour-of-code>
  * Kodlama Saatini genel medya, sosyal medya, e-posta listeleri, vs. aracılığıyla **#HourOfCode** (büyük H, O, C harfleriyle) etiketini kullanarak destekleyin
  * Yerel bir etkinliğe ev sahipliği yapın ya da çalışanlarınızdan yerel okullarda ve yerel sosyal gruplarda bir etkinlik düzenlemelerini rica edin.
  * Kaynaklar Kitimizde daha detaylı bilgiler bulabilirsiniz (çok yakında).

[**Back to the top**](#top)

## Engelli öğrenciler için özel bir not

If you create a tutorial that is designed for the vision-impaired, we'd love to highlight it for viewers with screen-readers. We have not yet received such a tutorial, and would be eager to include one as an option for these students.

[**Back to the top**](#top)


text:
ARCH?=amd64
GOOS?=linux
OUT_DIR?=build
PACKAGE=github.com/GoogleCloudPlatform/k8s-stackdriver/custom-metrics-stackdriver-adapter
PREFIX?=staging-k8s.gcr.io
TAG = v0.13.1
PKG := $(shell find pkg/* -type f)

.PHONY: build docker push test clean

build: build/adapter

build/adapter: adapter.go $(PKG)
	CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -mod readonly -a -o $(OUT_DIR)/$(ARCH)/adapter adapter.go

docker:
	docker build --pull -t ${PREFIX}/custom-metrics-stackdriver-adapter:$(TAG) .

push: docker
	gcloud docker -- push ${PREFIX}/custom-metrics-stackdriver-adapter:$(TAG)

test: $(PKG)
	CGO_ENABLED=0 go test -mod readonly ./...

clean:
	rm -rf build

coverage:
	rm -f coverage.out
	go test -coverpkg=./... -coverprofile=coverage.out ./...


text:
layout: post
title: Den norske kronen suger!
tags: "forbrukerelektronikk, valuta"
published: true
---

De store mediehusene i Norge har siden nyttår fokusert på at Apple produktene har gjort ett prishopp. Dette kommer ikke som noe sjokk da dette har vært varslet lenge. Vi kunne allerede i august lese om norske studenter i utlandet som tapte store penger på semesteravgiften på grunn av den lave kronen.

![Bilde av norske penger.]({{ site.baseurl }}/img/norske-penger.JPG)

Sannheten er at det ikke bare gjelder Apple, det gjelder all forbrukerelektronikk og annen importvare med tilknytning til amerikanske dollar eller europeisk valuta enhet m.m. Apple var dog først ut og vi kan ikke annet enn forvente at de andre kommer etter i løpet av svært kort tid.

Forklaringen er enkel, svært enkel. **Den norske kronen suger!** Dollaren koster i dag over 7 kroner og 50 øre og skal du ha en euro må du ut med minst 9 kroner.

Skal du kjøpe ny mobiltelefon, bærbar datamaskin eller kanskje nytt TV til stuen? Da bør du enten kline til før prisene stiger eller avvente til "mini-finanskrisen" går over om du ikke vil tape 20-25%.


text:
package org.kjots.json.object.simple.impl;

import com.google.inject.Guice;

import org.junit.Before;

import org.kjots.json.object.shared.JsonObject;
import org.kjots.json.object.shared.JsonObjectMap;
import org.kjots.json.object.shared.impl.JsonObjectMapImplTestBase;
import org.kjots.json.object.simple.SimpleJsonObjectModule;
import org.kjots.json.object.simple.SimpleJsonValue;

/**
 * Simple JSON Object Map Implementation Test.
 *

 * Created: 9th March 2010.
 *
 * @author Karl J. Ots <kjots@kjots.org>
 * @since 1.0
 */
public class SimpleJsonObjectMapImplTest extends JsonObjectMapImplTestBase<SimpleJsonValue> {
  /**
   * Set up the JSON object implementation test.
   */
  @Before
  public void setUp() {
    Guice.createInjector(new SimpleJsonObjectModule());
  }

  /**
   * Create a JSON object with the given underlying JSON object.
   *
   * @param object The underlying JSON object.
   * @return The JSON object.
   */
  @Override
  protected JsonObject createJsonObject(SimpleJsonValue object) {
    return new SimpleJsonObjectImpl(object);
  }

  /**
   * Create a JSON object map with the given underlying JSON object.
   *
   * @param object The underlying JSON object.
   * @return The JSON object map.
   */
  @Override
  protected JsonObjectMap<JsonObject> createJsonObjectMap(SimpleJsonValue object) {
    return new SimpleJsonObjectMapImpl<JsonObject>(object);
  }

  /**
   * Create an empty underlying JSON object.
   *
   * @return The empty underlying JSON object.
   */
  @Override
  protected SimpleJsonValue createUnderlyingJsonObject() {
    return SimpleJsonValue.createObject();
  }

  /**
   * Retrieve the object value of the property with the given name from the
   * given underlying JSON object.
   *
   * @param object The underlying JSON object.
   * @param propertyName The name of the property.
   * @return The object value of the property.
   * @see #setObjectProperty(SimpleJsonValue, String, Object)
   */
  @Override
  protected SimpleJsonValue getObjectProperty(SimpleJsonValue object, String propertyName) {
    return (SimpleJsonValue)object.getMap().get(propertyName);
  }

  /**
   * Set the property with the given name in the given underlying JSON object
   * to the given object value.
   *
   * @param object The underlying JSON object.
   * @param propertyName The name of the property.
   * @param propertyValue The object value of the property.
   * @see #getObjectProperty(SimpleJsonValue, String)
   */
  @Override
  protected void setObjectProperty(SimpleJsonValue object, String propertyName, SimpleJsonValue propertyValue) {
    object.getMap().put(propertyName, propertyValue);
  }
}


text:
// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s)     : Baruch Zukerman <baruchzu@post.tau.ac.il>

#ifndef CGAL_SEGMENT_ASSERTIONS_H
#define CGAL_SEGMENT_ASSERTIONS_H

namespace CGAL {

template <class Traits_>
class Segment_assertions
{
  typedef Traits_                                  Traits_2;

  typedef typename Traits_2::Point_2               Point_2;
  typedef typename Traits_2::Kernel                Kernel;
  typedef typename Kernel::Line_2                  Line_2;
  typedef typename Traits_2::X_monotone_curve_2    X_monotone_curve_2;

public:

  static bool _assert_is_point_on (const Point_2& pt,
                                   const X_monotone_curve_2& cv,
                                   Tag_true /* tag */)
  {
    Traits_2    traits;
    return (traits.compare_y_at_x_2_object() (pt, cv) == EQUAL);
  }

  static bool _assert_is_point_on (const Point_2& /* pt */,
                                   const X_monotone_curve_2& /* cv */,
                                   Tag_false /* tag */)
  {
    return (true);
  }

  static bool _assert_is_point_on (const Point_2& pt,
                                   const Line_2& l,
                                   Tag_true /* tag */)
  {
    Kernel      kernel;
    return (kernel.has_on_2_object() (l, pt));
  }

  static bool _assert_is_point_on (const Point_2& /* pt */,
                                   const Line_2& /* l */,
                                   Tag_false /* tag */)
  {
    return (true);
  }
};

} //namespace CGAL

#endif


text:
class RedirectorForGoneContact
  def initialize(gone_content_id:, redirect_to_location:)
    @gone_content_id = gone_content_id
    @redirect_to_location = redirect_to_location
  end

  def redirect_gone_contact
    Services.publishing_api.unpublish(
      @gone_content_id,
      type: "redirect",
      alternative_path: @redirect_to_location,
    )
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="JavaScriptLibraryMappings">
    <includedPredefinedLibrary name="Node.js Core" />
  </component>
</project>