text:
package main

import (
	"flag"
	"fmt"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"strings"
	"time"

	"github.com/joewalnes/websocketd/libwebsocketd"
)

type Config struct {
	Addr              []string // TCP addresses to listen on. e.g. ":1234", "1.2.3.4:1234" or "[::1]:1234"
	MaxForks          int      // Number of allowable concurrent forks
	LogLevel          libwebsocketd.LogLevel
	RedirPort         int
	CertFile, KeyFile string
	*libwebsocketd.Config
}

type Arglist []string

func (al *Arglist) String() string {
	return fmt.Sprintf("%v", []string(*al))
}

func (al *Arglist) Set(value string) error {
	*al = append(*al, value)
	return nil
}

// Borrowed from net/http/cgi
var defaultPassEnv = map[string]string{
	"darwin":  "PATH,DYLD_LIBRARY_PATH",
	"freebsd": "PATH,LD_LIBRARY_PATH",
	"hpux":    "PATH,LD_LIBRARY_PATH,SHLIB_PATH",
	"irix":    "PATH,LD_LIBRARY_PATH,LD_LIBRARYN32_PATH,LD_LIBRARY64_PATH",
	"linux":   "PATH,LD_LIBRARY_PATH",
	"openbsd": "PATH,LD_LIBRARY_PATH",
	"solaris": "PATH,LD_LIBRARY_PATH,LD_LIBRARY_PATH_32,LD_LIBRARY_PATH_64",
	"windows": "PATH,SystemRoot,COMSPEC,PATHEXT,WINDIR",
}

