text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Diffusional Rate Limitations in Heterogeneous Porous Media: Model Structure, Scale, and Geologic Characterization|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2017-01-26" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Project Research Results

Final Report

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Diffusional Rate Limitations in Heterogeneous Porous Media: Model Structure, Scale, and Geologic Characterization

    EPA Grant Number: R824768

    Title: Diffusional Rate Limitations in Heterogeneous Porous Media: Model Structure, Scale, and Geologic Characterization

    Investigators:
     Freyberg, David L.
        ,  Roberts, Paul V.

    Institution:

      Stanford University

    	EPA Project Officer:

           Levinson, Barbara

      Project Period:
      November 1, 1995 through
        October 1, 1998

        Project Amount:

          $198,000

      RFA:
      Water and Watersheds (1995)

          Recipients Lists

      Research Category:

          Water and Watersheds
          ,
          Water

Description:

      	This project aims to elucidate the nature and significance of diffusional
rate limitations during solute transport in saturated, heterogeneous porous
media, with a view to evaluating the role of diffusional limitations in
contaminant remediation. The research is considering the relative importance of
diffusional rate limitations manifested over a range of spatial scales, from the
grain scale up to regional scales, within the context of a numerical transport
model that accounts for advection, dispersion, and sorption. Along with
multi-scale diffusion submodel development, the project is addressing: (1) the
interactions between geologic structure, heterogeneity, upscaling, and
diffusional transport process representation; (2) physically-based aggregation
schemes that are consistent with different model formulations of transport
processes; and (3) the increase in size and complexity of heterogeneities that
are likely to be encountered with increasing size of an aquifer domain under
analysis.

This aspect of the investigation is using a quasi-deterministic approach that
postulates a set of realistic scenarios for heterogeneity based on
physically-founded consideration of geologic depositional processes. Using a
non-dimensional form of the transport model, dimensionless groups incorporating
space and time scales will be identified that quantify the relative importance
of the diffusional rate limitations in terms of influence on contaminant
transport. Sensitivity analyses will be conducted to differentiate between: (1)
situations in which diffusional rate limitations are important and need to be
accounted for, and (2) circumstances where such rate limitations are negligible.
As a preliminary test of the modeling methodology, site characterization data
from the well-documented Borden transport experiment will be utilized.

The results from this research will contribute to fundamental understanding
of the impact of heterogeneities at differing scales on solute transport in
groundwater, under the influence of diffusionally controlled slow release from
zones of low permeability, with applications to contaminant remediation design,
site characterization, and the interpretation of field monitoring and laboratory experimental data.

Supplemental Keywords:

      water, groundwater, land, soil, restoration, remediation, environmental chemistry, physics, hydrology, geology, modeling., RFA, Scientific Discipline, Water, Hydrology, Ecology, Water & Watershed, Physics, Geology, Watersheds, fate and transport, contaminant transport, model structure, Borden transport experiment, aquatic ecosystems, diffusion rate limitations, heterogeneous porus media, groundwater

Progress and Final Reports:

                Final Report

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Thursday, January 26, 2017


