text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
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 index_1 = require("../../models/reflections/index");
var ReflectionGroup_1 = require("../../models/ReflectionGroup");
var components_1 = require("../components");
var converter_1 = require("../converter");
var GroupPlugin = (function (_super) {
    __extends(GroupPlugin, _super);
    function GroupPlugin() {
        _super.apply(this, arguments);
    }
    GroupPlugin.prototype.initialize = function () {
        this.listenTo(this.owner, (_a = {},
            _a[converter_1.Converter.EVENT_RESOLVE] = this.onResolve,
            _a[converter_1.Converter.EVENT_RESOLVE_END] = this.onEndResolve,
            _a
        ));
        var _a;
    };
    GroupPlugin.prototype.onResolve = function (context, reflection) {
        var reflection = reflection;
        reflection.kindString = GroupPlugin.getKindSingular(reflection.kind);
        if (reflection instanceof index_1.ContainerReflection) {
            var container = reflection;
            if (container.children && container.children.length > 0) {
                container.children.sort(GroupPlugin.sortCallback);
                container.groups = GroupPlugin.getReflectionGroups(container.children);
            }
        }
    };
    GroupPlugin.prototype.onEndResolve = function (context) {
        function walkDirectory(directory) {
            directory.groups = GroupPlugin.getReflectionGroups(directory.getAllReflections());
            for (var key in directory.directories) {
                if (!directory.directories.hasOwnProperty(key))
                    continue;
                walkDirectory(directory.directories[key]);
            }
        }
        var project = context.project;
        if (project.children && project.children.length > 0) {
            project.children.sort(GroupPlugin.sortCallback);
            project.groups = GroupPlugin.getReflectionGroups(project.children);
        }
        walkDirectory(project.directory);
        project.files.forEach(function (file) {
            file.groups = GroupPlugin.getReflectionGroups(file.reflections);
        });
    };
    GroupPlugin.getReflectionGroups = function (reflections) {
        var groups = [];
        reflections.forEach(function (child) {
            for (var i = 0; i < groups.length; i++) {
                var group = groups[i];
                if (group.kind != child.kind) {
                    continue;
                }
                group.children.push(child);
                return;
            }
            var group = new ReflectionGroup_1.ReflectionGroup(GroupPlugin.getKindPlural(child.kind), child.kind);
            group.children.push(child);
            groups.push(group);
        });
        groups.forEach(function (group) {
            var someExported = false, allInherited = true, allPrivate = true, allProtected = true, allExternal = true;
            group.children.forEach(function (child) {
                someExported = child.flags.isExported || someExported;
                allPrivate = child.flags.isPrivate && allPrivate;
                allProtected = (child.flags.isPrivate || child.flags.isProtected) && allProtected;
                allExternal = child.flags.isExternal && allExternal;
                if (child instanceof index_1.DeclarationReflection) {
                    allInherited = child.inheritedFrom && allInherited;
                }
                else {
                    allInherited = false;
                }
            });
            group.someChildrenAreExported = someExported;
            group.allChildrenAreInherited = allInherited;
            group.allChildrenArePrivate = allPrivate;
            group.allChildrenAreProtectedOrPrivate = allProtected;
            group.allChildrenAreExternal = allExternal;
        });
        return groups;
    };
    GroupPlugin.getKindString = function (kind) {
        var str = index_1.ReflectionKind[kind];
        str = str.replace(/(.)([A-Z])/g, function (m, a, b) { return a + ' ' + b.toLowerCase(); });
        return str;
    };
    GroupPlugin.getKindSingular = function (kind) {
        if (GroupPlugin.SINGULARS[kind]) {
            return GroupPlugin.SINGULARS[kind];
        }
        else {
            return GroupPlugin.getKindString(kind);
        }
    };
    GroupPlugin.getKindPlural = function (kind) {
        if (GroupPlugin.PLURALS[kind]) {
            return GroupPlugin.PLURALS[kind];
        }
        else {
            return this.getKindString(kind) + 's';
        }
    };
    GroupPlugin.sortCallback = function (a, b) {
        var aWeight = GroupPlugin.WEIGHTS.indexOf(a.kind);
        var bWeight = GroupPlugin.WEIGHTS.indexOf(b.kind);
        if (aWeight == bWeight) {
            if (a.flags.isStatic && !b.flags.isStatic)
                return 1;
            if (!a.flags.isStatic && b.flags.isStatic)
                return -1;
            if (a.name == b.name)
                return 0;
            return a.name > b.name ? 1 : -1;
        }
        else
            return aWeight - bWeight;
    };
    GroupPlugin.WEIGHTS = [
        index_1.ReflectionKind.Global,
        index_1.ReflectionKind.ExternalModule,
        index_1.ReflectionKind.Module,
        index_1.ReflectionKind.Enum,
        index_1.ReflectionKind.EnumMember,
        index_1.ReflectionKind.Class,
        index_1.ReflectionKind.Interface,
        index_1.ReflectionKind.TypeAlias,
        index_1.ReflectionKind.Constructor,
        index_1.ReflectionKind.Event,
        index_1.ReflectionKind.Property,
        index_1.ReflectionKind.Variable,
        index_1.ReflectionKind.Function,
        index_1.ReflectionKind.Accessor,
        index_1.ReflectionKind.Method,
        index_1.ReflectionKind.ObjectLiteral,
        index_1.ReflectionKind.Parameter,
        index_1.ReflectionKind.TypeParameter,
        index_1.ReflectionKind.TypeLiteral,
        index_1.ReflectionKind.CallSignature,
        index_1.ReflectionKind.ConstructorSignature,
        index_1.ReflectionKind.IndexSignature,
        index_1.ReflectionKind.GetSignature,
        index_1.ReflectionKind.SetSignature,
    ];
    GroupPlugin.SINGULARS = (function () {
        var singulars = {};
        singulars[index_1.ReflectionKind.Enum] = 'Enumeration';
        singulars[index_1.ReflectionKind.EnumMember] = 'Enumeration member';
        return singulars;
    })();
    GroupPlugin.PLURALS = (function () {
        var plurals = {};
        plurals[index_1.ReflectionKind.Class] = 'Classes';
        plurals[index_1.ReflectionKind.Property] = 'Properties';
        plurals[index_1.ReflectionKind.Enum] = 'Enumerations';
        plurals[index_1.ReflectionKind.EnumMember] = 'Enumeration members';
        plurals[index_1.ReflectionKind.TypeAlias] = 'Type aliases';
        return plurals;
    })();
    GroupPlugin = __decorate([
        components_1.Component({ name: 'group' })
    ], GroupPlugin);
    return GroupPlugin;
})(components_1.ConverterComponent);
exports.GroupPlugin = GroupPlugin;


text:
<!DOCTYPE html>

  <link rel="canonical" href="/texts/raising/"/>

  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"/>

  <meta name="DC.title" content="A Raisin in the Sun" />
  <meta name="DC.creator" content="Lorraine Hansberry" />
  <meta name="DC.contributor" content="" />
  <meta name="DC.date" content="" />
  <meta name="DC.rights" content="" />
  <meta name="DC.source" content="Getty Intern Guide" />

    <meta property="og:title" content="A Raisin in the Sun"/>
    <meta property="og:description" content="An Ed edition">
    <meta property="fb:admins" content="elotroalex"/>
    <meta property="og:type" content="article" />
    <meta property="og:url" content="http://elotroalex.github.io/texts/raising/"/>
    <meta property="fb:app_id" content="589495744558280"/>
    <meta property="og:image" content="http://elotroalex.github.io/public/open-graph-logo.png"/>
    <meta property="og:image:width" content="200" />
    <meta property="og:image:height" content="200" />

  <title>

      A Raisin in the Sun

  </title>

  <link rel="stylesheet" href="/public/css/syntax.css"/>
  <link rel="stylesheet" href="/public/css/ed.css"/>

  <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/public/apple-touch-icon-precomposed.png"/>
  <link rel="shortcut icon" href="/public/favicon.ico"/>

  <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml"/>

<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">

No matter how long your internship may last, you're in for a ride of insight and knowledge in the world of publications. Created by a previous Multicultural Undergraduate Intern, this website was envisioned to act as a helpful resource for future interns. It provides guides on how to navigate the expansive the Getty campus to how to use communication tools like Slack and Microsoft Outlook. It's like Getty Go, but streamlined to fit the needs of interns. Looking for something not addressed in here? Ask your supervisor.

    Home

          About

          Credits

          Documentation

          Search

    Annotate me
    GitHub project
    Currently v0.0.6

Distributed with an MIT license.

            Getty Intern Guide

Hello there and welcome!

A Raisin in the Sun

 by Lorraine Hansberry

(excerpt)

MAMA: Son—how come you talk so much 'bout money?

WALTER (with immense passion): Because it is life, Mama!

MAMA: Oh—So now it's life. Money is life. Once upon a time freedom used to be life—now it's money. I guess the world really do change …

WALTER: No—it was always money, Mama. We just didn't know about it.

MAMA: No . . . something has changed. (She looks at him) You something new, boy. In my time we was worried about not being lynched and getting to the North if we could and how to stay alive and still have a pinch of dignity too … Now here come you and Beneatha—talking 'bout things we never even thought about hardly, me and your daddy. You ain't satisfied or proud of nothing we done. I mean that you had a home; that we kept you out of trouble till you was grown; that you don't have to ride to work on the back of nobody's streetcar—You my children—but how different we done become.

redpajama_set_name: RedPajamaGithub