func parseCommandLine() *Config {
	var mainConfig Config
	var config libwebsocketd.Config

	flag.Usage = func() {}
	flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)

	// If adding new command line options, also update the help text in help.go.
	// The flag library's auto-generate help message isn't pretty enough.

	addrlist := Arglist(make([]string, 0, 1)) // pre-reserve for 1 address
	flag.Var(&addrlist, "address", "Interfaces to bind to (e.g. 127.0.0.1 or [::1]).")

	// server config options
	portFlag := flag.Int("port", 0, "HTTP port to listen on")
	versionFlag := flag.Bool("version", false, "Print version and exit")
	licenseFlag := flag.Bool("license", false, "Print license and exit")
	logLevelFlag := flag.String("loglevel", "access", "Log level, one of: debug, trace, access, info, error, fatal")
	sslFlag := flag.Bool("ssl", false, "Use TLS on listening socket (see also --sslcert and --sslkey)")
	sslCert := flag.String("sslcert", "", "Should point to certificate PEM file when --ssl is used")
	sslKey := flag.String("sslkey", "", "Should point to certificate private key file when --ssl is used")
	maxForksFlag := flag.Int("maxforks", 0, "Max forks, zero means unlimited")
	redirPortFlag := flag.Int("redirport", 0, "HTTP port to redirect to canonical --port address")

	// lib config options
	binaryFlag := flag.Bool("binary", false, "Set websocketd to experimental binary mode (default is line by line)")
	reverseLookupFlag := flag.Bool("reverselookup", true, "Perform reverse DNS lookups on remote clients")
	scriptDirFlag := flag.String("dir", "", "Base directory for WebSocket scripts")
	staticDirFlag := flag.String("staticdir", "", "Serve static content from this directory over HTTP")
	cgiDirFlag := flag.String("cgidir", "", "Serve CGI scripts from this directory over HTTP")
	devConsoleFlag := flag.Bool("devconsole", false, "Enable development console (cannot be used in conjunction with --staticdir)")
	passEnvFlag := flag.String("passenv", defaultPassEnv[runtime.GOOS], "List of envvars to pass to subprocesses (others will be cleaned out)")
	sameOriginFlag := flag.Bool("sameorigin", false, "Restrict upgrades if origin and host headers differ")
	allowOriginsFlag := flag.String("origin", "", "Restrict upgrades if origin does not match the list")

	headers := Arglist(make([]string, 0))
	headersWs := Arglist(make([]string, 0))
	headersHttp := Arglist(make([]string, 0))
	flag.Var(&headers, "header", "Custom headers for any response.")
	flag.Var(&headersWs, "header-ws", "Custom headers for successful WebSocket upgrade responses.")
	flag.Var(&headersHttp, "header-http", "Custom headers for all but WebSocket upgrade HTTP responses.")

	err := flag.CommandLine.Parse(os.Args[1:])
	if err != nil {
		if err == flag.ErrHelp {
			PrintHelp()
			os.Exit(0)
		} else {
			ShortHelp()
			os.Exit(2)
		}
	}

	port := *portFlag
	if port == 0 {
		if *sslFlag {
			port = 443
		} else {
			port = 80
		}
	}

	if socknum := len(addrlist); socknum != 0 {
		mainConfig.Addr = make([]string, socknum)
		for i, addrSingle := range addrlist {
			mainConfig.Addr[i] = fmt.Sprintf("%s:%d", addrSingle, port)
		}
	} else {
		mainConfig.Addr = []string{fmt.Sprintf(":%d", port)}
	}
	mainConfig.MaxForks = *maxForksFlag
	mainConfig.RedirPort = *redirPortFlag
	mainConfig.LogLevel = libwebsocketd.LevelFromString(*logLevelFlag)
	if mainConfig.LogLevel == libwebsocketd.LogUnknown {
		fmt.Printf("Incorrect loglevel flag '%s'. Use --help to see allowed values.\n", *logLevelFlag)
		ShortHelp()
		os.Exit(1)
	}

	config.Headers = []string(headers)
	config.HeadersWs = []string(headersWs)
	config.HeadersHTTP = []string(headersHttp)

	config.Binary = *binaryFlag
	config.ReverseLookup = *reverseLookupFlag
	config.Ssl = *sslFlag
	config.ScriptDir = *scriptDirFlag
	config.StaticDir = *staticDirFlag
	config.CgiDir = *cgiDirFlag
	config.DevConsole = *devConsoleFlag
	config.StartupTime = time.Now()
	config.ServerSoftware = fmt.Sprintf("websocketd/%s", Version())

	if len(os.Args) == 1 {
		fmt.Printf("Command line arguments are missing.\n")
		ShortHelp()
		os.Exit(1)
	}

	if *versionFlag {
		fmt.Printf("%s %s\n", HelpProcessName(), Version())
		os.Exit(0)
	}

	if *licenseFlag {
		fmt.Printf("%s %s\n", HelpProcessName(), Version())
		fmt.Printf("%s\n", libwebsocketd.License)
		os.Exit(0)
	}

	// Reading SSL options
	if config.Ssl {
		if *sslCert == "" || *sslKey == "" {
			fmt.Fprintf(os.Stderr, "Please specify both --sslcert and --sslkey when requesting --ssl.\n")
			os.Exit(1)
		}
	} else {
		if *sslCert != "" || *sslKey != "" {
			fmt.Fprintf(os.Stderr, "You should not be using --ssl* flags when there is no --ssl option.\n")
			os.Exit(1)
		}
	}

	mainConfig.CertFile = *sslCert
	mainConfig.KeyFile = *sslKey

	// Building config.ParentEnv to avoid calling Environ all the time in the scripts
	// (caller is responsible for wiping environment if desired)
	config.ParentEnv = make([]string, 0)
	newlineCleaner := strings.NewReplacer("\n", " ", "\r", " ")
	for _, key := range strings.Split(*passEnvFlag, ",") {
		if key != "HTTPS" {
			if v := os.Getenv(key); v != "" {
				// inevitably adding flavor of libwebsocketd appendEnv func.
				// it's slightly nicer than in net/http/cgi implementation
				if clean := strings.TrimSpace(newlineCleaner.Replace(v)); clean != "" {
					config.ParentEnv = append(config.ParentEnv, fmt.Sprintf("%s=%s", key, clean))
				}
			}
		}
	}

	if *allowOriginsFlag != "" {
		config.AllowOrigins = strings.Split(*allowOriginsFlag, ",")
	}
	config.SameOrigin = *sameOriginFlag

	args := flag.Args()
	if len(args) < 1 && config.ScriptDir == "" && config.StaticDir == "" && config.CgiDir == "" {
		fmt.Fprintf(os.Stderr, "Please specify COMMAND or provide --dir, --staticdir or --cgidir argument.\n")
		ShortHelp()
		os.Exit(1)
	}

	if len(args) > 0 {
		if config.ScriptDir != "" {
			fmt.Fprintf(os.Stderr, "Ambiguous. Provided COMMAND and --dir argument. Please only specify just one.\n")
			ShortHelp()
			os.Exit(1)
		}
		if path, err := exec.LookPath(args[0]); err == nil {
			config.CommandName = path // This can be command in PATH that we are able to execute
			config.CommandArgs = flag.Args()[1:]
			config.UsingScriptDir = false
		} else {
			fmt.Fprintf(os.Stderr, "Unable to locate specified COMMAND '%s' in OS path.\n", args[0])
			ShortHelp()
			os.Exit(1)
		}
	}

	if config.ScriptDir != "" {
		scriptDir, err := filepath.Abs(config.ScriptDir)
		if err != nil {
			fmt.Fprintf(os.Stderr, "Could not resolve absolute path to dir '%s'.\n", config.ScriptDir)
			ShortHelp()
			os.Exit(1)
		}
		inf, err := os.Stat(scriptDir)
		if err != nil {
			fmt.Fprintf(os.Stderr, "Could not find your script dir '%s'.\n", config.ScriptDir)
			ShortHelp()
			os.Exit(1)
		}
		if !inf.IsDir() {
			fmt.Fprintf(os.Stderr, "Did you mean to specify COMMAND instead of --dir '%s'?\n", config.ScriptDir)
			ShortHelp()
			os.Exit(1)
		} else {
			config.ScriptDir = scriptDir
			config.UsingScriptDir = true
		}
	}

	if config.CgiDir != "" {
		if inf, err := os.Stat(config.CgiDir); err != nil || !inf.IsDir() {
			fmt.Fprintf(os.Stderr, "Your CGI dir '%s' is not pointing to an accessible directory.\n", config.CgiDir)
			ShortHelp()
			os.Exit(1)
		}
	}

	if config.StaticDir != "" {
		if inf, err := os.Stat(config.StaticDir); err != nil || !inf.IsDir() {
			fmt.Fprintf(os.Stderr, "Your static dir '%s' is not pointing to an accessible directory.\n", config.StaticDir)
			ShortHelp()
			os.Exit(1)
		}
	}

	mainConfig.Config = &config

	return &mainConfig
}