text:
(function() {
  var Api, Database, Document;

  Api = require('./api');

  Document = require('./document');

  Database = (function() {
    Database.DOCUMENTS_BY_ENTITY_NAME_INDEX = 'Raven/DocumentsByEntityName';

    Database.DYNAMIC_INDEX = 'dynamic';

    function Database(datastore, name1, apiProvider) {
      this.datastore = datastore;
      this.name = name1;
      if (apiProvider == null) {
        apiProvider = Api;
      }
      this.api = new apiProvider(this.datastore.url, this.name);
    }

    Database.prototype.getUrl = function() {
      return this.api.getUrl();
    };

    Database.prototype.getDocsUrl = function() {
      return this.api.getDocsUrl();
    };

    Database.prototype.getDocUrl = function(id) {
      return this.api.getDocUrl(id);
    };

    Database.prototype.getIndexesUrl = function() {
      return this.api.getIndexesUrl();
    };

    Database.prototype.getIndexUrl = function(index) {
      return this.api.getIndexUrl(index);
    };

    Database.prototype.getTermsUrl = function(index, field) {
      return this.api.getTermsUrl(index, field);
    };

    Database.prototype.getStaticUrl = function() {
      return this.api.getStaticUrl();
    };

    Database.prototype.getAttachmentUrl = function(id) {
      return this.api.getAttachmentUrl(id);
    };

    Database.prototype.getQueriesUrl = function() {
      return this.api.getQueriesUrl();
    };

    Database.prototype.getBulkDocsUrl = function() {
      return this.api.getBulkDocsUrl();
    };

    Database.prototype.getBulkDocsIndexUrl = function(index, query) {
      return this.api.getBulkDocsIndexUrl(index, query);
    };

    Database.prototype.getStatsUrl = function() {
      return this.api.getStatsUrl();
    };

    Database.prototype.setAuthorization = function(authValue) {
      return this.api.setAuthorization(authValue);
    };

    Database.prototype.setBasicAuthorization = function(username, password) {
      return this.api.setBasicAuthorization(username, password);
    };

    Database.prototype.setProxy = function(proxyUrl) {
      return this.api.setProxy(proxyUrl);
    };

    Database.prototype.getCollections = function(cb) {
      this.apiGet(this.getTermsUrl(Database.DOCUMENTS_BY_ENTITY_NAME_INDEX, 'Tag'), function(error, response) {
        if (!error && response.statusCode === 200) {
          if (cb != null) {
            return cb(null, JSON.parse(response.body));
          }
        } else if (cb != null) {
          return cb(error);
        }
      });
      return null;
    };

    Database.prototype.saveDocument = function(collection, doc, cb) {
      var op, url;
      op = this.apiPost;
      url = this.getDocsUrl();
      if (typeof collection === 'object' && collection !== null) {
        cb = doc;
        doc = collection;
        collection = null;
      }
      if (doc.id != null) {
        op = this.apiPut;
        url = this.getDocUrl(doc.id);
        doc = Document.fromObject(doc);
        delete doc.id;
      }
      if (doc.getMetadataValue('Raven-Entity-Name') == null) {
        if (collection != null) {
          doc.setMetadataValue('Raven-Entity-Name', collection);
        }
      }
      op.call(this, url, doc, doc.getMetadata(), function(error, response) {
        if (!error && response.statusCode === 201) {
          doc.setMetadataValues(JSON.parse(response.body));
          doc.id = doc.getMetadataValue('key');
          if (cb != null) {
            return cb(null, doc);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to create document: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.getDocument = function(id, cb) {
      var url;
      url = this.getDocUrl(id);
      this.apiGet(url, function(error, response) {
        var doc;
        if (!error && response.statusCode === 200) {
          doc = Document.fromObject(JSON.parse(response.body));
          doc.setMetadataValues(response.headers);
          doc.id = doc.getMetadataValue('key');
          return cb(null, doc);
        } else {
          return cb(error);
        }
      });
    };

    Database.prototype.getDocuments = function(ids, cb) {
      var url;
      url = this.getQueriesUrl();
      this.apiPost(url, ids, function(error, response) {
        if (!error && response.statusCode === 200) {
          if (cb != null) {
            return cb(null, response.body);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to find documents: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.deleteDocument = function(id, cb) {
      var url;
      url = this.getDocUrl(id);
      this.apiDelete(url, function(error, response) {
        if (!error && response.statusCode === 204) {
          if (cb != null) {
            return cb(null, response.body);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to delete document: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.deleteDocuments = function(index, query, cb) {
      var url;
      url = this.getBulkDocsIndexUrl(index, query);
      this.apiDelete(url, function(error, response) {
        var ref;
        if (!error && response.statusCode === 200) {
          if (cb != null) {
            return cb(null, ((response != null ? (ref = response.body) != null ? ref.length : void 0 : void 0) != null) > 0 ? JSON.parse(response.body) : null);
          }
        } else {
          if (cb != null) {
            if (typeof error === "function" ? error(cb(error)) : void 0) {

            } else {
              return cb(new Error('Unable to delete documents: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.find = function(doc, start, count, cb) {
      if (typeof start === 'function') {
        cb = start;
        start = null;
        count = null;
      } else if (typeof count === 'function') {
        cb = count;
        count = null;
      }
      this.dynamicQuery(doc, start, count, function(error, results) {
        var matches;
        if (!error) {
          results = JSON.parse(results.body);
          matches = (results != null ? results.Results : void 0) != null ? results.Results : null;
        }
        return cb(error, matches);
      });
    };

    Database.prototype.getDocsInCollection = function(collection, start, count, cb) {
      if (typeof start === 'function') {
        cb = start;
        start = null;
        count = null;
      } else if (typeof count === 'function') {
        cb = count;
        count = null;
      }
      this.queryRavenDocumentsByEntityName(collection, start, count, function(error, results) {
        if (error == null) {
          results = JSON.parse(results.body);
        }
        return cb(error, (results != null ? results.Results : void 0) != null ? results.Results : null);
      });
    };

    Database.prototype.getDocumentCount = function(collection, cb) {
      this.queryRavenDocumentsByEntityName(collection, 0, 0, function(error, response) {
        var manufacturedError, results;
        if (error != null) {
          cb(error, null);
          return;
        }
        manufacturedError = new Error("Unable to get document count: " + response.statusCode + " - " + response.body);
        if (response.statusCode >= 400) {
          cb(manufacturedError, null);
          return;
        }
        results = JSON.parse(response.body);
        if ((results != null ? results.TotalResults : void 0) != null) {
          return cb(null, results.TotalResults);
        } else {
          return cb(manufacturedError, null);
        }
      });
    };

    Database.prototype.getStats = function(cb) {
      this.apiGet(this.getStatsUrl(), function(error, results) {
        var stats;
        if (error == null) {
          stats = JSON.parse(results.body);
        }
        return cb(error, stats);
      });
    };

    Database.prototype.dynamicQuery = function(doc, start, count, cb) {
      return this.queryByIndex(Database.DYNAMIC_INDEX, doc, start, count, cb);
    };

    Database.prototype.queryRavenDocumentsByEntityName = function(name, start, count, cb) {
      var search;
      search = name != null ? {
        Tag: name
      } : null;
      return this.queryByIndex(Database.DOCUMENTS_BY_ENTITY_NAME_INDEX, search, start, count, cb);
    };

    Database.prototype.queryByIndex = function(index, query, start, count, fetch, cb) {
      var url;
      if (start == null) {
        start = 0;
      }
      if (count == null) {
        count = 25;
      }
      if (typeof start === 'function') {
        cb = start;
        start = null;
        count = null;
        fetch = null;
      } else if (typeof count === 'function') {
        cb = count;
        count = null;
        fetch = null;
      } else if (typeof fetch === 'function') {
        cb = fetch;
        fetch = null;
      }
      url = (this.getIndexUrl(index)) + "?start=" + start + "&pageSize=" + count + "&aggregation=None";
      if (query != null) {
        url += "&query=" + (this.luceneQueryArgs(query));
      }
      if (fetch != null) {
        url += "&fetch=" + (this.luceneFetchArgs(fetch));
      }
      return this.apiGet(url, cb);
    };

    Database.prototype.createIndex = function(name, map, reduce, cb) {
      var index, url;
      if (typeof reduce === 'function') {
        cb = reduce;
        reduce = null;
      }
      url = this.getIndexUrl(name);
      index = {
        Map: map
      };
      if (reduce != null) {
        index['Reduce'] = reduce;
      }
      return this.apiPut(url, index, function(error, response) {
        var ref;
        if (!error && response.statusCode === 201) {
          if (cb != null) {
            return cb(null, ((response != null ? (ref = response.body) != null ? ref.length : void 0 : void 0) != null) > 0 ? JSON.parse(response.body) : null);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to create index: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.deleteIndex = function(index, cb) {
      var url;
      url = this.getIndexUrl(index);
      return this.apiDelete(url, function(error, response) {
        var ref;
        if (!error && response.statusCode === 204) {
          if (cb != null) {
            return cb(null, ((response != null ? (ref = response.body) != null ? ref.length : void 0 : void 0) != null) > 0 ? JSON.parse(response.body) : null);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to delete index: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.saveAttachment = function(docId, content, headers, cb) {
      var url;
      url = this.getAttachmentUrl(docId);
      return this.apiPut(url, content, headers, function(error, response) {
        var ref;
        if (!error && response.statusCode === 201) {
          if (cb != null) {
            return cb(null, ((response != null ? (ref = response.body) != null ? ref.length : void 0 : void 0) != null) > 0 ? JSON.parse(response.body) : null);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to save attachment: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.getAttachment = function(id, cb) {
      var url;
      url = this.getAttachmentUrl(id);
      return this.apiGet(url, function(error, response) {
        if (!error && response.statusCode === 200) {
          return cb(null, response);
        } else {
          return cb(error);
        }
      });
    };

    Database.prototype.deleteAttachment = function(id, cb) {
      var url;
      url = this.getAttachmentUrl(id);
      return this.apiDelete(url, function(error, response) {
        if (!error && response.statusCode === 204) {
          if (cb != null) {
            return cb(null, response.body);
          }
        } else {
          if (cb != null) {
            if (error != null) {
              return cb(error);
            } else {
              return cb(new Error('Unable to delete attachment: ' + response.statusCode + ' - ' + response.body));
            }
          }
        }
      });
    };

    Database.prototype.luceneQueryArgs = function(query) {
      return this.api.luceneQueryArgs(query);
    };

    Database.prototype.luceneFetchArgs = function(fetch) {
      return this.api.luceneFetchArgs(fetch);
    };

    Database.prototype.useRavenHq = function(apiKey, cb) {
      return this.api.useRavenHq(apiKey, (function(_this) {
        return function(error, authorizationHeaderValue) {
          _this.setAuthorization(authorizationHeaderValue);
          if (cb != null) {
            return cb(error, authorizationHeaderValue);
          }
        };
      })(this));
    };

    Database.prototype.apiGet = function(url, headers, cb) {
      return this.api.get(url, headers, cb);
    };

    Database.prototype.apiPut = function(url, body, headers, cb) {
      return this.api.put(url, body, headers, cb);
    };

    Database.prototype.apiPost = function(url, body, headers, cb) {
      return this.api.post(url, body, headers, cb);
    };

    Database.prototype.apiPatch = function(url, body, headers, cb) {
      return this.api.patch(url, body, headers, cb);
    };

    Database.prototype.apiDelete = function(url, body, headers, cb) {
      return this.api["delete"](url, body, headers, cb);
    };

    return Database;

  })();

  module.exports = Database;

}).call(this);

redpajama_set_name: RedPajamaGithub


text:
module com.sun.xml.bind {
    requires java.desktop;
    requires java.logging;

    requires transitive com.sun.xml.bind.core;

    requires static com.sun.xml.fastinfoset;
    requires static org.jvnet.staxex;

    exports org.glassfish.jaxb.runtime;
    exports org.glassfish.jaxb.runtime.api;
    exports org.glassfish.jaxb.runtime.marshaller;
    exports org.glassfish.jaxb.runtime.unmarshaller;
    exports org.glassfish.jaxb.runtime.util;
    exports org.glassfish.jaxb.runtime.v2;
    exports org.glassfish.jaxb.runtime.v2.model.annotation;
    exports org.glassfish.jaxb.runtime.v2.model.impl;
    exports org.glassfish.jaxb.runtime.v2.model.runtime;
    exports org.glassfish.jaxb.runtime.v2.runtime;
    exports org.glassfish.jaxb.runtime.v2.runtime.output;
    exports org.glassfish.jaxb.runtime.v2.runtime.property;
    exports org.glassfish.jaxb.runtime.v2.runtime.reflect;
    exports org.glassfish.jaxb.runtime.v2.runtime.unmarshaller;
    exports org.glassfish.jaxb.runtime.v2.schemagen;
    exports org.glassfish.jaxb.runtime.v2.schemagen.xmlschema;
    exports org.glassfish.jaxb.runtime.v2.util;

    opens org.glassfish.jaxb.runtime.v2.runtime.reflect.opt to jakarta.xml.bind;
    opens org.glassfish.jaxb.runtime.v2.schemagen to jakarta.xml.bind;
    opens org.glassfish.jaxb.runtime.v2.schemagen.xmlschema to jakarta.xml.bind;
    opens org.glassfish.jaxb.runtime.v2 to jakarta.xml.bind;

    provides jakarta.xml.bind.JAXBContextFactory with org.glassfish.jaxb.runtime.v2.JAXBContextFactory;

}


text:
@interface KYNavigationController : UINavigationController

@end


text:
/**
 * All popover content component should extends this class
 */
import { AfterViewInit } from '@angular/core';
import { UIPopoverRef } from './popover-ref';

export class UIPopoverContent implements AfterViewInit {

    constructor(protected popoverRef: UIPopoverRef<UIPopoverContent>) {}

    ngAfterViewInit(): void {
        this.popoverRef.updatePosition();
    }
}


text:
(function($) {

    var _compileTemplate = function(templateId, jsonObj) {
        var template = $(templateId).html();
        return Mustache.compile(template,  ["[[", "]]"])(jsonObj);
    },
    Urls = {
        dones: '/api/dones/',
        current_session: '/api/sessions/me',
        sessions: 'api/sessions',
        users: 'api/users'
    },
    Dones = function(app) {
        var _this = this,
            _initialContent = $('#content').html(),
            _prettifyDates = function(selector) {
                $(selector).each(function() {
                    var element = $(this);
                    var date = moment(element.html(), "YYYYMDD");
                    element.html(date.format('dddd, MMMM Do YYYY'));
                });
            };

        this.init = function() {
            $('#content').on('submit', '#insert-done-form', function() {
                $.ajax({
                    url: app.urls.dones,
                    type: 'POST',
                    data: $(this).serialize(),
                    success: _this.show
                });
                return false;
            });
            $('#content').on('click', '.delete', function() {
                var _confirm = confirm('Are you sure you want to delete this done?');
                var id = $(this).attr('data-delete');
                if (_confirm == true) {
                    $.ajax({
                        url: app.urls.dones + id,
                        type: 'DELETE',
                        success: _this.show
                    });
                };
                return false;
            });
        };

        this.show = function() {
            $.ajax({
                type: 'GET',
                url: app.urls.dones,
                dataType: 'json',
                success: function(data) {
                    $('#content').html(_compileTemplate('#dones-template', data));
                    _prettifyDates('#content .date');
                }
            });
        };

        this.delete = function() {
            $('#content').html(_initialContent);
        };
    },
    LoginLogout = function(app) {
        var _this = this,
            _ok_feedback = function() {
            $('#content').html('
Thanks, your account has been created.

 You can login now
');
        };

        this.render = function() {
            $.ajax(app.urls.current_session)
                .done(function() {
                    $('#login').hide();
                    $('#logout').show();
                    app.dones.show();
                })
                .fail(function() {
                    $('#login').show();
                    $('#logout').hide();
                });
        },
        this.init = function() {
            $('#register-form').on('submit', function() {
                $.ajax({
                    type: 'POST',
                    url: app.urls.users,
                    data: $(this).serialize(),
                    success: _ok_feedback
                });
                return false;
            });
            $('#login-form').on('submit', function(event) {
                $.ajax({
                    type: 'POST',
                    url: app.urls.sessions,
                    data: $(this).serialize(),
                    success: _this.render
                });
                $(this).find('input[type="password"]').val('');
                return false;
            });
            $('#logout-link').on('click', function() {
                $.ajax({
                    type: 'DELETE',
                    url: app.urls.current_session,
                    success: _this.render
                });
                app.dones.delete();
                return false;
            });
        }
    },
    startup = function() {
        var dones = new Dones({urls: Urls});
        dones.init();

        var login = new LoginLogout({dones:dones, urls:Urls});
        login.init();
        login.render();
    };

    $(document).on('ready', startup);

})(jQuery);


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Class vs Object | Software Interview Technical Questions </title>
    <meta name="description" content="Creators of Approachable Open Source projects to allow anyone to start contribute to open source software, regardless of technical skill level.">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../styles.css">

    <link rel="apple-touch-icon" sizes="180x180" href="../../../images/icons/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="../../../images/icons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="../../../images/icons/favicon-16x16.png">
    <link rel="manifest" href="../../../images/icons/manifest.json">
    <link rel="mask-icon" href="../../../images/icons/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="theme-color" content="#ffffff">

Class vs Object

            More technical interview questions

An object is a member or an "instance" of a class.

An
            Approachable Open Source project from
            Approachable IO


text:
<?php

/*
 * @package base
 * @copyright Copyright (c) 2010, shopex. inc
 * @author edwin.lzh@gmail.com
 * @license
 */
class base_setup_lock
{

    /*
     * @var string $lockcode_prefix
     * @access private
     */
    private $lockcode_prefix = "If you want to reinstall system, delete this file! <?php exit();?> \ncode: ";

    /*
     * @var string $codecookie_name
     * @access private
     */
    private $codecookie_name = '_ecos_setup_lockcode';

    /*
     * lockfile路径
     * @access private
     * @return string
     */
    private function lockfile()
    {
        if(ECAE_MODE){
            return 'ecos.install.lock';
        }else{
            return ROOT_DIR . '/config/install.lock.php';
        }
    }//End Function

    /*
     * 写入lockfile文件
     * @access private
     * @return boolean
     */
    private function put_lockfile($content)
    {
        if(ECAE_MODE){
            return app::get('base')->setConf($this->lockfile(), $content);
        }else{
            return file_put_contents($this->lockfile(), $content);
        }
    }//End Function

    /*
     * 写入lockfile文件
     * @access private
     * @return string
     */
    private function get_lockfile()
    {
        if(ECAE_MODE){
            return app::get('base')->getConf($this->lockfile());
        }else{
            return file_get_contents($this->lockfile());
        }
    }//End Function

    /*
     * 检查是否有lock文件
     * @access public
     * @return boolean
     */
    public function lockfile_exists()
    {
        if(ECAE_MODE){
            return (app::get('base')->getConf($this->lockfile())) ? true : false;
        }else{
            return file_exists($this->lockfile());
        }
    }//End Function

    /*
     * 写入锁文件
     * @access public
     * @return string
     */
    public function write_lock_file($cookie=true){
        $lock_code = md5(microtime()).md5(print_r($_SERVER,1));
        if($this->put_lockfile($this->lockcode_prefix.$lock_code)){
            $path = kernel::base_url();
            $path = $path?$path:'/';
            if($cookie) setcookie($this->codecookie_name,$lock_code,0,$path);
            return true;
        }else{
            return false;
        }
    }

    /*
     * 读取锁码
     * @access public
     * @return string
     */
    public function get_lock_code()
    {
        $content = $this->get_lockfile($this->lockfile());
        $ncode = substr($content, strlen($this->lockcode_prefix));
        return $ncode;
    }//End Function

    /*
     * 验证锁码
     * @access public
     * @return string
     */
    public function check_lock_code()
    {
        if(isset($_COOKIE[$this->codecookie_name])){
            $code = $this->get_lock_code();
            if($code && $this->get_lock_code() === $_COOKIE[$this->codecookie_name]){
                return true;
            }
        }
        return false;
    }//End Function

}//End Class


text:
echo "creating openssl config"
[ ! -e openssl.cnf ] && echo '[ ca ]
default_ca              = default_CA
[ default_CA ]
dir                     = ./ca
certs                   = $dir
new_certs_dir           = $dir/certs
database                = $dir/index
serial                  = $dir/serial
RANDFILE                = $dir/random-bits
certificate             = $dir/ca.crt
private_key             = $dir/ca.key
default_days            = 1095
default_crl_days        = 30
default_md              = sha256
preserve                = no
x509_extensions         = server_cert
policy                  = policy_anything

[ policy_anything ]
countryName             = optional
stateOrProvinceName     = optional
localityName            = optional
organizationName        = optional
organizationalUnitName  = optional
commonName              = supplied
emailAddress            = optional

[req]
distinguished_name 	= req_distinguished_name

[req_distinguished_name]
countryName                     = Country Name (2 letter code)
countryName_default             = US
countryName_min                 = 2
countryName_max                 = 2
stateOrProvinceName             = State or Province Name (full name)
stateOrProvinceName_default     = Florida
localityName                    = Locality Name (eg, city)
localityName_default            = Gator Town
0.organizationName              = Organization Name (eg, company)
0.organizationName_default      = Mozilla
organizationalUnitName          = Organizational Unit Name (eg, section)
organizationalUnitName_default  = MIG
commonName                      = Common Name (eg, YOUR name)
commonName_max                  = 64

[ root_ca ]
nsComment                       = "MIG Certificate Authority"
subjectKeyIdentifier            = hash
authorityKeyIdentifier          = keyid,issuer:always
basicConstraints                = critical,CA:TRUE,pathlen:1
keyUsage                        = keyCertSign, cRLSign

[v3_req]
basicConstraints 	= CA:FALSE
keyUsage 		= digitalSignature, keyEncipherment

[ server_cert ]
authorityKeyIdentifier  = keyid,issuer:always
issuerAltName           = issuer:copy
extendedKeyUsage        = serverAuth,clientAuth,msSGC,nsSGC
basicConstraints        = critical,CA:false
keyUsage                = digitalSignature,nonRepudiation,keyEncipherment
nsCertType              = server,client' > openssl.cnf

mkdir -p ca/certs
[ ! -e ca/serial ] && echo 1000 > ca/serial
[ ! -e ca/index ] && touch ca/index

echo "creating a key for the root certificate authority"
openssl genrsa -out ca/ca.key 2048
openssl req -new -x509 -days 3650 -key ca/ca.key -out ca/ca.crt -config openssl.cnf -extensions root_ca << EOF
US
Florida
Gator Town
MIG
CA
$(hostname --fqdn)
postmaster@$(hostname --fqdn)
EOF

echo "create certificate for rabbitmq"
echo -n "enter the public dns name of the rabbitmq server agents will connect to> "
read rabbitmqhostname
openssl req -new -newkey rsa:2048 -keyout rabbitmq.key -nodes -out rabbitmq.csr -config openssl.cnf << EOF
US
Florida
Gator Town
MIG
RabbitMQ Relay
${rabbitmqhostname}
postmaster@${rabbitmqhostname}
EOF
openssl ca -extensions server_cert -in rabbitmq.csr -out rabbitmq.crt -config openssl.cnf

echo "create certificates for scheduler, workers and agents"
for target in scheduler worker agent
do
	openssl req -new -newkey rsa:2048 -keyout $target.key -nodes -out $target.csr -config openssl.cnf << EOF
US
Florida
Gator Town
MIG
$target
${target}.$(hostname --fqdn)
postmaster@${target}.$(hostname --fqdn)
EOF
	yes | openssl ca -extensions server_cert -in $target.csr -out $target.crt -config openssl.cnf
done


text:
/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

var msRestAzure = require('ms-rest-azure');

exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.Resource = require('./resource');
exports.Job = require('./job');
exports.JobResource = require('./jobResource');
exports.ResourceList = require('./resourceList');
exports.JobResourceList = require('./jobResourceList');
exports.BackupEngineBase = require('./backupEngineBase');
exports.BMSBackupEngineQueryObject = require('./bMSBackupEngineQueryObject');
exports.OperationStatusError = require('./operationStatusError');
exports.OperationStatusExtendedInfo = require('./operationStatusExtendedInfo');
exports.OperationStatus = require('./operationStatus');
exports.OperationWorkerResponse = require('./operationWorkerResponse');
exports.JobQueryObject = require('./jobQueryObject');
exports.WorkloadProtectableItem = require('./workloadProtectableItem');
exports.WorkloadProtectableItemResource = require('./workloadProtectableItemResource');
exports.WorkloadProtectableItemResourceList = require('./workloadProtectableItemResourceList');
exports.OperationResultInfoBase = require('./operationResultInfoBase');
exports.ProtectedItem = require('./protectedItem');
exports.ProtectedItemResource = require('./protectedItemResource');
exports.BMSPOQueryObject = require('./bMSPOQueryObject');
exports.ProtectedItemResourceList = require('./protectedItemResourceList');
exports.GetProtectedItemQueryObject = require('./getProtectedItemQueryObject');
exports.BackupRequest = require('./backupRequest');
exports.BackupRequestResource = require('./backupRequestResource');
exports.ProtectedItemQueryObject = require('./protectedItemQueryObject');
exports.RecoveryPoint = require('./recoveryPoint');
exports.RecoveryPointResource = require('./recoveryPointResource');
exports.RecoveryPointResourceList = require('./recoveryPointResourceList');
exports.ProtectionContainer = require('./protectionContainer');
exports.ProtectionContainerResource = require('./protectionContainerResource');
exports.ProtectionContainerResourceList = require('./protectionContainerResourceList');
exports.BMSRPQueryObject = require('./bMSRPQueryObject');
exports.ProtectionPolicy = require('./protectionPolicy');
exports.ProtectionPolicyResource = require('./protectionPolicyResource');
exports.ProtectionPolicyResourceList = require('./protectionPolicyResourceList');
exports.BMSContainerQueryObject = require('./bMSContainerQueryObject');
exports.RestoreRequest = require('./restoreRequest');
exports.RestoreRequestResource = require('./restoreRequestResource');
exports.ProtectionPolicyQueryObject = require('./protectionPolicyQueryObject');
exports.ILRRequest = require('./iLRRequest');
exports.ILRRequestResource = require('./iLRRequestResource');
exports.AzureBackupServerEngine = require('./azureBackupServerEngine');
exports.DpmBackupEngine = require('./dpmBackupEngine');
exports.AzureSqlContainer = require('./azureSqlContainer');
exports.IaaSVMContainer = require('./iaaSVMContainer');
exports.MabContainerExtendedInfo = require('./mabContainerExtendedInfo');
exports.MabContainer = require('./mabContainer');
exports.IaaSVMProtectableItem = require('./iaaSVMProtectableItem');
exports.AzureIaaSVMProtectedItemExtendedInfo = require('./azureIaaSVMProtectedItemExtendedInfo');
exports.AzureIaaSVMProtectedItem = require('./azureIaaSVMProtectedItem');
exports.MabFileFolderProtectedItemExtendedInfo = require('./mabFileFolderProtectedItemExtendedInfo');
exports.MabFileFolderProtectedItem = require('./mabFileFolderProtectedItem');
exports.AzureSqlProtectedItemExtendedInfo = require('./azureSqlProtectedItemExtendedInfo');
exports.AzureSqlProtectedItem = require('./azureSqlProtectedItem');
exports.IaasVMBackupRequest = require('./iaasVMBackupRequest');
exports.SchedulePolicy = require('./schedulePolicy');
exports.RetentionPolicy = require('./retentionPolicy');
exports.AzureIaaSVMProtectionPolicy = require('./azureIaaSVMProtectionPolicy');
exports.MabProtectionPolicy = require('./mabProtectionPolicy');
exports.AzureSqlProtectionPolicy = require('./azureSqlProtectionPolicy');
exports.KEKDetails = require('./kEKDetails');
exports.BEKDetails = require('./bEKDetails');
exports.KeyAndSecretDetails = require('./keyAndSecretDetails');
exports.IaasVMRecoveryPoint = require('./iaasVMRecoveryPoint');
exports.GenericRecoveryPoint = require('./genericRecoveryPoint');
exports.EncryptionDetails = require('./encryptionDetails');
exports.IaasVMRestoreRequest = require('./iaasVMRestoreRequest');
exports.IaasVMILRRegistrationRequest = require('./iaasVMILRRegistrationRequest');
exports.AzureIaaSVMErrorInfo = require('./azureIaaSVMErrorInfo');
exports.AzureIaaSVMJobTaskDetails = require('./azureIaaSVMJobTaskDetails');
exports.AzureIaaSVMJobExtendedInfo = require('./azureIaaSVMJobExtendedInfo');
exports.AzureIaaSVMJob = require('./azureIaaSVMJob');
exports.DpmErrorInfo = require('./dpmErrorInfo');
exports.DpmJobTaskDetails = require('./dpmJobTaskDetails');
exports.DpmJobExtendedInfo = require('./dpmJobExtendedInfo');
exports.DpmJob = require('./dpmJob');
exports.MabErrorInfo = require('./mabErrorInfo');
exports.MabJobTaskDetails = require('./mabJobTaskDetails');
exports.MabJobExtendedInfo = require('./mabJobExtendedInfo');
exports.MabJob = require('./mabJob');
exports.OperationResultInfo = require('./operationResultInfo');
exports.ExportJobsOperationResultInfo = require('./exportJobsOperationResultInfo');
exports.AzureIaaSComputeVMContainer = require('./azureIaaSComputeVMContainer');
exports.AzureIaaSClassicComputeVMContainer = require('./azureIaaSClassicComputeVMContainer');
exports.AzureIaaSComputeVMProtectableItem = require('./azureIaaSComputeVMProtectableItem');
exports.AzureIaaSClassicComputeVMProtectableItem = require('./azureIaaSClassicComputeVMProtectableItem');
exports.AzureIaaSComputeVMProtectedItem = require('./azureIaaSComputeVMProtectedItem');
exports.AzureIaaSClassicComputeVMProtectedItem = require('./azureIaaSClassicComputeVMProtectedItem');
exports.OperationStatusJobExtendedInfo = require('./operationStatusJobExtendedInfo');
exports.ClientScriptForConnect = require('./clientScriptForConnect');
exports.InstantItemRecoveryTarget = require('./instantItemRecoveryTarget');
exports.OperationStatusProvisionILRExtendedInfo = require('./operationStatusProvisionILRExtendedInfo');
exports.OperationStatusJobsExtendedInfo = require('./operationStatusJobsExtendedInfo');
exports.LongTermSchedulePolicy = require('./longTermSchedulePolicy');
exports.SimpleSchedulePolicy = require('./simpleSchedulePolicy');
exports.RetentionDuration = require('./retentionDuration');
exports.SimpleRetentionPolicy = require('./simpleRetentionPolicy');
exports.DailyRetentionSchedule = require('./dailyRetentionSchedule');
exports.WeeklyRetentionSchedule = require('./weeklyRetentionSchedule');
exports.Day = require('./day');
exports.DailyRetentionFormat = require('./dailyRetentionFormat');
exports.WeeklyRetentionFormat = require('./weeklyRetentionFormat');
exports.MonthlyRetentionSchedule = require('./monthlyRetentionSchedule');
exports.YearlyRetentionSchedule = require('./yearlyRetentionSchedule');
exports.LongTermRetentionPolicy = require('./longTermRetentionPolicy');
exports.BackupEngineBaseResource = require('./backupEngineBaseResource');
exports.BackupEngineBaseResourceList = require('./backupEngineBaseResourceList');
exports.OperationResultInfoBaseResource = require('./operationResultInfoBaseResource');
exports.ProtectionPolicyResourceList = require('./protectionPolicyResourceList');
exports.ProtectionContainerResourceList = require('./protectionContainerResourceList');
exports.RecoveryPointResourceList = require('./recoveryPointResourceList');
exports.ProtectedItemResourceList = require('./protectedItemResourceList');
exports.WorkloadProtectableItemResourceList = require('./workloadProtectableItemResourceList');
exports.JobResourceList = require('./jobResourceList');
exports.BackupEngineBaseResourceList = require('./backupEngineBaseResourceList');
exports.discriminators = {
  'Job' : exports.Job,
  'BackupEngineBase' : exports.BackupEngineBase,
  'OperationStatusExtendedInfo' : exports.OperationStatusExtendedInfo,
  'WorkloadProtectableItem' : exports.WorkloadProtectableItem,
  'OperationResultInfoBase' : exports.OperationResultInfoBase,
  'ProtectedItem' : exports.ProtectedItem,
  'BackupRequest' : exports.BackupRequest,
  'RecoveryPoint' : exports.RecoveryPoint,
  'ProtectionContainer' : exports.ProtectionContainer,
  'ProtectionPolicy' : exports.ProtectionPolicy,
  'RestoreRequest' : exports.RestoreRequest,
  'ILRRequest' : exports.ILRRequest,
  'BackupEngineBase.AzureBackupServerEngine' : exports.AzureBackupServerEngine,
  'BackupEngineBase.DpmBackupEngine' : exports.DpmBackupEngine,
  'ProtectionContainer.AzureSqlContainer' : exports.AzureSqlContainer,
  'ProtectionContainer.IaaSVMContainer' : exports.IaaSVMContainer,
  'ProtectionContainer.MABWindowsContainer' : exports.MabContainer,
  'WorkloadProtectableItem.IaaSVMProtectableItem' : exports.IaaSVMProtectableItem,
  'ProtectedItem.AzureIaaSVMProtectedItem' : exports.AzureIaaSVMProtectedItem,
  'ProtectedItem.MabFileFolderProtectedItem' : exports.MabFileFolderProtectedItem,
  'ProtectedItem.Microsoft.Sql/servers/databases' : exports.AzureSqlProtectedItem,
  'BackupRequest.IaasVMBackupRequest' : exports.IaasVMBackupRequest,
  'SchedulePolicy' : exports.SchedulePolicy,
  'RetentionPolicy' : exports.RetentionPolicy,
  'ProtectionPolicy.AzureIaasVM' : exports.AzureIaaSVMProtectionPolicy,
  'ProtectionPolicy.MAB' : exports.MabProtectionPolicy,
  'ProtectionPolicy.AzureSql' : exports.AzureSqlProtectionPolicy,
  'RecoveryPoint.IaasVMRecoveryPoint' : exports.IaasVMRecoveryPoint,
  'RecoveryPoint.GenericRecoveryPoint' : exports.GenericRecoveryPoint,
  'RestoreRequest.IaasVMRestoreRequest' : exports.IaasVMRestoreRequest,
  'ILRRequest.IaasVMILRRegistrationRequest' : exports.IaasVMILRRegistrationRequest,
  'Job.AzureIaaSVMJob' : exports.AzureIaaSVMJob,
  'Job.DpmJob' : exports.DpmJob,
  'Job.MabJob' : exports.MabJob,
  'OperationResultInfoBase.OperationResultInfo' : exports.OperationResultInfo,
  'OperationResultInfoBase.ExportJobsOperationResultInfo' : exports.ExportJobsOperationResultInfo,
  'ProtectionContainer.Microsoft.Compute/virtualMachines' : exports.AzureIaaSComputeVMContainer,
  'ProtectionContainer.Microsoft.ClassicCompute/virtualMachines' : exports.AzureIaaSClassicComputeVMContainer,
  'WorkloadProtectableItem.Microsoft.Compute/virtualMachines' : exports.AzureIaaSComputeVMProtectableItem,
  'WorkloadProtectableItem.Microsoft.ClassicCompute/virtualMachines' : exports.AzureIaaSClassicComputeVMProtectableItem,
  'ProtectedItem.Microsoft.Compute/virtualMachines' : exports.AzureIaaSComputeVMProtectedItem,
  'ProtectedItem.Microsoft.ClassicCompute/virtualMachines' : exports.AzureIaaSClassicComputeVMProtectedItem,
  'OperationStatusExtendedInfo.OperationStatusJobExtendedInfo' : exports.OperationStatusJobExtendedInfo,
  'OperationStatusExtendedInfo.OperationStatusProvisionILRExtendedInfo' : exports.OperationStatusProvisionILRExtendedInfo,
  'OperationStatusExtendedInfo.OperationStatusJobsExtendedInfo' : exports.OperationStatusJobsExtendedInfo,
  'SchedulePolicy.LongTermSchedulePolicy' : exports.LongTermSchedulePolicy,
  'SchedulePolicy.SimpleSchedulePolicy' : exports.SimpleSchedulePolicy,
  'RetentionPolicy.SimpleRetentionPolicy' : exports.SimpleRetentionPolicy,
  'RetentionPolicy.LongTermRetentionPolicy' : exports.LongTermRetentionPolicy
};


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.ua.bioinformatics.converter;

import com.hp.hpl.jena.sparql.core.DatasetGraph;
import com.hp.hpl.jena.sparql.core.DatasetGraphFactory;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.HashMap;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Path;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Produces;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.riot.RDFFormat;

/**
 * REST Web Service
 *
 * @author Pedro Sernadela <sernadela at ua.pt>
 */
@Path("/")
public class ServiceResource {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of ServiceResource
     */
    public ServiceResource() {
    }

    /**
     * Retrieves representation of an instance of
     * pt.ua.rdf.converter.ServiceResource
     *
     * @return an instance of java.lang.String
     */
    @GET
    @Produces("text/plain")
    public String test() {
        return "It works!";
    }

    /**
     * PUT method for updating or creating an instance of ServiceResource
     *
     * @param content representation for the resource
     * @return an HTTP response with content of the updated or created resource.
     */
    @POST
    //@Consumes("text/plain")
    public String convert(String content) {
        StringWriter sw = new StringWriter();
        DatasetGraph dg = DatasetGraphFactory.createMem();
        InputStream stream = new ByteArrayInputStream(content.getBytes());
        try {
            RDFDataMgr.read(dg, stream, Lang.NQUADS);

            RDFDataMgr.write(sw, dg, RDFFormat.TRIG);
        } catch (Exception e) {
            sw.write(e.getLocalizedMessage());
        }

        return sw.toString();
    }

    /**
     * PUT method for converting an instance of ServiceResource
     *
     * @param url representation for the resource
     * @return an HTTP response with content of the updated or created resource.
     */
    @Path("/url/")
    @POST
    //@Consumes("text/plain")
    //@Produces(MediaType.TEXT_PLAIN)
    public String convertURL(String url) {
        System.out.println(url);
        StringWriter sw = new StringWriter();
        DatasetGraph dg = DatasetGraphFactory.createMem();
        try {
            RDFDataMgr.read(dg, url, Lang.NQUADS);
            HashMap<String, String> prefixes = new HashMap<String, String>();
            prefixes.put("coeus", "http://bioinformatics.ua.pt/coeus/resource/");
            prefixes.put("dc", "http://purl.org/dc/elements/1.1/");
            prefixes.put("np", "http://www.nanopub.org/nschema#");
            prefixes.put("prov", "http://www.w3.org/ns/prov#");
            prefixes.put("xsd", "http://www.w3.org/2001/XMLSchema#");
            prefixes.put("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
            prefixes.put("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
            prefixes.put("dcterms", "http://purl.org/dc/terms/");

            dg.getDefaultGraph().getPrefixMapping().setNsPrefixes(prefixes);
            RDFDataMgr.write(sw, dg, RDFFormat.TRIG);
        } catch (Exception e) {
            sw.write(e.getLocalizedMessage());
        }

        return sw.toString();
    }
}


text:
\documentclass[manual-fr.tex]{subfiles}
\begin{document}
A linear file is a file in which word are (usually) separated by a space. \SEM considers that an empty line is the end of a sentence.
\end{document}


text:
package kafka.network

import java.nio._
import java.nio.channels._
import kafka.utils._

@nonthreadsafe
class ByteBufferSend(val buffer: ByteBuffer) extends Send {

  var complete: Boolean = false

  def this(size: Int) = this(ByteBuffer.allocate(size))

  def writeTo(channel: WritableByteChannel): Int = {
    expectIncomplete()
    var written = 0
    written += channel.write(buffer)
    if(!buffer.hasRemaining)
      complete = true
    written
  }

}


text:
using System;
using System.Threading;
using Llvm.NET.Native;

namespace Llvm.NET
{
    public static class GlobalPassRegistry
    {
        public static void InitializeAll()
        {
           InitializeCore( );
           InitializeTransformUtils( );
           InitializeScalarOpts( );
           InitializeObjCARCOpts( );
           InitializeVectorization( );
           InitializeInstCombine( );
           InitializeIPO( );
           InitializeInstrumentation( );
           InitializeAnalysis( );
           InitializeIPA( );
           InitializeCodeGen( );
           InitializeTarget( );
        }

        public static void InitializeCore()
        {
            NativeMethods.InitializeCore( PassRegistryHandle.Value );
        }

        public static void InitializeTransformUtils()
        {
            NativeMethods.InitializeTransformUtils( PassRegistryHandle.Value );
        }

        public static void InitializeScalarOpts()
        {
            NativeMethods.InitializeScalarOpts( PassRegistryHandle.Value );
        }

        public static void InitializeObjCARCOpts()
        {
            NativeMethods.InitializeObjCARCOpts( PassRegistryHandle.Value );
        }

        public static void InitializeVectorization()
        {
            NativeMethods.InitializeVectorization( PassRegistryHandle.Value );
        }

        public static void InitializeInstCombine( )
        {
            NativeMethods.InitializeInstCombine( PassRegistryHandle.Value );
        }

        public static void InitializeIPO( )
        {
            NativeMethods.InitializeIPO( PassRegistryHandle.Value );
        }

        public static void InitializeInstrumentation( )
        {
            NativeMethods.InitializeInstrumentation( PassRegistryHandle.Value );
        }

        public static void InitializeAnalysis( )
        {
            NativeMethods.InitializeAnalysis( PassRegistryHandle.Value );
        }

        public static void InitializeIPA( )
        {
            NativeMethods.InitializeIPA( PassRegistryHandle.Value );
        }

        public static void InitializeCodeGen( )
        {
            NativeMethods.InitializeCodeGen( PassRegistryHandle.Value );
        }

        public static void InitializeTarget( )
        {
            NativeMethods.InitializeTarget( PassRegistryHandle.Value );
        }

        private static Lazy<LLVMPassRegistryRef> PassRegistryHandle
            = new Lazy<LLVMPassRegistryRef>( ( ) => NativeMethods.GetGlobalPassRegistry( ), LazyThreadSafetyMode.ExecutionAndPublication );
    }
}


text:
using System;
using System.Web;
using NServiceBus;

namespace WebApplication
{
    public class Global : HttpApplication
    {
        public static IBus Bus;

        protected void Application_Start(object sender, EventArgs e)
        {
            #region ApplicationStart
            Configure.Serialization.Json();
            Configure configure = Configure.With();
            configure.Log4Net();
            configure.DefineEndpointName("Samples.AsyncPages.WebApplication");
            configure.DefaultBuilder();
            configure.UseTransport<Msmq>();
            IStartableBus startableBus = configure.UnicastBus().CreateBus();
            Bus = startableBus.Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
            #endregion
        }

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="en">
  <message key="stoppingAfterFirstPageNoFilename">No filename information available. Stopping early after the first page.</message>
  <message key="stoppingAfterFirstPageNoMultiWriter">Image writer does not support multiple images. Only the first page has been produced.</message>
  <message key="noImageWriterFound">Could not get an ImageWriter to produce "{mime}". The most likely explanation for this is a class loading problem.</message>
</catalogue>


text:
/* If the -cl-std build option is not specified, the highest OpenCL C 1.x
 * language version supported by each device is used as the version of
 * OpenCL C when compiling the program for each device.
 */
#ifndef __OPENCL_C_VERSION__
#define __OPENCL_C_VERSION__ 120
#endif

#if (__OPENCL_C_VERSION__ > 99)
#define CL_VERSION_1_0 100
#endif

#if (__OPENCL_C_VERSION__ > 109)
#define CL_VERSION_1_1 110
#endif

#if (__OPENCL_C_VERSION__ > 119)
#define CL_VERSION_1_2 120
#endif

#if (__OPENCL_C_VERSION__ > 199)
#define CL_VERSION_2_0 200
#endif

#include "_enable_all_exts.h"

#include "_builtin_renames.h"

/* Define some feature test macros to help write generic code. These are used
 * mostly in _pocl_opencl.h header + some .cl files in kernel library */

#ifdef cl_khr_int64
#  define __IF_INT64(x) x
#else
#  define __IF_INT64(x)
#endif
#ifdef cl_khr_fp16
#  define __IF_FP16(x) x
#else
#  define __IF_FP16(x)
#endif
#ifdef cl_khr_fp64
#  define __IF_FP64(x) x
#else
#  define __IF_FP64(x)
#endif
#ifdef cl_khr_int64_base_atomics
#define __IF_BA64(x) x
#else
#define __IF_BA64(x)
#endif
#ifdef cl_khr_int64_extended_atomics
#define __IF_EA64(x) x
#else
#define __IF_EA64(x)
#endif

/****************************************************************************/

/* Function/type attributes supported by Clang/SPIR */
#if __has_attribute(__always_inline__)
#  define _CL_ALWAYSINLINE __attribute__((__always_inline__))
#else
#  define _CL_ALWAYSINLINE
#endif
#if __has_attribute(__noinline__)
#  define _CL_NOINLINE __attribute__((__noinline__))
#else
#  define _CL_NOINLINE
#endif
#if __has_attribute(__overloadable__)
#  define _CL_OVERLOADABLE __attribute__((__overloadable__))
#else
#  define _CL_OVERLOADABLE
#endif
#if __has_attribute(__pure__)
#  define _CL_READONLY __attribute__((__pure__))
#else
#  define _CL_READONLY
#endif
#if __has_attribute(__const__)
#  define _CL_READNONE __attribute__((__const__))
#else
#  define _CL_READNONE
#endif
#if __has_attribute(convergent)
#  define _CL_CONVERGENT __attribute__((convergent))
#else
#  define _CL_CONVERGENT
#endif

/************************ setup Clang version macros ******************/

#if (__clang_major__ == 6)

# undef LLVM_6_0
# define LLVM_6_0

#elif (__clang_major__ == 7)

# undef LLVM_7_0
# define LLVM_7_0

#elif (__clang_major__ == 8)

# undef LLVM_8_0
# define LLVM_8_0

#elif (__clang_major__ == 9)

# undef LLVM_9_0
# define LLVM_9_0

#elif (__clang_major__ == 10)

# undef LLVM_10_0
# define LLVM_10_0

#elif (__clang_major__ == 11)

# undef LLVM_11_0
# define LLVM_11_0

#elif (__clang_major__ == 12)

# undef LLVM_12_0
# define LLVM_12_0

#elif (__clang_major__ == 13)

# undef LLVM_13_0
# define LLVM_13_0

#elif (__clang_major__ == 14)

#undef LLVM_14_0
#define LLVM_14_0

#else

#error Unsupported Clang/LLVM version.

#endif

#define CLANG_MAJOR __clang_major__
#include "_libclang_versions_checks.h"

/****************************************************************************/

/* A static assert statement to catch inconsistencies at build time */
#if __has_extension(__c_static_assert__)
#  define _CL_STATIC_ASSERT(_t, _x) _Static_assert(_x, #_t)
#else
#  define _CL_STATIC_ASSERT(_t, _x) typedef int __cl_ai##_t[(x) ? 1 : -1];
#endif

/****************************************************************************/

#define IMG_RO_AQ __read_only
#define IMG_WO_AQ __write_only

#if (__OPENCL_C_VERSION__ > 199)
#define CLANG_HAS_RW_IMAGES
#define IMG_RW_AQ __read_write
#else
#undef CLANG_HAS_RW_IMAGES
#define IMG_RW_AQ __RW_IMAGES_UNSUPPORTED_BEFORE_CL_20
#endif

/****************************************************************************/
/* use Clang opencl header for definitions. */

#ifdef POCL_DEVICE_ADDRESS_BITS

/* If we wish to override the Clang set __SIZE_TYPE__ for this target,
   let's do it here so the opencl-c.h sets size_t to the wanted type. */

#ifdef __SIZE_TYPE__
#undef __SIZE_TYPE__
#endif

#if POCL_DEVICE_ADDRESS_BITS == 32
#define __SIZE_TYPE__ uint
#elif POCL_DEVICE_ADDRESS_BITS == 64
#define __SIZE_TYPE__ ulong
#else
#error Unsupported POCL_DEVICE_ADDRESS_BITS value.
#endif

#endif

#include "_clang_opencl.h"

/****************************************************************************/

/* GNU's libm seems to use INT_MIN here while the Clang's header uses
   INT_MAX. Both are allowed by the OpenCL specs, but we want them to
   be unified to avoid failing tests. */
#undef FP_ILOGBNAN
#undef FP_ILOGB0
#define FP_ILOGBNAN INT_MIN
#define FP_ILOGB0 INT_MIN

/****************************************************************************/

#include "pocl_image_types.h"

#pragma OPENCL EXTENSION all : disable


text:
package com.yeyu.dearinformaton.View;

import com.yeyu.dearinformaton.Constant.LoadNewsType;
import com.yeyu.dearinformaton.View.BaseView.BaseView;
import com.yeyu.dearinformaton.entity.PhotoGirl;

import java.util.List;

/**
 * Created by gaoyehua on 2016/9/11.
 */
public interface PhotoView extends BaseView {
    void setPhotoList(List<PhotoGirl> photoGirls, @LoadNewsType.checker int loadType);
}


text:
package mocks

import (
	k "github.com/remind101/kinesumer/interface"
	"github.com/stretchr/testify/mock"
)

type Checkpointer struct {
	mock.Mock
}

func (m *Checkpointer) DoneC() chan<- k.Record {
	ret := m.Called()

	var r0 chan k.Record
	if ret.Get(0) != nil {
		r0 = ret.Get(0).(chan k.Record)
	}

	return r0
}
func (m *Checkpointer) Begin() error {
	ret := m.Called()

	r0 := ret.Error(0)

	return r0
}
func (m *Checkpointer) End() {
	m.Called()
}
func (m *Checkpointer) GetStartSequence(shardID string) string {
	ret := m.Called(shardID)

	r0 := ret.String(0)

	return r0
}
func (m *Checkpointer) Sync() {
	m.Called()
}
func (m *Checkpointer) TryAcquire(shardID string) error {
	ret := m.Called(shardID)

	r0 := ret.Error(0)

	return r0
}
func (m *Checkpointer) Release(shardID string) error {
	ret := m.Called(shardID)

	r0 := ret.Error(0)

	return r0
}


text:
require File.dirname(__FILE__) + '/../test_helper'

class TestObjects < Test::Unit::TestCase
  def setup
    set_file_paths
  end

  def test_object
    #GitRuby::Object.new(self, objectish)
  end

  def test_gtree
    #GitRuby::Object.new(self, objectish, 'tree')
  end

  def test_gcommit
    #GitRuby::Object.new(self, objectish, 'commit')
  end

  def test_gblob
    #GitRuby::Object.new(self, objectish, 'blob')
  end

  def test_tags
  end

end


text:
<!DOCTYPE html>
<html class="reftest-wait">
<title>WebVTT rendering, default style, italic objects</title>
<link rel="match" href="italic_object_default_font-style-ref.html">
<style>
html { overflow:hidden }
body { margin:0 }
</style>
<script src="/common/reftest-wait.js"></script>
<video width="320" height="180" autoplay onplaying="this.onplaying = null; this.pause(); takeScreenshot();">
    <source src="/media/white.webm" type="video/webm">
    <source src="/media/white.mp4" type="video/mp4">
    <track src="../../support/test_italic.vtt">
    <script>
    document.getElementsByTagName('track')[0].track.mode = 'showing';
    </script>
</video>
</html>


text:
namespace EMU7800.Core
{
    public sealed class Machine2600NTSC : Machine2600
    {
        public override string ToString()
        {
            return GetType().Name;
        }

        public Machine2600NTSC(Cart cart, ILogger logger)
            : base(cart, logger, 262, 16, 60, 31440 /* NTSC_SAMPLES_PER_SEC */, TIATables.NTSCPalette)
        {
        }

        #region Serialization Members

        public Machine2600NTSC(DeserializationContext input) : base(input, TIATables.NTSCPalette)
        {
            input.CheckVersion(1);
        }

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);
            output.WriteVersion(1);
        }

        #endregion
    }
}


text:
package lucy

/*
#include "Lucy/Index/Indexer.h"
#include "Lucy/Index/IndexReader.h"
#include "Lucy/Index/DataReader.h"
#include "Lucy/Index/DataWriter.h"
#include "Lucy/Index/SegWriter.h"
#include "Lucy/Index/DeletionsWriter.h"
#include "Lucy/Index/DocReader.h"
#include "Lucy/Index/LexiconReader.h"
#include "Lucy/Index/PostingListReader.h"
#include "Lucy/Index/HighlightReader.h"
#include "Lucy/Index/SortReader.h"
#include "Lucy/Index/IndexManager.h"
#include "Lucy/Index/BackgroundMerger.h"
#include "Lucy/Index/TermVector.h"
#include "Lucy/Index/Segment.h"
#include "Lucy/Index/Snapshot.h"
#include "Lucy/Index/SortCache.h"
#include "Lucy/Document/Doc.h"
#include "Lucy/Plan/Schema.h"
#include "Clownfish/Hash.h"
#include "Clownfish/String.h"
#include "Clownfish/Vector.h"
#include "Clownfish/Err.h"
*/
import "C"
import "fmt"
import "reflect"
import "strings"
import "unsafe"
import "git-wip-us.apache.org/repos/asf/lucy-clownfish.git/runtime/go/clownfish"

type IndexerIMP struct {
	clownfish.ObjIMP
	fieldNames map[string]string
}

type OpenIndexerArgs struct {
	Schema   Schema
	Index    interface{}
	Manager  IndexManager
	Create   bool
	Truncate bool
}

func OpenIndexer(args *OpenIndexerArgs) (obj Indexer, err error) {
	schema := (*C.lucy_Schema)(clownfish.UnwrapNullable(args.Schema))
	manager := (*C.lucy_IndexManager)(clownfish.UnwrapNullable(args.Manager))
	index := (*C.cfish_Obj)(clownfish.GoToClownfish(args.Index, unsafe.Pointer(C.CFISH_OBJ), false))
	defer C.cfish_decref(unsafe.Pointer(index))
	var flags int32
	if args.Create {
		flags = flags | int32(C.lucy_Indexer_CREATE)
	}
	if args.Truncate {
		flags = flags | int32(C.lucy_Indexer_TRUNCATE)
	}
	err = clownfish.TrapErr(func() {
		cfObj := C.lucy_Indexer_new(schema, index, manager, C.int32_t(flags))
		obj = WRAPIndexer(unsafe.Pointer(cfObj))
	})
	return obj, err
}

func (obj *IndexerIMP) Close() error {
	// TODO: implement Close in core Lucy rather than bindings.
	return nil // TODO catch errors
}

func (obj *IndexerIMP) addDocObj(doc Doc, boost float32) error {
	self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
	d := (*C.lucy_Doc)(clownfish.Unwrap(doc, "doc"))
	return clownfish.TrapErr(func() {
		C.LUCY_Indexer_Add_Doc(self, d, C.float(boost))
	})
}

func (obj *IndexerIMP) addMapAsDoc(doc map[string]interface{}, boost float32) error {
	self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
	d := C.LUCY_Indexer_Get_Stock_Doc(self)
	docFields := fetchDocFields(d)
	for field := range docFields {
		delete(docFields, field)
	}
	for key, value := range doc {
		field, err := obj.findRealField(key)
		if err != nil {
			return err
		}
		docFields[field] = value
	}
	return clownfish.TrapErr(func() {
		C.LUCY_Indexer_Add_Doc(self, d, C.float(boost))
	})
}

func (obj *IndexerIMP) addStructAsDoc(doc interface{}, boost float32) error {
	self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
	d := C.LUCY_Indexer_Get_Stock_Doc(self)
	docFields := fetchDocFields(d)
	for field := range docFields {
		delete(docFields, field)
	}

	// Get reflection value and type for the supplied struct.
	var docValue reflect.Value
	var success bool
	if reflect.ValueOf(doc).Kind() == reflect.Ptr {
		temp := reflect.ValueOf(doc).Elem()
		if temp.Kind() == reflect.Struct {
			docValue = temp
			success = true
		}
	}
	if !success {
		mess := fmt.Sprintf("Unexpected type for doc: %t", doc)
		return clownfish.NewErr(mess)
	}

	// Copy field values into stockDoc.
	docType := docValue.Type()
	for i := 0; i < docValue.NumField(); i++ {
		field := docType.Field(i).Name
		value := docValue.Field(i).String()
		realField, err := obj.findRealField(field)
		if err != nil {
			return err
		}
		docFields[realField] = value
	}

	return clownfish.TrapErr(func() {
		C.LUCY_Indexer_Add_Doc(self, d, C.float(boost))
	})
}

func (obj *IndexerIMP) AddDoc(doc interface{}) error {
	// TODO create an additional method AddDocWithBoost which allows the
	// client to supply `boost`.
	boost := float32(1.0)

	if suppliedDoc, ok := doc.(Doc); ok {
		return obj.addDocObj(suppliedDoc, boost)
	} else if m, ok := doc.(map[string]interface{}); ok {
		return obj.addMapAsDoc(m, boost)
	} else {
		return obj.addStructAsDoc(doc, boost)
	}
}

func (obj *IndexerIMP) findRealField(name string) (string, error) {
	self := ((*C.lucy_Indexer)(unsafe.Pointer(obj.TOPTR())))
	if obj.fieldNames == nil {
		obj.fieldNames = make(map[string]string)
	}
	if field, ok := obj.fieldNames[name]; ok {
		return field, nil
	} else {
		schema := C.LUCY_Indexer_Get_Schema(self)
		fieldList := C.LUCY_Schema_All_Fields(schema)
		defer C.cfish_dec_refcount(unsafe.Pointer(fieldList))
		for i := 0; i < int(C.CFISH_Vec_Get_Size(fieldList)); i++ {
			cfString := unsafe.Pointer(C.CFISH_Vec_Fetch(fieldList, C.size_t(i)))
			field := clownfish.CFStringToGo(cfString)
			if strings.EqualFold(name, field) {
				obj.fieldNames[name] = field
				return field, nil
			}
		}
	}
	return "", clownfish.NewErr(fmt.Sprintf("Unknown field: '%v'", name))
}

func (obj *IndexerIMP) AddIndex(index interface{}) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
		indexC := (*C.cfish_Obj)(clownfish.GoToClownfish(index, unsafe.Pointer(C.CFISH_OBJ), false))
		defer C.cfish_decref(unsafe.Pointer(indexC))
		C.LUCY_Indexer_Add_Index(self, indexC)
	})
}

func (obj *IndexerIMP) DeleteByTerm(field string, term interface{}) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		termC := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), false))
		defer C.cfish_decref(unsafe.Pointer(termC))
		C.LUCY_Indexer_Delete_By_Term(self, fieldC, termC)
	})
}

func (obj *IndexerIMP) DeleteByQuery(query Query) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
		queryC := (*C.lucy_Query)(clownfish.Unwrap(query, "query"))
		C.LUCY_Indexer_Delete_By_Query(self, queryC)
	})
}

func (obj *IndexerIMP) DeleteByDocID(docID int32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Indexer)(clownfish.Unwrap(obj, "obj"))
		C.LUCY_Indexer_Delete_By_Doc_ID(self, C.int32_t(docID))
	})
}

func (obj *IndexerIMP) PrepareCommit() error {
	self := ((*C.lucy_Indexer)(unsafe.Pointer(obj.TOPTR())))
	return clownfish.TrapErr(func() {
		C.LUCY_Indexer_Prepare_Commit(self)
	})
}

func (obj *IndexerIMP) Commit() error {
	self := ((*C.lucy_Indexer)(unsafe.Pointer(obj.TOPTR())))
	return clownfish.TrapErr(func() {
		C.LUCY_Indexer_Commit(self)
	})
}

func (d *DataWriterIMP) addInvertedDoc(inverter Inverter, docId int32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataWriter)(clownfish.Unwrap(d, "d"))
		inverterCF := (*C.lucy_Inverter)(clownfish.Unwrap(inverter, "inverter"))
		C.LUCY_DataWriter_Add_Inverted_Doc(self, inverterCF, C.int32_t(docId))
	})
}

func (d *DataWriterIMP) AddSegment(reader SegReader, docMap []int32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataWriter)(clownfish.Unwrap(d, "d"))
		readerCF := (*C.lucy_SegReader)(clownfish.Unwrap(reader, "reader"))
		docMapConv := NewI32Array(docMap)
		docMapCF := (*C.lucy_I32Array)(clownfish.UnwrapNullable(docMapConv))
		C.LUCY_DataWriter_Add_Segment(self, readerCF, docMapCF)
	})
}

func (d *DataWriterIMP) DeleteSegment(reader SegReader) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataWriter)(clownfish.Unwrap(d, "d"))
		readerCF := (*C.lucy_SegReader)(clownfish.Unwrap(reader, "reader"))
		C.LUCY_DataWriter_Delete_Segment(self, readerCF)
	})
}

func (d *DataWriterIMP) MergeSegment(reader SegReader, docMap []int32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataWriter)(clownfish.Unwrap(d, "d"))
		readerCF := (*C.lucy_SegReader)(clownfish.Unwrap(reader, "reader"))
		docMapConv := NewI32Array(docMap)
		docMapCF := (*C.lucy_I32Array)(clownfish.UnwrapNullable(docMapConv))
		C.LUCY_DataWriter_Merge_Segment(self, readerCF, docMapCF)
	})
}

func (d *DataWriterIMP) Finish() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataWriter)(clownfish.Unwrap(d, "d"))
		C.LUCY_DataWriter_Finish(self)
	})
}

func (s *SegWriterIMP) PrepSegDir() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_SegWriter)(clownfish.Unwrap(s, "s"))
		C.LUCY_SegWriter_Prep_Seg_Dir(self)
	})
}

func (s *SegWriterIMP) AddDoc(doc Doc, boost float32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_SegWriter)(clownfish.Unwrap(s, "s"))
		docCF := (*C.lucy_Doc)(clownfish.Unwrap(doc, "doc"))
		C.LUCY_SegWriter_Add_Doc(self, docCF, C.float(boost))
	})
}

func (d *DeletionsWriterIMP) DeleteByTerm(field string, term interface{}) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(d, "d"))
		fieldCF := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldCF))
		termCF := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), false))
		defer C.cfish_decref(unsafe.Pointer(termCF))
		C.LUCY_DelWriter_Delete_By_Term(self, fieldCF, termCF)
	})
}