text:
using namespace AMDiS;

struct G : AbstractFunction<double, WorldVector<double> >
{
  double operator()(WorldVector<double> const& x) const
  {
    return std::exp(x*x) + std::cos(10.0 * (x[0] + x[1]));
  }
};

// solve: dt(u) - laplace(u) = f(x) in Omega,    u = 0 on Gamma
int main(int argc, char* argv[])
{
  AMDiS::init(argc, argv);

  // ===== create and init the scalar problem =====
  ProblemStat prob("heat");
  prob.initialize(INIT_ALL);

  ProblemInstat instat("heat", prob);
  instat.initialize(INIT_NOTHING);

  // ===== create info-object, that holds parameters ===
  AdaptInfo adaptInfo("adapt");

  // ===== define operators =====
  Operator opMatrix(prob.getFeSpace(), prob.getFeSpace());
  addZOT(opMatrix, 1.0/var(adaptInfo.getTimestepPtr())); // 1/tau * u
  addSOT(opMatrix, 1.0);  // -laplace(u)

  DOFVector<double>& u = *prob.getSolution(0);

  Operator opVector(prob.getFeSpace());
  addZOT(opVector, valueOf(u) / var(adaptInfo.getTimestepPtr())); // 1/tau * u_old
  addZOT(opVector, dot(X(), X()) + 10.0); // f(x) = x*x + 10

  // ===== add operators to problem =====
  prob.addMatrixOperator(opMatrix, 0, 0);
  prob.addVectorOperator(opVector, 0);

  // ===== add boundary conditions =====
  BoundaryType nr = 1;
  prob.addDirichletBC(nr, 0, 0, new G); // g(x) = exp(x*x) + cos(10*(x_0 + x_1)))

  // ===== set initial solution =====
  u << constant(0.0); // u(x,t=0) := 0

  AdaptInstationary adaptInstat("adapt", prob, adaptInfo, instat, adaptInfo);
  adaptInstat.adapt();

  AMDiS::finalize();
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/fontello.css">
    <link rel="stylesheet" href="css/animation.css">

        fontello
         font demo

        <input type="checkbox" onclick="toggleCodes(this.checked)">show codes

 icon-mail0xe806

 icon-cancel0xe80f

 icon-paper-plane0xe804

 icon-doc-text0xe803

 icon-github-circled0xe80e

 icon-twitter-circled0xe808

 icon-facebook-circled0xe807

 icon-gplus-circled0xe809

 icon-pinterest-circled0xe80a

 icon-linkedin-circled0xe80b

 icon-dribbble-circled0xe80c

 icon-stumbleupon-circled0xe80d

 icon-picture0xe802

 icon-trophy0xe801

 icon-user0xe800

 icon-download0xe805

Generated by fontello.com


text:
package de.iritgo.aktera.authentication;

import javax.security.auth.login.LoginException;
import java.util.List;
import java.util.Map;

/**
 * This is the interface implemented by services that provide user
 * authentication in Keel.
 *
 * The contract for the authentication service is that the
 * class using the service will set the loginname, password, domain
 * by calling the appropriate setters, prior to calling login/logout methods.
 * In addition, the other-config Map will contain the request, response,
 * as well as "remember" parameters. After login, the AuthenticationManager
 * will set the JAAS login-context in the user-env., as well as clearing it
 * out after logout.
 *
 * @version        $Revision: 1.3 $        $Date: 2003/12/10 22:58:48 $
 * @author Shash Chatterjee
 * Created on Jun 8, 2003
 */
public interface AuthenticationManager
{
	/**
	 * The Avalon role for the authentication service
	 */
	public static String ROLE = AuthenticationManager.class.getName();

	/**
	 * Set the user's login-name prior to login/logout
	 * @param name The login name
	 */
	public void setUsername(String name);

	/**
	 * Set the unencoded, text password prior to login/logout
	 * @param password The supplied passowrd
	 */
	public void setPassword(String password);

	/**
	 * The login domain.  Each domain has a unique schema and user/group mappings
	 * @param domain The login domain
	 */
	public void setDomain(String domain);

	/**
	 * A place to hold arbitrary data that might be required by the various
	 * JAAS login modules.  Other than name, password, domain, everything else
	 * should be passed in this map.
	 * @param config Extra config items
	 */
	public void setOtherConfig(Map config);

	/**
	 * Attempt to log the user in
	 * @param ue The user environment which holds the login-context and JAAS subject
	 * @throws LoginException
	 */
	public void login(UserEnvironment ue) throws LoginException;

	/**
	 * Attempt to log the user out
	 * @param ue The user environment which holds the login-context and JAAS subject
	 * @throws LoginException
	 */
	public void logout(UserEnvironment ue) throws LoginException;

	public String getDomainDescrip(String domainName);

	public List getAllowedDomains(String loginName);
}


text:
// "Fix all 'Loop can be collapsed with Stream API' problems in file" "true"

import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

public class Test {
  void testList(List<String> input) {
    List<String> result = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toCollection(() -> new ArrayList<>(/*initial size*/10)));
      System.out.println(result);

    ArrayList<String> result2 = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toCollection(() -> new ArrayList<>/*valuable comment*/(20)));
      System.out.println(result2);

    // Non-empty
    ArrayList<String> result3 = new ArrayList<>(input);
      input.stream().filter(s -> !s.isEmpty()).forEach(result3::add);
    System.out.println(result3);

    // Non-final var used in initializer
    int size = 5;
    if(size < input.size()) size = input.size();
    List<String> result4 = new ArrayList<>(size);
      input.stream().filter(s -> !s.isEmpty()).forEach(result4::add);
    System.out.println(result4);
  }

  void testSet(List<String> input) {
    Set<String> result = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toCollection(() -> new HashSet/*comment*/<>(/*size*/10)));
      System.out.println(result);

    Collection<String> result2 = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toCollection(() -> new LinkedHashSet<>(20, /*load factor*/ 0.8f)));
      System.out.println(result2);

    // Non-empty
    AbstractSet<String> result3 = new HashSet<>(input);
      input.stream().filter(s -> !s.isEmpty()).forEach(result3::add);
    System.out.println(result3);

    Collection<TimeUnit> result4 = input.stream().filter(s -> !s.isEmpty()).map(TimeUnit::valueOf).collect(Collectors.toCollection(() -> EnumSet.noneOf(/*timeunits*/TimeUnit.class)));
      System.out.println(result4);
  }

  void testMap(List<String> input) {
    Map<Integer, String> result = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toMap(String::length, s -> s, (a, b) -> b, () -> new HashMap<>(10)));
      System.out.println(result);

    Map<Integer, String> result2 = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toMap(String::length, s -> s, (a, b) -> b, () -> new HashMap<>(10, 0.8f)));
      System.out.println(result2);

    EnumMap<TimeUnit, String> result3 = input.stream().filter(s -> !s.isEmpty()).collect(Collectors.toMap(TimeUnit::valueOf, s -> s, (a, b) -> b, () -> new EnumMap<>(TimeUnit.class)));
      System.out.println(result3);

    // Non-empty
    EnumMap<TimeUnit, String> result4 = new EnumMap<>(result3);
      input.stream().filter(s -> !s.isEmpty()).forEach(s -> result4.put(TimeUnit.valueOf(s), s));
    System.out.println(result4);
  }
}


text:
オリジナルのMarkdownは[Daring Fireball][]で公開されています。

[Daring Fireball]: http://daringfireball.net/


text:
package cn.nec.nlc.example.activitytest9;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

/**
   x<0         x>0
                ^
                |
    +-----------+-->  y>0
    |           |
    |           |
    |   screen  |
    |           |   / z<0
    |           |  /
    |           | /
Origin----------+/
    |[]  [ ]  []/
    +----------/+     y<0
              /
             /
           |/ z>0 (toward the sky)

    O: Origin (x=0,y=0,z=0)
 */

public class MyCompassView extends View {
	private Paint paint;
	private float position = 0;

	public MyCompassView(Context context) {
		super(context);
		init();
	}

	private void init() {
		paint = new Paint();
		// smooths out the edges of what is being drawn + has no impact on the
		// interior of the shape
		paint.setAntiAlias(true);
		paint.setStrokeWidth(2); // 0 to stroke in hairline mode (one pixel width)
		paint.setTextSize(25); 	// value must be > 0
		paint.setStyle(Paint.Style.STROKE);
		paint.setColor(Color.BLACK);
	}

	@Override
	protected void onDraw(Canvas canvas) {
		// The width of this view as measured in the most recent call to
		// measure(). This should be used during measurement and layout
		// calculations only.
		// getMeasuredHeight() is the whole height including the part outside
		// the screen / layout. getHeight() is the height in the layout only.
		// it is possible that getMeasuredHeight() < getHeight() when all
		// content of the view is located within the screen / layout.
		int xPoint = getMeasuredWidth() / 2;
		int yPoint = getMeasuredHeight() / 2;

		float radius = (float) (Math.max(xPoint, yPoint) * 0.6);
		// center circle
		canvas.drawCircle(xPoint, yPoint, radius, paint);
		canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), paint);

		// 3.143 is an approximation for the circle
		// ?? -position in degrees