text:
namespace OmniPrototype {
    public class OmBlockStatementUiExtension : OmEntityUiExtension {
        public ExpressionInputControl AddExpressionControl
        {
            get;
            set;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
var RX_1 = require("rxjs/RX");
var EventService = (function () {
    function EventService(http) {
        this.http = http;
        this.baseUrl = 'http://mymain.azurewebsites.net/api/ReserveEvent';
    }
    ;
    EventService.prototype.getEvents = function () {
        return this.http.get(this.baseUrl)
            .map(function (resp) { return resp.json(); })
            .catch(function (err) {
            var msg = 'Error getting EventType';
            console.log(msg);
            return RX_1.Observable.throw(msg);
        });
    };
    EventService.prototype.getEventNames = function () {
        return this.http.get(this.baseUrl + '/eventTypes')
            .map(function (resp) { return resp.json(); })
            .catch(function (err) {
            var msg = 'Error getting EventType';
            console.log(msg);
            return RX_1.Observable.throw(msg);
        });
    };
    EventService.prototype.createEvent = function (event) {
        return this.http.post(this.baseUrl, event)
            .map(function (res) { return res.json(); })
            .catch(function (error) {
            return RX_1.Observable.throw(error.json() || 'Server error testing err');
        }); //...errors if any
        // .map((res:Response) => res.json()) // ...and calling .json() on the response to return data
        //https://scotch.io/tutorials/angular-2-http-requests-with-observables   ference
    };
    return EventService;
}());
EventService = __decorate([
    core_1.Injectable(),
    __metadata("design:paramtypes", [http_1.Http])
], EventService);
exports.EventService = EventService;
//# sourceMappingURL=event.service.js.map


text:
using namespace v8;

NAN_METHOD(GetFunctionInfo) {
  NanScope();

  if (args.Length() < 1) {
    NanThrowTypeError("Wrong number of arguments, please pass function reference as only argument");
    NanReturnUndefined();
  }

  //cast first argument to function
  Local<Function> func = args[0].As<Function>();

  //create return object
  Local<Object> ret = NanNew<Object>();
  ret->Set(NanNew("sourceFile"), NanNew(func->GetScriptOrigin().ResourceName()));
  ret->Set(NanNew("lineNumber"), NanNew(func->GetScriptLineNumber()));
  ret->Set(NanNew("columnNumber"), NanNew(func->GetScriptColumnNumber()));

  NanReturnValue(ret);
}

void Init(Handle<Object> exports) {
  exports->Set(NanNew("getFunctionInfo"), NanNew<FunctionTemplate>(GetFunctionInfo)->GetFunction());
}

NODE_MODULE(functionInfo, Init)


text:
export default (state = [], { type, payload } = {}) => {
  switch(type) {
    case 'GAMES_FETCHED' :
      return [].concat(payload)

    case 'GAME_CREATED' :
      return [payload].concat(state)

    case 'GAME_UPDATED' :
      return state.map((game) => {
        return game._id === payload._id ? payload : game
      })

    default :
      return state
  }
}


text:
package awsec2

import (
	"io/ioutil"
	"net/http"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/ec2"
	"github.com/cloudstax/firecamp/api/common"
	"github.com/golang/glog"
)

const ec2InstanceIDURL = "http://169.254.169.254/latest/meta-data/instance-id"
const ec2AZURL = "http://169.254.169.254/latest/meta-data/placement/availability-zone"
const ec2HostnameURL = "http://169.254.169.254/latest/meta-data/hostname"
const ec2LocalIPURL = "http://169.254.169.254/latest/meta-data/local-ipv4"
const ec2MacURL = "http://169.254.169.254/latest/meta-data/mac"
const ec2VpcURLPrefix = "http://169.254.169.254/latest/meta-data/network/interfaces/macs/"

// GetLocalEc2InstanceID gets the current ec2 node's instanceID
func GetLocalEc2InstanceID() (string, error) {
	return getEc2Metadata(ec2InstanceIDURL)
}

// GetLocalEc2AZ gets the current ec2 node's availability-zone
func GetLocalEc2AZ() (string, error) {
	az, err := getEc2Metadata(ec2AZURL)
	if err != nil || len(az) == 0 {
		glog.Errorln("get region error", err, "az", az)
		return "", err
	}
	return az, nil
}

// GetLocalEc2Region gets the current ec2 node's region
func GetLocalEc2Region() (string, error) {
	az, err := getEc2Metadata(ec2AZURL)
	if err != nil || len(az) == 0 {
		glog.Errorln("get region error", err, "az", az)
		return "", err
	}

	// az must be like us-west-1c, get region from it
	region := az[:len(az)-1]
	glog.Infoln("get ec2 region", region, "az", az)
	return region, nil
}

// GetLocalEc2Hostname gets the current ec2 node's hostname
func GetLocalEc2Hostname() (string, error) {
	return getEc2Metadata(ec2HostnameURL)
}

// GetLocalEc2IP gets the current ec2 node's local IP
func GetLocalEc2IP() (string, error) {
	return getEc2Metadata(ec2LocalIPURL)
}

// GetLocalEc2VpcID gets the current ec2 node's vpc id
func GetLocalEc2VpcID() (string, error) {
	mac, err := getEc2Metadata(ec2MacURL)
	if err != nil {
		glog.Errorln("get mac error", err)
		return "", err
	}

	vpcURL := ec2VpcURLPrefix + mac + "/vpc-id"
	vpcID, err := getEc2Metadata(vpcURL)
	if err != nil {
		glog.Errorln("get vpc id error", err)
		return "", err
	}
	return vpcID, nil
}

func getEc2Metadata(url string) (string, error) {
	resp, err := http.Get(url)
	if err != nil {
		glog.Errorln("get url", url, "error", err)
		return "", err
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		glog.Errorln("read body error", err, "url", url)
		return "", err
	}

	return string(body), nil
}

// GetRegionAZs gets the AvailabilityZones in one region
func GetRegionAZs(region string, sess *session.Session) ([]string, error) {
	svc := ec2.New(sess)
	// describe AvailabilityZones in the region
	params := &ec2.DescribeAvailabilityZonesInput{
		Filters: []*ec2.Filter{
			{
				Name: aws.String(regionFilterName),
				Values: []*string{
					aws.String(region),
				},
			},
		},
	}
	res, err := svc.DescribeAvailabilityZones(params)
	if err != nil {
		glog.Errorln("DescribeAvailabilityZones error", err)
		return nil, err
	}
	if len(res.AvailabilityZones) == 0 {
		glog.Errorln("No AvailabilityZones in region", region)
		return nil, common.ErrInternal
	}
	azs := make([]string, len(res.AvailabilityZones))
	for i, zone := range res.AvailabilityZones {
		azs[i] = *(zone.ZoneName)
	}
	return azs, nil
}


text:
package com.parallelsymmetry.cirrus.painter;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.Arc2D;
import java.awt.image.BufferedImage;

import javax.swing.JComponent;

public abstract class CommonColorIconPainter extends AbstractCommonColorsPainter {

	public static final double DEFAULT_SIZE = 256;

	public static final double CANVAS_SIZE = 512;

	public static final double A = 0 * CANVAS_SIZE;

	public static final double B = 1 * CANVAS_SIZE;

	public static final double C = 0.5 * CANVAS_SIZE;

	public static final double D = 0.25 * CANVAS_SIZE;

	public static final double E = 0.75 * CANVAS_SIZE;

	public static final double F = 0.125 * CANVAS_SIZE;

	public static final double G = 0.375 * CANVAS_SIZE;

	public static final double H = 0.625 * CANVAS_SIZE;

	public static final double I = 0.875 * CANVAS_SIZE;

	public static final double J = 0.0625 * CANVAS_SIZE;

	public static final double K = 0.1875 * CANVAS_SIZE;

	public static final double L = 0.3125 * CANVAS_SIZE;

	public static final double M = 0.4375 * CANVAS_SIZE;

	public static final double N = 0.5625 * CANVAS_SIZE;

	public static final double O = 0.6875 * CANVAS_SIZE;

	public static final double P = 0.8125 * CANVAS_SIZE;

	public static final double Q = 0.9375 * CANVAS_SIZE;

	public static final double ZA = 0.03125 * CANVAS_SIZE;

	public static final double ZB = 0.09375 * CANVAS_SIZE;

	public static final double ZC = 0.15625 * CANVAS_SIZE;

	public static final double ZD = 0.21875 * CANVAS_SIZE;

	public static final double ZE = 0.28125 * CANVAS_SIZE;

	public static final double ZF = 0.34375 * CANVAS_SIZE;

	public static final double ZG = 0.40625 * CANVAS_SIZE;

	public static final double ZH = 0.46875 * CANVAS_SIZE;

	public static final double ZI = 0.53125 * CANVAS_SIZE;

	public static final double ZJ = 0.59375 * CANVAS_SIZE;

	public static final double ZK = 0.65625 * CANVAS_SIZE;

	public static final double ZL = 0.71875 * CANVAS_SIZE;

	public static final double ZM = 0.78125 * CANVAS_SIZE;

	public static final double ZN = 0.84375 * CANVAS_SIZE;

	public static final double ZO = 0.90625 * CANVAS_SIZE;

	public static final double ZP = 0.96875 * CANVAS_SIZE;

	protected Stroke strokeRound = new BasicStroke( (float)CANVAS_SIZE / 16f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND );

	protected Stroke strokeSquare = new BasicStroke( (float)CANVAS_SIZE / 16f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND );

	protected Stroke halfStroke = new BasicStroke( (float)CANVAS_SIZE / 32f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND );

	// Border colors
	private Color iconBorderTop = decodeColor( "commonBorderBaseEnabled" );

	private Color iconBorderBottom = decodeColor( "commonBorderBaseEnabled" );

	private TwoColors iconBorder = new TwoColors( iconBorderTop, iconBorderBottom );

	// Contrast colors
	private Color iconContrastTop = decodeColor( "commonInteriorBaseEnabled", -0.017974f, 0.225841f, 0.027451f, 0 );

	private Color iconContrastUpperMid = decodeColor( "commonInteriorBaseEnabled", -0.002101f, 0.10291f, 0.007843f, 0 );

	private Color iconContrastLowerMid = decodeColor( "commonInteriorBaseEnabled", -0.003354f, 0.115574f, 0.003922f, 0 );

	private Color iconContrastBottom = decodeColor( "commonInteriorBaseEnabled", -0.011029f, 0.206031f, 0.023529f, 0 );

	private FourColors iconContrast = new FourColors( iconContrastTop, iconContrastUpperMid, iconContrastLowerMid, iconContrastBottom );

	// Interior colors
	private Color iconInteriorTop = decodeColor( "commonInteriorBaseEnabled", -0.017974f, 0.025841f, 0.027451f, 0 );

	private Color iconInteriorUpperMid = decodeColor( "commonInteriorBaseEnabled", -0.002101f, 0.05291f, 0.007843f, 0 );

	private Color iconInteriorLowerMid = decodeColor( "commonInteriorBaseEnabled", -0.003354f, 0.065574f, 0.003922f, 0 );

	private Color iconInteriorBottom = decodeColor( "commonInteriorBaseEnabled", -0.011029f, 0.006031f, 0.023529f, 0 );

	private FourColors iconInterior = new FourColors( iconInteriorTop, iconInteriorUpperMid, iconInteriorLowerMid, iconInteriorBottom );

	// Highlight colors
	private Color iconHighlightTop = decodeColor( "commonInteriorBaseMouseover", -0.017974f, -0.125841f, 0.027451f, 0 );

	private Color iconHighlightUpperMid = decodeColor( "commonInteriorBaseMouseover", -0.002101f, -0.00291f, 0.007843f, 0 );

	private Color iconHighlightLowerMid = decodeColor( "commonInteriorBaseMouseover", -0.003354f, -0.015574f, 0.003922f, 0 );

	private Color iconHighlightBottom = decodeColor( "commonInteriorBaseMouseover", -0.011029f, -0.106031f, 0.023529f, 0 );

	private FourColors iconHighlight = new FourColors( iconHighlightTop, iconHighlightUpperMid, iconHighlightLowerMid, iconHighlightBottom );

	public CommonColorIconPainter() {}

	@Override
	protected void doPaint( Graphics2D graphics, JComponent c, int width, int height, Object[] extendedCacheKeys ) {
		BufferedImage image = new BufferedImage( (int)( CANVAS_SIZE ), (int)( CANVAS_SIZE ), BufferedImage.TYPE_INT_ARGB );
		Graphics2D g = (Graphics2D)image.getGraphics();
		g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
		g.setStroke( strokeRound );
		doPaintIcon( g );
		g.dispose();

		graphics.drawImage( image.getScaledInstance( width, height, BufferedImage.SCALE_SMOOTH ), 0, 0, null );
	}

	protected abstract void doPaintIcon( Graphics2D g );

	protected Stroke getDefaultStroke() {
		return strokeRound;
	}

	protected Stroke getHalfStroke() {
		return halfStroke;
	}

	protected Paint getIconBorderPaint( Shape s, CommonControlState state ) {
		return createVerticalGradient( s, iconBorder );
	}

	protected Paint getIconContrastPaint( Shape s, CommonControlState state ) {
		return createVerticalGradient( s, iconContrast );
	}

	protected Paint getIconInteriorPaint( Shape s, CommonControlState state ) {
		return createVerticalGradient( s, iconInterior );
	}

	protected Paint getIconHighlightPaint( Shape s, CommonControlState state ) {
		return createVerticalGradient( s, iconHighlight );
	}

	protected Arc2D getDirectedArc( double cx, double cy, double radius, double start, double extents, int type ) {
		return getDirectedArc( cx, cy, radius, radius, start, extents, type );
	}

	protected Arc2D getDirectedArc( double cx, double cy, double rx, double ry, double start, double extents, int type ) {
		double x = cx - rx;
		double y = cy - ry;
		double w = rx * 2;
		double h = ry * 2;

		return new Arc2D.Double( x, y, w, h, start, extents, type );
	}

}


text:
require 'simplecov'
SimpleCov.start

require File.expand_path('../../spec/dummy/config/environment.rb', __FILE__)
require 'wor/paginate/rspec'
Dir[File.join('.', 'spec', 'support', '**', '*.rb')].each{ |f| require(f) }

ActiveRecord::Migrator.migrations_paths = [File.expand_path('../../spec/dummy/db/migrate', __FILE__)]
RSpec.configure do |config|
  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.around(:each) do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end
end

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include Response::JSONParser, type: :controller
  config.include Response::JSONParser, type: :request
end

require 'rspec/rails'
require 'byebug'


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>PhotoSphereViewer - overlay demo</title>

  <link rel="stylesheet" href="../dist/photo-sphere-viewer.css">
  <link rel="stylesheet" href="style.css">


text:
using DNK.ItalianConsulate.DATA;
using DNK.ItalianConsulate.Properties;
using DNK.ReportSettings;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Design;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DNK.ItalianConsulate
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private Model model;
        public FormMain(Model model) : this()
        {
            this.model = model;
            tslblDGCode.Text = model.DGCode;
            //включить доступ через PROXY
            if (model.Settings != null)
            {
                UploadFileToVisaCentre.IncludeProxy(model.Settings.Address, model.Settings.Domain, model.Settings.Login, model.Settings.Password);
            }
        }

        private readonly SettingFromCSVFiles settingFromCSVFiles = new SettingFromCSVFiles();
        private void FormMain_Load(object sender, EventArgs e)
        {
            errorProvider.SetError(btnImport, "");
            try
            {
                this.Cursor = Cursors.WaitCursor;
                settingFromCSVFiles.GetSettings();

                GetNotes();

                string branch = model.VisaPartnerCities(new ChooseValueDelegate(GetChooseValue));
                Note note = new Note(branch, new SearchLinkCodeDeletegate(SearchLinkCode));

                if (model.TurDateBegin != null)
                    note.SDate = ((DateTime)model.TurDateBegin).ToString("dd.MM.yyyy");
                if (model.TurDateEnd != null)
                    note.FDate = ((DateTime)model.TurDateEnd).ToString("dd.MM.yyyy");

                note.Cost = Settings.Default.TourCost;
                note.Frontiera = model.Country;
                note.Itinerario = model.FlightRoute;
                note.Vettore = model.FlightPartner;

                note.Applicants = GetApplicants(note, branch, model.AppointmentCity);
                propertyGrid.SelectedObject = note;
                GetAccess(note.Center);

                if (note.Applicants == null || note.Applicants.Count <= 0)
                {
                    errorProvider.SetError(btnImport, "Нет данных по заявителям. Заполните анкеты на заявителей в Мастер-туре.");
                    btnImport.Enabled = false;
                }
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }

        }

        private void GetNotes()
        {
            tsbOpen.Enabled = false;
            tsbDelete.Enabled = false;
            tsbOpen.Tag = model.GetNoteUrls();
            if (tsbOpen.Tag != null && tsbOpen.Tag is List<string>)
            {
                if (((List<string>)tsbOpen.Tag).Count > 0)
                {
                    tsslNotes.Text = string.Format("Кол-во импортированых нот : {0} шт.", ((List<string>)tsbOpen.Tag).Count);
                    tsbOpen.Enabled = true;
                    tsbDelete.Enabled = true;
                }
                else
                {
                    tsslNotes.Text = "Ноты еще не импортированы";
                }
            }
        }

        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            // сохраним возможно измененные значения параметров
            Settings.Default.Save();
        }