func (d *DeletionsWriterIMP) DeleteByQuery(query Query) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(d, "d"))
		queryCF := (*C.lucy_Query)(clownfish.Unwrap(query, "query"))
		C.LUCY_DelWriter_Delete_By_Query(self, queryCF)
	})
}

func (d *DeletionsWriterIMP) deleteByDocID(docId int32) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(d, "d"))
		C.LUCY_DelWriter_Delete_By_Doc_ID(self, C.int32_t(docId))
	})
}

func (d *DeletionsWriterIMP) generateDocMap(deletions Matcher, docMax int32, offset int32) (retval []int32, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(d, "d"))
		deletionsCF := (*C.lucy_Matcher)(clownfish.Unwrap(deletions, "deletions"))
		retvalCF := C.LUCY_DelWriter_Generate_Doc_Map(self, deletionsCF, C.int32_t(docMax), C.int32_t(offset))
		defer C.cfish_decref(unsafe.Pointer(retvalCF))
		retval = i32ArrayToSlice(retvalCF)
	})
	return retval, err
}

func (d *DeletionsWriterIMP) segDeletions(segReader SegReader) (retval Matcher, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(d, "d"))
		segReaderCF := (*C.lucy_SegReader)(clownfish.Unwrap(segReader, "segReader"))
		retvalCF := C.LUCY_DelWriter_Seg_Deletions(self, segReaderCF)
		if retvalCF != nil {
			retval = clownfish.WRAPAny(unsafe.Pointer(retvalCF)).(Matcher)
		}
	})
	return retval, err
}