//		canvas.drawLine(xPoint, yPoint,
//				(float) (xPoint + radius
//						* Math.sin((double) (-position) / 180 * 3.143)),
//				(float) (yPoint - radius
//						* Math.cos((double) (-position) / 180 * 3.143)),
//				paint);
		canvas.drawLine(xPoint, yPoint,
				(float) (xPoint + radius
						* Math.cos((double) (position) / 180 * 3.143)),
				(float) (yPoint - radius
						* Math.sin((double) (position) / 180 * 3.143)),
				paint);
		// .. line from center to
		canvas.drawText(String.valueOf(position), xPoint, yPoint, paint);
	}

	public void updateData(float position) {
		this.position = position;
		invalidate();
		// .. If view is visible, onDraw(Canvas) will be called at some point
		// UI Thread	: invalidate()
		// non-UI Thread: postInvalidate()
	}
}


text:
/* Visit http://www.menucool.com/responsive-slider for instructions */

#ninja-slider {
    width:100%;
    background:#191919;
    padding: 0;

    margin:0 auto;
    overflow:hidden;
    box-sizing:border-box;
}

#ninja-slider .fs-icon {
    top:6px;
    right:6px;
    width:60px;
    height:26px;
    background: rgba(0,0,0,0.2);
    z-index:2;
    color:white;
    text-align:center;
    text-shadow:0 0 3px black;
    font:bold 18px/36px arial;
    border-radius:2px;
    opacity:0;
    -webkit-transition:opacity 0.8s;
    transition:opacity 0.8s;
}

#ninja-slider .slider-inner:hover .fs-icon,
#ninja-slider.fullscreen .fs-icon {
    opacity: 1;
}

#ninja-slider .fs-icon::before {
    content:"EXPAND";
    display:block;
}

#ninja-slider.fullscreen .fs-icon::before {
    content:"+";
    display:block;
    font-weight:bold;
    font-size:3em;
    transform: rotate(-45deg);
}

#ninja-slider .slider-inner {
    max-width:500px;
    margin:0 auto;/*center-aligned */
    font-size:0px;
    position:relative;
    box-sizing:border-box;
}

#ninja-slider.fullscreen .slider-inner {
    width:100%;
    max-width:700px;
}

#ninja-slider ul {
    position:relative;
    list-style:none;
    padding:0;
    box-sizing:border-box;

    overflow:visible!important; /*For showing captions outside the slider when transitionType is "fade". */
    margin-bottom:100px!important;
}

#ninja-slider li {

    width:100%;
    height:100%;
    top:0;
    left:0;
    position: absolute;
    font-size:12px;
    list-style:none;
    margin:0;
    padding:0;
    opacity:0;
    /*overflow:hidden;*/ /*Comment it out to show the caption*/
    box-sizing:border-box;

    margin-bottom:100px!important;
}

#ninja-slider li.ns-show {
    opacity:1;
}

/* --------- slider image ------- */
#ninja-slider .ns-img {
    background-color:rgba(0,0,0,0.3);
    background-size:contain;/*Note: If transitionType is zoom, it will be overridden to cover.*/

    /*decorate border*/
    box-shadow: inset 0 0 2px rgba(255,255,255,.3);
    border-radius:6px;

    cursor:default;
    display:block;
    position: absolute;
    width:100%;
    height:100%;
    background-repeat:no-repeat;
    background-position:center center;
}

/*---------- Captions -------------------*/
#ninja-slider .caption {
    position:absolute;
    top:auto;bottom:-100px;
    padding:0 40px;
    margin:auto;
    width:100%;
    text-align:left;
    font-family:sans-serif;
    font-size:14px;
    color:#ccc;
    box-sizing:border-box;
}

/* ---------Arrow buttons ------- */
/* The arrow button id should be: slider id + ("-prev", "-next", and "-pause-play") */
#ninja-slider-pause-play { display:none;}

#ninja-slider-prev, #ninja-slider-next
{
    position: absolute;
    display:inline-block;
    width:42px;
    height:56px;
    line-height:56px;
    top: 40%; /* not 50% as caption at bottom should be counted.*/
    margin-top:-28px;
    background-color:rgba(0,0,0,0.4);
    background-color:#ccc\9;/*IE8 hack*/
    backface-visibility:hidden;
    color:white;
    overflow:hidden;
    white-space:nowrap;
    -webkit-user-select: none;
    user-select:none;
    border-radius:2px;
    z-index:10;
    opacity:0.3;
    font-family:sans-serif;
    font-size:13px;
    cursor:pointer;
    -webkit-transition:all 0.7s;
    transition:all 0.4s;
}

.slider-inner:hover #ninja-slider-prev, .slider-inner:hover #ninja-slider-next {
    opacity:1;
}

#ninja-slider-prev {
    left: -41px; /*set it with a positive value if .slider-inner does not have max-width setting.*/
}
#ninja-slider-next {
    right: -41px;
}

/* arrows */
#ninja-slider-prev::before, #ninja-slider-next::before {
    position: absolute;
    top: 17px;
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border-left: 2px solid white;
    border-top: 2px solid white;
    backface-visibility:hidden;
}

#ninja-slider-prev::before {
    -ms-transform:rotate(-45deg);/*IE 9*/
    -webkit-transform:rotate(-45deg);
    transform: rotate(-45deg);
    left:16px;
}

#ninja-slider-next::before {
    -ms-transform:rotate(135deg);/*IE 9*/
    -webkit-transform:rotate(135deg);
    transform: rotate(135deg);
    right:16px;
}

/*pagination num within the arrow buttons*/
#ninja-slider-prev:hover, #ninja-slider-next:hover {width:80px;background-color:rgba(0,0,0,0.5);}
#ninja-slider-prev div {margin-right:8px;white-space:nowrap;opacity:0;float:right;}
#ninja-slider-next div {margin-left:8px;white-space:nowrap;opacity:0;float:left;}
#ninja-slider-prev:hover div, #ninja-slider-next:hover div {opacity:1;}

/*------ pager(nav bullets) ------*/
/* The pager id should be: slider id + "-pager" */
#ninja-slider-pager { display:none;}

#ninja-slider-prev, #ninja-slider-next, #ninja-slider-pause-play
{
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/*Responsive settings*/
@media only screen and (max-width:600px){

    #ninja-slider-prev, #ninja-slider-next, #ninja-slider-pager {
        display:none;
    }

    #ninja-slider li .cap1 {
        font-size:20px;
    }
}


text:
import { Distributor, eventFactory } from './index';

//  Blabbermouth is the public interface of this library. Whilst all its pieces
//  are designed to be de-coupled and re-usable, this class ties together all of
//  these into a cohesive and productive interface.
class Blabbermouth implements Blabbermouth.IBlabber {
    private distributor;
    // A Blabbermouth can be initialized with sane defaults, or optionally be
    // injected with an IDistrubtor implementation.
    constructor(distributor: Blabbermouth.IDistributor = new Distributor()) {
        this.distributor = distributor;
    }

    publish(topicId, data, subscriber?) {
        const topicIds = Array.isArray(topicId) ? topicId : [topicId];

        topicIds.map((id) => {
            const event = eventFactory(id, data);
            this.distributor.publish(id, event, subscriber);
        });

        return this;
    }

    async request(topicId, data, subscriber?) {
        const topicIds = Array.isArray(topicId) ? topicId : [topicId];
        let i = 0;
        let response = [];

        while (i < topicIds.length) {
            const event = eventFactory(topicIds[i], data);
            response = response.concat(
                await this.distributor.request(topicIds[i], event, subscriber));
            i++;
        }

        return response;
    }

    createTopic(topic: Blabbermouth.Topic) {
        this.distributor.createTopic(topic)

        return this;
    }

    deleteTopic(topicId: string) {
        this.distributor.deleteTopic(topicId);

        return this;
    }

    listTopics() {
        return this.distributor.list();
    }

    getTopic(topicId: string) {
        return this.distributor.getTopic(topicId);
    }

    subscribe(topicId, subscriber) {
        const topicIds = Array.isArray(topicId) ? topicId : [topicId];

        topicIds.forEach((id) => {
            this.distributor.subscribe(id, subscriber);
        });
        return this;
    }
};

export default Blabbermouth;


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Parser Semantic Actions</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Spirit 2.5.2">
<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
<link rel="prev" href="operator.html" title="Parser Operators">
<link rel="next" href="../compound_attribute_rules.html" title="Compound Attribute Rules">

Home
Libraries
People
FAQ
More

Parser
          Semantic Actions

<colgroup>
<col>
<col>
<col>
</colgroup>

                      Expression

                      Attribute

                      Description

                      p[fa]

                      Attribute of p

                      Call semantic action, fa
                      if p succeeds.

Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
using System;
using System.Collections.Generic;
using CsQuery;

namespace CsQueryControls.HtmlElements {
    /// <summary>
    ///     The table tag defines an HTML table.
    ///     An HTML table consists of the table element and one or more tr, th, and td elements.
    ///     The tr element defines a table row, the th element defines a table header, and the td element defines a table cell.
    ///     A more complex HTML table may also include caption, col, colgroup, thead, tfoot, and tbody elements.
    /// </summary>
    public class TableElement : CommonElement {
        #region Property