        private void tsbtnCodes_Click(object sender, EventArgs e)
        {
            FormItalianVisaCentreCodes formItalianVisaCentreCodes = new FormItalianVisaCentreCodes(settingFromCSVFiles, model);
            if (formItalianVisaCentreCodes.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {

            }
        }

        private void btnImport_Click(object sender, EventArgs e)
        {
            errorProvider.SetError(btnImport, "");
            Note note = propertyGrid.SelectedObject as Note;
            if (note == null)
            {
                errorProvider.SetError(btnImport, "Ошибка при создании структуры ноты");
                return;
            }
            string error;
            if (note.CheckFileds(out error))
            {
                errorProvider.SetError(btnImport, error);
                return;
            }
            try
            {
                string xml = Serialization.Serialize(note, typeof(Note));
                Log.Write("Отправленный XML", xml);
                string resultImport = UploadFileToVisaCentre.PostFile(xml);
                if (!string.IsNullOrEmpty(resultImport))
                {
                    string[] resultImports = resultImport.Split(new char[] { ';' });
                    if (resultImports.Length > 0)
                    {
                        int returnValue = 0;
                        if (int.TryParse(resultImports[0], out returnValue))
                        {
                            if (returnValue > 0)
                            {
                                //сохранить и открыть
                                string urlNote = string.Format("http://italy-vms.ru/lk/partners/editnt.htm?nid={0}", returnValue); //string.Format("http://italy-vms.ru/lk/partners/test/editnt.htm?nid={0}", returnValue);
                                urlNote = model.AddImportNote(urlNote);
                                if (!string.IsNullOrEmpty(urlNote))
                                {
                                    System.Diagnostics.Process.Start(urlNote);
                                    this.Close();
                                }
                                else
                                {
                                    error = string.Format("Ошибка сохранения ссылки на ноту в базе Мастер-тура : {0}", model.Error);
                                    errorProvider.SetError(btnImport, error);
                                    Log.Write("Ошибка импорта файла", error);
                                }
                            }
                            else
                            {
                                error = string.Format("Неизвестный код ошибки : {0}", returnValue);
                                switch (returnValue)
                                {
                                    case -6: error = "Не удалось создать ноту"; break;
                                    case -7: error = "Пользователь не связан ни с одной компанией"; break;
                                    case -8: error = "Пользователь заблокирован"; break;
                                    case -9: error = "Ошибка авторизации"; break;
                                }
                                if (resultImports.Length > 1)
                                {
                                    error += ":\n" + resultImports[1];
                                }
                                errorProvider.SetError(btnImport, error);
                                Log.Write("Ошибка импорта файла", error);
                            }
                        }
                        else
                        {
                            errorProvider.SetError(btnImport, string.Format("Неизвестный код ошибки : {0}", resultImport));
                            Log.Write("Ошибка импорта файла", string.Format("Неизвестный код ошибки : {0}", resultImport));
                        }
                    }
                    else
                    {
                        errorProvider.SetError(btnImport, "Нет результата импорта");
                        Log.Write("Ошибка импорта файла", "Нет результата импорта");
                    }
                }
                else
                {
                    errorProvider.SetError(btnImport, "Нет результата импорта");
                    Log.Write("Ошибка импорта файла", "Нет результата импорта");
                }
            }
            catch(Exception ex)
            {
                errorProvider.SetError(btnImport, ex.Message);
                Log.Write("Ошибка импорта файла", ex.Message);
            }
        }

        private string GetChooseValue(string title, List<string> source)
        {
            FormChoose formChoose = new FormChoose(title, source);
            if (formChoose.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                return formChoose.ChooseValue;
            return string.Empty;
        }

        private List<Applicant> GetApplicants(Note note, string branch, string city)
        {
            List<Applicant> applicants = new List<Applicant>();
            List<tbl_Turist> tourists = model.VisaSericeTourists(branch);
            foreach (tbl_Turist turist in tourists)
            {
                List<Ank_Turist> ankTurists = turist.Ank_Turists.ToList<Ank_Turist>();
                if (ankTurists != null && ankTurists.Count > 0)
                {
                    Applicant applicant = null;
                    foreach(Ank_Turist ankTurist in ankTurists)
                    {
                        if (ankTurist != null)
                        {
                            if (applicant == null)
                                applicant = new Applicant(city);
                            FillField(ankTurist, applicant, note, new SearchLinkCodeDeletegate(SearchLinkCode));
                        }
                    }
                    if (applicant != null)
                        applicants.Add(applicant);
                }
            }
            return applicants;
        }

        private void FillField(Ank_Turist ankTurist, Applicant applicant, Note note, SearchLinkCodeDeletegate searchLinkCode)
        {
            applicant.FirstCountry = CountriesTypeConverter.SearchKey(note.Frontiera, searchLinkCode);
            switch(ankTurist.AF_Name.Trim())
            {
                case "Фамилия текущая": applicant.LName = ankTurist.AT_EngValue; break;
                case "Имя и Отчество": applicant.FName = ankTurist.AT_EngValue; break;
                case "Фамилия при рождении": applicant.PrevLName = ankTurist.AT_EngValue; break;
                case "Пол": applicant.Gender = GENDERTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Дата рождения": applicant.BrhDate = ankTurist.AT_EngValue; break;
                case "Номер паспорта":
                    {
                        if (!string.IsNullOrEmpty(ankTurist.AT_EngValue) && ankTurist.AT_EngValue.Length > 0)
                        {
                            List<char> result = ankTurist.AT_EngValue.ToList();
                            result.RemoveAll(c => c == ' ');
                            string newEngValue = new string(result.ToArray());
                            applicant.PassNum = newEngValue;
                        }
                    } break;
                case "Дата выдачи": applicant.PassDate = ankTurist.AT_EngValue; break;
                case "Действителен до": applicant.PassTill = ankTurist.AT_EngValue; break;
                case "Кем выдан": applicant.PassWhom = ankTurist.AT_EngValue; break;
                case "Место рождения": applicant.BrhPlace = ankTurist.AT_EngValue; break;
                case "Страна рождения": applicant.BrhCountry = CountriesTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Гражданство текущее": applicant.Citizenship = CountriesTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Гражданство при рождение": applicant.PrevCitizenship = CountriesTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Семейное положение": applicant.Family = FAMILYTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Местожительство, Email": applicant.FullAddress = ankTurist.AT_EngValue; break;
                case "Телефон": applicant.AppPhone = ankTurist.AT_EngValue; break;
                case "Опекун№1 ФИ Адрес": applicant.KinderData = ankTurist.AT_EngValue; break;
                case "Опекун№2 ФИ Адрес": applicant.KinderData += ", " + ankTurist.AT_EngValue; break;
                case "Страна пребывания, если не является страной гражданства": applicant.CountryLive = YESNOTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Вид на жительство или иной документ": applicant.VidNo = ankTurist.AT_EngValue; break;
                case "Срок действия до":  applicant.VidTill = ankTurist.AT_EngValue; break;
                case "Род занятий в настоящее время": applicant.ProfActivity = ankTurist.AT_EngValue; break;
                case "Работодатель; адрес и телефон работодателя или место учебы": applicant.WorkOrg = ankTurist.AT_EngValue; break;
                case "Дата въезда": applicant.AppSDate = ankTurist.AT_EngValue; break;
                case "Дата выезда": applicant.AppFDate = ankTurist.AT_EngValue; break;
                case "Виза запрашивается на кол-во дней": applicant.CalcDuration = ankTurist.AT_EngValue; break;
                case "За последние три год выдавалась ли Шенгенская виза": applicant.PrevVisa = YESNOTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Предыдущая виза Шенг. С": applicant.PrevVisaFD = ankTurist.AT_EngValue; break;
                case "Предыдущая виза Шенг. По": applicant.PrevVisaED = ankTurist.AT_EngValue; break;
                case "Есть ли отпечатки пальцев, предоставленные ранее": applicant.Fingers = YESNOTypeConverter.SearchKey(ankTurist.AT_EngValue, searchLinkCode); break;
                case "Дата, если известна": applicant.FingersDate = ankTurist.AT_EngValue; break;
                case "Название гостиницы": applicant.Hotels = ankTurist.AT_EngValue; break;
                case "Адрес гостиницы": applicant.HotelAdresses = ankTurist.AT_EngValue; break;
                case "Телефон и факс гостиницы": applicant.HotelPhone = ankTurist.AT_EngValue; break;
                case "Название и адрес приглашающей компании": applicant.ACompanyName = ankTurist.AT_EngValue; break;
                case "Телефон и факс компании": applicant.ACompanyPhone = ankTurist.AT_EngValue; break;
                case "Контактного лица компании телефон и email": applicant.ACompanyPerson = ankTurist.AT_EngValue; break;
                case "Номер внутреннего паспорта": applicant.IdNumber = ankTurist.AT_EngValue; break;
            }
        }

        private string SearchLinkCode(string valueMT, Dictionary<string, string> dictionary)
        {
            string result = model.GetLinkCode(valueMT);
            if (string.IsNullOrEmpty(result) && !string.IsNullOrEmpty(valueMT))
            {
                FormLinkCodes formLinkCodes = new FormLinkCodes(valueMT, dictionary, model);
                if (formLinkCodes.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    result = formLinkCodes.Result;
            }
            return result;
        }

        private void tsbOpen_Click(object sender, EventArgs e)
        {
            //http://italy-vms.ru/lk/partners/import_note.htm
            //http://italy-vms.ru/lk/partners/test/import_note.htm

            if (tsbOpen.Tag != null && tsbOpen.Tag is List<string>)
            {
                foreach (string url in (List<string>)tsbOpen.Tag)
                {
                    if (!string.IsNullOrEmpty(url))
                    {
                        System.Diagnostics.Process.Start(url);
                    }
                }
            }
        }

        private void tsbDelete_Click(object sender, EventArgs e)
        {
            FormListNotes formListNotes = new FormListNotes(model);
            formListNotes.ShowDialog();
            GetNotes();
        }

        private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            if (e.ChangedItem.Label == "Визовый центр")
            {
                GetAccess(e.ChangedItem.Value.ToString());
            }
        }

        private void GetAccess(string id_branch)
        {
            if (propertyGrid.SelectedObject != null && propertyGrid.SelectedObject is Note)
            {
                ((Note)propertyGrid.SelectedObject).Login = settingFromCSVFiles.GetAccess(id_branch, 1);
                ((Note)propertyGrid.SelectedObject).Pass = settingFromCSVFiles.GetAccess(id_branch, 2);
                propertyGrid.Refresh();
            }
        }
    }
}


text:
using Bridge.Test.NUnit;
using System;

namespace Bridge.ClientTest.Batch4.SimpleTypes
{
    [TestFixture(TestNameFormat = "CharTests - {0}")]
    public class CharTests
    {
        [Test]
        public void TypePropertiesAreInt32_SPI_1603()
        {
            // #1603
            Assert.False(typeof(IFormattable).IsAssignableFrom(typeof(char)));
            var interfaces = typeof(char).GetInterfaces();
            Assert.False(interfaces.Contains(typeof(IFormattable)));
        }