func OpenBackgroundMerger(index interface{}, manager IndexManager) (bgm BackgroundMerger, err error) {
	err = clownfish.TrapErr(func() {
		indexC := (*C.cfish_Obj)(clownfish.GoToClownfish(index, unsafe.Pointer(C.CFISH_OBJ), false))
		defer C.cfish_decref(unsafe.Pointer(indexC))
		managerC := (*C.lucy_IndexManager)(clownfish.UnwrapNullable(manager))
		cfObj := C.lucy_BGMerger_new(indexC, managerC)
		bgm = WRAPBackgroundMerger(unsafe.Pointer(cfObj))
	})
	return bgm, err
}

func (bgm *BackgroundMergerIMP) PrepareCommit() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_BackgroundMerger)(clownfish.Unwrap(bgm, "bgm"))
		C.LUCY_BGMerger_Prepare_Commit(self)
	})
}

func (bgm *BackgroundMergerIMP) Commit() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_BackgroundMerger)(clownfish.Unwrap(bgm, "bgm"))
		C.LUCY_BGMerger_Commit(self)
	})
}

func (im *IndexManagerIMP) WriteMergeData(cutoff int64) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_IndexManager)(clownfish.Unwrap(im, "im"))
		C.LUCY_IxManager_Write_Merge_Data(self, C.int64_t(cutoff))
	})
}