        /// <summary>
        ///     Specifies the alignment of a table according to surrounding text.
        /// </summary>
        /// <value>
        ///     left|center|right
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string Align { get { return Attr("align"); } set { Attr("align", value); } }
        /// <summary>
        ///     Specifies the background color for a table.
        /// </summary>
        /// <value>
        ///     rgb(x,x,x)|#xxxxxx|colorname
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string BgColor { get { return Attr("bgcolor"); } set { Attr("bgcolor", value); } }
        /// <summary>
        ///     Specifies whether the table cells should have borders or not.
        /// </summary>
        /// <value>
        ///     1|""
        /// </value>
        public virtual bool Border { get { return Attr("border") == "1"; } set { Attr("border", value ? "1" : string.Empty); } }
        /// <summary>
        ///     Specifies the space between the cell wall and the cell content.
        /// </summary>
        /// <value>
        ///     pixels
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual int? CellPadding { get { return Attr<int?>("cellpadding"); } set { Attr("cellpadding", value); } }
        /// <summary>
        ///     Specifies the space between cells.
        /// </summary>
        /// <value>
        ///     pixels
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual int? CellSpacing { get { return Attr<int?>("cellspacing"); } set { Attr("cellspacing", value); } }
        /// <summary>
        ///     Specifies which parts of the outside borders that should be visible.
        /// </summary>
        /// <value>
        ///     void|above|below|hsides|lhs|rhs|vsides|box|border
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string Frame { get { return Attr("frame"); } set { Attr("frame", value); } }
        /// <summary>
        ///     Specifies which parts of the inside borders that should be visible.
        /// </summary>
        /// <value>
        ///     none|groups|rows|cols|all
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string Rules { get { return Attr("rules"); } set { Attr("rules", value); } }
        /// <summary>
        ///     Specifies a summary of the content of a table.
        /// </summary>
        /// <value>
        ///     text
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string Summary { get { return Attr("summary"); } set { Attr("summary", value); } }
        /// <summary>
        ///     Specifies the width of a table.
        /// </summary>
        /// <value>
        ///     pixels|%
        /// </value>
        [Obsolete("Not supported in HTML5.")]
        public virtual string InnerWidth { get { return Attr("width"); } set { Attr("width", value); } }

        #endregion

        public TableElement(HtmlParsingMode parsingMode = HtmlParsingMode.Auto, HtmlParsingOptions parsingOptions = HtmlParsingOptions.Default, DocType docType = DocType.Default)
            : base(HtmlTag.Table, parsingMode, parsingOptions, docType) {
        }
        public new CQ Append(IEnumerable<IDomObject> elements) {
            var first = true;

            // must copy the enumerable first, since this can cause
            // els to be removed from it if they move across a document boundary

            var list = new List<IDomObject>(elements);

            foreach (var obj in Elements) {
                foreach (var e in list) {
                    var toInsert = first ? e : e.Clone();
                    obj.AppendChild(toInsert);
                }
                first = false;
            }
            return this;
        }
    }
}


text:
const char *getConfigURL() {
    return CONFIG_URL;
}

// Construct the URL for data
char *getDataURL() {
    // Get NASA Time: seconds from epoch divided by 5
    struct timeval t;
    gettimeofday(&t, NULL);
    __time_t nasa_time = t.tv_sec / 5;

    // Find length of URL and NASA Time
    size_t url_len = strlen(DATA_URL);
    int time_len = (int) log10(nasa_time) + 1;

    // Format URL and NASA Time, and store in allocated space
    static char data_url[64];
    char *p_url = data_url;
    sprintf(p_url, "%s%lld", DATA_URL, (long long) nasa_time);
    data_url[url_len + time_len] = '\0';

    return p_url;
}

// Callback for storing page contents
size_t curlWriteFunctionCB(void *content, size_t size, size_t nmemb, struct string *data) {
    // Calculate content size from cURL, and add content length to string length
    size_t csize = size * nmemb;
    size_t data_end = data->len + csize;

    // Reallocate pointer memory to reflect new size
    data->ptr = realloc(data->ptr, data_end + 1);
    if (data->ptr == NULL) {
        fprintf(stderr, "Failed to realloc() string in cURL write callback.\n");
        // TODO: Handle error condition
    }

    // Figure out next address to write at, and copy the content in
    void *next_addr = data->ptr + data->len;
    memcpy(next_addr, content, csize);

    // Null terminate string, and adjust length
    data->ptr[data_end] = '\0';
    data->len = data_end;

    return csize;
}

// Grab a page's contents with cURL, send to callback
int fetchContent(struct string *data, const char *url) {
    CURL *curl = curl_easy_init();

    if (curl) {
        CURLcode res;
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
        curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3L);
        curl_easy_setopt(curl, CURLOPT_URL, url);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlWriteFunctionCB);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, data);
        res = curl_easy_perform(curl);

        if (res != CURLE_OK) {
            return res;
        }

        curl_easy_cleanup(curl);
        return res;
    } else {
        fprintf(stderr, "Curl initialization failed.\n");
        return 1;
    }
}

// SAX Handlers
xmlSAXHandlerPtr initSAXHandler(SAXHandleType type) {
    xmlSAXHandlerPtr ourSAXHandlerPtr = calloc(1, sizeof(xmlSAXHandler));
    if (ourSAXHandlerPtr == NULL) {
        return NULL;
    }

    ourSAXHandlerPtr->initialized = XML_SAX2_MAGIC;
    if (type == HAND_CONFIG) {
        ourSAXHandlerPtr->startDocument = configDocStart;
        ourSAXHandlerPtr->endDocument   = configDocEnd;
        ourSAXHandlerPtr->startElement  = configElemStart;
        ourSAXHandlerPtr->endElement    = configElemEnd;
    } else if (type == HAND_DATA) {
//    ourSAXHandlerPtr->startDocument = dataDocStart;
//    ourSAXHandlerPtr->endDocument   = dataDocEnd;
//    ourSAXHandlerPtr->startElement  = dataElemStart;
//    ourSAXHandlerPtr->endElement    = dataElemEnd;
    }

    return ourSAXHandlerPtr;
}

void cleanupSAXHandler(xmlSAXHandlerPtr ourSAXHandlerPtr) {
    free(ourSAXHandlerPtr);
}

// Config Handlers
void configDocStart(void *user_data) {
    struct ParserState *s = user_data;
    s->state = STATE_START;
    printf("Starting document, State: %d\n", s->state);
}

void configDocEnd(void *user_data) {
    struct ParserState *s = user_data;
    printf("Ending document, State: %d\n", s->state);
}

void configElemStart(void *user_data, const xmlChar *name, const xmlChar **attrs) {
    struct ParserState *s = user_data;

    switch (s->state) {
        case STATE_START:
            if (xmlStrEqual(name, (xmlChar *) "config")) {
                s->state = STATE_CONFIG;
            } else {
                // TODO: Something went wrong
            }
            break;
        case STATE_CONFIG:
            if (xmlStrEqual(name, (xmlChar *) "sites")) {
                s->state = STATE_SITES;
            } else
            if (xmlStrEqual(name, (xmlChar *) "spacecraftMap")) {
                s->state = STATE_SPACECRAFT_MAP;
            } else {
                // TODO: Something went wrong
            }
            break;
        case STATE_SITES:
            if (xmlStrEqual(name, (xmlChar *) "site")) {
                s->state = STATE_SITE;
            } else {
                // TODO: Something went wrong
            }
            break;
        case STATE_SITE:
            if (xmlStrEqual(name, (xmlChar *) "dish")) {
                s->state = STATE_DISH;
            } else {
                // TODO: Something went wrong
            }
            break;
        case STATE_DISH:
            break;
        case STATE_SPACECRAFT_MAP:
            if (xmlStrEqual(name, (xmlChar *) "spacecraft")) {
                s->state = STATE_SPACECRAFT;
            } else {
                // TODO: Something went wrong
            }
        case STATE_SPACECRAFT:
            break;
        case STATE_FINISH:
            break;
    }
    printf("Entering element: %s, Entering state: %d\n", name, s->state);

    if (attrs) {
        while (*attrs != NULL) {
            printf("\t%s: ", *attrs);
            attrs++;
            printf("%s\n", *attrs);
            attrs++;
        }
    }
}

void configElemEnd(void *user_data, const xmlChar *name) {
    struct ParserState *s = user_data;
    switch (s->state) {
        case STATE_START:
            break;
        case STATE_CONFIG:
            s->state = STATE_FINISH;
            break;
        case STATE_SITES:
            s->state = STATE_CONFIG;
            break;
        case STATE_SITE:
            s->state = STATE_SITES;
            break;
        case STATE_DISH:
            s->state = STATE_SITE;
            break;
        case STATE_SPACECRAFT_MAP:
            s->state = STATE_CONFIG;
            break;
        case STATE_SPACECRAFT:
            s->state = STATE_SPACECRAFT_MAP;
            break;
        case STATE_FINISH:
            break;
    }
    printf("Leaving element: %s, Entering state: %d\n", name, s->state);
}

// Parse DSN XML content
int parseDSNConfig(void **stations, xmlSAXHandlerPtr configSAXHandler, struct string *configXML) {

    // Do it better with SAX
    struct ParserState configDocState;

    if (xmlSAXUserParseMemory(configSAXHandler, &configDocState, configXML->ptr, (int) configXML->len) < 0) {
        return RET_FAIL;
    } else {
        return configDocState.retVal;
    }

    return 0;
}


text:
package javax.mail.internet;

/**
 * @version $Rev: 729233 $ $Date: 2008-12-23 23:08:45 -0600 (Tue, 23 Dec 2008) $
 */
public class HeaderTokenizer {
    public static class Token {
        // Constant values from J2SE 1.4 API Docs (Constant values)
        public static final int ATOM = -1;
        public static final int COMMENT = -3;
        public static final int EOF = -4;
        public static final int QUOTEDSTRING = -2;
        private int _type;
        private String _value;

        public Token(int type, String value) {
            _type = type;
            _value = value;
        }