        // #SPI
        //[Test]
        //public void TryParseWorks_SPI_1630()
        //{
        //    // #1630
        //    char charResult;
        //    bool result = char.TryParse("a", out charResult);
        //    Assert.True(result);
        //    Assert.AreEqual((int)charResult, (int)'a');

        //    result = char.TryParse("", out charResult);
        //    Assert.False(result);
        //    Assert.AreEqual((int)charResult, 0);

        //    result = char.TryParse("ab", out charResult);
        //    Assert.False(result);
        //    Assert.AreEqual((int)charResult, 0);
        //}
    }
}


text:
package org.apache.felix.resolver.test.util;

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

import org.apache.felix.resolver.test.util.IdentityCapability;
import org.osgi.framework.Version;
import org.osgi.framework.namespace.IdentityNamespace;
import org.osgi.resource.Capability;
import org.osgi.resource.Requirement;
import org.osgi.resource.Resource;

public class ResourceImpl implements Resource
{
    private final List<Capability> m_caps;
    private final List<Requirement> m_reqs;

    public ResourceImpl() {
        m_caps = new ArrayList<Capability>();
        m_reqs = new ArrayList<Requirement>();
    }
    public ResourceImpl(String name) {
        this(name, IdentityNamespace.TYPE_BUNDLE, Version.emptyVersion);
    }
    public ResourceImpl(String name, String type, Version v)
    {
        m_caps = new ArrayList<Capability>();
        m_caps.add(0, new IdentityCapability(this, name, type, v));
        m_reqs = new ArrayList<Requirement>();
    }