func (im *IndexManagerIMP) ReadMergeData() (retval map[string]interface{}, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_IndexManager)(clownfish.Unwrap(im, "im"))
		retvalC := C.LUCY_IxManager_Read_Merge_Data(self)
		if retvalC != nil {
			defer C.cfish_decref(unsafe.Pointer(retvalC))
			retval = clownfish.ToGo(unsafe.Pointer(retvalC)).(map[string]interface{})
		}
	})
	return retval, err
}

func (im *IndexManagerIMP) RemoveMergeData() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_IndexManager)(clownfish.Unwrap(im, "im"))
		C.LUCY_IxManager_Remove_Merge_Data(self)
	})
}

func (im *IndexManagerIMP) Recycle(reader PolyReader, delWriter DeletionsWriter,
	cutoff int64, optimize bool) (retval []SegReader, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_IndexManager)(clownfish.Unwrap(im, "im"))
		readerC := (*C.lucy_PolyReader)(clownfish.Unwrap(reader, "reader"))
		delWriterC := (*C.lucy_DeletionsWriter)(clownfish.Unwrap(delWriter, "delWriter"))
		vec := C.LUCY_IxManager_Recycle(self, readerC, delWriterC,
			C.int64_t(cutoff), C.bool(optimize))
		if vec != nil {
			defer C.cfish_decref(unsafe.Pointer(vec))
			size := int(C.CFISH_Vec_Get_Size(vec))
			retval = make([]SegReader, size)
			for i := 0; i < size; i++ {
				elem := C.CFISH_Vec_Fetch(vec, C.size_t(i))
				retval[i] = WRAPSegReader(unsafe.Pointer(C.cfish_incref(unsafe.Pointer(elem))))
			}
		}
	})
	return retval, err
}