        public int getType() {
            return _type;
        }

        public String getValue() {
            return _value;
        }
    }

    private static final Token EOF = new Token(Token.EOF, null);
    // characters not allowed in MIME
    public static final String MIME = "()<>@,;:\\\"\t []/?=";
    // charaters not allowed in RFC822
    public static final String RFC822 = "()<>@,;:\\\"\t .[]";
    private static final String WHITE = " \t\n\r";
    private String _delimiters;
    private String _header;
    private boolean _skip;
    private int pos;

    public HeaderTokenizer(String header) {
        this(header, RFC822);
    }

    public HeaderTokenizer(String header, String delimiters) {
        this(header, delimiters, true);
    }

    public HeaderTokenizer(String header,
                           String delimiters,
                           boolean skipComments) {
        _skip = skipComments;
        _header = header;
        _delimiters = delimiters;
    }

    public String getRemainder() {
        return _header.substring(pos);
    }

    public Token next() throws ParseException {
        return readToken();
    }

    public Token peek() throws ParseException {
        int start = pos;
        try {
            return readToken();
        } finally {
            pos = start;
        }
    }

    /**
     * Read an ATOM token from the parsed header.
     *
     * @return A token containing the value of the atom token.
     */
    private Token readAtomicToken() {
        // skip to next delimiter
        int start = pos;
        while (++pos < _header.length()) {
            // break on the first non-atom character.
            char ch = _header.charAt(pos);
            if (_delimiters.indexOf(_header.charAt(pos)) != -1 || ch < 32 || ch >= 127) {
                break;
            }
        }

        return new Token(Token.ATOM, _header.substring(start, pos));
    }

    /**
     * Read the next token from the header.
     *
     * @return The next token from the header.  White space is skipped, and comment
     *         tokens are also skipped if indicated.
     * @exception ParseException
     */
    private Token readToken() throws ParseException {
        if (pos >= _header.length()) {
            return EOF;
        } else {
            char c = _header.charAt(pos);
            // comment token...read and skip over this
            if (c == '(') {
                Token comment = readComment();
                if (_skip) {
                    return readToken();
                } else {
                    return comment;
                }
                // quoted literal
            } else if (c == '\"') {
                return readQuotedString();
            // white space, eat this and find a real token.
            } else if (WHITE.indexOf(c) != -1) {
                eatWhiteSpace();
                return readToken();
            // either a CTL or special.  These characters have a self-defining token type.
            } else if (c < 32 || c >= 127 || _delimiters.indexOf(c) != -1) {
                pos++;
                return new Token((int)c, String.valueOf(c));
            } else {
                // start of an atom, parse it off.
                return readAtomicToken();
            }
        }
    }

    /**
     * Extract a substring from the header string and apply any
     * escaping/folding rules to the string.
     *
     * @param start  The starting offset in the header.
     * @param end    The header end offset + 1.
     *
     * @return The processed string value.
     * @exception ParseException
     */
    private String getEscapedValue(int start, int end) throws ParseException {
        StringBuffer value = new StringBuffer();

        for (int i = start; i < end; i++) {
            char ch = _header.charAt(i);
            // is this an escape character?
            if (ch == '\\') {
                i++;
                if (i == end) {
                    throw new ParseException("Invalid escape character");
                }
                value.append(_header.charAt(i));
            }
            // line breaks are ignored, except for naked '\n' characters, which are consider
            // parts of linear whitespace.
            else if (ch == '\r') {
                // see if this is a CRLF sequence, and skip the second if it is.
                if (i < end - 1 && _header.charAt(i + 1) == '\n') {
                    i++;
                }
            }
            else {
                // just append the ch value.
                value.append(ch);
            }
        }
        return value.toString();
    }

    /**
     * Read a comment from the header, applying nesting and escape
     * rules to the content.
     *
     * @return A comment token with the token value.
     * @exception ParseException
     */
    private Token readComment() throws ParseException {
        int start = pos + 1;
        int nesting = 1;

        boolean requiresEscaping = false;

        // skip to end of comment/string
        while (++pos < _header.length()) {
            char ch = _header.charAt(pos);
            if (ch == ')') {
                nesting--;
                if (nesting == 0) {
                    break;
                }
            }
            else if (ch == '(') {
                nesting++;
            }
            else if (ch == '\\') {
                pos++;
                requiresEscaping = true;
            }
            // we need to process line breaks also
            else if (ch == '\r') {
                requiresEscaping = true;
            }
        }

        if (nesting != 0) {
            throw new ParseException("Unbalanced comments");
        }

        String value;
        if (requiresEscaping) {
            value = getEscapedValue(start, pos);
        }
        else {
            value = _header.substring(start, pos++);
        }
        return new Token(Token.COMMENT, value);
    }

    /**
     * Parse out a quoted string from the header, applying escaping
     * rules to the value.
     *
     * @return The QUOTEDSTRING token with the value.
     * @exception ParseException
     */
    private Token readQuotedString() throws ParseException {
        int start = pos+1;
        boolean requiresEscaping = false;

        // skip to end of comment/string
        while (++pos < _header.length()) {
            char ch = _header.charAt(pos);
            if (ch == '"') {
                String value;
                if (requiresEscaping) {
                    value = getEscapedValue(start, pos++);
                }
                else {
                    value = _header.substring(start, pos++);
                }
                return new Token(Token.QUOTEDSTRING, value);
            }
            else if (ch == '\\') {
                pos++;
                requiresEscaping = true;
            }
            // we need to process line breaks also
            else if (ch == '\r') {
                requiresEscaping = true;
            }
        }

        throw new ParseException("Missing '\"'");
    }

    /**
     * Skip white space in the token string.
     */
    private void eatWhiteSpace() {
        // skip to end of whitespace
        while (++pos < _header.length()
                && WHITE.indexOf(_header.charAt(pos)) != -1)
            ;
    }
}


text:
module.exports = {
  scripts: "node_modules/*"
};


text:
package com.example.android.milestone;

//Default configuration for Backendless DataBase
//Required to initialize DataBase acces

public class Defaults
{

public static final String APPLICATION_ID = "DA9B7F0B-3E31-3FFF-FF82-22B88B91D000";
public static final String API_KEY = "26CAC899-CC62-48FD-FF39-51B368C57C00";
public static final String SERVER_URL = "https://api.backendless.com";

}


text:
# Retinize