    public void addCapability(Capability cap)
    {
        m_caps.add(cap);
    }

    public List<Capability> getCapabilities(String namespace)
    {
        List<Capability> result = m_caps;
        if (namespace != null)
        {
            result = new ArrayList<Capability>();
            for (Capability cap : m_caps)
            {
                if (cap.getNamespace().equals(namespace))
                {
                    result.add(cap);
                }
            }
        }
        return result;
    }

    public void addRequirement(Requirement req)
    {
        m_reqs.add(req);
    }

    public List<Requirement> getRequirements(String namespace)
    {
        List<Requirement> result = m_reqs;
        if (namespace != null)
        {
            result = new ArrayList<Requirement>();
            for (Requirement req : m_reqs)
            {
                if (req.getNamespace().equals(namespace))
                {
                    result.add(req);
                }
            }
        }
        return result;
    }

    @Override
    public String toString()
    {
        return getCapabilities(IdentityNamespace.IDENTITY_NAMESPACE).get(0).toString();
    }

    public void addCapabilities(Collection<Capability> caps) {
        for (Capability cap : caps) {
            addCapability(cap);
        }
    }

    public void addRequirements(Collection<Requirement> reqs) {
        for (Requirement req : reqs) {
            addRequirement(req);
        }
    }
}


text:
package com.thoughtworks.go.apiv1.pipelineoperations.representers;

import com.thoughtworks.go.api.representers.EnvironmentVariableRepresenter;
import com.thoughtworks.go.api.representers.JsonReader;
import com.thoughtworks.go.server.domain.MaterialForScheduling;
import com.thoughtworks.go.server.domain.PipelineScheduleOptions;

import java.util.ArrayList;
import java.util.List;

public class PipelineScheduleOptionsRepresenter {
    public static PipelineScheduleOptions fromJSON(JsonReader jsonReader) {
        PipelineScheduleOptions model = new PipelineScheduleOptions();
        model.shouldPerformMDUBeforeScheduling(jsonReader.optBoolean("update_materials_before_scheduling").orElse(Boolean.TRUE));
        jsonReader.readArrayIfPresent("materials", materials -> {
            List<MaterialForScheduling> materialsForScheduling = new ArrayList<>();
            materials.forEach(material -> materialsForScheduling.add(MaterialRevisionRepresenter.fromJSON(new JsonReader(material.getAsJsonObject()))));
            model.setMaterials(materialsForScheduling);
        });
        model.setEnvironmentVariables(EnvironmentVariableRepresenter.fromJSONArray(jsonReader));
        return model;
    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Igneel.Design.Forms;
using Igneel;

namespace Igneel.Design.Controls
{
    public partial class DirectionPicker : UserControl
    {
        Vector3 direction;

        public DirectionPicker()
        {
            InitializeComponent();
            direction = new Euler(0,0,0).ToDirection();
            tbAttitude.Text = StringConverter.GetString(direction);
        }

        public event EventHandler DirectionChanged;

        public Vector3 Direction
        {
            get
            {
                return direction;
            }
            set
            {
                if (direction != value)
                {
                    direction = value;
                    tbAttitude.Text = StringConverter.GetString(direction);
                    OnDirectionChanged();
                    Refresh();
                }
            }
        }

        protected void OnDirectionChanged()
        {
            if (DirectionChanged != null)
            {
                DirectionChanged(this, EventArgs.Empty);
            }
        }

        private void tbAttitude_Enter(object sender, EventArgs e)
        {
            tbAttitude.BackColor = Color.FromArgb(192, 255, 192);
        }

        private void tbAttitude_Leave(object sender, EventArgs e)
        {
            try
            {
                tbAttitude.BackColor = Color.White;
                if (!string.IsNullOrEmpty(tbAttitude.Text))
                {
                    var newAtt = (Vector3)StringConverter.GetValue(typeof(Vector3), tbAttitude.Text);
                    if (direction != newAtt)
                    {
                        direction = newAtt;
                        OnDirectionChanged();
                    }
                }
            }
            catch (ArgumentException)
            {
                MessageBox.Show("Invalid Format");
            }
        }

        private void btPick_Click(object sender, EventArgs e)
        {
            using (AttitudePickerForm form = new AttitudePickerForm(Euler.FromDirection(direction)))
            {
                Vector3 oldDir = direction;
                form.OrientationChanged += new EventHandler(form_OrientationChanged);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    Vector3 dir = form.Orientation.ToDirection();
                    direction = oldDir;
                    if (direction != dir )
                    {
                        direction = dir;
                        tbAttitude.Text = StringConverter.GetString(direction);
                        OnDirectionChanged();
                    }
                }
            }
        }

        void form_OrientationChanged(object sender, EventArgs e)
        {
            var form = sender as AttitudePickerForm;
            Vector3 dir = form.Orientation.ToDirection();
            if (direction != dir)
            {
                direction = dir;
                tbAttitude.Text = StringConverter.GetString(direction);
                OnDirectionChanged();
            }
        }
    }
}


text:
package mrkoopa.jfbx.impl;

import mrkoopa.jfbx.*;

public class FbxCameraImpl extends FbxNodeAttributeImpl implements FbxCamera {
    FbxCameraImpl(long nativePointer) {
        super(nativePointer);
    }

}


text:
from flask import Blueprint

class ConfigurationError(RuntimeError):
    pass

class LwAdmin(object):