func NewTermVector(field, text string, positions, startOffsets, endOffsets []int32) TermVector {
	fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
	textC := (*C.cfish_String)(clownfish.GoToClownfish(text, unsafe.Pointer(C.CFISH_STRING), false))
	defer C.cfish_decref(unsafe.Pointer(fieldC))
	defer C.cfish_decref(unsafe.Pointer(textC))
	posits := NewI32Array(positions)
	starts := NewI32Array(startOffsets)
	ends := NewI32Array(endOffsets)
	positsC := (*C.lucy_I32Array)(clownfish.Unwrap(posits, "posits"))
	startsC := (*C.lucy_I32Array)(clownfish.Unwrap(starts, "starts"))
	endsC := (*C.lucy_I32Array)(clownfish.Unwrap(ends, "ends"))
	retvalC := C.lucy_TV_new(fieldC, textC, positsC, startsC, endsC)
	return WRAPTermVector(unsafe.Pointer(retvalC))
}

func (tv *TermVectorIMP) GetPositions() []int32 {
	self := (*C.lucy_TermVector)(clownfish.Unwrap(tv, "tv"))
	return i32ArrayToSlice(C.LUCY_TV_Get_Positions(self))
}

func (tv *TermVectorIMP) GetStartOffsets() []int32 {
	self := (*C.lucy_TermVector)(clownfish.Unwrap(tv, "tv"))
	return i32ArrayToSlice(C.LUCY_TV_Get_Start_Offsets(self))
}

