text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TemplateCollectionModelEx (FreeMarker 2.3.22 API)</title>
<meta name="date" content="2015-02-28">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

freemarker.template

Interface TemplateCollectionModelEx

All Superinterfaces:

TemplateCollectionModel, TemplateModel

All Known Implementing Classes:

DefaultNonListCollectionAdapter

public interface TemplateCollectionModelEx
extends TemplateCollectionModel

Experimental - subject to change: "extended collection" template language data type: Adds size/emptiness
 querybility and "contains" test to TemplateCollectionModel. The added extra operations is provided by all
 Java Collection-s, and this interface was added to make that accessible for templates too.

 Experimental status warning: This interface is subject to change on non-backward compatible ways, hence, it
 shouldn't be implemented outside FreeMarker yet.

Since:

2.3.22

Field Summary

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

boolean
contains(TemplateModel item)

Tells if a given value occurs in the collection, accodring the rules of the wrapped collection.

boolean
isEmpty()

Returns if the collection contains any elements.

int
size()

Returns the number items in this collection, or Integer.MAX_VALUE, if there are more than
 Integer.MAX_VALUE items.

Methods inherited from interface freemarker.template.TemplateCollectionModel

iterator

Method Detail

size

int size()
  throws TemplateModelException

Returns the number items in this collection, or Integer.MAX_VALUE, if there are more than
 Integer.MAX_VALUE items.

Throws:

TemplateModelException

isEmpty

boolean isEmpty()
         throws TemplateModelException

Returns if the collection contains any elements. This differs from size() != 0 only in that the exact
 number of items need not be calculated.

Throws:

TemplateModelException

contains

boolean contains(TemplateModel item)
          throws TemplateModelException

Tells if a given value occurs in the collection, accodring the rules of the wrapped collection. As of 2.3.22,
 this interface is not yet utilized by FTL, and certainly it won't be earlier than 2.4.0. The usefulness of this
 method is questionable, as the equality rules of Java differs from that of FTL, hence, calling this won't be
 equivalent with ?seq_contains(e).

Throws:

TemplateModelException

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
{% extends "base.html" %}

{% block content %}