    def __init__(self, app=None):
        if app is not None:
            self.init_app(app)

    def init_app(self, app):
        blueprint = Blueprint(
            'lw_admin',
            __name__,
            template_folder='templates',
            static_folder='static',
            static_url_path=app.static_url_path + '/lw_admin')

        app.register_blueprint(blueprint)


text:
{% extends "kolibri/base.html" %}
{% load device_management_tags %}

{% block content %}
  {% device_management_assets %}
{% endblock %}


text:
require('../../../../node_modules/inputmask/dist/inputmask/jquery.inputmask.js');
let InputMask = ($timeout, $cookies,toastr) => {
	return {
		restrict: 'A',
		link:function($scope, element, attrs){
			var $element =$(element);
			$element.inputmask({mask: attrs.inputMask,greedy: false});
		}
	}
}

InputMask.$inject = ['$timeout', '$cookies','toastr'];
module.exports = (ngMold) => {
    ngMold.directive('inputMask', InputMask);
};


text:
namespace TypedRest.Links;

/// <summary>
/// Represents a link to another resource.
/// </summary>
public sealed class Link
{
    /// <summary>
    /// The relation type of the link.
    /// </summary>
    public string Rel { get; }

    /// <summary>
    /// The href/target of the link.
    /// </summary>
    public string Href { get; }

    /// <summary>
    /// The title of the link (optional).
    /// </summary>
    public string? Title { get; }

    /// <summary>
    /// Indicates whether the link is an URI Template (RFC 6570).
    /// </summary>
    public bool Templated { get; }

    /// <summary>
    /// Creates a new link
    /// </summary>
    /// <param name="rel">The relation type of the link.</param>
    /// <param name="href">The href/target of the link.</param>
    /// <param name="title">The title of the link (optional).</param>
    /// <param name="templated">Indicates whether the link is an URI Template (RFC 6570).</param>
    public Link(string rel, string href, string? title = null, bool templated = false)
    {
        Rel = rel;
        Href = href;
        Title = title;
        Templated = templated;
    }
}