[![Dependency Status](https://david-dm.org/MatthewCallis/retinize.svg)](https://david-dm.org/MatthewCallis/retinize)
[![devDependency Status](https://david-dm.org/MatthewCallis/retinize/dev-status.svg?style=flat)](https://david-dm.org/MatthewCallis/retinize#info=devDependencies)

[Retinize](https://github.com/MatthewCallis/retinize) will upscale (using nearest neighbor) images to look correctly on retina screens. This is particularly useful for pixel art when you don't want to store an upscaled version. Here's a [demo](http://jsfiddle.net/matthewcallis/hrMeA/).

# Update 2016
The blurring issue has been mostly resolved with CSS now. The jQuery version remains the same, but this is only really needed if you need older browser support or just want use a canvas anyway so the class is canvas only.

Use the below:
```css
canvas, img {
  image-rendering: optimizeSpeed;
  image-rendering: -o-crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: optimize-contrast;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: pixelated; /* CSS4 */
  image-rendering: crisp-edges; /* CSS4 */
  -ms-interpolation-mode: nearest-neighbor; /* IE */
}
```

## How to Use

### Vanilla JavaScript

```javascript
// Construct an instance of Retinize, passing the element
var el = document.querySelectorAll("img.pixelart");
var retinize  = new Retinize(el);
```

```javascript
// Construct an instance of Retinize, passing the element
var el = document.querySelector("img#pixelart");
Retinize.convertToCanvas(el);
```

### jQuery

To enable on all images with the class of 'retinize' simply call

```javascript
$('img.retinize').retinize();
```

If you want to force the effect on all images regardless of need use

```javascript
$('img.retinize').retinize({ forceCanvas: true });
```

All available settings

```javascript
var options = {
  forceCanvas: false
};
```


text:
param([Parameter(Mandatory=$true,ValueFromPipeline=$true)]
  [string]
  $installation_path,
  [Parameter(Mandatory=$true,ValueFromPipeline=$true)]
  [string]
  $dcos_url,
  [string]
  $add_path
  )

if (-Not(Get-Command python -errorAction SilentlyContinue))
{
  echo "The program 'python' could not be found. Make sure that 'python' is installed and that its directory is included in the PATH system variable."
  exit 1
}

$PYTHON_VERSION = (python --version) 2>&1

if ($PYTHON_VERSION -match "[0-9]+.[0-9]+") {
    $PYTHON_VERSION = $matches[0]

    if (-Not (($PYTHON_VERSION -eq "2.7") -Or ($PYTHON_VERSION -eq "3.4"))) {
        echo "Python must be version 2.7 or 3.4. Aborting."
        exit 1
    }
}

if (-Not(Get-Command pip -errorAction SilentlyContinue))
{
  echo "The program 'pip' could not be found. Make sure that 'pip' is installed and that its directory (eg 'C:\Python27\Scripts') is included in the PATH system variable."
  exit 1
}

$PIP_VERSION = (pip -V)

"$PIP_VERSION" -match "[0-9]+\.[0-9]+"

if ([double]$matches[0] -le 1.4) {
  echo "Pip version must be greater than 1.4. Aborting."
  exit 1
}

if (-Not(Get-Command virtualenv -errorAction SilentlyContinue))
{
  echo "The program 'virtualenv' could not be found. Make sure that it has been installed with the 'pip' Python package program."
  exit 1
}

$VIRTUAL_ENV_VERSION = (virtualenv --version)

$VIRTUAL_ENV_VERSION  -match "[0-9]+"

if ($matches[0] -lt 12) {
  echo "Virtualenv version must be 12 or greater. Aborting."
  exit 1
}

if (-Not(Get-Command git -errorAction SilentlyContinue))
{
  echo "The program 'git' could not be found. Make sure that 'git' is installed and that its directory is included in the PATH system variable."
  exit 1
}

echo "Installing DC/OS CLI from PyPI..."
echo ""

if (-Not([System.IO.Path]::IsPathRooted("$installation_path"))) {
  $installation_path = Join-Path (pwd) $installation_path
}

if (-Not( Test-Path $installation_path)) {
  mkdir  $installation_path
}

& virtualenv $installation_path
& $installation_path\Scripts\activate

[int]$PYTHON_ARCHITECTURE=(python -c 'import struct;print( 8 * struct.calcsize(\"P\"))')

if ($PYTHON_ARCHITECTURE -eq 64) {
  & $installation_path\Scripts\easy_install  "http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win-amd64-py$PYTHON_VERSION.exe" 2>&1 | out-null
} else {
  & $installation_path\Scripts\easy_install  "http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win32-py$PYTHON_VERSION.exe" 2>&1 | out-null
}

& $installation_path\Scripts\pip install --quiet "dcoscli<0.4.0"

$env:Path="$env:Path;$installation_path\Scripts\"

$DCOS_CONFIG="$env:USERPROFILE\.dcos\dcos.toml"

if (-Not(Test-Path $DCOS_CONFIG)) {
  mkdir "$env:USERPROFILE\.dcos"
  New-Item $DCOS_CONFIG -type file
}
[Environment]::SetEnvironmentVariable("DCOS_CONFIG", "$DCOS_CONFIG", "User")
$env:DCOS_CONFIG = $DCOS_CONFIG

dcos config set core.reporting true
dcos config set core.dcos_url $dcos_url
dcos config set core.timeout 5
dcos config set package.cache $env:temp\dcos\package-cache
dcos config set package.sources '[\"https://github.com/mesosphere/universe/archive/version-1.x.zip\"]'

dcos package update

$ACTIVATE_PATH="$installation_path\Scripts\activate.ps1"

function AddToPath ($AddedLocation)
{
	$Reg = "Registry::HKCU\Environment"
	$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
	$NewPath = $OldPath + ';' + $AddedLocation
	Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath
	$script:ACTIVATE_PATH="activate.ps1"
}

function PromptAddToPath ($AddedLocation)
{
	$message = "Modify your Environment to add DCOS to your PATH?"
	$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
	    "Yes, add DCOS to PATH."
	$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
	    "No, do not add DCOS to PATH."
	$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
	$result = $host.ui.PromptForChoice("", $message, $options, 0)
    if ($result -eq 0)
	{
		AddToPath "$AddedLocation"
	}
}

switch -regex ($add_path)
{
  "[Yy].*" {AddToPath "$installation_path\Scripts"; break}
  "[Nn].*" {break}
  default {PromptAddToPath "$installation_path\Scripts"}
}

echo "Finished installing and configuring DC/OS CLI."
echo ""
echo "Run this command to set up your environment and to get started:"
echo "& $ACTIVATE_PATH; dcos help"


text:
Bacon.Observable.prototype.doLog = function(...args) {
  return withDesc(new Bacon.Desc(this, "doLog", args), this.withHandler(function(event) {
    if (typeof console !== "undefined" && console !== null && typeof console.log === "function") {
      console.log(...args, event.log());
    }
    return this.push(event);
  })
  );
};


text:
package org.owasp.dependencycheck.data.update;

import java.net.MalformedURLException;
import java.util.Calendar;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.net.URL;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import javax.annotation.concurrent.ThreadSafe;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import static org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.MODIFIED;
import org.owasp.dependencycheck.data.update.exception.InvalidDataException;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.data.update.nvd.DownloadTask;
import org.owasp.dependencycheck.data.update.nvd.NvdCveInfo;
import org.owasp.dependencycheck.data.update.nvd.ProcessTask;
import org.owasp.dependencycheck.data.update.nvd.UpdateableNvdCve;
import org.owasp.dependencycheck.utils.DateUtil;
import org.owasp.dependencycheck.utils.Downloader;
import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Class responsible for updating the NVD CVE data.
 *
 * @author Jeremy Long
 */
@ThreadSafe
public class NvdCveUpdater implements CachedWebDataSource {

    /**
     * The logger.
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(NvdCveUpdater.class);
    /**
     * The thread pool size to use for CPU-intense tasks.
     */
    private static final int PROCESSING_THREAD_POOL_SIZE = Runtime.getRuntime().availableProcessors();
    /**
     * The thread pool size to use when downloading files.
     */
    private static final int DOWNLOAD_THREAD_POOL_SIZE = Math.round(1.5f * Runtime.getRuntime().availableProcessors());
    /**
     * ExecutorService for CPU-intense processing tasks.
     */
    private ExecutorService processingExecutorService = null;
    /**
     * ExecutorService for tasks that involve blocking activities and are not
     * very CPU-intense, e.g. downloading files.
     */
    private ExecutorService downloadExecutorService = null;
    /**
     * The configured settings.
     */
    private Settings settings;
    /**
     * Reference to the DAO.
     */
    private CveDB cveDb = null;
    /**
     * The properties obtained from the database.
     */
    private DatabaseProperties dbProperties = null;

    /**
     * Downloads the latest NVD CVE XML file from the web and imports it into
     * the current CVE Database. A lock on a file is obtained in an attempt to
     * prevent more then one thread/JVM from updating the database at the same
     * time. This method may sleep upto 5 minutes.
     *
     * @param engine a reference to the dependency-check engine
     * @throws UpdateException is thrown if there is an error updating the
     * database
     */
    @Override
    public synchronized void update(Engine engine) throws UpdateException {
        this.settings = engine.getSettings();
        this.cveDb = engine.getDatabase();
        if (isUpdateConfiguredFalse()) {
            return;
        }
        try {
            dbProperties = cveDb.getDatabaseProperties();
            if (checkUpdate()) {
                initializeExecutorServices();
                final UpdateableNvdCve updateable = getUpdatesNeeded();
                if (updateable.isUpdateNeeded()) {
                    performUpdate(updateable);
                }
                dbProperties.save(DatabaseProperties.LAST_CHECKED, Long.toString(System.currentTimeMillis()));
            }
        } catch (MalformedURLException ex) {
            throw new UpdateException("NVD CVE properties files contain an invalid URL, unable to update the data to use the most current data.", ex);
        } catch (DownloadFailedException ex) {
            LOGGER.warn("Unable to download the NVD CVE data; the results may not include the most recent CPE/CVEs from the NVD.");
            if (settings.getString(Settings.KEYS.PROXY_SERVER) == null) {
                LOGGER.info("If you are behind a proxy you may need to configure dependency-check to use the proxy.");
            }
            final String jre = System.getProperty("java.version");
            if (jre == null || jre.startsWith("1.4") || jre.startsWith("1.5") || jre.startsWith("1.6") || jre.startsWith("1.7")) {
                LOGGER.warn("An old JRE is being used ({} {}), and likely does not have the correct root certificates or algorithms "
                        + "to connect to the NVD - consider upgrading your JRE.", System.getProperty("java.vendor"), jre);
            }
            throw new UpdateException("Unable to download the NVD CVE data.", ex);
        } catch (DatabaseException ex) {
            throw new UpdateException("Database Exception, unable to update the data to use the most current data.", ex);
        } finally {
            shutdownExecutorServices();
        }
    }

    /**
     * Checks if the system is configured NOT to update.
     *
     * @return false if the system is configured to perform an update; otherwise
     * true
     */
    private boolean isUpdateConfiguredFalse() {
        try {
            if (!settings.getBoolean(Settings.KEYS.UPDATE_NVDCVE_ENABLED, true)) {
                return true;
            }
        } catch (InvalidSettingException ex) {
            LOGGER.trace("invalid setting UPDATE_NVDCVE_ENABLED", ex);
        }
        boolean autoUpdate = true;
        try {
            autoUpdate = settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
        } catch (InvalidSettingException ex) {
            LOGGER.debug("Invalid setting for auto-update; using true.");
        }
        return !autoUpdate;
    }

    /**
     * Initialize the executor services for download and processing of the NVD
     * CVE XML data.
     */
    protected void initializeExecutorServices() {
        processingExecutorService = Executors.newFixedThreadPool(PROCESSING_THREAD_POOL_SIZE);
        downloadExecutorService = Executors.newFixedThreadPool(DOWNLOAD_THREAD_POOL_SIZE);
        LOGGER.debug("#download   threads: {}", DOWNLOAD_THREAD_POOL_SIZE);
        LOGGER.debug("#processing threads: {}", PROCESSING_THREAD_POOL_SIZE);
    }

    /**
     * Shutdown and cleanup of resources used by the executor services.
     */
    private void shutdownExecutorServices() {
        if (processingExecutorService != null) {
            processingExecutorService.shutdownNow();
        }
        if (downloadExecutorService != null) {
            downloadExecutorService.shutdownNow();
        }
    }

    /**
     * Checks if the NVD CVE XML files were last checked recently. As an
     * optimization, we can avoid repetitive checks against the NVD. Setting
     * CVE_CHECK_VALID_FOR_HOURS determines the duration since last check before
     * checking again. A database property stores the timestamp of the last
     * check.
     *
     * @return true to proceed with the check, or false to skip
     * @throws UpdateException thrown when there is an issue checking for
     * updates
     */
    private boolean checkUpdate() throws UpdateException {
        boolean proceed = true;
        // If the valid setting has not been specified, then we proceed to check...
        final int validForHours = settings.getInt(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, 0);
        if (dataExists() && 0 < validForHours) {
            // ms Valid = valid (hours) x 60 min/hour x 60 sec/min x 1000 ms/sec
            final long msValid = validForHours * 60L * 60L * 1000L;
            final long lastChecked = Long.parseLong(dbProperties.getProperty(DatabaseProperties.LAST_CHECKED, "0"));
            final long now = System.currentTimeMillis();
            proceed = (now - lastChecked) > msValid;
            if (!proceed) {
                LOGGER.info("Skipping NVD check since last check was within {} hours.", validForHours);
                LOGGER.debug("Last NVD was at {}, and now {} is within {} ms.", lastChecked, now, msValid);
            }
        }
        return proceed;
    }

    /**
     * Checks the CVE Index to ensure data exists and analysis can continue.
     *
     * @return true if the database contains data
     */
    private boolean dataExists() {
        return cveDb.dataExists();
    }

    /**
     * Downloads the latest NVD CVE XML file from the web and imports it into
     * the current CVE Database.
     *
     * @param updateable a collection of NVD CVE data file references that need
     * to be downloaded and processed to update the database
     * @throws UpdateException is thrown if there is an error updating the
     * database
     */
    private void performUpdate(UpdateableNvdCve updateable) throws UpdateException {
        int maxUpdates = 0;
        for (NvdCveInfo cve : updateable) {
            if (cve.getNeedsUpdate()) {
                maxUpdates += 1;
            }
        }
        if (maxUpdates <= 0) {
            return;
        }
        if (maxUpdates > 3) {
            LOGGER.info("NVD CVE requires several updates; this could take a couple of minutes.");
        }

        final Set<Future<Future<ProcessTask>>> downloadFutures = new HashSet<>(maxUpdates);
        for (NvdCveInfo cve : updateable) {
            if (cve.getNeedsUpdate()) {
                final DownloadTask call = new DownloadTask(cve, processingExecutorService, cveDb, settings);
                downloadFutures.add(downloadExecutorService.submit(call));
            }
        }

        //next, move the future future processTasks to just future processTasks
        final Set<Future<ProcessTask>> processFutures = new HashSet<>(maxUpdates);
        for (Future<Future<ProcessTask>> future : downloadFutures) {
            final Future<ProcessTask> task;
            try {
                task = future.get();
            } catch (InterruptedException ex) {
                LOGGER.debug("Thread was interrupted during download", ex);
                Thread.currentThread().interrupt();
                throw new UpdateException("The download was interrupted", ex);
            } catch (ExecutionException ex) {
                LOGGER.debug("Thread was interrupted during download execution", ex);
                throw new UpdateException("The execution of the download was interrupted", ex);
            }
            if (task == null) {
                LOGGER.debug("Thread was interrupted during download");
                throw new UpdateException("The download was interrupted; unable to complete the update");
            } else {
                processFutures.add(task);
            }
        }

        for (Future<ProcessTask> future : processFutures) {
            try {
                final ProcessTask task = future.get();
                if (task.getException() != null) {
                    throw task.getException();
                }
            } catch (InterruptedException ex) {
                LOGGER.debug("Thread was interrupted during processing", ex);
                Thread.currentThread().interrupt();
                throw new UpdateException(ex);
            } catch (ExecutionException ex) {
                LOGGER.debug("Execution Exception during process", ex);
                throw new UpdateException(ex);
            }
        }

        //always true because <=0 exits early above
        //if (maxUpdates >= 1) {
        //ensure the modified file date gets written (we may not have actually updated it)
        dbProperties.save(updateable.get(MODIFIED));
        LOGGER.info("Begin database maintenance.");
        cveDb.cleanupDatabase();
        LOGGER.info("End database maintenance.");
        //}
    }

    /**
     * Determines if the index needs to be updated. This is done by fetching the
     * NVD CVE meta data and checking the last update date. If the data needs to
     * be refreshed this method will return the NvdCveUrl for the files that
     * need to be updated.
     *
     * @return the collection of files that need to be updated
     * @throws MalformedURLException is thrown if the URL for the NVD CVE Meta
     * data is incorrect
     * @throws DownloadFailedException is thrown if there is an error.
     * downloading the NVD CVE download data file
     * @throws UpdateException Is thrown if there is an issue with the last
     * updated properties file
     */
    protected final UpdateableNvdCve getUpdatesNeeded() throws MalformedURLException, DownloadFailedException, UpdateException {
        LOGGER.info("starting getUpdatesNeeded() ...");
        final UpdateableNvdCve updates;
        try {
            updates = retrieveCurrentTimestampsFromWeb();
        } catch (InvalidDataException ex) {
            final String msg = "Unable to retrieve valid timestamp from nvd cve downloads page";
            LOGGER.debug(msg, ex);
            throw new DownloadFailedException(msg, ex);
        } catch (InvalidSettingException ex) {
            LOGGER.debug("Invalid setting found when retrieving timestamps", ex);
            throw new DownloadFailedException("Invalid settings", ex);
        }

        if (updates == null) {
            throw new DownloadFailedException("Unable to retrieve the timestamps of the currently published NVD CVE data");
        }
        if (dbProperties != null && !dbProperties.isEmpty()) {
            try {
                final int startYear = settings.getInt(Settings.KEYS.CVE_START_YEAR, 2002);
                final int endYear = Calendar.getInstance().get(Calendar.YEAR);
                boolean needsFullUpdate = false;
                for (int y = startYear; y <= endYear; y++) {
                    final long val = Long.parseLong(dbProperties.getProperty(DatabaseProperties.LAST_UPDATED_BASE + y, "0"));
                    if (val == 0) {
                        needsFullUpdate = true;
                    }
                }

                final long lastUpdated = Long.parseLong(dbProperties.getProperty(DatabaseProperties.LAST_UPDATED, "0"));
                final long now = System.currentTimeMillis();
                final int days = settings.getInt(Settings.KEYS.CVE_MODIFIED_VALID_FOR_DAYS, 7);
                if (!needsFullUpdate && lastUpdated == updates.getTimeStamp(MODIFIED)) {
                    updates.clear(); //we don't need to update anything.
                } else if (!needsFullUpdate && DateUtil.withinDateRange(lastUpdated, now, days)) {
                    for (NvdCveInfo entry : updates) {
                        if (MODIFIED.equals(entry.getId())) {
                            entry.setNeedsUpdate(true);
                        } else {
                            entry.setNeedsUpdate(false);
                        }
                    }
                } else { //we figure out which of the several XML files need to be downloaded.
                    for (NvdCveInfo entry : updates) {
                        if (MODIFIED.equals(entry.getId())) {
                            entry.setNeedsUpdate(true);
                        } else {
                            long currentTimestamp = 0;
                            try {
                                currentTimestamp = Long.parseLong(dbProperties.getProperty(DatabaseProperties.LAST_UPDATED_BASE
                                        + entry.getId(), "0"));
                            } catch (NumberFormatException ex) {
                                LOGGER.debug("Error parsing '{}' '{}' from nvdcve.lastupdated",
                                        DatabaseProperties.LAST_UPDATED_BASE, entry.getId(), ex);
                            }
                            if (currentTimestamp == entry.getTimestamp()) {
                                entry.setNeedsUpdate(false);
                            }
                        }
                    }
                }
            } catch (NumberFormatException ex) {
                LOGGER.warn("An invalid schema version or timestamp exists in the data.properties file.");
                LOGGER.debug("", ex);
            }
        }
        return updates;
    }

    /**
     * Retrieves the timestamps from the NVD CVE meta data file.
     *
     * @return the timestamp from the currently published nvdcve downloads page
     * @throws MalformedURLException thrown if the URL for the NVD CCE Meta data
     * is incorrect.
     * @throws DownloadFailedException thrown if there is an error downloading
     * the nvd cve meta data file
     * @throws InvalidDataException thrown if there is an exception parsing the
     * timestamps
     * @throws InvalidSettingException thrown if the settings are invalid
     */
    private UpdateableNvdCve retrieveCurrentTimestampsFromWeb()
            throws MalformedURLException, DownloadFailedException, InvalidDataException, InvalidSettingException {

        final int start = settings.getInt(Settings.KEYS.CVE_START_YEAR);
        final int end = Calendar.getInstance().get(Calendar.YEAR);

        final Map<String, Long> lastModifiedDates = retrieveLastModifiedDates(start, end);

        final UpdateableNvdCve updates = new UpdateableNvdCve();

        final String baseUrl20 = settings.getString(Settings.KEYS.CVE_SCHEMA_2_0);
        final String baseUrl12 = settings.getString(Settings.KEYS.CVE_SCHEMA_1_2);
        for (int i = start; i <= end; i++) {
            final String url = String.format(baseUrl20, i);
            updates.add(Integer.toString(i), url, String.format(baseUrl12, i),
                    lastModifiedDates.get(url), true);
        }

        final String url = settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL);
        updates.add(MODIFIED, url, settings.getString(Settings.KEYS.CVE_MODIFIED_12_URL),
                lastModifiedDates.get(url), false);
        return updates;
    }

    /**
     * Retrieves the timestamps from the NVD CVE meta data file.
     *
     * @param startYear the first year whose item to check for the timestamp
     * @param endYear the last year whose item to check for the timestamp
     * @return the timestamps from the currently published NVD CVE downloads
     * page
     * @throws MalformedURLException thrown if the URL for the NVD CCE Meta data
     * is incorrect.
     * @throws DownloadFailedException thrown if there is an error downloading
     * the NVD CVE meta data file
     */
    private Map<String, Long> retrieveLastModifiedDates(int startYear, int endYear)
            throws MalformedURLException, DownloadFailedException {

        final Set<String> urls = new HashSet<>();
        final String baseUrl20 = settings.getString(Settings.KEYS.CVE_SCHEMA_2_0);
        for (int i = startYear; i <= endYear; i++) {
            final String url = String.format(baseUrl20, i);
            urls.add(url);
        }
        urls.add(settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));

        final Map<String, Future<Long>> timestampFutures = new HashMap<>();
        for (String url : urls) {
            final TimestampRetriever timestampRetriever = new TimestampRetriever(url, settings);
            final Future<Long> future = downloadExecutorService.submit(timestampRetriever);
            timestampFutures.put(url, future);
        }

        final Map<String, Long> lastModifiedDates = new HashMap<>();
        for (String url : urls) {
            final Future<Long> timestampFuture = timestampFutures.get(url);
            final long timestamp;
            try {
                timestamp = timestampFuture.get(60, TimeUnit.SECONDS);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new DownloadFailedException(e);
            } catch (ExecutionException | TimeoutException e) {
                throw new DownloadFailedException(e);
            }
            lastModifiedDates.put(url, timestamp);
        }

        return lastModifiedDates;
    }

    /**
     * Sets the settings object; this is used during testing.
     *
     * @param settings the configured settings
     */
    protected synchronized void setSettings(Settings settings) {
        this.settings = settings;
    }

    /**
     * Retrieves the last modified timestamp from a NVD CVE meta data file.
     */
    private static class TimestampRetriever implements Callable<Long> {

        /**
         * A reference to the global settings object.
         */
        private final Settings settings;
        /**
         * The URL to obtain the timestamp from.
         */
        private final String url;

        /**
         * Instantiates a new timestamp retriever object.
         *
         * @param url the URL to hit
         * @param settings the global settings
         */
        TimestampRetriever(String url, Settings settings) {
            this.url = url;
            this.settings = settings;
        }

        @Override
        public Long call() throws Exception {
            LOGGER.debug("Checking for updates from: {}", url);
            try {
                final Downloader downloader = new Downloader(settings);
                return downloader.getLastModified(new URL(url));
            } finally {
                settings.cleanup(false);
            }
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Gallery</title>

  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

WIDOCO's gallery

 This page illustrates examples of the main features of WIDOCO, a WIzard for DOCumenting Ontologies.

Documentation of ontology concepts

Widoco builds on top of LODE, an open source tool designed to generate a cross reference section with the definition of classes, properties, data properties and individuals of the ontology. Widoco extends LODE by extending the metadata types used in the annotation of ontology concepts.

See an example

Dynamic visualization

				Widoco uses WebVowl to create an interactive diagram to the documentation. The diagram can be used to filter and browse concepts and properties.

See an example

Markdown support

				You can write your class descriptions using markdown, and they will automatically render in your ontology documentation.

Ontology metadata documentation

Widoco processes and recognizes over forty properties for ontology metadata description from common vocabularies and standards. These terms have been collected in a best practices document grouping terms, including a rationale of their importance when describing a vocabulary, which may help users on deciding whether to include them or not.

See an example

Change log

Widoco extends Bubastis, a software for capturing differences between classes in ontologies, adding which are the properties, data properties and annotations that have changed from version to version.

See an example

Provenance

Widoco produces a separate page, linked to the main HTML of the documentation, with the the provenance of the documentation. The page is captured both in both a human readable and machine readable way, following the PROV-O standard

See an example

Annotations for discovery

Widoco includes json-ld snippets on the main html document with a basic description of the metadata annotated according to Schema.org. These snippets are useful for search engines to find and explore the contents of the documentation automatically.

For an example, you may go to the following link and view the page source. Close to the beggining of the document you will see a JSON-LD snippet with the information of the page, annotated according to schema.org. This would be the information of the page as seen by a search engine.

Serialization and content negotiation

Widoco automatically creates an .htaccess file to access the documentation through its URI once it is published online. We have adopted the W3C best practices for vocabulary publishing on the Web, adapting the content negotiation to the vocabulary URI (hash versus slash vocabularies) and serving the ontology (by default) on RDF/XML, TTL and N3.

See an example

Evaluation Reports

Widoco enables users to produce evaluation reports of the ontology, facilitating checking whether the ontology has any pitfalls in its design. Widoco produces these reports by using the OOPS! web service, which evaluates ontologies against a catalog of pitfalls.

See an example


text:
import { ModelReference20 } from "../../";

export = ModelReference20;


text:
(function(module) {
  var webDB = {};

  // Private function to configure the underlying database connection via the html5sql library:
  function _config(isVerbose) {
    var msg;
    if (isVerbose) {
      html5sql.logInfo = true;
      html5sql.logErrors = true;
      html5sql.putSelectResultsInArray = true;
      msg = 'html5sql verbosity on';
    } else {
      html5sql.logInfo = false;
      html5sql.logErrors = false;
      html5sql.putSelectResultsInArray = false;
      msg = 'html5sql verbosity off';
    }
    console.log(msg);
  };

  // Public interface method to set up the initial database connection:
  webDB.init = function(isVerbose) {
    // Open and init DB
    try {
      if (openDatabase) {
        _config(isVerbose);
        html5sql.openDatabase('BikeItDB', 'Bike it database', 5*1024*1024);
      } else {
        console.log('Web Databases not supported.');
      }
    } catch (e) {
      console.error('Error occured during DB init. Web Database may not be supported.');
    }
  };

  // Public interface method to run some SQL and pass the result to a callback function:
  webDB.execute = function (sql, callback) {
    callback = callback || function() {};
    html5sql.process(
      sql,
      function (tx, result, resultArray) {
        callback(resultArray, result, tx); // Reorder the args, because we usually want JUST the resultArray.
      }
    );
  };

  module.webDB = webDB;
})(window);

// We can go ahead and set up the basic db connection now:
webDB.init(true);


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginLeft="@dimen/activity_horizontal_margin"
    android:layout_marginRight="@dimen/activity_horizontal_margin"
    android:layout_marginTop="@dimen/activity_vertical_margin"
    android:layout_marginBottom="@dimen/activity_vertical_margin"
    tools:context=".MainActivity"
    android:id="@+id/game_area">
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:layout_marginEnd="@dimen/activity_vertical_margin">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="vertical"
            android:layout_marginBottom="@dimen/activity_vertical_margin">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:gravity="center"
                android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                android:textColor="@color/color_yellow"
                android:id="@+id/status_difficulty"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:gravity="center"
                android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                android:textColor="@color/color_yellow"
                android:layout_marginTop="@dimen/activity_vertical_margin"
                android:layout_marginBottom="@dimen/activity_vertical_margin"
                android:id="@+id/status_first_turn"/>
            <TextView
                android:id="@+id/game_msg"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:gravity="center"
                android:textColor="@color/color_white"
                android:textAppearance="@style/Base.TextAppearance.AppCompat.Title"/>
        </LinearLayout>
        <include layout="@layout/tool_menu" />
    </LinearLayout>
    <include layout="@layout/game_grid" />
</LinearLayout>


text:
'use strict';

var mongoose = require('mongoose'),
	path = require('path'),
	VehicleType = mongoose.model('VehicleType'),
	errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));

exports.create = function(req, res) {
	console.log(req.body);
	var vehicleType = new VehicleType(req.body);

	vehicleType.save(function(error) {
		if (error) {
			return res.status(400).send({
				message: error
			});
		} else {
			res.json(vehicleType);
		}
	});
};

exports.read = function(req, res) {
	res.jsonp(req.vehicleType);
};

exports.update = function(req, res) {
	var vehicleType = req.vehicleType;

	vehicleType.name = req.body.name;
	vehicleType.description = req.body.description;
	vehicleType.maximumPassengers = req.body.maximumPassengers;
	vehicleType.maximumLuggage = req.body.maximumLuggage;
	vehicleType.enabled = req.body.enabled;

	vehicleType.save(function(error) {
		if (error) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(error)
			});
		} else  {
			res.json(vehicleType);
		}
	});
};

exports.list = function(req, res) {
	VehicleType.find().exec(function(error, vehicleTypes) {
		if (error) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(error)
			});
		} else {
			res.json(vehicleTypes);
		}
	});
};

exports.delete = function(req, res) {
	var vehicleType = req.vehicleType;

	vehicleType.remove(function(error) {
		if (error) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(error)
			});
		} else {
			res.json(vehicleType);
		}
	});
};

exports.vehicleTypeById = function(req, res, next, id) {
	VehicleType.getById(id)
		.exec(function(error, vehicleType) {
			if (error) { return next(error); }
			if (!vehicleType) { return next( new Error('Failed to load Vehicle Type ' + id)); }
			req.vehicleType = vehicleType;
			next();
		});
};