func (tv *TermVectorIMP) GetEndOffsets() []int32 {
	self := (*C.lucy_TermVector)(clownfish.Unwrap(tv, "tv"))
	return i32ArrayToSlice(C.LUCY_TV_Get_End_Offsets(self))
}

func (s *SnapshotIMP) List() []string {
	self := (*C.lucy_Snapshot)(clownfish.Unwrap(s, "s"))
	retvalC := C.LUCY_Snapshot_List(self)
	defer C.cfish_decref(unsafe.Pointer(retvalC))
	return vecToStringSlice(retvalC)
}

func (s *SnapshotIMP) ReadFile(folder Folder, path string) (Snapshot, error) {
	err := clownfish.TrapErr(func() {
		self := (*C.lucy_Snapshot)(clownfish.Unwrap(s, "s"))
		folderC := (*C.lucy_Folder)(clownfish.Unwrap(folder, "folder"))
		pathC := (*C.cfish_String)(clownfish.GoToClownfish(path, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(pathC))
		C.LUCY_Snapshot_Read_File(self, folderC, pathC)
	})
	return s, err
}

func (s *SnapshotIMP) WriteFile(folder Folder, path string) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Snapshot)(clownfish.Unwrap(s, "s"))
		folderC := (*C.lucy_Folder)(clownfish.Unwrap(folder, "folder"))
		pathC := (*C.cfish_String)(clownfish.GoToClownfish(path, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(pathC))
		C.LUCY_Snapshot_Write_File(self, folderC, pathC)
	})
}

func (s *SegmentIMP) WriteFile(folder Folder) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Segment)(clownfish.Unwrap(s, "s"))
		folderC := (*C.lucy_Folder)(clownfish.Unwrap(folder, "folder"))
		C.LUCY_Seg_Write_File(self, folderC)
	})
}

func (s *SegmentIMP) ReadFile(folder Folder) error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_Segment)(clownfish.Unwrap(s, "s"))
		folderC := (*C.lucy_Folder)(clownfish.Unwrap(folder, "folder"))
		C.LUCY_Seg_Read_File(self, folderC)
	})
}

func (s *SortCacheIMP) Value(ord int32) (retval interface{}, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_SortCache)(clownfish.Unwrap(s, "s"))
		retvalCF := C.LUCY_SortCache_Value(self, C.int32_t(ord))
		defer C.cfish_decref(unsafe.Pointer(retvalCF))
		retval = clownfish.ToGo(unsafe.Pointer(retvalCF))
	})
	return retval, err
}

func (s *SortCacheIMP) Ordinal(docId int32) (retval int32, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_SortCache)(clownfish.Unwrap(s, "s"))
		retvalCF := C.LUCY_SortCache_Ordinal(self, C.int32_t(docId))
		retval = int32(retvalCF)
	})
	return retval, err
}

func (s *SortCacheIMP) Find(term interface{}) (retval int32, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_SortCache)(clownfish.Unwrap(s, "s"))
		termCF := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), true))
		defer C.cfish_decref(unsafe.Pointer(termCF))
		retvalCF := C.LUCY_SortCache_Find(self, termCF)
		retval = int32(retvalCF)
	})
	return retval, err
}

func (d *DataReaderIMP) Aggregator(readers []DataReader, offsets []int32) (retval DataReader, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_DataReader)(clownfish.Unwrap(d, "d"))
		size := len(readers)
		readersC := C.cfish_Vec_new(C.size_t(size))
		defer C.cfish_decref(unsafe.Pointer(readersC))
		for i := 0; i < size; i++ {
			elemC := clownfish.Unwrap(readers[i], "readers[i]")
			C.CFISH_Vec_Push(readersC, C.cfish_incref(elemC))
		}
		offs := NewI32Array(offsets)
		offsetsC := (*C.lucy_I32Array)(clownfish.Unwrap(offs, "offs"))
		retvalCF := C.LUCY_DataReader_Aggregator(self, readersC, offsetsC)
		defer C.cfish_decref(unsafe.Pointer(retvalCF))
		if retvalCF != nil {
			retval = clownfish.ToGo(unsafe.Pointer(retvalCF)).(DataReader)
		}
	})
	return retval, err
}