{% if current_user.has_role(config.get("ACCOUNT_CREATE_USER_ROLE")) %}

        {# FIXME: need to set the URL correctly when account.register is enabled #}
        Create User

{% endif %}

Manage Users

{% endblock %}

{% block extra_js_bottom %}

{% endblock extra_js_bottom %}

redpajama_set_name: RedPajamaGithub


text:
- [Google Chrome API](https://developer.chrome.com/extensions/api_index)
- [JQuery 1.11.2](https://jquery.com/)
- [Free Currency Converter API](http://www.freecurrencyconverterapi.com/)

####Created in 36 hours at [HackBU](http://2015s.hackbu.org/) 2015


text:
/* @flow weak */

"use strict";

var React = require('react');
var Title = require('react-document-title');
var Link = require('react-router').Link;

var About = React.createClass({

  render: function() {
    return (
      <Title title='About'>

About

          <Link to='Home'>Home</Link>

      </Title>
    );
  }

});

module.exports = About;


text:
package com.artificial.cachereader.wrappers.rt4;

import com.artificial.cachereader.datastream.Stream;
import com.artificial.cachereader.wrappers.rt4.loaders.WrapperLoader;

public class Component extends StreamedWrapper {
    public int index = 0;
    public int parentId = -1;
    public boolean hasScript = true;
    public int componentType;
    public int specialType;
    public String text;
    public String name;
    public String[] actions;
    public String selectedAction;
    public String[] interfaceActions;
    public String textFormatting;
    public String spellName; //
    public String tooltip;
    public int originalX;
    public int originalY;
    public int originalWidth;
    public int originalHeight;
    public boolean isHidden;
    public int scrollWidth;
    public int scrollHeight;
    public int textureId;
    public int opacity;
    public int borderThickness;
    public int sprite2;
    public boolean flippedVertically;
    public boolean flippedHorizontally;
    public int modelType;
    public int modelId;
    public int rotationX;
    public int rotationY;
    public int rotationZ;
    public int modelZoom;
    public boolean textCentered;
    public int textColor;
    public boolean filled;
    public int fontId;
    public Object[] compTextureSpells;
    public int actionType;
    public int[][] dynamicValues;
    public int[] itemIds;
    public int[] itemQuantities;
    public int[] spritesX;
    public int[] spritesY;
    public int[] sprites;
    public int activeColor;
    public int mouseOverColor;
    public int mouseOverActiveColor;
    public int field2226;
    public int field2227;
    public int field2351;
    public int field2217;
    public boolean field2210;
    public int field2294;
    public boolean field2257;
    public int field2268;
    public int field2269;
    public int field2266;
    public boolean field2296;
    public int field2274;
    public int field2212;
    public int field2219;
    public int field2283;
    public int field2218;
    public boolean field2253;
    public int field2291;
    public int field2295;
    public int field2223;
    public boolean field2297;
    public Object[] field2300; //
    public Object[] field2248; //
    public Object[] field2311; //
    public Object[] field2350; //
    public Object[] field2312; //
    public Object[] field2314; //
    public Object[] field2316; //
    public Object[] field2318; //
    public Object[] field2319; //
    public Object[] field2306; //
    public Object[] settingsConfigAndOther;
    public Object[] field2287; //
    public Object[] field2303; //
    public Object[] field2304; //
    public Object[] field2308; //
    public Object[] field2310; //
    public Object[] field2262; //
    public int[] field2313;
    public int[] field2315;
    public int[] field2282;
    public boolean field2299;
    public int field2334;
    public int[] field2224;
    public int[] field2333;
    public int field2285;
    public int field2286;
    public int field2332;
    public int field2264;
    public int field2265;
    public int field2276;

    public Component(WrapperLoader<?> loader, int id) {
        super(loader, id);
    }

    @Override
    public void decode(Stream stream) {
        if (stream.getAllBytes()[0] == -1) {
            decodeActiveInterface(stream);
        } else {
            decodeInterface(stream);
        }
    }

    private void decodeInterface(Stream stream) {
        hasScript = false;
        componentType = stream.getUByte();
        actionType = stream.getUByte();
        specialType = stream.getUShort();
        originalX = stream.getShort();
        originalY = stream.getShort();
        originalWidth = stream.getUShort();
        originalHeight = stream.getUShort();
        opacity = stream.getUByte();
        parentId = stream.getUShort();
        if (parentId == '\uffff') {
            parentId = -1;
        } else {
            parentId += id() & -65536;
        }

        field2334 = stream.getUShort();
        if (field2334 == '\uffff') {
            field2334 = -1;
        }

        int var2 = stream.getUByte();
        int var3;
        if (var2 > 0) {
            field2224 = new int[var2];
            field2333 = new int[var2];

            for (var3 = 0; var3 < var2; ++var3) {
                field2224[var3] = stream.getUByte();
                field2333[var3] = stream.getUShort();
            }
        }

        var3 = stream.getUByte();
        int var4;
        int var5;
        int var6;
        if (var3 > 0) {
            dynamicValues = new int[var3][];

            for (var4 = 0; var4 < var3; ++var4) {
                var5 = stream.getUShort();
                dynamicValues[var4] = new int[var5];

                for (var6 = 0; var6 < var5; ++var6) {
                    dynamicValues[var4][var6] = stream.getUShort();
                    if (dynamicValues[var4][var6] == '\uffff') {
                        dynamicValues[var4][var6] = -1;
                    }
                }
            }
        }

        if (componentType == 0) {
            scrollHeight = stream.getUShort();
            isHidden = stream.getUByte() == 1;
        }

        if (componentType == 1) {
            stream.getUShort();
            stream.getUByte();
        }

        if (componentType == 2) {
            itemIds = new int[originalWidth * originalHeight];
            itemQuantities = new int[originalHeight * originalWidth];
            var4 = stream.getUByte();
            if (var4 == 1) {
                field2291 |= 268435456;
            }

            var5 = stream.getUByte();
            if (var5 == 1) {
                field2291 |= 1073741824;
            }

            var6 = stream.getUByte();
            if (var6 == 1) {
                field2291 |= Integer.MIN_VALUE;
            }

            int var7 = stream.getUByte();
            if (var7 == 1) {
                field2291 |= 536870912;
            }

            field2285 = stream.getUByte();
            field2286 = stream.getUByte();
            spritesX = new int[20];
            spritesY = new int[20];
            sprites = new int[20];

            int var8;
            for (var8 = 0; var8 < 20; ++var8) {
                int var9 = stream.getUByte();
                if (var9 == 1) {
                    spritesX[var8] = stream.getShort();
                    spritesY[var8] = stream.getShort();
                    sprites[var8] = stream.getInt();
                } else {
                    sprites[var8] = -1;
                }
            }

            interfaceActions = new String[5];

            for (var8 = 0; var8 < 5; ++var8) {
                String var11 = stream.getString();
                if (var11.length() > 0) {
                    interfaceActions[var8] = var11;
                    field2291 |= 1 << var8 + 23;
                }
            }
        }

        if (componentType == 3) {
            filled = stream.getUByte() == 1;
        }

        if (componentType == 4 || componentType == 1) {
            field2219 = stream.getUByte();
            field2283 = stream.getUByte();
            field2212 = stream.getUByte();
            fontId = stream.getUShort();
            if (fontId == '\uffff') {
                fontId = -1;
            }

            textCentered = stream.getUByte() == 1;
        }

        if (componentType == 4) {
            text = stream.getString();
            textFormatting = stream.getString();
        }

        if (componentType == 1 || componentType == 3 || componentType == 4) {
            textColor = stream.getInt();
        }

        if (componentType == 3 || componentType == 4) {
            activeColor = stream.getInt();
            mouseOverColor = stream.getInt();
            mouseOverActiveColor = stream.getInt();
        }

        if (componentType == 5) {
            textureId = stream.getInt();
            field2332 = stream.getInt();
        }

        if (componentType == 6) {
            modelType = 1;
            modelId = stream.getUShort();
            if (modelId == '\uffff') {
                modelId = -1;
            }

            field2264 = 1;
            field2265 = stream.getUShort();
            if (field2265 == '\uffff') {
                field2265 = -1;
            }

            field2266 = stream.getUShort();
            if (field2266 == '\uffff') {
                field2266 = -1;
            }

            field2276 = stream.getUShort();
            if (field2276 == '\uffff') {
                field2276 = -1;
            }

            modelZoom = stream.getUShort();
            rotationX = stream.getUShort();
            rotationZ = stream.getUShort();
        }

        if (componentType == 7) {
            itemIds = new int[originalWidth * originalHeight];
            itemQuantities = new int[originalWidth * originalHeight];
            field2219 = stream.getUByte();
            fontId = stream.getUShort();
            if (fontId == '\uffff') {
                fontId = -1;
            }

            textCentered = stream.getUByte() == 1;
            textColor = stream.getInt();
            field2285 = stream.getShort();
            field2286 = stream.getShort();
            var4 = stream.getUByte();
            if (var4 == 1) {
                field2291 |= 1073741824;
            }

            interfaceActions = new String[5];

            for (var5 = 0; var5 < 5; ++var5) {
                String var10 = stream.getString();
                if (var10.length() > 0) {
                    interfaceActions[var5] = var10;
                    field2291 |= 1 << var5 + 23;
                }
            }
        }

        if (componentType == 8) {
            text = stream.getString();
        }

        if (actionType == 2 || componentType == 2) {
            selectedAction = stream.getString();
            spellName = stream.getString();
            var4 = stream.getUShort() & 63;
            field2291 |= var4 << 11;
        }

        if (actionType == 1 || actionType == 4 || actionType == 5 || actionType == 6) {
            tooltip = stream.getString();
            if (tooltip.length() == 0) {
                if (actionType == 1) {
                    tooltip = "Ok";
                }

                if (actionType == 4) {
                    tooltip = "Select";
                }

                if (actionType == 5) {
                    tooltip = "Select";
                }

                if (actionType == 6) {
                    tooltip = "Continue";
                }
            }
        }

        if (actionType == 1 || actionType == 4 || actionType == 5) {
            field2291 |= 4194304;
        }

        if (actionType == 6) {
            field2291 |= 1;
        }

    }

    private void decodeActiveInterface(Stream stream) {
        stream.getUByte();
        hasScript = true;
        componentType = stream.getUByte();
        specialType = stream.getUShort();
        originalX = stream.getShort();
        originalY = stream.getShort();
        originalWidth = stream.getUShort();
        if (componentType == 9) {
            originalHeight = stream.getShort();
        } else {
            originalHeight = stream.getUShort();
        }

        field2226 = stream.getByte();
        field2227 = stream.getByte();
        field2351 = stream.getByte();
        field2217 = stream.getByte();
        parentId = stream.getUShort();
        if (parentId == '\uffff') {
            parentId = -1;
        } else {
            parentId += id & -65536;
        }

        isHidden = stream.getUByte() == 1;
        if (componentType == 0) {
            scrollWidth = stream.getUShort();
            scrollHeight = stream.getUShort();
            field2210 = stream.getUByte() == 1;
        }

        if (componentType == 5) {
            textureId = stream.getInt();
            field2294 = stream.getUShort();
            field2257 = stream.getUByte() == 1;
            opacity = stream.getUByte();
            borderThickness = stream.getUByte();
            sprite2 = stream.getInt();
            flippedVertically = stream.getUByte() == 1;
            flippedHorizontally = stream.getUByte() == 1;
        }

        if (componentType == 6) {
            modelType = 1;
            modelId = stream.getUShort();
            if (modelId == '\uffff') {
                modelId = -1;
            }

            field2268 = stream.getShort();
            field2269 = stream.getShort();
            rotationX = stream.getUShort();
            rotationZ = stream.getUShort();
            rotationY = stream.getUShort();
            modelZoom = stream.getUShort();
            field2266 = stream.getUShort();
            if (field2266 == '\uffff') {
                field2266 = -1;
            }

            field2296 = stream.getUByte() == 1;
            stream.getUShort();
            if (field2226 != 0) {
                field2274 = stream.getUShort();
            }

            if (field2227 != 0) {
                stream.getUShort();
            }
        }

        if (componentType == 4) {
            fontId = stream.getUShort();
            if (fontId == '\uffff') {
                fontId = -1;
            }

            text = stream.getString();
            field2212 = stream.getUByte();
            field2219 = stream.getUByte();
            field2283 = stream.getUByte();
            textCentered = stream.getUByte() == 1;
            textColor = stream.getInt();
        }

        if (componentType == 3) {
            textColor = stream.getInt();
            filled = stream.getUByte() == 1;
            opacity = stream.getUByte();
        }

        if (componentType == 9) {
            field2218 = stream.getUByte();
            textColor = stream.getInt();
            field2253 = stream.getUByte() == 1;
        }

        field2291 = stream.getUInt24();
        name = stream.getString();
        int var2 = stream.getUByte();
        if (var2 > 0) {
            actions = new String[var2];

            for (int var3 = 0; var3 < var2; ++var3) {
                actions[var3] = stream.getString();
            }
        }

        field2295 = stream.getUByte();
        field2223 = stream.getUByte();
        field2297 = stream.getUByte() == 1;
        selectedAction = stream.getString();
        compTextureSpells = this.readScriptParams(stream);
        field2300 = this.readScriptParams(stream);
        field2248 = this.readScriptParams(stream);
        field2311 = this.readScriptParams(stream);
        field2350 = this.readScriptParams(stream);
        field2312 = this.readScriptParams(stream);
        field2314 = this.readScriptParams(stream);
        field2316 = this.readScriptParams(stream);
        field2318 = this.readScriptParams(stream);
        field2319 = this.readScriptParams(stream);
        field2306 = this.readScriptParams(stream);
        settingsConfigAndOther = this.readScriptParams(stream);
        field2287 = this.readScriptParams(stream);
        field2303 = this.readScriptParams(stream);
        field2304 = this.readScriptParams(stream);
        field2308 = this.readScriptParams(stream);
        field2310 = this.readScriptParams(stream);
        field2262 = this.readScriptParams(stream);
        field2313 = this.readTriggers(stream);
        field2315 = this.readTriggers(stream);
        field2282 = this.readTriggers(stream);
    }

    private Object[] readScriptParams(Stream stream) {
        int var2 = stream.getUByte();
        if (var2 == 0) {
            return null;
        } else {
            Object[] var3 = new Object[var2];

            for (int var4 = 0; var4 < var2; ++var4) {
                int var5 = stream.getUByte();
                if (var5 == 0) {
                    var3[var4] = new Integer(stream.getInt());
                } else if (var5 == 1) {
                    var3[var4] = stream.getString();
                }
            }

            field2299 = true;
            return var3;
        }
    }

    private int[] readTriggers(Stream stream) {
        int var2 = stream.getUByte();
        if (var2 == 0) {
            return null;
        } else {
            int[] var3 = new int[var2];

            for (int var4 = 0; var4 < var2; ++var4) {
                var3[var4] = stream.getInt();
            }

            return var3;
        }
    }

    @Override
    public String toString() {
        return index + " (" + id() + ")";
    }
}


text:
import webpack from 'webpack';
import path from 'path';
import WebpackConfig from 'webpack-config';

module.exports = new WebpackConfig().extend('./webpack.config.common.babel.js').merge({
  entry : path.join(__dirname,'/app/app.module.js'),
  plugins: [
    new webpack.optimize.OccurrenceOrderPlugin(true),
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.AggressiveMergingPlugin(),
    new webpack.optimize.UglifyJsPlugin()
  ]
})


text:
typedef void(^BLActionItemBlock)();

@interface BLActionItem : NSObject

@property (nonatomic, strong) NSString* title;
@property (nonatomic, copy) BLActionItemBlock block;

+ (BLActionItem*)actionItemWithTitle:(NSString*)title;

+ (BLActionItem*)actionItemWithTitle:(NSString*)title block:(BLActionItemBlock)block;

- (id)initWithTitle:(NSString*)title block:(BLActionItemBlock)block;

@end

@interface BLActionSheet : UIActionSheet <UIActionSheetDelegate>

@property (nonatomic, strong) NSArray* items;

+ (BLActionSheet*)actionSheetWithTitle:(NSString *)title
                            cancelItem:(BLActionItem*)cancelItem
                       destructiveItem:(BLActionItem*)destructiveItem
                            otherItems:(NSArray*)otherItems;

- (id)initWithTitle:(NSString *)title
         cancelItem:(BLActionItem*)cancelItem
    destructiveItem:(BLActionItem*)destructiveItem
         otherItems:(NSArray*)otherItems;

@end


text:
BrowserHistory={__events:{},__event:function(_1){
var _2=1;
var o={id:_2,name:_1,listeners:[]};
return o;
},__dispatchQueue:function(_4){
var _5=_4.type;
var _6=this.__events[_5];
if(!_6){
return;
}
for(var i=0;i<_6.listeners.length;i++){
var _8=_6.listeners[i][_5];
_8(_4);
}
},__removeListener:function(_9,_a){
var _b=this.__events[_9];
if(_b){
for(var i in _b.listeners){
if(_b.listeners[i]==_a){
_b.listeners.splice(i,1);
}
}
}
},__addEventType:function(_d){
if(!this.__events[_d]){
this.__events[_d]=this.__event(_d);
}
},__checkListener:function(_e,_f){
var _10=this.__events[_e].listeners;
for(var i=0;i<_10.length;i++){
if(_10[i]==_f){
return true;
}
}
return false;
},dispatch:function(_12){
this.__dispatchQueue(_12);
},addListener:function(_13,obj){
this.__addEventType(_13);
if(!this.__checkListener(_13,obj)){
this.__events[_13].listeners.push(obj);
}
if(this.fireOnNewListener==true){
this.fireHistoryEvent(this.currentLocation);
this.fireOnNewListener=false;
}
},removeListener:function(_15,_16){
this.__removeListener(_15,_16);
},firstLoad:null,ieDebug:null,iframe:null,ignoreLocationChange:false,ieAtomicLocationChange:false,currentWaitTime:0,WAIT_TIME:200,IE_UPDATE:true,CurrentURI:null,LastURI:null,initialize:function(){
window.xpath=!!(document.evaluate);
if(window.ActiveXObject){
window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true;
}else{
if(document.childNodes&&!document.all&&!navigator.taintEnabled){
window.webkit=window[window.xpath?"webkit420":"webkit419"]=true;
}else{
if(document.getBoxObjectFor!=null){
window.gecko=true;
}
}
}
this.ieDebugLog=function(_17){
if(!this.ieDebug){
this.ieDebug=window.open("about:blank","IEDebug");
}
this.ieDebug.document.writeln(_17+"<br>");
};
this.create();
if(window.ie){
return;
}
},create:function(){
var _18=this.getCurrentLocation();
this.CurrentURI=_18;
if(window.ie&&!this.iframe){
this.iframe=document.createElement("iframe");
with(this.iframe.style){
position="absolute";
top="-10000px";
left="-10000px";
display="none";
}
this.iframe.src="blank.html";
document.body.appendChild(this.iframe);
this.WAIT_TIME=400;
}
if(window.webkit&&!this.form){
this.form=document.createElement("form");
this.form.setAttribute("method","get");
document.body.appendChild(this.form);
}
this.ignoreLocationChange=(window.ie)?true:false;
this.firstLoad=true;
var _19=this;
var _1a=function(){
_19.checkLocation();
};
setInterval(_1a,100);
},checkLocation:function(){
if(!window.ie&&this.ignoreLocationChange==true){
this.ignoreLocationChange=false;
return;
}
if(!window.ie&&this.ieAtomicLocationChange==true){
return;
}
var _1b=this.getCurrentLocation();
if(_1b==this.CurrentURI){
return;
}
this.ieAtomicLocationChange=true;
if(window.ie&&this.getIframeHash()!=_1b){
this.iframe.src="blank.html?"+_1b;
}else{
if(window.ie){
return;
}
}
this.CurrentURI=_1b;
this.ieAtomicLocationChange=false;
this.fireHistoryEvent(_1b);
},fireHistoryEvent:function(_1c){
this.dispatch({type:"onHistoryEvent",newURI:_1c});
},getIframeHash:function(){
var doc=this.iframe.contentWindow.document;
var _1e=new String(doc.location.search);
if(_1e.length==1&&_1e.charAt(0)=="?"){
_1e="";
}else{
if(_1e.length>=2&&_1e.charAt(0)=="?"){
_1e=_1e.substring(1);
}
}
return _1e;
},getCurrentLocation:function(){
return this.cleanHash(window.location.hash);
},cleanHash:function(_1f){
if(typeof _1f=="undefined"||_1f==""){
return "";
}
_1f=_1f.substring(1);
if(typeof _1f=="undefined"||_1f==""){
return "";
}
return _1f;
},setHash:function(uri){
if(window.webkit){
this.form.setAttribute("action","#"+uri);
this.form.submit();
}else{
window.location.hash=uri;
}
},add:function(uri){
var _22=this;
var _23=function(){
if(_22.currentWaitTime>0){
_22.currentWaitTime=_22.currentWaitTime-_22.WAIT_TIME;
}
var _24=_22.cleanHash(uri);
_22.dispatch({type:"onHistoryAdd",newURI:uri});
_22.ignoreLocationChange=true;
this.ieAtomicLocationChange=true;
_22.CurrentURI=uri;
if(window.webkit&&this.form){
this.form.setAttribute("action","#"+uri);
this.form.submit();
}else{
window.location.hash=uri;
}
if(window.ie){
_22.iframe.src="blank.html?"+uri;
}
this.ieAtomicLocationChange=false;
};
window.setTimeout(_23,this.currentWaitTime);
this.currentWaitTime=this.currentWaitTime+this.WAIT_TIME;
},iframeLoaded:function(_25){
if(this.ignoreLocationChange==true){
this.ignoreLocationChange=false;
return;
}
var _26=new String(_25.search);
if(_26.length==1&&_26.charAt(0)=="?"){
_26="";
}else{
if(_26.length>=2&&_26.charAt(0)=="?"){
_26=_26.substring(1);
}
}
if(this.pageLoadEvent!=true){
window.location.hash=_26;
}
this.fireHistoryEvent(_26);
},isFirstLoad:function(){
if(this.firstLoad==true){
return true;
}else{
return false;
}
}};


text:
package fr.inria.verveine.extractor.fortran.parser.ast;

public class ASTModuleNode extends ASTNode implements IProgramUnit // extends ScopingNode
{
    ASTModuleStmtNode moduleStmt;
    IASTListNode<IModuleBodyConstruct> moduleBody;
    ASTEndModuleStmtNode endModuleStmt;

    public ASTModuleNode() {
		setModuleBody( new ASTListNode<>());
	}

	public ASTModuleStmtNode getModuleStmt()
    {
        return this.moduleStmt;
    }

    public void setModuleStmt(ASTModuleStmtNode newValue)
    {
        this.moduleStmt = newValue;
        if (newValue != null) newValue.setParent(this);
    }

    public IASTListNode<IModuleBodyConstruct> getModuleBody()
    {
        return this.moduleBody;
    }

    public void setModuleBody(IASTListNode<IModuleBodyConstruct> newValue)
    {
        this.moduleBody = newValue;
        if (newValue != null) newValue.setParent(this);
    }

    public void addModuleBody(IModuleBodyConstruct newValue)
    {
    	this.moduleBody.add(newValue);
    }

    public ASTEndModuleStmtNode getEndModuleStmt()
    {
        return this.endModuleStmt;
    }

    public void setEndModuleStmt(ASTEndModuleStmtNode newValue)
    {
        this.endModuleStmt = newValue;
        if (newValue != null) newValue.setParent(this);
    }

	@Override
    public void accept(IASTVisitor visitor)
    {
        visitor.visitASTModuleNode(this);
//        visitor.visitIProgramUnit(this);
//        visitor.visitASTNode(this);
    }

    @Override
    protected int getNumASTFields()
    {
        return 3;
    }

    @Override
    protected IASTNode getASTField(int index)
    {
        switch (index)
        {
        case 0:  return this.moduleStmt;
        case 1:  return this.moduleBody;
        case 2:  return this.endModuleStmt;
        default: throw new IllegalArgumentException("Invalid index");
        }
    }

    @Override
    protected void setASTField(int index, IASTNode value)
    {
        switch (index)
        {
        case 0:  this.moduleStmt = (ASTModuleStmtNode)value; if (value != null) value.setParent(this); return;
        case 1:  this.moduleBody = (IASTListNode<IModuleBodyConstruct>)value; if (value != null) value.setParent(this); return;
        case 2: this.endModuleStmt = (ASTEndModuleStmtNode)value; if (value != null) value.setParent(this); return;
        default: throw new IllegalArgumentException("Invalid index");
        }
    }

	@Override
	public String basename() {
		return getModuleStmt().getModuleName().getText();
	}

	/**
	 * Get the Token representing the name of the Node
	 *
	 * @return
	 */
	public ASTToken getNameToken() {
		return this.getModuleStmt().getModuleName();
	}

	@Override
	public boolean isTopLevelNode() {
		return true;
	}

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
TarBuffer (Apache Ant API)
</TITLE>

<META NAME="date" CONTENT="2013-07-08">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.tools.tar

Class TarBuffer

java.lang.Object
  org.apache.tools.tar.TarBuffer

public class TarBuffer
extends java.lang.Object

The TarBuffer class implements the tar archive concept
 of a buffered input stream. This concept goes back to the
 days of blocked tape drives and special io devices. In the
 Java universe, the only real function that this class
 performs is to ensure that files have the correct "block"
 size, or other tars will complain.

 You should never have a need to access this class directly.
 TarBuffers are created by Tar IO Streams.

Field Summary

static int
DEFAULT_BLKSIZE

          Default block size

static int
DEFAULT_RCDSIZE

          Default record size

Constructor Summary

TarBuffer(java.io.InputStream inStream)

          Constructor for a TarBuffer on an input stream.

TarBuffer(java.io.InputStream inStream,
          int blockSize)

          Constructor for a TarBuffer on an input stream.

TarBuffer(java.io.InputStream inStream,
          int blockSize,
          int recordSize)

          Constructor for a TarBuffer on an input stream.

TarBuffer(java.io.OutputStream outStream)

          Constructor for a TarBuffer on an output stream.

TarBuffer(java.io.OutputStream outStream,
          int blockSize)

          Constructor for a TarBuffer on an output stream.

TarBuffer(java.io.OutputStream outStream,
          int blockSize,
          int recordSize)

          Constructor for a TarBuffer on an output stream.

Method Summary

 void
close()

          Close the TarBuffer.

 int
getBlockSize()

          Get the TAR Buffer's block size.

 int
getCurrentBlockNum()

          Get the current block number, zero based.

 int
getCurrentRecordNum()

          Get the current record number, within the current block, zero based.

 int
getRecordSize()

          Get the TAR Buffer's record size.

 boolean
isEOFRecord(byte[] record)

          Determine if an archive record indicate End of Archive.

 byte[]
readRecord()

          Read a record from the input stream and return the data.

 void
setDebug(boolean debug)

          Set the debugging flag for the buffer.

 void
skipRecord()

          Skip over a record on the input stream.

 void
writeRecord(byte[] record)

          Write an archive record to the archive.

 void
writeRecord(byte[] buf,
            int offset)

          Write an archive record to the archive, where the record may be
 inside of a larger array buffer.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_RCDSIZE

public static final int DEFAULT_RCDSIZE

Default record size

See Also:
Constant Field Values

DEFAULT_BLKSIZE

public static final int DEFAULT_BLKSIZE

Default block size

See Also:
Constant Field Values

Constructor Detail

TarBuffer

public TarBuffer(java.io.InputStream inStream)

Constructor for a TarBuffer on an input stream.

Parameters:
inStream - the input stream to use

TarBuffer

public TarBuffer(java.io.InputStream inStream,
                 int blockSize)

Constructor for a TarBuffer on an input stream.

Parameters:
inStream - the input stream to use
blockSize - the block size to use

TarBuffer

public TarBuffer(java.io.InputStream inStream,
                 int blockSize,
                 int recordSize)

Constructor for a TarBuffer on an input stream.

Parameters:
inStream - the input stream to use
blockSize - the block size to use
recordSize - the record size to use

TarBuffer

public TarBuffer(java.io.OutputStream outStream)

Constructor for a TarBuffer on an output stream.

Parameters:
outStream - the output stream to use

TarBuffer

public TarBuffer(java.io.OutputStream outStream,
                 int blockSize)

Constructor for a TarBuffer on an output stream.

Parameters:
outStream - the output stream to use
blockSize - the block size to use

TarBuffer

public TarBuffer(java.io.OutputStream outStream,
                 int blockSize,
                 int recordSize)

Constructor for a TarBuffer on an output stream.

Parameters:
outStream - the output stream to use
blockSize - the block size to use
recordSize - the record size to use

Method Detail

getBlockSize

public int getBlockSize()

Get the TAR Buffer's block size. Blocks consist of multiple records.

Returns:
the block size

getRecordSize

public int getRecordSize()

Get the TAR Buffer's record size.

Returns:
the record size

setDebug

public void setDebug(boolean debug)

Set the debugging flag for the buffer.

Parameters:
debug - If true, print debugging output.

isEOFRecord

public boolean isEOFRecord(byte[] record)

Determine if an archive record indicate End of Archive. End of
 archive is indicated by a record that consists entirely of null bytes.

Parameters:
record - The record data to check.

Returns:
true if the record data is an End of Archive

skipRecord

public void skipRecord()
                throws java.io.IOException

Skip over a record on the input stream.

Throws:

java.io.IOException - on error

readRecord

public byte[] readRecord()
                  throws java.io.IOException

Read a record from the input stream and return the data.

Returns:
The record data.

Throws:

java.io.IOException - on error

getCurrentBlockNum

public int getCurrentBlockNum()

Get the current block number, zero based.

Returns:
The current zero based block number.

getCurrentRecordNum

public int getCurrentRecordNum()

Get the current record number, within the current block, zero based.
 Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.

Returns:
The current zero based record number.

writeRecord

public void writeRecord(byte[] record)
                 throws java.io.IOException

Write an archive record to the archive.

Parameters:
record - The record data to write to the archive.

Throws:

java.io.IOException - on error

writeRecord

public void writeRecord(byte[] buf,
                        int offset)
                 throws java.io.IOException

Write an archive record to the archive, where the record may be
 inside of a larger array buffer. The buffer must be "offset plus
 record size" long.

Parameters:
buf - The buffer containing the record data to write.
offset - The offset of the record data within buf.

Throws:

java.io.IOException - on error

close

public void close()
           throws java.io.IOException

Close the TarBuffer. If this is an output buffer, also flush the
 current block before closing.

Throws:

java.io.IOException - on error

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
layout: post
title:  "Java 8 Streams API"
date:   2014-03-06 19:00
location: "T-Systems on site , Alessandro-Volta-Straße 11, 38440 Wolfsburg"
speaker: "Julia Dellnitz (Learnical GbR)"
categories: event
organizer: JUG
author: uwe
---
Versteckte oder emergente Anforderungen machen häufig den innovativen Charakter eines Softwareentwicklungsvorhabens aus,
entziehen sich aber ebenso häufig dem analytischen Zugang. Wir zeigen in dem Vortrag, wie Entwickler und Stakeholder
im Team eben diese Anforderungen mit Methoden und Materialien aus dem LEGO® Serious Play® entdecken und präzisieren
können. Der Ansatz bietet eine kreative Ergänzung zu analytischen Verfahren und unterstützt außerdem den
Teamentwicklungsprozess im Sinne agiler Ideen und Werte.


text:
package stroom.dashboard.expression.v1;

import java.util.function.Supplier;

abstract class Selector extends AbstractSingleChildGenerator {

    Selector(final Generator childGenerator) {
        super(childGenerator);
    }

    @Override
    public void set(final Val[] values) {
        childGenerator.set(values);
    }

    @Override
    public Val eval(final Supplier<ChildData> childDataSupplier) {
        Val val = null;
        if (childDataSupplier != null) {
            final ChildData childData = childDataSupplier.get();
            if (childData != null) {
                val = select(childData);
            }
        }

        if (val == null) {
            val = childGenerator.eval(childDataSupplier);
        }

        return val;
    }

    Val select(ChildData childData) {
        return null;
    }
}


text:
const port = process.env.PORT || 3000;
const Hapi = require('hapi');
const vision = require('vision');
const inert = require('inert');
const pug = require('pug');
const web = require('./web/routes');
const ViewData = require('./helpers/viewData.js');

const server = new Hapi.Server({ port });

const errorHandler = (request, reply) => {
  const { response } = request;
  const error = response;
  if (!response.isBoom) {
    return reply.continue;
  }
  if (process.env.NODE_VERBOSE !== 'false') {
    console.log(error);
  }
  const viewData = ViewData.getSyncData('Index', 'ho');
  switch (error.output.statusCode) {
    case 401:
      return reply.view('401', viewData);
    case 404:
      return reply.view('404', viewData);
    default:
      return reply.view('error', viewData);
  }
};

server.ext('onPreResponse', errorHandler);
server.route(web);

// Start the server
async function start() {
  try {
    await server.register([vision, inert]);
    server.views({
      relativeTo: __dirname,
      path: 'views',
      engines: {
        pug,
      },
    });
    /* Ennable all public files */
    server.route({
      method: 'GET',
      path: '/{public*}',
      handler: {
        directory: {
          path: 'public',
          listing: false,
        },
      },
    });
    /* Serve Favicon */
    server.route({
      method: 'GET',
      path: '/favicon.ico',
      handler: {
        file: 'favicon.ico',
      },
    });

    await server.start();
  } catch (err) {
    console.log(err);
    process.exit(1);
  }
  console.log('Server running at:', server.info.uri);
}
start();


text:
package org.apache.usergrid.cassandra;

/** @author zznate */
public interface DataLoader {

    /** Free-form execution */
    void execute();
}


text:
using LinqInfer.Data.Pipes;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace LinqInfer.Utility
{
    public static class LinqExtensions
    {
        public static TCol Add<TCol, TInput>(this TCol collection, IEnumerable<TInput> items)
            where TCol : ICollection<TInput>
        {
            foreach (var item in items) collection.Add(item);
            return collection;
        }

        public static IEnumerable<O> SelectIf<T, O>(this IEnumerable<T> values, Func<IEnumerable<T>, bool> condition, Func<T, O> selector)
        {
            if (!condition(values))
            {
                return Enumerable.Empty<O>();
            }

            return values.Select(selector);
        }

        /// <summary>
        /// Returns null if zero or more than one element exists
        /// </summary>
        public static T SingleOrNull<T>(this IEnumerable<T> values) where T : class
        {
            T value = null;
            var i = 0;

            foreach (var item in values)
            {
                value = item;
                i++;

                if (i > 1) break;
            }

            return i == 1 ? value : null;
        }

        public static T[] ToArray<T>(this IList<T> values, T[] buffer)
        {
            for (var i = 0; i < buffer.Length; i++)
            {
                buffer[i++] = values[i];
                if (i == values.Count) break;
            }

            return buffer;
        }

        public static T[] ToArray<T>(this IEnumerable<T> values, T[] buffer)
        {
            var i = 0;

            foreach (var item in values)
            {
                buffer[i++] = item;
                if (i == buffer.Length) break;
            }

            return buffer;
        }

        public static T[] ToArray<T>(this IEnumerable<T> values, int size) => values.ToArray(new T[size]);

        /// <summary>
        /// Returns true if all members of an enumeration
        /// satisfy a predicate function which takes an
        /// item index and an item.
        /// e.g. {'a', 'b', 'c'}.All((n, x) => x == (char)((byte)'a' + n))
        /// </summary>
        public static bool All<T>(this IEnumerable<T> items, Func<int, T, bool> predicate)
        {
            int i = 0;
            foreach (var x in items)
            {
                if (!predicate(i++, x)) return false;
            }
            return true;
        }

        /// <summary>
        /// Returns true if all members of an enumeration
        /// satisfy a predicate function which takes an
        /// item index and an item.
        /// e.g. {'a', 'b', 'c'}.All((n, x) => x == (char)((byte)'a' + n))
        /// </summary>
        public static bool AllEqual<T>(this IEnumerable<T> items, Func<int, T> comparisonFunc)
        {
            int i = 0;
            foreach (var x in items)
            {
                if (!comparisonFunc(i++).Equals(x)) return false;
            }
            return true;
        }

        /// <summary>
        /// Converts an enumeration into an async enumerator
        /// </summary>
        public static ITransformingAsyncBatchSource<T> AsAsyncEnumerator<T>(this IEnumerable<T> values, int batchSize = 1000)
        {
            return From.Enumerable(values, batchSize);
        }

        /// <summary>
        /// Converts an enumeration of batch loading tasks
        /// into an async enumerable object
        /// </summary>
        /// <typeparam name="T">The type of each item in a batch of data</typeparam>
        /// <param name="batchLoader">An enumeration of tasks to load data</param>
        public static ITransformingAsyncBatchSource<T> AsAsyncEnumerator<T>(this IEnumerable<Task<IList<T>>> batchLoader)
        {
            return From.EnumerableTasks(batchLoader);
        }

        /// <summary>
        /// Iterates over an enumeration of values and applies a function returning the results of the function
        /// </summary>
        public static IList<O> ForEach<I, O>(this IEnumerable<I> values, Func<I, O> func)
        {
            var len = values is IList<I> list ? list.Count : 16;
            var results = new List<O>(len);

            foreach (var v in values)
            {
                results.Add(func(v));
            }

            return results;
        }

        public static IEnumerable<(T1 a, T2 b)> Zip<T1, T2>(this IEnumerable<T1> items1, IEnumerable<T2> items2)
        {
            return items1.Zip(items2, (x, y) => (x, y));
        }

        /// <summary>
        /// Zips together two enumerables, returning when the end of both have been reached. If one enumerable contains less items
        /// than the other then the default value is returned. E.g.
        /// [1,2,3].ZipAll([1,2], (x,y) => [x,y]) = [[1,1],[2,2],[3,0]]
        /// OR using references:
        /// ["1","2","3"].ZipAll(["1","2"], (x,y) => [x,y]) = [["1","1"],["2","2"],["3",null]]
        /// </summary>
        public static IEnumerable<O> ZipAll<T1, T2, O>(this IEnumerable<T1> items1, IEnumerable<T2> items2, Func<T1, T2, O> resultSelector)
        {
            var e1 = items1.GetEnumerator();
            var e2 = items2.GetEnumerator();
            var e1Cont = true;
            var e2Cont = true;

            T1 item1;
            T2 item2;

            try
            {
                while (e1Cont || e2Cont)
                {
                    if (e1Cont)
                    {
                        e1Cont = e1.MoveNext();
                        item1 = e1Cont ? e1.Current : default(T1);
                    }
                    else
                    {
                        item1 = default(T1);
                    }

                    if (e2Cont)
                    {
                        e2Cont = e2.MoveNext();
                        item2 = e2Cont ? e2.Current : default(T2);
                    }
                    else
                    {
                        item2 = default(T2);
                    }

                    if (e1Cont || e2Cont) yield return resultSelector(item1, item2);
                }
            }
            finally
            {
                e1.Dispose();
                e2.Dispose();
            }
        }

        /// <summary>
        /// Returns a distinct list of items using the comparison functions
        /// </summary>
        /// <typeparam name="T">The type of item</typeparam>
        /// <param name="compareFunc">A function returning true is two objects are considered equal</param>
        /// <param name="hashCodeFunc">A function returning a hashcode (default will be used if not supplied)</param>
        /// <returns>A distinct list of T</returns>
        public static IEnumerable<T> Distinct<T>(this IEnumerable<T> items, Func<T, T, bool> compareFunc, Func<T, int> hashCodeFunc = null)
        {
            var comparer = CreateComparer(compareFunc, hashCodeFunc);

            return items.Distinct(comparer);
        }

        /// <summary>
        /// Creates an equality comparer from a comparing function.
        /// If the type is class then a null value will always compare as false.
        /// </summary>
        /// <typeparam name="T">The type of item</typeparam>
        /// <param name="compareFunc">A function returning true is two objects are considered equal</param>
        /// <param name="hashCodeFunc">A function returning a hashcode (default will be used if not supplied)</param>
        /// <returns>An <see cref="IEqualityComparer{T}"/> instance</returns>
        public static IEqualityComparer<T> CreateComparer<T>(Func<T, T, bool> compareFunc, Func<T, int> hashCodeFunc = null)
        {
            return new DynamicEqualityComparer<T>(compareFunc, hashCodeFunc);
        }

        /// <summary>
        /// Splits an enumeration into subsets
        /// using a delimiting function.
        /// </summary>
        /// <typeparam name="T">The type of item</typeparam>
        /// <param name="items">An enumerable sequence of items</param>
        /// <param name="delimitingFunction">A function which will return true value to indicate a delimiting item</param>
        /// <returns>A enumerable of enumerable items</returns>
        public static IEnumerable<IEnumerable<T>> Delimit<T>(this IEnumerable<T> items, Func<T, bool> delimitingFunction)
        {
            Contract.Assert(delimitingFunction != null);

            var batch = new List<T>();

            foreach (var item in items)
            {
                if (delimitingFunction(item))
                {
                    yield return batch.ToArray();
                    batch.Clear();
                }
                batch.Add(item);
            }

            if (batch.Any()) yield return batch;
        }

        /// <summary>
        /// Orders an enumeration of values randomly.
        /// </summary>
        /// <param name="source">The source items</param>
        /// <returns></returns>
        public static IOrderedEnumerable<T> RandomOrder<T>(this IEnumerable<T> source)
        {
            return source.OrderBy(_ => Guid.NewGuid());
        }

        /// <summary>
        /// Inverts an expression e.g. not(exp).
        /// </summary>
        public static Expression<Func<T, bool>> Invert<T>(this Expression<Func<T, bool>> exp)
        {
            var notExp = Expression.Not(exp.Body);

            return Expression.Lambda<Func<T, bool>>(notExp, exp.Parameters);
        }

        /// <summary>
        /// Joins two expressions with an OR.
        /// </summary>
        public static Expression<Func<T, bool>> DisjunctiveJoin<T>(this Expression<Func<T, bool>> exp1, Expression<Func<T, bool>> exp2)
        {
            var exp2p = UpdateParameter(exp2, exp1.Parameters.First());
            var andExp = Expression.OrElse(exp1.Body, exp2p.Body);

            return Expression.Lambda<Func<T, bool>>(andExp, exp1.Parameters);
        }

        /// <summary>
        /// Joins two expressions with an AND.
        /// </summary>
        public static Expression<Func<T, bool>> ConjunctiveJoin<T>(this Expression<Func<T, bool>> exp1, Expression<Func<T, bool>> exp2)
        {
            var exp2p = UpdateParameter(exp2, exp1.Parameters.First());
            var andExp = Expression.AndAlso(exp1.Body, exp2p.Body);

            return Expression.Lambda<Func<T, bool>>(andExp, exp1.Parameters);
        }

#if NET_STD
        /// <summary>
        /// Chunks up a queryable source into batches.
        /// </summary>
        public static IEnumerable<IEnumerable<T>> Chunk<T>(this IQueryable<T> source, int size = 1000)
        {
            Contract.Requires(size > 0);

            IList <T> batch;
            int next = 0;

            while (true)
            {
                batch = source.Skip(next).Take(size).ToList();

                if (batch.Any()) yield return batch;

                next += size;

                if (batch.Count < size)
                {
                    break;
                }
            }
        }
#endif

        internal static string GetPropertyName<TSource, TField>(Expression<Func<TSource, TField>> propertyExpression)
        {
            return (propertyExpression.Body as MemberExpression ?? ((UnaryExpression)propertyExpression.Body).Operand as MemberExpression).Member.Name;
        }

        internal static string GetPropertyName<TField>(Expression<Func<TField>> propertyExpression)
        {
            return (propertyExpression.Body as MemberExpression ?? ((UnaryExpression)propertyExpression.Body).Operand as MemberExpression).Member.Name;
        }

        static Expression<Func<T, bool>> UpdateParameter<T>(
            Expression<Func<T, bool>> expr,
            ParameterExpression newParameter)
        {
            var visitor = new ParameterUpdateVisitor(expr.Parameters[0], newParameter);
            var body = visitor.Visit(expr.Body);

            return Expression.Lambda<Func<T, bool>>(body, newParameter);
        }

        class ParameterUpdateVisitor : ExpressionVisitor
        {
            ParameterExpression _oldParameter;
            ParameterExpression _newParameter;

            public ParameterUpdateVisitor(ParameterExpression oldParameter, ParameterExpression newParameter)
            {
                _oldParameter = oldParameter;
                _newParameter = newParameter;
            }

            protected override Expression VisitParameter(ParameterExpression node)
            {
                if (ReferenceEquals(node, _oldParameter))
                    return _newParameter;

                return base.VisitParameter(node);
            }
        }
    }
}


text:
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 __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
import { Injectable, Inject, Optional } from 'angular2/core';
import { isBlank } from 'angular2/src/facade/lang';
import { BaseException } from 'angular2/src/facade/exceptions';
import { PlatformLocation } from './platform_location';
import { LocationStrategy, APP_BASE_HREF } from './location_strategy';
import { Location } from './location';
/**
 * `PathLocationStrategy` is a {@link LocationStrategy} used to configure the
 * {@link Location} service to represent its state in the
 * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
 * browser's URL.
 *
 * `PathLocationStrategy` is the default binding for {@link LocationStrategy}
 * provided in {@link ROUTER_PROVIDERS}.
 *
 * If you're using `PathLocationStrategy`, you must provide a provider for
 * {@link APP_BASE_HREF} to a string representing the URL prefix that should
 * be preserved when generating and recognizing URLs.
 *
 * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call
 * `location.go('/foo')`, the browser's URL will become
 * `example.com/my/app/foo`.
 *
 * ### Example
 *
 * ```
 * import {Component, provide} from 'angular2/core';
 * import {bootstrap} from 'angular2/platform/browser';
 * import {
 *   Location,
 *   APP_BASE_HREF
 * } from 'angular2/platform/common';
 * import {
 *   ROUTER_DIRECTIVES,
 *   ROUTER_PROVIDERS,
 *   RouteConfig
 * } from 'angular2/router';
 *
 * @Component({directives: [ROUTER_DIRECTIVES]})
 * @RouteConfig([
 *  {...},
 * ])
 * class AppCmp {
 *   constructor(location: Location) {
 *     location.go('/foo');
 *   }
 * }
 *
 * bootstrap(AppCmp, [
 *   ROUTER_PROVIDERS, // includes binding to PathLocationStrategy
 *   provide(APP_BASE_HREF, {useValue: '/my/app'})
 * ]);
 * ```
 */
export let PathLocationStrategy = class PathLocationStrategy extends LocationStrategy {
    constructor(_platformLocation, href) {
        super();
        this._platformLocation = _platformLocation;
        if (isBlank(href)) {
            href = this._platformLocation.getBaseHrefFromDOM();
        }
        if (isBlank(href)) {
            throw new BaseException(`No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`);
        }
        this._baseHref = href;
    }
    onPopState(fn) {
        this._platformLocation.onPopState(fn);
        this._platformLocation.onHashChange(fn);
    }
    getBaseHref() { return this._baseHref; }
    prepareExternalUrl(internal) {
        return Location.joinWithSlash(this._baseHref, internal);
    }
    path() {
        return this._platformLocation.pathname +
            Location.normalizeQueryParams(this._platformLocation.search);
    }
    pushState(state, title, url, queryParams) {
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
        this._platformLocation.pushState(state, title, externalUrl);
    }
    replaceState(state, title, url, queryParams) {
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
        this._platformLocation.replaceState(state, title, externalUrl);
    }
    forward() { this._platformLocation.forward(); }
    back() { this._platformLocation.back(); }
};
PathLocationStrategy = __decorate([
    Injectable(),
    __param(1, Optional()),
    __param(1, Inject(APP_BASE_HREF)),
    __metadata('design:paramtypes', [PlatformLocation, String])
], PathLocationStrategy);


text:
source "$(dirname "$0")"/common.sh

function run_test {
    PARALLELISM=$1
    TEST_JOB_JAR="${END_TO_END_DIR}/flink-state-evolution-test/target/StatefulStreamingJob.jar"
    BASE_DIR="${TEST_DATA_DIR}/flink-state-evolution-test"
    CHECKPOINT_DIR="file://${BASE_DIR}/checkpoints/"
    SAVEPOINT_PARENT_DIR="file://${BASE_DIR}/savepoints/"

    SAVEPOINT_DIR="file:///${END_TO_END_DIR}/flink-state-evolution-test/savepoints/1.6/"

    set_config_key "state.backend.fs.memory-threshold" 1048576
    start_cluster

    # restart the job from the savepoint from Flink 1.6
    JOB_ID=$($FLINK_DIR/bin/flink run -s $SAVEPOINT_DIR -p $PARALLELISM -d $TEST_JOB_JAR --checkpoint.dir $CHECKPOINT_DIR \
        | grep "Job has been submitted with JobID" | sed 's/.* //g')

    wait_job_running ${JOB_ID}
    wait_num_checkpoints ${JOB_ID} 3

    SECOND_SAVEPOINT_DIR=$($FLINK_DIR/bin/flink cancel -s $SAVEPOINT_PARENT_DIR $JOB_ID | grep "Savepoint stored in file" | sed 's/.* //g' | sed 's/\.$//')

    # restart the job from the savepoint from Flink 1.7
    FINAL_JOB_ID=$($FLINK_DIR/bin/flink run -s $SECOND_SAVEPOINT_DIR -p $PARALLELISM -d $TEST_JOB_JAR --checkpoint.dir $CHECKPOINT_DIR \
        | grep "Job has been submitted with JobID" | sed 's/.* //g')

    wait_job_running ${FINAL_JOB_ID}
    wait_num_checkpoints ${FINAL_JOB_ID} 3

    cancel_job ${FINAL_JOB_ID}
}

run_test 1


text:
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Building a sensing prosthetic with the Raspberry Pi)
[#]: via: (https://opensource.com/article/20/4/raspberry-pi-sensebreast)
[#]: author: (Kathy Reid https://opensource.com/users/kathyreid)

Building a sensing prosthetic with the Raspberry Pi
======
SenseBreast is an early prototype of a sensing mastectomy prosthetic
based on open hardware.
![Open source doctor.][1]

_Content advisory: this article contains frank discussions of breast cancer._

What's the first question you ask your surgeon when you're discussing reconstruction options after breast cancer?

"How many USB ports can you give me?" is probably not the one that comes to mind for many people!

Although the remark was said jokingly, it sparked a thread that would ultimately become [SenseBreast][2]—an early prototype of a sensing mastectomy prosthetic, based on open hardware.

### How did SenseBreast come about?

All technology has a history—an origin story of experimentation, missteps, successes, setbacks, and breakthroughs. SenseBreast is no different. SenseBreast was developed as a term project for the Masters of Applied Cybernetics—a highly selective course at the Australian National University's [3A Institute][3]. The mission of the 3Ai is to bring artificial intelligence and cyber-physical systems safely, responsibly, and sustainably to scale. The purpose of the assignment was to explore the nexus between the electronic, virtual world, and the physical, tactile world.

### What is SenseBreast?

SenseBreast combines two distinct elements: a cyber component—electronics, sensors, and storage for gathering data, and a physical component—a breast form designed to be worn inside a mastectomy bra. SenseBreast is a rudimentary cyber-physical system. In cyber-physical systems, physical and software components are deeply intertwined and interact in different ways depending on context.

The SenseBreast draws on a rich heritage of open source hardware and software. Based on the Raspberry Pi 3B+, it uses the Debian-flavored Raspbian operating system, Python to interact with the onboard sensors, and d3.js to visualize the data that the sensors generate.

Early versions of the SenseBreast used the SenseHAT, but in the true spirit of open source collaboration, I partnered with Australian open source luminary Jon Oxer to develop a custom SenseBreast board. This contains an inertial motion unit (IMU) and temperature, humidity, and pressure sensors, just like the SenseHAT, but in addition, it contains the BME680 volatile gas sensor and a breakout for a heart rate monitor.

![SenseBreast open hardware board developed by Jon Oxer and Kathy Reid][4]

SenseBreast is wearable tech, so the physical form of the cyber-physical system is also important. Factors like comfort, texture, and fit in clothing are important in the design of wearables because technology isn't better unless it's better for people! The early attempts at building a housing for SenseBreast were spectacular failures; in fact, the very first iteration was put together using acrylic render and linen cloth, and held together with paper clips—in true hacker style! It wasn't comfortable to wear at all, but it served as a proof point for further exploration.

![First attempt at creating a breast form using acrylic render covered in linen cloth][5]

Later iterations used a different approach. This involved taking a cast of a breast, using quick-dry silicone supported by a plaster cast. The resulting mold was then used with slow-setting silicone to create a true-to-life shape. A recess was carved into the form to house the electronic components, and an additional silicone layer was added to protect the wearer's skin from contact with electronics.

### What did we learn from SenseBreast?

The key learning from SenseBreast is that data is partial. It only tells part of a story. It can be misleading and untrustworthy, which makes the decisions based on that data unreliable too. For example, the sensor data gathered by SenseBreast was affected by how hard the CPU was working. The graph below plots a sequence of 5 minutes of data from SenseBreast, just after the device has booted. You can see that the temperature decreases over time; this is because the CPU has to work harder as the Raspberry Pi boots, and then cools down after the boot operations are completed.

![Data visualisation of the readings in SenseBreast using the d3.js library][6]

These sorts of learnings have implications on a broader scale.

What if the SenseBreast were not an open source device, but a commercial wearable that stored data about me? What if part of the business model of that company was to sell the data that was harvested? What if my health insurer had access to that data? Or prospective employers? Now, more than ever, it's important that we have private, open solutions for sensing data about ourselves.

### What's next for the SenseBreast project?

The SenseBreast is a very early prototype, but it has the potential to develop through many different arcs. It could be used to assess range of movement post-surgery, to research how different garments and fabrics adjust to temperature and humidity, and to identify correlations between ambient air pressure and conditions such as lymphoedema. The path SenseBreast takes will be dependent on the passion, needs, and dedication of the incredible global open source community.

You can learn more about SenseBreast at [https://sensebreast.org][2] and see my presentation at [linux.conf.au][7] 2020 [here][8].

The code for SenseBreast is available on [GitHub][9].

Health IT has been surprisingly unwilling to deeply support open source software. Despite the huge...

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

via: https://opensource.com/article/20/4/raspberry-pi-sensebreast

作者:[Kathy Reid][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

[a]: https://opensource.com/users/kathyreid
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcedoctor.png?itok=fk79NwpC (Open source doctor.)
[2]: https://sensebreast.org/
[3]: https://3ainstitute.cecs.anu.edu.au/
[4]: https://opensource.com/sites/default/files/uploads/49427571178_bb5df37c3a_c.jpg (SenseBreast open hardware board developed by Jon Oxer and Kathy Reid)
[5]: https://opensource.com/sites/default/files/uploads/49641040471_6d0cc91619_c.jpg (First attempt at creating a breast form using acrylic render covered in linen cloth)
[6]: https://opensource.com/sites/default/files/uploads/49640513813_5a7d63803a_c.jpg (Data visualisation of the readings in SenseBreast using the d3.js library)
[7]: http://linux.conf.au
[8]: https://www.youtube.com/watch?v=G3QfZ11DCpc.
[9]: https://github.com/KathyReid/sensebreast


text:
from functools import wraps
from threading import Thread

from flask import flash, redirect, url_for, abort
from flask_login import current_user

def async(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        thread = Thread(target=f, args=args, kwargs=kwargs)
        thread.start()
    return wrapper

def check_confirmed(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        if not getattr(current_user, 'confirmed', False):
            flash('Please activate your account!', 'warning')
            return redirect(url_for('main.index'))
        return f(*args, **kwargs)
    return wrapper

def success_or_abort(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        result = f(*args, **kwargs)
        if result is None:
            abort(400)
        return result
    return wrapper


text:
describe('csResource', function() {
  var csResource;
  var $q;
  var $httpBackend;
  var csDataStore;
  var User;

  // extend function: TODO: should be part of cloudstorm? More like part of the resource generator service, which can turn JSON files into angular resources...
  const extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty;
  const registerUserResource = function () {
    User = (function(superClass) {
      extend(User, superClass);

      function User() {
        return User.__super__.constructor.apply(this, arguments);
      }

      User.endpoint = 'api/v1/users';
      User.base_url = '/base';

      User.descriptor = {
        type: 'users',
        name: 'User',
        fields: [
          {
            attribute: 'email',
            label: 'email',
            type: 'string',
            cardinality: 'one',
            required: false,
            read_only: false
          }
        ],
        display: {
          name: 'email'
        }
      };

      ResourceService.register('users', User)

      return User;

    })(csResource);
  };
  const users = {
    data: [
      {
        attributes: {
          email: 'test1',
          id: 1
        },
        id: '1',
        links: {
          self: {
            href: '/api/v1/users/1'
          }
        },
        type: 'users'
      },
      {
        attributes: {
          email: 'test2',
          id: 2
        },
        id: '2',
        links: {
          self: {
            href: '/api/v1/users/2'
          }
        },
        type: 'users'
      }
    ]
  }
  const scopedUsers = {
    data: [
      {
        attributes: {
          email: 'test1',
          id: 1
        },
        id: '1',
        links: {
          self: {
            href: '/api/v1/users/1'
          }
        },
        type: 'users'
      }
    ]
  }

  beforeEach(angular.mock.module('cloudStorm.resourceService'));
  beforeEach(angular.mock.module('cloudStorm.restApi'));
  beforeEach(angular.mock.module('cloudStorm.dataStore'));
  beforeEach(angular.mock.module('cloudStorm.localizationProvider'));
  beforeEach(angular.mock.module('cloudStorm.settings'));
  beforeEach(angular.mock.module('cloudStorm.resource'));

  beforeEach(inject(function (_csResource_, _ResourceService_, _$q_, _$httpBackend_, _csDataStore_) {
    csResource = _csResource_;
    $q = _$q_;
    $httpBackend = _$httpBackend_;
    csDataStore = _csDataStore_;
    ResourceService = _ResourceService_;
  }));

  it('should exist', function() {
    expect(csResource).toBeDefined();
  });

  it('should return a list of resources for "$index" - global datastore', function() {
    registerUserResource();
    var data;
    var deferred = $q.defer();
    var promise = deferred.promise;
    promise.then(function (response) {
      data = response;
    });

    $httpBackend.whenGET('/base/api/v1/users').respond(users);

    // get index from User resource
    User.$index(undefined, {datastore: csDataStore.global()}).then(function(response) {
      deferred.resolve(response);
    });

    // flush is required for the promise to be resolved
    $httpBackend.flush();

    // check if users are retrieved
    expect(data[0].id).toEqual('1');
    expect(data[0].type).toEqual('users');
    expect(data[0].attributes).toEqual({email: 'test1', id: 1});

    expect(data[1].id).toEqual('2');
    expect(data[1].type).toEqual('users');
    expect(data[1].attributes).toEqual({email: 'test2', id: 2});

    // Users should be available in global datastore
    expect(data[0]).toEqual(csDataStore.global().get('users', 1));
    expect(data[1]).toEqual(csDataStore.global().get('users', 2));
  });

  it('should return a list of resources for "$index" ', function() {
    registerUserResource();
    var data;
    var deferred = $q.defer();
    var promise = deferred.promise;
    promise.then(function (response) {
      data = response;
    });

    $httpBackend.expectGET('/base/api/v1/users/only-the-first?a=n&include=*');
    $httpBackend.whenGET('/base/api/v1/users/only-the-first?a=n&include=*').respond(scopedUsers);

    // get index from User resource
    User.$index({include: '*'}, {scope: 'only-the-first', query: {a: 'n'}}).then(function(response) {
      deferred.resolve(response);
    });

    // flush is required for the promise to be resolved
    $httpBackend.flush();

    // check if users are retrieved
    expect(data[0].id).toEqual('1');
    expect(data[0].type).toEqual('users');
    expect(data[0].attributes).toEqual({email: 'test1', id: 1});
    expect(data[1]).not.toBeDefined();
  });

});


text:
namespace sw
{
	struct Vector;
	struct Matrix;

	struct Point
	{
		Point();
		Point(const int i);
		Point(const Point &P);
		Point(const Vector &v);
		Point(float Px, float Py, float Pz);

		Point &operator=(const Point &P);

		union
		{
			float p[3];

			struct
			{
				float x;
				float y;
				float z;
			};
		};

		float &operator[](int i);
		float &operator()(int i);

		const float &operator[](int i) const;
		const float &operator()(int i) const;

		Point &operator+=(const Vector &v);
		Point &operator-=(const Vector &v);

		friend Point operator+(const Point &P, const Vector &v);
		friend Point operator-(const Point &P, const Vector &v);

		friend Vector operator-(const Point &P, const Point &Q);

		friend Point operator*(const Matrix &M, const Point& P);
		friend Point operator*(const Point &P, const Matrix &M);
		friend Point &operator*=(Point &P, const Matrix &M);

		float d(const Point &P) const;   // Distance between two points
		float d2(const Point &P) const;   // Squared distance between two points

		static float d(const Point &P, const Point &Q);   // Distance between two points
		static float d2(const Point &P, const Point &Q);   // Squared distance between two points
	};
}

#include "Vector.hpp"

namespace sw
{
	inline Point::Point()
	{
	}

	inline Point::Point(const int i)
	{
		const float s = (float)i;

		x = s;
		y = s;
		z = s;
	}

	inline Point::Point(const Point &P)
	{
		x = P.x;
		y = P.y;
		z = P.z;
	}

	inline Point::Point(const Vector &v)
	{
		x = v.x;
		y = v.y;
		z = v.z;
	}

	inline Point::Point(float P_x, float P_y, float P_z)
	{
		x = P_x;
		y = P_y;
		z = P_z;
	}

	inline Point &Point::operator=(const Point &P)
	{
		x = P.x;
		y = P.y;
		z = P.z;

		return *this;
	}

	inline float &Point::operator()(int i)
	{
		return p[i];
	}

	inline float &Point::operator[](int i)
	{
		return p[i];
	}

	inline const float &Point::operator()(int i) const
	{
		return p[i];
	}

	inline const float &Point::operator[](int i) const
	{
		return p[i];
	}
}

#endif   // Point_hpp


text:
/**
 *  @file DenseMatrix.cpp
 */

// Copyright 2001  California Institute of Technology

#include "cantera/numerics/ctlapack.h"
#include "cantera/numerics/DenseMatrix.h"
#include "cantera/base/stringUtils.h"

namespace Cantera
{

DenseMatrix::DenseMatrix() :
    m_useReturnErrorCode(0),
    m_printLevel(0)
{
}

DenseMatrix::DenseMatrix(size_t n, size_t m, doublereal v) :
    Array2D(n, m, v),
    m_useReturnErrorCode(0),
    m_printLevel(0)
{
    m_ipiv.resize(std::max(n, m));
    m_colPts.resize(m);
    if (!m_data.empty()) {
        for (size_t j = 0; j < m; j++) {
            m_colPts[j] = &m_data[m_nrows*j];
        }
    }
}

DenseMatrix::DenseMatrix(const DenseMatrix& y) :
    Array2D(y),
    m_useReturnErrorCode(0),
    m_printLevel(0)
{
    m_ipiv = y.ipiv();
    m_colPts.resize(m_ncols);
    if (!m_data.empty()) {
        for (size_t j = 0; j < m_ncols; j++) {
            m_colPts[j] = &m_data[m_nrows*j];
        }
    }
}

DenseMatrix& DenseMatrix::operator=(const DenseMatrix& y)
{
    if (&y == this) {
        return *this;
    }
    Array2D::operator=(y);
    m_ipiv = y.ipiv();
    m_colPts.resize(m_ncols);
    for (size_t j = 0; j < m_ncols; j++) {
        m_colPts[j] = &m_data[m_nrows*j];
    }
    m_useReturnErrorCode = y.m_useReturnErrorCode;
    m_printLevel = y.m_printLevel;
    return *this;
}

void DenseMatrix::resize(size_t n, size_t m, doublereal v)
{
    Array2D::resize(n,m,v);
    m_ipiv.resize(std::max(n,m));
    m_colPts.resize(m_ncols);
    if (!m_data.empty()) {
        for (size_t j = 0; j < m_ncols; j++) {
            m_colPts[j] = &m_data[m_nrows*j];
        }
    }
}

doublereal* const* DenseMatrix::colPts()
{
    return &m_colPts[0];
}

const doublereal* const* DenseMatrix::const_colPts() const
{
    return &m_colPts[0];
}

void DenseMatrix::mult(const double* b, double* prod) const
{
    ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose,
             static_cast<int>(nRows()),
             static_cast<int>(nRows()), 1.0, ptrColumn(0),
             static_cast<int>(nRows()), b, 1, 0.0, prod, 1);
}

void DenseMatrix::mult(const DenseMatrix& B, DenseMatrix& prod) const
{
    if (m_ncols != B.nColumns() || m_nrows != B.nRows() || m_ncols != m_nrows || m_ncols != prod.nColumns() || m_nrows != prod.nColumns()) {
        throw CanteraError("mult(const DenseMatrix &B, DenseMatrix &prod)",
                           "Cannot multiply matrices that are not square and/or not the same size.");
    }
    const doublereal* const* bcols = B.const_colPts();
    doublereal* const* prodcols = prod.colPts();
    for (size_t col=0; col < m_ncols; ++col) {
        // Loop over ncols multiplying A*column of B and storing in
        // corresponding prod column
        mult(bcols[col], prodcols[col]);
    }
}

void DenseMatrix::leftMult(const double* const b, double* const prod) const
{
    size_t nc = nColumns();
    size_t nr = nRows();
    double sum = 0.0;
    for (size_t n = 0; n < nc; n++) {
        sum = 0.0;
        for (size_t i = 0; i < nr; i++) {
            sum += value(i,n)*b[i];
        }
        prod[n] = sum;
    }
}

vector_int& DenseMatrix::ipiv()
{
    return m_ipiv;
}

int solve(DenseMatrix& A, double* b, size_t nrhs, size_t ldb)
{
    int info = 0;
    if (A.nColumns() != A.nRows()) {
        if (A.m_printLevel) {
            writelogf("solve(DenseMatrix& A, double* b): Can only solve a square matrix\n");
        }
        throw CanteraError("solve(DenseMatrix& A, double* b)", "Can only solve a square matrix");
    }
    ct_dgetrf(A.nRows(), A.nColumns(), A.ptrColumn(0),
              A.nRows(), &A.ipiv()[0], info);
    if (info > 0) {
        if (A.m_printLevel) {
            writelogf("solve(DenseMatrix& A, double* b): DGETRF returned INFO = %d   U(i,i) is exactly zero. The factorization has"
                      " been completed, but the factor U is exactly singular, and division by zero will occur if "
                      "it is used to solve a system of equations.\n", info);
        }
        if (!A.m_useReturnErrorCode) {
            throw CanteraError("solve(DenseMatrix& A, double* b)",
                                "DGETRF returned INFO = {}. U(i,i) is exactly zero. The factorization has"
                                " been completed, but the factor U is exactly singular, and division by zero will occur if "
                                "it is used to solve a system of equations.", info);
        }
        return info;
    } else if (info < 0) {
        if (A.m_printLevel) {
            writelogf("solve(DenseMatrix& A, double* b): DGETRF returned INFO = %d. The argument i has an illegal value\n", info);
        }

        throw CanteraError("solve(DenseMatrix& A, double* b)",
                           "DGETRF returned INFO = {}. The argument i has an illegal value", info);
    }

    if (ldb == 0) {
        ldb = A.nColumns();
    }
    ct_dgetrs(ctlapack::NoTranspose, A.nRows(), nrhs, A.ptrColumn(0),
              A.nRows(), &A.ipiv()[0], b, ldb, info);
    if (info != 0) {
        if (A.m_printLevel) {
            writelogf("solve(DenseMatrix& A, double* b): DGETRS returned INFO = %d\n", info);
        }
        if (info < 0 || !A.m_useReturnErrorCode) {
            throw CanteraError("solve(DenseMatrix& A, double* b)", "DGETRS returned INFO = {}", info);
        }
    }
    return info;
}

int solve(DenseMatrix& A, DenseMatrix& b)
{
    return solve(A, b.ptrColumn(0), b.nColumns(), b.nRows());
}

void multiply(const DenseMatrix& A, const double* const b, double* const prod)
{
    ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose,
             static_cast<int>(A.nRows()), static_cast<int>(A.nColumns()), 1.0,
             A.ptrColumn(0), static_cast<int>(A.nRows()), b, 1, 0.0, prod, 1);
}

void increment(const DenseMatrix& A, const double* b, double* prod)
{
    ct_dgemv(ctlapack::ColMajor, ctlapack::NoTranspose,
             static_cast<int>(A.nRows()), static_cast<int>(A.nRows()), 1.0,
             A.ptrColumn(0), static_cast<int>(A.nRows()), b, 1, 1.0, prod, 1);
}

int invert(DenseMatrix& A, size_t nn)
{
    integer n = static_cast<int>(nn != npos ? nn : A.nRows());
    int info=0;
    ct_dgetrf(n, n, A.ptrColumn(0), static_cast<int>(A.nRows()),
              &A.ipiv()[0], info);
    if (info != 0) {
        if (A.m_printLevel) {
            writelogf("invert(DenseMatrix& A, int nn): DGETRS returned INFO = %d\n", info);
        }
        if (! A.m_useReturnErrorCode) {
            throw CanteraError("invert(DenseMatrix& A, int nn)", "DGETRS returned INFO = {}", info);
        }
        return info;
    }

    vector_fp work(n);
    integer lwork = static_cast<int>(work.size());
    ct_dgetri(n, A.ptrColumn(0), static_cast<int>(A.nRows()),
              &A.ipiv()[0], &work[0], lwork, info);
    if (info != 0) {
        if (A.m_printLevel) {
            writelogf("invert(DenseMatrix& A, int nn): DGETRS returned INFO = %d\n", info);
        }
        if (! A.m_useReturnErrorCode) {
            throw CanteraError("invert(DenseMatrix& A, int nn)", "DGETRI returned INFO={}", info);
        }
    }
    return info;
}

}


text:
Public Files
============

Any files you place in here will be publicly available on your site
under the root (`/`) path. For instance "favicon.ico" will be publicly
available as http://example.com/favicon.ico etc.

Any CSS stylesheets, Javascript source files or images that you use
should be placed under the "assets" directory where Spontaneous can
manage them using Sprockets' powerful bundling, compression and
fingerprinting functions (see `assets/README.md` for more
information).


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

export = DoubleInteger16;


text:
package de.fxnn.geld.common.view;

import com.gluonhq.charm.glisten.application.MobileApplication;
import com.gluonhq.charm.glisten.control.FloatingActionButton;
import com.gluonhq.charm.glisten.visual.MaterialDesignIcon;

public class FloatingViewSwitchButton extends FloatingActionButton {
  public FloatingViewSwitchButton(MaterialDesignIcon icon, String viewName) {
    super(icon.text, e -> MobileApplication.getInstance().switchView(viewName));
  }
}