func (d *DataReaderIMP) GetSegments() []Segment {
	self := (*C.lucy_DataReader)(clownfish.Unwrap(d, "d"))
	retvalCF := C.LUCY_DataReader_Get_Segments(self);
	if retvalCF == nil {
		return nil
	}
	size := C.CFISH_Vec_Get_Size(retvalCF)
	retval := make([]Segment, int(size))
	for i := 0; i < int(size); i++ {
		elem := unsafe.Pointer(C.CFISH_Vec_Fetch(retvalCF, C.size_t(i)))
		retval[i] = clownfish.ToGo(unsafe.Pointer(C.cfish_incref(elem))).(Segment)
	}
	return retval
}

func (d *DataReaderIMP) Close() error {
	return clownfish.TrapErr(func() {
		self := (*C.lucy_DataReader)(clownfish.Unwrap(d, "d"))
		C.LUCY_DataReader_Close(self)
	})
}

func (d *DocReaderIMP) ReadDoc(docID int32, doc interface{}) error {
	self := (*C.lucy_DocReader)(clownfish.Unwrap(d, "d"))
	class := clownfish.GetClass(d)
	classC := ((*C.cfish_Class)(clownfish.Unwrap(class, "class")))
	if classC == C.LUCY_DEFAULTDOCREADER {
		return doReadDocData((*C.lucy_DefaultDocReader)(self), docID, doc)
	} else if classC == C.LUCY_POLYDOCREADER {
		return readDocPolyDR((*C.lucy_PolyDocReader)(self), docID, doc)
	} else {
		panic(clownfish.NewErr(fmt.Sprintf("Unexpected type: %s", class.GetName)))
	}
}

func (d *DocReaderIMP) FetchDoc(docID int32) (doc HitDoc, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_DocReader)(clownfish.Unwrap(d, "d"))
		docC := C.LUCY_DocReader_Fetch_Doc(self, C.int32_t(docID))
		doc = WRAPHitDoc(unsafe.Pointer(docC))
	})
	return doc, err
}

func (lr *LexiconReaderIMP) Lexicon(field string, term interface{}) (retval Lexicon, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_LexiconReader)(clownfish.Unwrap(lr, "lr"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		termC := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), true))
		defer C.cfish_decref(unsafe.Pointer(termC))
		retvalCF := C.LUCY_LexReader_Lexicon(self, fieldC, termC)
		if retvalCF != nil {
			retval = clownfish.ToGo(unsafe.Pointer(retvalCF)).(Lexicon)
		}
	})
	return retval, err
}

func (lr *LexiconReaderIMP) DocFreq(field string, term interface{}) (retval uint32, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_LexiconReader)(clownfish.Unwrap(lr, "lr"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		termC := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), true))
		defer C.cfish_decref(unsafe.Pointer(termC))
		retval = uint32(C.LUCY_LexReader_Doc_Freq(self, fieldC, termC))
	})
	return retval, err
}

func (lr *LexiconReaderIMP) fetchTermInfo(field string, term interface{}) (retval TermInfo, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_LexiconReader)(clownfish.Unwrap(lr, "lr"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		termC := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), true))
		defer C.cfish_decref(unsafe.Pointer(termC))
		retvalCF := C.LUCY_LexReader_Fetch_Term_Info(self, fieldC, termC)
		if retvalCF != nil {
			retval = clownfish.ToGo(unsafe.Pointer(retvalCF)).(TermInfo)
		}
	})
	return retval, err
}

func (p *PostingListReaderIMP) PostingList(field string, term interface{}) (retval PostingList, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_PostingListReader)(clownfish.Unwrap(p, "p"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		termC := (*C.cfish_Obj)(clownfish.GoToClownfish(term, unsafe.Pointer(C.CFISH_OBJ), true))
		defer C.cfish_decref(unsafe.Pointer(termC))
		retvalCF := C.LUCY_PListReader_Posting_List(self, fieldC, termC)
		if retvalCF != nil {
			retval = clownfish.ToGo(unsafe.Pointer(retvalCF)).(PostingList)
		}
	})
	return retval, err
}

func (h *HighlightReaderIMP) FetchDocVec(docID int32) (retval DocVector, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_HighlightReader)(clownfish.Unwrap(h, "h"))
		retvalCF := C.LUCY_HLReader_Fetch_Doc_Vec(self, C.int32_t(docID))
		retval = WRAPDocVector(unsafe.Pointer(retvalCF))
	})
	return retval, err
}

func (s *SortReaderIMP) fetchSortCache(field string) (retval SortCache, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_SortReader)(clownfish.Unwrap(s, "s"))
		fieldC := (*C.cfish_String)(clownfish.GoToClownfish(field, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(fieldC))
		retvalCF := C.LUCY_SortReader_Fetch_Sort_Cache(self, fieldC)
		if retvalCF != nil {
			retval = clownfish.ToGo(unsafe.Pointer(C.cfish_incref(unsafe.Pointer(retvalCF)))).(SortCache)
		}
	})
	return retval, err
}

func OpenIndexReader(index interface{}, snapshot Snapshot, manager IndexManager) (retval IndexReader, err error) {
	err = clownfish.TrapErr(func() {
		indexC := (*C.cfish_Obj)(clownfish.GoToClownfish(index, unsafe.Pointer(C.CFISH_OBJ), false))
		defer C.cfish_decref(unsafe.Pointer(indexC))
		snapshotC := (*C.lucy_Snapshot)(clownfish.UnwrapNullable(snapshot))
		managerC := (*C.lucy_IndexManager)(clownfish.UnwrapNullable(manager))
		cfObj := C.lucy_IxReader_open(indexC, snapshotC, managerC)
		retval = clownfish.WRAPAny(unsafe.Pointer(cfObj)).(IndexReader)
	})
	return retval, err
}

func (r *IndexReaderIMP) SegReaders() []SegReader {
	self := (*C.lucy_IndexReader)(clownfish.Unwrap(r, "r"))
	retvalCF := C.LUCY_IxReader_Seg_Readers(self);
	defer C.cfish_decref(unsafe.Pointer(retvalCF))
	if retvalCF == nil {
		return nil
	}
	size := C.CFISH_Vec_Get_Size(retvalCF)
	retval := make([]SegReader, int(size))
	for i := 0; i < int(size); i++ {
		elem := unsafe.Pointer(C.CFISH_Vec_Fetch(retvalCF, C.size_t(i)))
		retval[i] = clownfish.ToGo(unsafe.Pointer(C.cfish_incref(elem))).(SegReader)
	}
	return retval
}

func (r *IndexReaderIMP) Offsets() []int32 {
	self := (*C.lucy_IndexReader)(clownfish.Unwrap(r, "r"))
	retvalCF := C.LUCY_IxReader_Offsets(self)
	defer C.cfish_decref(unsafe.Pointer(retvalCF))
	return i32ArrayToSlice(retvalCF)
}

func (r *IndexReaderIMP) Obtain(api string) (retval DataReader, err error) {
	err = clownfish.TrapErr(func() {
		self := (*C.lucy_IndexReader)(clownfish.Unwrap(r, "r"))
		apiC := (*C.cfish_String)(clownfish.GoToClownfish(api, unsafe.Pointer(C.CFISH_STRING), false))
		defer C.cfish_decref(unsafe.Pointer(apiC))
		retvalCF := C.LUCY_IxReader_Obtain(self, apiC)
		retval = clownfish.WRAPAny(unsafe.Pointer(C.cfish_incref(unsafe.Pointer(retvalCF)))).(DataReader)
	})
	return retval, err
}


text:
jQuery(document).on('click', '#show_kontaktpersoner, #show_main_mobile_menu', function() {
    pageFocus(jQuery(this));
});
jQuery(document).on('click', '#pageDeFocus', function() {
    jQuery('#' + jQuery(this).attr('data-clicker')).click();
});

function pageFocus(clicked) {
    if (clicked.attr('data-action') == 'show') {
        clicked.attr('data-action', 'hide');

        var title = clicked.attr('data-showJumboUKM');
        if (title == 'true') {
            jQuery('#ukm_page_jumbo_header').hide();
            jQuery('#ukm_page_jumbo_header_temp').show();
        }

        jQuery('#ukm_page_content').hide();
        jQuery('#ukm_page_pre_content').html(jQuery(clicked.attr('data-toggle')).html()).slideDown();

        jQuery('#ukm_page_jumbo_content').hide();
        jQuery('#ukm_page_jumbo_temp').html(clicked.attr('data-toggletitle')).show();

        jQuery('#ukm_page_post_content').show();
        jQuery('#pageDeFocus').attr('data-clicker', clicked.attr('id')).html(clicked.attr('data-toggleclose'));
    } else {
        clicked.attr('data-action', 'show');

        jQuery('#ukm_page_jumbo_temp').html('').hide();
        jQuery('#ukm_page_jumbo_content').show();

        jQuery('#ukm_page_pre_content').slideUp(400, function() { jQuery('#ukm_page_content').show(); });
        jQuery('#ukm_page_post_content').hide();

        jQuery('#ukm_page_jumbo_header_temp').hide();
        jQuery('#ukm_page_jumbo_header').show();
    }
}

window.onbeforeunload = function() {
    //$('#page_load_content').fadeOut(400, function(){$('#page_load_loader').fadeIn();});
};

$(document).on('touchend click', "a.btn:not(.isClicked, .this-is-js)", function(e) {
    e.preventDefault();
    $(this).addClass('isClicked').val('Vennligst vent...').html('Vennligst vent...');
    $(window).trigger('resize');
    window.location.href = $(this).attr('href');
});
$(document).on('touchend click', "a.isClicked", function(e) {
    e.preventDefault();
});

$(document).on('submit', 'form', function() {
    $(this).find(':submit').attr('disabled', 'disabled').val('Vennligst vent...').html('Vennligst vent..');
    return true;
});

jQuery(document).ready(function() {
    jQuery('textarea').autogrow();
});

$(document).on('touchend click', '.clickLinkWithin', function(e) {
    if ($(e.target).is('a') || $(e.target).is('button')) {
        return true;
    }
    if ($(e.target).hasClass('clickLinkWithin')) {
        var clicked = $(e.target);
    } else {
        var clicked = $(e.target).parents('.clickLinkWithin');
    }
    var link = clicked.find('a.linkWithin');
    if (link) {
        window.location.href = link.attr('href');
    }
});


text:
package io.jsonwebtoken.impl.lang;

/**
 * Exception indicating that no implementation of an jjwt-api SPI was found on the classpath.
 * @since 0.11.0
 */
public final class UnavailableImplementationException extends RuntimeException {

    private static final String DEFAULT_NOT_FOUND_MESSAGE = "Unable to find an implementation for %s using java.util.ServiceLoader. Ensure you include a backing implementation .jar in the classpath, for example jjwt-impl.jar, or your own .jar for custom implementations.";

    UnavailableImplementationException(final Class klass) {
        super(String.format(DEFAULT_NOT_FOUND_MESSAGE, klass));
    }
}