text:
package com.example.bigquerydatatransfer;

import static com.google.common.truth.Truth.assertThat;
import static junit.framework.TestCase.assertNotNull;

import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class RunDetailsIT {

  private static final Logger LOG = Logger.getLogger(GetTransferConfigInfoIT.class.getName());
  private ByteArrayOutputStream bout;
  private String runName;
  private PrintStream out;
  private PrintStream originalPrintStream;

  private static final String CONFIG_NAME = requireEnvVar("DTS_TRANSFER_CONFIG_NAME");

  private static String requireEnvVar(String varName) {
    String value = System.getenv(varName);
    assertNotNull(
        "Environment variable " + varName + " is required to perform these tests.",
        System.getenv(varName));
    return value;
  }

  @BeforeClass
  public static void checkRequirements() {
    requireEnvVar("DTS_TRANSFER_CONFIG_NAME");
  }

  @Before
  public void setUp() throws IOException {
    bout = new ByteArrayOutputStream();
    out = new PrintStream(bout);
    originalPrintStream = System.out;
    System.setOut(out);
    try (DataTransferServiceClient client = DataTransferServiceClient.create()) {
      client.listTransferRuns(CONFIG_NAME).iterateAll().forEach(run -> runName = run.getName());
    }
  }

  @After
  public void tearDown() throws IOException {
    // restores print statements in the original method
    System.out.flush();
    System.setOut(originalPrintStream);
    LOG.log(Level.INFO, bout.toString());
  }

  @Test
  public void testRunDetails() throws IOException {
    RunDetails.runDetails(runName);
    assertThat(bout.toString()).contains("Run details retrieved successfully :");
  }
}


text:
const ExtractTextPlugin = require("extract-text-webpack-plugin"),
  _ = require('lodash'),
  fs = require('fs'),
  path = require('path'),
  stripTags = require('striptags'),
  frontMatter = require('front-matter'),
  toml = require('toml'),
  pug = require('pug'),
  moment = require('moment'),
  MarkdownIt = require('markdown-it');

exports.modifyWebpackConfig = function(webpackConfig, env) {
  console.log('gatsby env: ', env);

  webpackConfig.loader('stylus', function(cfg) {
    cfg.test = /\.styl$/;
    if ('develop' !== env) {
      cfg.loader = ExtractTextPlugin.extract("css?-url&minimize!stylus");
    } else {
      cfg.loader = 'style!css?-url!stylus';
    }
    return cfg;
  });

  webpackConfig.loader('png', function(cfg) {
    cfg.test = /\.png$/;
    cfg.loader = 'file';
    return cfg;
  });

  webpackConfig.loader('jpg', function(cfg) {
    cfg.test = /\.jpg$/;
    cfg.loader = 'file';
    return cfg;
  });

  if ('develop' !== env) {
    webpackConfig.plugin('extract-css', ExtractTextPlugin, ['styles.css', { allChunks: true }]);
  }

  return webpackConfig;
};

exports.postBuild = function(pages, callback) {
  buildRssFeed(pages);

  callback()
};

function buildRssFeed(pages) {
  const config = toml.parse(fs.readFileSync('config.toml', 'utf8').toString());

  let relevantPages = [];

  pages.forEach(function(page) {
    if (_.get(page, 'data.title') && _.get(page, 'data.date')) {
      relevantPages.push({
        filePath: page.requirePath,
        path: page.path,
        data: page.data,
      });
    }
  });

  relevantPages.sort(function(a,b) {
    return moment(a.data.date).valueOf() > moment(b.data.date).valueOf() ? -1 : 1;
  });

  const md = new MarkdownIt();

  let feedItems = _.map(relevantPages, function(p) {
    let fileContent = fs.readFileSync(path.join(__dirname, 'pages', p.filePath), 'utf8').toString(),
      fileBody = frontMatter(fileContent).body;

    return {
      title: p.data.title,
      url: `${config.baseUrl}${p.path}`,
      date: moment(p.data.date).toDate(),
      content: _.truncate(stripTags(md.render(fileBody)), {
        length: 1024
      }),
    };
  });

  let html = pug.renderFile(
    path.join(__dirname, 'pug', 'rss.pug'),
    {
      items: feedItems,
      config: config,
    }
  );

  fs.writeFileSync(path.join(__dirname, 'public', 'feed.xml'), html, {
    encoding: 'utf8'
  });
}

redpajama_set_name: RedPajamaGithub


text:
package io.cdap.plugin.zuora.objects;

import com.google.gson.annotations.SerializedName;
import io.cdap.cdap.api.data.schema.Schema;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectDefinition;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectFieldDefinition;
import io.cdap.plugin.zuora.restobjects.objects.BaseObject;

import javax.annotation.Nullable;

/**
* Object name: InvoiceProcessingOptions (InvoiceProcessingOptions).
* Related objects:
**/
@SuppressWarnings("unused")
@ObjectDefinition(
  Name = "InvoiceProcessingOptions",
  ObjectType = ObjectDefinition.ObjectDefinitionType.NESTED
)
public class InvoiceProcessingOptions extends BaseObject {
  /**
  * Name: InvoiceDate (InvoiceDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("invoiceDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String invoiceDate;

  /**
  * Name: InvoiceTargetDate (InvoiceTargetDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("invoiceTargetDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String invoiceTargetDate;

  @Override
  public void addFields() {
    addCustomField("invoiceDate", invoiceDate, String.class);
    addCustomField("invoiceTargetDate", invoiceTargetDate, String.class);
  }
}


text:
import os

from compose_objects import main

RESOURCES = os.path.join(os.path.dirname(__file__), 'resources')
BUCKET = os.environ['CLOUD_STORAGE_BUCKET']

def test_main():
    main(
        BUCKET,
        'dest.txt',
        [os.path.join(RESOURCES, 'file1.txt'),
         os.path.join(RESOURCES, 'file2.txt')]
    )


text:
cask "postbox" do
  version "7.0.30"
  sha256 "820e39dea9bd9221109ba8f811ed553994e563f520b4837067814302d4619abb"

  # d3nx85trn0lqsg.cloudfront.net/mac/ was verified as official when first introduced to the cask
  url "https://d3nx85trn0lqsg.cloudfront.net/mac/postbox-#{version}-mac64.dmg"
  appcast "https://www.postbox-inc.com/download/success-mac"
  name "Postbox"
  desc "Email client focusing on privacy protection"
  homepage "https://www.postbox-inc.com/"

  auto_updates true
  depends_on macos: ">= :high_sierra"

  app "Postbox.app"

  zap trash: [
    "~/Library/Application Support/Postbox",
    "~/Library/Application Support/PostboxApp",
    "~/Library/Caches/com.crashlytics.data/com.postbox-inc.postbox",
    "~/Library/Caches/com.postbox-inc.postbox",
    "~/Library/Caches/Postbox",
    "~/Library/Caches/PostboxApp",
    "~/Library/PDF Services/Mail PDF with Postbox",
    "~/Library/Preferences/com.postbox-inc.postbox.plist",
    "~/Library/Saved Application State/com.postbox-inc.postbox.savedState",
  ]
end


text:
import { InterviewsService } from './interview.service';
export { ApiService } from './api.service';
export { AlertService } from './alert.service';
export { UserService } from './user.service';
export { UsersFactoryService } from './usersFactory.service';
export { InterviewsFactoryService } from './interviewsFactory.service';
export { InterviewsService } from './interview.service'
export { AuthService } from './auth.service';
export { ContactService } from './contact.service';


text:
	<localize key='restrictedswitch_clickToChange'>Click to change</localize>

		<input type="checkbox" name="restrictedswitch" class="restrictedswitch-checkbox" id="idrestrictedswitch" ng-model="engine.checked" ng-change="engine.change()">

				<localize key="restrictedswitch_isRestricted">Is Currently Restricted</localize>

					<localize key="restrictedswitch_notRestricted">Not Currently Restricted</localize>


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=ISO-8859-1">
<TITLE>
UserDetailsManager (Spring Security 2.0.4 API)
</TITLE>

<META NAME="keywords" CONTENT="org.springframework.security.userdetails.UserDetailsManager interface">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.springframework.security.userdetails

Interface UserDetailsManager

All Superinterfaces:
UserDetailsService

All Known Implementing Classes:
JdbcUserDetailsManager, LdapUserDetailsManager

public interface UserDetailsManager
extends UserDetailsService

An extension of the UserDetailsService which provides the ability
 to create new users and update existing ones.

Since:

2.0

Version:

$Id: UserDetailsManager.html,v 1.1 2009/05/19 01:52:30 root Exp $

Author:

Luke Taylor

Method Summary

 void
changePassword(String oldPassword,
               String newPassword)

          Modify the current user's password.

 void
createUser(UserDetails user)

          Create a new user with the supplied details.

 void
deleteUser(String username)

          Remove the user with the given login name from the system.

 void
updateUser(UserDetails user)

          Update the specified user.

 boolean
userExists(String username)

          Check if a user with the supplied login name exists in the system.

Methods inherited from interface org.springframework.security.userdetails.UserDetailsService

loadUserByUsername

Method Detail

createUser

void createUser(UserDetails user)

Create a new user with the supplied details.

updateUser

void updateUser(UserDetails user)

Update the specified user.

deleteUser

void deleteUser(String username)

Remove the user with the given login name from the system.

changePassword

void changePassword(String oldPassword,
                    String newPassword)

Modify the current user's password. This should change the user's password in
 the persistent user repository (datbase, LDAP etc) and should also modify the
 current security context to contain the new password.

Parameters:
oldPassword - current password (for re-authentication if required)
newPassword - the password to change to

userExists

boolean userExists(String username)

Check if a user with the supplied login name exists in the system.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 SpringSource, Inc. All Rights Reserved.


text:
/* global BESPOKE_PDF */
module.exports = function(options) {
  options = options || {};
  options.delay = options.delay || 250;
  options.evalDelay  = options.evalDelay || 100;

  return function(deck) {

    if (!(window.__nwWindowId && window.nwDispatcher)) {
      return;
    }

    window.BESPOKE_PDF = Object.create(deck);

    if (options.setup instanceof Function) { options.setup(BESPOKE_PDF); }

    document.documentElement.classList.add('pdf');

    BESPOKE_PDF.once = function (evt, cb) {
      var off = BESPOKE_PDF.on(evt, function (e) {
        off();
        cb(e);
      });
    };

    BESPOKE_PDF.when = function (evt) {
      //NOTE: we're in the NW.js environment - it's chrome,
      //chrome has es6 Promise
      return new Promise(function (resolve) {
        BESPOKE_PDF.once(evt, function (e) {
          resolve(e);
        });
      });
    };

    BESPOKE_PDF.slides
      .map(function (el) {
        return {
          element: el,
          headline: el.querySelector('h1') ||
            el.querySelector('h2') ||
            el.querySelector('h3') ||
            el.querySelector('h4') ||
            el.querySelector('h5') ||
            el.querySelector('li') ||
            el.querySelector('p') ||
            el.querySelector('span')
        };
      })
      .map(function (slide) {

        if (!slide.headline) { return; }

        slide.element.dataset.pdfId = slide
          .headline
          .innerText
          .trim()
          .toLowerCase()
          .split(' ')
          .join('-');

        return slide.element;
      })
      .filter(Boolean)
      .map(getComputedStyle)
      .map(function (style, i) {
        return style.display === 'none' && i;
      })
      .filter(function (n) {
        return typeof n === 'number';
      })
      .forEach(function(index) {
         BESPOKE_PDF.slides.splice(index, 1);
       });

    BESPOKE_PDF.options = options;

  };
};


text:
"""
Make items sortable by drag-drop in list view. Diffierent from
builtin plugin sortable, it touches model field indeed intead
of only for display.
"""

from __future__ import unicode_literals

from django.template.loader import render_to_string
from django.core.urlresolvers import reverse
from django.db import transaction

from xadmin.views import (
    BaseAdminPlugin, ModelAdminView, ListAdminView
)
from xadmin.sites import site
from xadmin.views.base import csrf_protect_m

class SortableListPlugin(BaseAdminPlugin):

    list_order_field = None

    def init_request(self, *args, **kwargs):
        return bool(self.list_order_field)

    @property
    def is_list_sortable(self):
        return True

    def result_row(self, __, obj):
        row = __()
        row.update({
            "tagattrs": "order-key=order_{}".format(obj.pk)
        })
        return row

    def result_item(self, item, obj, field_name, row):
        if self.is_list_sortable and field_name == self.list_order_field:
            item.btns.append('')
        return item

    def get_context(self, context):
        context['save_order_url'] = self.get_model_url(self.admin_view.model, 'save_order')
        return context

    def block_top_toolbar(self, context, nodes):
        save_node = render_to_string(
            'xadmin/blocks/model_list.top_toolbar.saveorder.html', context_instance=context
        )
        nodes.append(save_node)

    def get_media(self, media):
        if self.is_list_sortable:
            media = media + self.vendor('xadmin.plugin.sortablelist.js')
        return media

class SaveOrderView(ModelAdminView):

    @csrf_protect_m
    @transaction.atomic
    def post(self, request):
        order_objs = request.POST.getlist("order[]")
        for order_value, pk in enumerate(order_objs, start=1):
            self.save_order(pk, order_value)
        return self.render_response({})

    def save_order(self, pk, order_value):
        obj = self.model.objects.get(pk=pk)
        order_field = self.list_order_field
        is_order_changed = lambda x: getattr(x, order_field) != order_value

        if is_order_changed(obj):
            setattr(obj, order_field, order_value)
            obj.save()

site.register_plugin(SortableListPlugin, ListAdminView)
site.register_modelview(r'^save-order/$', SaveOrderView, name='%s_%s_save_order')


text:
package org.wso2.carbon.identity.claim.metadata.mgt.internal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.identity.claim.metadata.mgt.ClaimMetadataManagementService;
import org.wso2.carbon.identity.claim.metadata.mgt.ClaimMetadataManagementServiceImpl;
import org.wso2.carbon.identity.claim.metadata.mgt.ClaimMetadataStoreFactory;
import org.wso2.carbon.identity.claim.metadata.mgt.dao.ClaimConfigInitDAO;
import org.wso2.carbon.identity.claim.metadata.mgt.internal.impl.DefaultClaimConfigInitDAO;
import org.wso2.carbon.identity.claim.metadata.mgt.listener.ClaimConfigListener;
import org.wso2.carbon.identity.claim.metadata.mgt.listener.ClaimMetadataManagementAuditLogger;
import org.wso2.carbon.identity.claim.metadata.mgt.listener.ClaimMetadataMgtListener;
import org.wso2.carbon.identity.claim.metadata.mgt.listener.ClaimMetadataTenantMgtListener;
import org.wso2.carbon.identity.core.util.IdentityCoreInitializedEvent;
import org.wso2.carbon.identity.event.handler.AbstractEventHandler;
import org.wso2.carbon.identity.event.services.IdentityEventService;
import org.wso2.carbon.identity.user.store.configuration.listener.UserStoreConfigListener;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.stratos.common.listeners.TenantMgtListener;
import org.wso2.carbon.user.core.claim.ClaimManagerFactory;
import org.wso2.carbon.user.core.listener.ClaimManagerListener;
import org.wso2.carbon.user.core.service.RealmService;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;

import java.util.Collection;

@SuppressWarnings("unused")
@Component(
         name = "identity.claim.metadata.component",
         immediate = true)
public class IdentityClaimManagementServiceComponent {

    private static final Log log = LogFactory.getLog(IdentityClaimManagementServiceComponent.class);

    @Activate
    protected void activate(ComponentContext ctxt) {
        try {
            BundleContext bundleCtx = ctxt.getBundleContext();

            IdentityClaimManagementServiceDataHolder.getInstance().setBundleContext(bundleCtx);

            if (IdentityClaimManagementServiceDataHolder.getInstance().getClaimConfigInitDAO() == null) {
                IdentityClaimManagementServiceDataHolder.getInstance()
                        .setClaimConfigInitDAO(new DefaultClaimConfigInitDAO());
            }
            ClaimMetadataStoreFactory claimMetadataStoreFactory = new ClaimMetadataStoreFactory();
            bundleCtx.registerService(ClaimManagerFactory.class.getName(), claimMetadataStoreFactory, null);

            ClaimMetadataManagementService claimManagementService = new ClaimMetadataManagementServiceImpl();
            bundleCtx.registerService(ClaimMetadataManagementService.class.getName(), claimManagementService, null);
            IdentityClaimManagementServiceDataHolder.getInstance().setClaimManagementService(claimManagementService);

            bundleCtx.registerService(TenantMgtListener.class.getName(),
                    new ClaimMetadataTenantMgtListener(), null);

            registerClaimConfigListener(bundleCtx);

            // Register claim operation event handler implementation.
            bundleCtx.registerService(AbstractEventHandler.class.getName(), new ClaimMetadataManagementAuditLogger(),
                    null);

            if (log.isDebugEnabled()) {
                log.debug("ClaimMetadataManagementAuditLogger is successfully registered.");
                log.debug("Identity Claim Management Core bundle is activated");
            }
        } catch (Throwable e) {
            log.error("Error occurred while activating Identity Claim Management Service Component", e);
        }
    }

    /**
     * Register ClaimConfigListener as a UserStoreConfigListener service.
     *
     * @param bundleCtx BundleContext
     */
    private void registerClaimConfigListener(BundleContext bundleCtx) {

        UserStoreConfigListener claimConfigListener = new ClaimConfigListener();
        ServiceRegistration mappedClaimConfigListenerSR =
                bundleCtx.registerService(UserStoreConfigListener.class.getName(), claimConfigListener
                        , null);
        if (mappedClaimConfigListenerSR != null) {
            if (log.isDebugEnabled()) {
                log.debug("ClaimConfigListener Service registered.");
            }
        } else {
            log.error("Error registering ClaimConfigListener Service.");
        }
    }

    @Deactivate
    protected void deactivate(ComponentContext ctxt) {
        if (log.isDebugEnabled()) {
            log.debug("Identity Claim Management bundle is deactivated");
        }
    }

    @Reference(
             name = "user.realmservice.default",
             service = org.wso2.carbon.user.core.service.RealmService.class,
             cardinality = ReferenceCardinality.MANDATORY,
             policy = ReferencePolicy.DYNAMIC,
             unbind = "unsetRealmService")
    protected void setRealmService(RealmService realmService) {
        IdentityClaimManagementServiceDataHolder.getInstance().setRealmService(realmService);
        if (log.isDebugEnabled()) {
            log.debug("RealmService set in Identity Claim Management bundle");
        }
    }

    protected void unsetRealmService(RealmService realmService) {
        IdentityClaimManagementServiceDataHolder.getInstance().setRealmService(null);
        if (log.isDebugEnabled()) {
            log.debug("RealmService unset in Identity Claim Management bundle");
        }
    }

    @Reference(
             name = "registry.service",
             service = org.wso2.carbon.registry.core.service.RegistryService.class,
             cardinality = ReferenceCardinality.MANDATORY,
             policy = ReferencePolicy.DYNAMIC,
             unbind = "unsetRegistryService")
    protected void setRegistryService(RegistryService registryService) {
        IdentityClaimManagementServiceDataHolder.getInstance().setRegistryService(registryService);
        if (log.isDebugEnabled()) {
            log.debug("RegistryService set in Identity Claim Management bundle");
        }
    }

    protected void unsetRegistryService(RegistryService registryService) {
        IdentityClaimManagementServiceDataHolder.getInstance().setRegistryService(null);
        if (log.isDebugEnabled()) {
            log.debug("RegistryService unset in Identity Claim Management bundle");
        }
    }

    @Reference(
             name = "claim.manager.listener.service",
             service = org.wso2.carbon.user.core.listener.ClaimManagerListener.class,
             cardinality = ReferenceCardinality.MULTIPLE,
             policy = ReferencePolicy.DYNAMIC,
             unbind = "unsetClaimManagerListener")
    public synchronized void setClaimManagerListener(ClaimManagerListener claimManagerListener) {
        IdentityClaimManagementServiceDataHolder.getInstance().setClaimManagerListener(claimManagerListener);
        if (log.isDebugEnabled()) {
            log.debug("ClaimManagerListener set in Identity Claim Management bundle");
        }
    }

    public synchronized void unsetClaimManagerListener(ClaimManagerListener claimManagerListener) {
        IdentityClaimManagementServiceDataHolder.getInstance().unsetClaimManagerListener(claimManagerListener);
        if (log.isDebugEnabled()) {
            log.debug("ClaimManagerListener unset in Identity Claim Management bundle");
        }
    }

    @Reference(
             name = "identityCoreInitializedEventService",
             service = org.wso2.carbon.identity.core.util.IdentityCoreInitializedEvent.class,
             cardinality = ReferenceCardinality.MANDATORY,
             policy = ReferencePolicy.DYNAMIC,
             unbind = "unsetIdentityCoreInitializedEventService")
    protected void setIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) {
    /* reference IdentityCoreInitializedEvent service to guarantee that this component will wait until identity core
         is started */
    }

    protected void unsetIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) {
    /* reference IdentityCoreInitializedEvent service to guarantee that this component will wait until identity core
         is started */
    }

    @Reference(
            name = "identity.event.service",
            service = IdentityEventService.class,
            cardinality = ReferenceCardinality.MANDATORY,
            policy = ReferencePolicy.DYNAMIC,
            unbind = "unsetIdentityEventService"
    )
    protected void setIdentityEventService(IdentityEventService identityEventService) {

        IdentityClaimManagementServiceDataHolder.getInstance().setIdentityEventService(identityEventService);
        if (log.isDebugEnabled()) {
            log.debug("IdentityEventService set in Identity Claim Management bundle");
        }
    }

    protected void unsetIdentityEventService(IdentityEventService identityEventService) {

        IdentityClaimManagementServiceDataHolder.getInstance().setIdentityEventService(null);
        if (log.isDebugEnabled()) {
            log.debug("IdentityEventService set in Identity Claim Management bundle");
        }
    }

    @Reference(
            name = "claim.metadata.mgt.event.listener.service",
            service = ClaimMetadataMgtListener.class,
            cardinality = ReferenceCardinality.MULTIPLE,
            policy = ReferencePolicy.DYNAMIC,
            unbind = "removeClaimMetadataMgtListenerService"
    )
    protected void addClaimMetadataMgtListenerService(ClaimMetadataMgtListener claimMetadataMgtListenerService) {

        IdentityClaimManagementServiceDataHolder.getInstance().addClaimMetadataMgtListener(
                claimMetadataMgtListenerService);
    }

    protected void removeClaimMetadataMgtListenerService(ClaimMetadataMgtListener claimMetadataMgtListener) {

        IdentityClaimManagementServiceDataHolder.getInstance().removeClaimMetadataMgtListener(claimMetadataMgtListener);
    }

    public static Collection<ClaimMetadataMgtListener> getClaimMetadataMgtListeners() {

        return IdentityClaimManagementServiceDataHolder.getClaimMetadataMgtListeners();
    }

    @Reference(
            name = "claim.config.init.dao",
            service = ClaimConfigInitDAO.class,
            cardinality = ReferenceCardinality.OPTIONAL,
            policy = ReferencePolicy.DYNAMIC,
            unbind = "unsetClaimConfigInitDAO"
    )
    protected void setClaimConfigInitDAO(ClaimConfigInitDAO claimConfigInitDAO) {

        ClaimConfigInitDAO existingDAO = IdentityClaimManagementServiceDataHolder.getInstance().getClaimConfigInitDAO();
        if (existingDAO != null) {
            log.warn("Claim config init DAO implementation " + existingDAO.getClass().getName() +
                    " is registered already and ClaimMetadataStoreFactory is created." +
                    " So DAO Impl : " + claimConfigInitDAO.getClass().getName() + " will not be registered");
        } else {
            IdentityClaimManagementServiceDataHolder.getInstance().setClaimConfigInitDAO(claimConfigInitDAO);
            if (log.isDebugEnabled()) {
                log.debug("Claim config init DAO implementation got registered: " +
                        claimConfigInitDAO.getClass().getName());
            }
        }
    }

    protected void unsetClaimConfigInitDAO(ClaimConfigInitDAO claimConfigInitDAO) {

        IdentityClaimManagementServiceDataHolder.getInstance().setClaimConfigInitDAO(new DefaultClaimConfigInitDAO());
        if (log.isDebugEnabled()) {
            log.debug("Claim config init DAO implementation: " + claimConfigInitDAO.getClass().getName() +
                    " got removed and default Claim config init DAO implementation:" +
                    DefaultClaimConfigInitDAO.class.getName() + " registered.");
        }
    }
}


text:
musicQuizApp.controller('quizcoinsController', ['$scope',

    function ($scope) {
        'use strict';

        $scope.quizCoins = {
            // How many Quiz Coins the current gamer holds.
            balance: 2,

            // At what level does the system think the current game has too few Quiz Coins.
            danger: 3
        };
    }

]);


text:
package org.jacpfx.rcp.registry;

import org.jacpfx.api.annotations.component.Component;
import org.jacpfx.api.annotations.component.DeclarativeView;
import org.jacpfx.api.annotations.component.View;
import org.jacpfx.api.annotations.perspective.Perspective;
import org.jacpfx.api.exceptions.ComponentNotFoundException;
import org.jacpfx.api.exceptions.NonUniqueComponentException;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;

/**
 * Created with IntelliJ IDEA.
 * User: Andy Moncsek
 * Date: 13.08.13
 * Time: 16:09
 * Contains registered classes found by scanning. This class should be thread save by convention. addClasses Method is performed ONCE while bootstrapping the application, while getClasses/Perspectives is called during initialisation of workbench and perspective.
 */
public class ClassRegistry {
    private static final List<Class> allClasses = new CopyOnWriteArrayList<>();

    private ClassRegistry(){

    }

    /**
     * in some cases (like unitTests) it may happen, that the ClassRegistry is invoked many times, do a cleanup before use to ensure old values are gone.
     */
    public static void clearAllClasses() {
        allClasses.clear();
    }

    /**
     * Add classes that were found while package scanning at application start up.
     *
     * @param classes , the list of classes to add
     */
    public static void addClasses(final List<Class> classes) {
        allClasses.addAll(classes);
    }

    /**
     * Returns an un-modifiable  list of all classes.
     *
     * @return an un-modifyable list of all registered classes
     */
    public static List<Class> getAllClasses() {
        return Collections.unmodifiableList(allClasses);
    }

    /**
     * Returns a component class by ID
     *
     * @param id , the component id
     * @return The component class for requested id
     */
    public static Class getComponentClassById(final String id) {
        if (id == null || id.isEmpty())
            throw new ComponentNotFoundException("following component id was not found: " + id);
        final List<Class> result = allClasses.stream()
                .filter(ClassRegistry::checkForAnntotation)
                .filter(component -> checkIdMatch(component, id))
                .collect(Collectors.toList());
        return checkAndGetClassSearch(result, id);

    }

    /**
     * Returns a perspective class by ID.
     *
     * @param id the perspective id
     * @return The perspective class for requested id
     */
    public static Class getPerspectiveClassById(final String id) {
        if (id == null || id.isEmpty())
            throw new ComponentNotFoundException("following perspective id was not found: " + id);
        final List<Class> result = allClasses.stream()
                .filter(clazz -> clazz.isAnnotationPresent(Perspective.class))
                .filter(component -> checkPerspectiveIdMatch(component, id)).collect(Collectors.toList());
        return checkAndGetClassSearch(result, id);
    }

    private static Class checkAndGetClassSearch(final List<Class> result, final String id) {
        if (result.isEmpty())
            throw new ComponentNotFoundException("following perspective or component id was not found: " + id);
        if (result.size() > 1)
            throw new NonUniqueComponentException("more than one component found for id " + id + " component: " + result);
        return result.get(0);
    }

    private static boolean checkForAnntotation(final Class c) {
        return c.isAnnotationPresent(Component.class) || c.isAnnotationPresent(View.class) || c.isAnnotationPresent(DeclarativeView.class);
    }

    private static boolean checkIdMatch(final Class component, final String id) {
        return getIdFromAnnotation(component).equalsIgnoreCase(id);
    }

    private static String getIdFromAnnotation(final Class component) {
        if (component.isAnnotationPresent(Component.class))
            return Component.class.cast(component.getAnnotation(Component.class)).id();
        if (component.isAnnotationPresent(View.class)) return View.class.cast(component.getAnnotation(View.class)).id();
        if (component.isAnnotationPresent(DeclarativeView.class))
            return DeclarativeView.class.cast(component.getAnnotation(DeclarativeView.class)).id();
        return "";
    }

    private static boolean checkPerspectiveIdMatch(final Class perspective, final String id) {
        final Perspective annotation = (Perspective) perspective.getAnnotation(Perspective.class);
        return annotation.id().equalsIgnoreCase(id);
    }
}


text:
namespace {

// Desktop notification constants.
const char kEnrollmentNotificationId[] = "consumer_management.enroll";
const char kEnrollmentNotificationUrl[] = "chrome://consumer-management/enroll";
const char kUnenrollmentNotificationId[] = "consumer_management.unenroll";
const char kUnenrollmentNotificationUrl[] =
    "chrome://consumer-management/unenroll";

// The path to the consumer management enrollment/unenrollment confirmation
// overlay, relative to the settings page URL.
const char kConsumerManagementOverlay[] = "consumer-management-overlay";

class DesktopNotificationDelegate : public NotificationDelegate {
 public:
  // |button_click_callback| is called when the button in the notification is
  // clicked.
  DesktopNotificationDelegate(const std::string& id,
                              const base::Closure& button_click_callback);

  // NotificationDelegate:
  std::string id() const override;
  void ButtonClick(int button_index) override;

 private:
  ~DesktopNotificationDelegate() override;

  const std::string id_;
  const base::Closure button_click_callback_;

  DISALLOW_COPY_AND_ASSIGN(DesktopNotificationDelegate);
};

DesktopNotificationDelegate::DesktopNotificationDelegate(
    const std::string& id,
    const base::Closure& button_click_callback)
    : id_(id), button_click_callback_(button_click_callback) {
}

DesktopNotificationDelegate::~DesktopNotificationDelegate() {
}

std::string DesktopNotificationDelegate::id() const {
  return id_;
}

void DesktopNotificationDelegate::ButtonClick(int button_index) {
  button_click_callback_.Run();
}

}  // namespace

namespace policy {

ConsumerManagementNotifier::ConsumerManagementNotifier(
    Profile* profile,
    ConsumerManagementService* consumer_management_service)
    : profile_(profile),
      consumer_management_service_(consumer_management_service),
      weak_ptr_factory_(this) {
  consumer_management_service_->AddObserver(this);
  OnConsumerManagementStatusChanged();
}

ConsumerManagementNotifier::~ConsumerManagementNotifier() {
}

void ConsumerManagementNotifier::Shutdown() {
  consumer_management_service_->RemoveObserver(this);
}

void ConsumerManagementNotifier::OnConsumerManagementStatusChanged() {
  const ConsumerManagementStage stage =
      consumer_management_service_->GetStage();
  if (stage.HasPendingNotification()) {
    // Reset the stage so that we won't show the same notification, again.
    consumer_management_service_->SetStage(ConsumerManagementStage::None());
    ShowNotification(stage);
  }
}

void ConsumerManagementNotifier::ShowNotification(
    const ConsumerManagementStage& stage) {
  if (stage.HasEnrollmentSucceeded()) {
    ShowDesktopNotification(
        kEnrollmentNotificationId,
        kEnrollmentNotificationUrl,
        IDS_CONSUMER_MANAGEMENT_ENROLLMENT_NOTIFICATION_TITLE,
        IDS_CONSUMER_MANAGEMENT_ENROLLMENT_NOTIFICATION_BODY,
        IDS_CONSUMER_MANAGEMENT_NOTIFICATION_MODIFY_SETTINGS_BUTTON,
        base::Bind(&ConsumerManagementNotifier::OpenSettingsPage,
                   weak_ptr_factory_.GetWeakPtr()));
  } else if (stage.HasEnrollmentFailed()) {
    ShowDesktopNotification(
        kEnrollmentNotificationId,
        kEnrollmentNotificationUrl,
        IDS_CONSUMER_MANAGEMENT_ENROLLMENT_FAILURE_NOTIFICATION_TITLE,
        IDS_CONSUMER_MANAGEMENT_ENROLLMENT_FAILURE_NOTIFICATION_BODY,
        IDS_CONSUMER_MANAGEMENT_NOTIFICATION_TRY_AGAIN_BUTTON,
        base::Bind(&ConsumerManagementNotifier::TryAgain,
                   weak_ptr_factory_.GetWeakPtr()));
  } else if (stage.HasUnenrollmentSucceeded()) {
    ShowDesktopNotification(
        kUnenrollmentNotificationId,
        kUnenrollmentNotificationUrl,
        IDS_CONSUMER_MANAGEMENT_UNENROLLMENT_NOTIFICATION_TITLE,
        IDS_CONSUMER_MANAGEMENT_UNENROLLMENT_NOTIFICATION_BODY,
        IDS_CONSUMER_MANAGEMENT_NOTIFICATION_MODIFY_SETTINGS_BUTTON,
        base::Bind(&ConsumerManagementNotifier::OpenSettingsPage,
                   weak_ptr_factory_.GetWeakPtr()));
  } else if (stage.HasUnenrollmentFailed()) {
    ShowDesktopNotification(
        kUnenrollmentNotificationId,
        kUnenrollmentNotificationUrl,
        IDS_CONSUMER_MANAGEMENT_UNENROLLMENT_FAILURE_NOTIFICATION_TITLE,
        IDS_CONSUMER_MANAGEMENT_UNENROLLMENT_FAILURE_NOTIFICATION_BODY,
        IDS_CONSUMER_MANAGEMENT_NOTIFICATION_TRY_AGAIN_BUTTON,
        base::Bind(&ConsumerManagementNotifier::TryAgain,
                   weak_ptr_factory_.GetWeakPtr()));
  } else {
    NOTREACHED();
  }
}

void ConsumerManagementNotifier::ShowDesktopNotification(
    const std::string& notification_id,
    const std::string& notification_url,
    int title_message_id,
    int body_message_id,
    int button_label_message_id,
    const base::Closure& button_click_callback) {
  message_center::RichNotificationData optional_field;
  optional_field.buttons.push_back(message_center::ButtonInfo(
      l10n_util::GetStringUTF16(button_label_message_id)));

  Notification notification(
      message_center::NOTIFICATION_TYPE_SIMPLE,
      l10n_util::GetStringUTF16(title_message_id),
      l10n_util::GetStringUTF16(body_message_id),
      ui::ResourceBundle::GetSharedInstance().GetImageNamed(
          IDR_CONSUMER_MANAGEMENT_NOTIFICATION_ICON),
      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
                                 notification_id),
      base::string16(),  // display_source
      GURL(notification_url), notification_id, optional_field,
      new DesktopNotificationDelegate(notification_id, button_click_callback));

  notification.SetSystemPriority();
  g_browser_process->notification_ui_manager()->Add(notification, profile_);
}

void ConsumerManagementNotifier::OpenSettingsPage() const {
  const GURL url(chrome::kChromeUISettingsURL);
  chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
  params.disposition = NEW_FOREGROUND_TAB;
  chrome::Navigate(&params);
}

void ConsumerManagementNotifier::TryAgain() const {
  const GURL base_url(chrome::kChromeUISettingsURL);
  const GURL url = base_url.Resolve(kConsumerManagementOverlay);

  chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
  params.disposition = NEW_FOREGROUND_TAB;
  chrome::Navigate(&params);
}

}  // namespace policy


text:
  Sommedieue est
       un village
       géographiquement positionné dans le département de Meuse en Lorraine. On dénombrait 944 habitants en 2008.

Le parc de logements, à Sommedieue, se décomposait en 2011 en 67 appartements et 355 maisons soit
 un marché relativement équilibré.

À coté de Sommedieue sont localisées les villes de
Ancemont située à 4 km, 571 habitants,
Mouilly localisée à 6 km, 110 habitants,
Belrupt-en-Verdunois située à 6 km, 442 habitants,
Haudainville localisée à 5 km, 1 003 habitants,
Dieue-sur-Meuse à 3 km, 1 382 habitants,
Dugny-sur-Meuse à 6 km, 1 324 habitants,
 entre autres. De plus, Sommedieue est située à seulement neuf km de Verdun.

La ville compte quelques  aménagements, elle dispose, entre autres, de deux terrains de sport et une boucle de randonnée.

À Sommedieue, la valeur moyenne à l'achat d'un appartement se situe à zero € du m² en vente. Le prix moyen d'une maison à l'achat se situe à 509 € du m². À la location la valeur moyenne se situe à 0 € du m² par mois.

Si vous envisagez de emmenager à Sommedieue, vous pourrez aisément trouver une maison à acheter.


text:
A Portable Class Library for handling Twitch emotes.

More detailed README coming soon! Kappa


text:
layout: page
title: Gilmore Productions Seminar
date: 2016-05-24
author: Christine Hahn
tags: weekly links, java
status: published
summary: Cras in rutrum ante, ut lacinia felis.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 11/27/2018
  endDate: 11/29/2018
  ctyhocn: MTVVAHX
  groupCode: GPS
published: true
---
Nulla auctor enim a sem ultricies consequat. Aenean eget condimentum diam. Cras massa lectus, viverra at justo a, accumsan bibendum sem. Donec ultricies purus ipsum, ac volutpat diam aliquam id. Suspendisse scelerisque, dui ut tristique maximus, felis tellus auctor purus, accumsan semper magna lorem a augue. Etiam id condimentum leo. Donec ac mi lobortis, condimentum justo vitae, vestibulum massa. Cras scelerisque ornare blandit. Nam volutpat commodo faucibus. Donec imperdiet sollicitudin pulvinar. Quisque interdum justo vehicula leo gravida, at ornare nisi interdum. Etiam porttitor risus a justo gravida pellentesque. Cras quis congue risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ullamcorper sit amet justo ac condimentum.
Donec luctus elit vitae vulputate consequat. Nullam lorem nibh, venenatis quis lectus et, dignissim sodales leo. Suspendisse potenti. Nullam tempus aliquet maximus. Aliquam convallis massa odio, ac rhoncus mi iaculis quis. Sed id ex non sapien auctor porttitor ut tempor lorem. Cras faucibus vulputate erat sit amet imperdiet. Donec nec arcu et neque dignissim semper. Etiam luctus libero tellus, nec consectetur elit commodo vestibulum. Nunc a lorem quis ligula condimentum rhoncus.

* Nunc sit amet ipsum semper, pellentesque metus vel, feugiat enim
* Pellentesque in odio non diam interdum vulputate
* Nunc efficitur turpis ut ipsum fermentum accumsan
* Sed sed massa quis lectus vestibulum blandit sit amet sed eros
* Sed id sapien congue, porta eros in, finibus velit.

Nulla ac eros ultrices, egestas mauris id, scelerisque elit. Pellentesque faucibus, dui ut posuere facilisis, erat nulla tempor neque, nec ultricies dolor magna eget nisl. Aliquam libero sapien, scelerisque eleifend metus eget, aliquet ornare lectus. In efficitur ante finibus, varius purus ac, ultrices lacus. Proin placerat porttitor metus. In aliquet magna ut congue sollicitudin. Cras placerat ac urna et gravida. Suspendisse mollis sit amet urna ac imperdiet. Morbi viverra ut libero quis lobortis.


text:
@interface GGViewController2 : UIViewController

@end


text:
module Dhoom
  module Parallax_Utils
    #HOW TO USE
    #The script will automatically search for any parallax graphics.
    #Put any of this after parallax filename
    # _overlay
    # _anim_(frame)
    # _overlay_anim_(frame)
    #You don't have to specify the total frame for animation, the script
    #will do it automatically.
    #example :
    # Parallax filename = parallax_example
    #   parallax_example_overlay
    #   parallax_example_anim_1, parallax_example_anim_2, parallax_example_anim_3
    #   parallax_example_overlay_anim_1

    #Put map ID here to disable any modified parallax properties
    IGNORE_MAP = [5]
    #Parallax animation speed
    ANIM_SPEED = 10
  end
end

class Game_Map
  attr_reader   :animated_parallax_name
  attr_reader   :animated_parallax_total_frame
  attr_reader   :overlay_parallax_name
  attr_reader   :overlay_animated_parallax_name
  attr_reader   :overlay_animated_parallax_total_frame

  alias dhoom_parutils_gmmap_calc_parallax_x calc_parallax_x
  def calc_parallax_x(bitmap)
    return @display_x / 8 unless Dhoom::Parallax_Utils::IGNORE_MAP.include?(@map_id)
    return dhoom_parutils_gmmap_calc_parallax_x(bitmap)
  end

  alias dhoom_parutils_gmmap_calc_parallax_y calc_parallax_y
  def calc_parallax_y(bitmap)
    return @display_y / 8 unless Dhoom::Parallax_Utils::IGNORE_MAP.include?(@map_id)
    return dhoom_parutils_gmmap_calc_parallax_y(bitmap)
  end

  alias dhoom_parutils_gmmap_setup setup
  def setup(map_id)
    dhoom_parutils_gmmap_setup(map_id)
    return if Dhoom::Parallax_Utils::IGNORE_MAP.include?(@map_id)
    setup_animated_parallax
    setup_overlay_parallax
    setup_overlay_animated_parallax
  end

  def setup_animated_parallax
    return unless any_animated_parallax?
    @animated_parallax_name = "#{@parallax_name}_anim_"
    @animated_parallax_total_frame = get_frame(@animated_parallax_name)
  end

  def setup_overlay_parallax
    return unless any_overlay_parallax?
    @overlay_parallax_name = "#{parallax_name}_overlay"
  end

  def setup_overlay_animated_parallax
    return if !any_overlay_animated_parallax?
    @overlay_animated_parallax_name = "#{parallax_name}_overlay_anim_"
    @overlay_animated_parallax_total_frame = get_frame(@overlay_animated_parallax_name)
  end

  def get_frame(name)
    frame = 1
    while FileTest.exist?("Graphics/Parallaxes/#{name}#{frame}.png") do
      frame += 1
    end
    frame -= 1
    return frame
  end

  def any_animated_parallax?
    return FileTest.exist?("Graphics/Parallaxes/#{@parallax_name}_anim_1.png")
  end

  def any_overlay_parallax?
    return FileTest.exist?("Graphics/Parallaxes/#{@parallax_name}_overlay.png")
  end

  def any_overlay_animated_parallax?
    return FileTest.exist?("Graphics/Parallaxes/#{@parallax_name}_overlay_anim_1.png")
  end
end

class Spriteset_Map
  alias dhoom_parutils_sprsmap_create_parallax create_parallax
  def create_parallax
    dhoom_parutils_sprsmap_create_parallax
    @animated_parallax = Plane.new(@viewport1)
    @animated_parallax.z = -100
    @overlay_parallax = Plane.new(@viewport3)
    @overlay_animated_parallax = Plane.new(@viewport3)
  end

  alias dhoom_parutils_sprsmap_update update
  def update
    dhoom_parutils_sprsmap_update
    update_animated_parallax
    update_overlay_parallax
    update_overlay_animated_parallax
  end

  def update_animated_parallax
    return unless $game_map.any_animated_parallax?
    if @animated_parallax_name != $game_map.animated_parallax_name
      @animated_parallax_name = $game_map.animated_parallax_name
      @animated_parallax_frame = 1
      @animated_parallax_wait = Dhoom::Parallax_Utils::ANIM_SPEED
      if @animated_parallax.bitmap != nil
        @animated_parallax.bitmap.dispose
        @animated_parallax.bitmap = nil
      end
      if @animated_parallax_name != "" and $game_map.any_animated_parallax?
        update_animated_parallax_graphic
      end
      Graphics.frame_reset
    end
    if @animated_parallax_wait > 0
      @animated_parallax_wait -= 1
    else
      if @animated_parallax_frame < $game_map.animated_parallax_total_frame
        @animated_parallax_frame += 1
      else
        @animated_parallax_frame = 1
      end
      update_animated_parallax_graphic
      @animated_parallax_wait = Dhoom::Parallax_Utils::ANIM_SPEED
    end
    @animated_parallax.ox = $game_map.calc_parallax_x(@animated_parallax.bitmap)
    @animated_parallax.oy = $game_map.calc_parallax_y(@animated_parallax.bitmap)
  end

  def update_animated_parallax_graphic
    @animated_parallax.bitmap = Cache.parallax("#{@animated_parallax_name}#{@animated_parallax_frame}")
  end

  def update_overlay_parallax
    return unless $game_map.any_overlay_parallax?
    if @overlay_parallax_name != $game_map.overlay_parallax_name
      @overlay_parallax_name = $game_map.overlay_parallax_name
      if @overlay_parallax.bitmap != nil
        @overlay_parallax.bitmap.dispose
        @overlay_parallax.bitmap = nil
      end
      if @overlay_parallax_name != "" and $game_map.any_overlay_parallax?
        @overlay_parallax.bitmap = Cache.parallax(@overlay_parallax_name)
      end
      Graphics.frame_reset
    end
    @overlay_parallax.ox = $game_map.calc_parallax_x(@overlay_parallax.bitmap)
    @overlay_parallax.oy = $game_map.calc_parallax_y(@overlay_parallax.bitmap)
  end

  def update_overlay_animated_parallax
    return unless $game_map.any_overlay_animated_parallax?
    if @overlay_animated_parallax_name != $game_map.overlay_animated_parallax_name
      @overlay_animated_parallax_name = $game_map.overlay_animated_parallax_name
      @overlay_animated_parallax_frame = 1
      @overlay_animated_parallax_wait = Dhoom::Parallax_Utils::ANIM_SPEED
      if @overlay_animated_parallax.bitmap != nil
        @overlay_animated_parallax.bitmap.dispose
        @overlay_animated_parallax.bitmap = nil
      end
      if @overlay_animated_parallax_name != "" and $game_map.any_overlay_animated_parallax?
        update_overlay_animated_parallax_graphic
      end
      Graphics.frame_reset
    end
    if @overlay_animated_parallax_wait > 0
      @overlay_animated_parallax_wait -= 1
    else
      if @overlay_animated_parallax_frame < $game_map.overlay_animated_parallax_total_frame
        @overlay_animated_parallax_frame += 1
      else
        @overlay_animated_parallax_frame = 1
      end
      update_overlay_animated_parallax_graphic
      @overlay_animated_parallax_wait = Dhoom::Parallax_Utils::ANIM_SPEED
    end
    @overlay_animated_parallax.ox = $game_map.calc_parallax_x(@overlay_animated_parallax.bitmap)
    @overlay_animated_parallax.oy = $game_map.calc_parallax_y(@overlay_animated_parallax.bitmap)
  end

  def update_overlay_animated_parallax_graphic
    @overlay_animated_parallax.bitmap = Cache.parallax("#{@overlay_animated_parallax_name}#{@overlay_animated_parallax_frame}")
  end

  alias dhoom_parutils_sprsmap_dispose_parallax dispose_parallax
  def dispose_parallax
    dhoom_parutils_sprsmap_dispose_parallax
    @animated_parallax.dispose unless @animated_parallax.nil?
    @overlay_parallax.dispose unless @overlay_parallax.nil?
    @overlay_animated_parallax.dispose unless @overlay_animated_parallax.nil?
  end
end


text:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2019 The Syndicate Ltd developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef SYNX_HASH_H
#define SYNX_HASH_H

#include "crypto/ripemd160.h"
#include "crypto/sha256.h"
#include "serialize.h"
#include "uint256.h"
#include "version.h"

#include "crypto/sph_blake.h"
#include "crypto/sph_bmw.h"
#include "crypto/sph_groestl.h"
#include "crypto/sph_jh.h"
#include "crypto/sph_keccak.h"
#include "crypto/sph_skein.h"
#include "crypto/sph_luffa.h"
#include "crypto/sph_cubehash.h"
#include "crypto/sph_shavite.h"
#include "crypto/sph_simd.h"
#include "crypto/sph_echo.h"
#include "crypto/sha512.h"

#include <iomanip>
#include <openssl/sha.h>
#include <sstream>
#include <vector>

typedef uint256 ChainCode;

/** A hasher class for Bitcoin's 256-bit hash (double SHA-256). */
class CHash256
{
private:
    CSHA256 sha;

public:
    static const size_t OUTPUT_SIZE = CSHA256::OUTPUT_SIZE;

    void Finalize(unsigned char hash[OUTPUT_SIZE])
    {
        unsigned char buf[CSHA256::OUTPUT_SIZE];
        sha.Finalize(buf);
        sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(hash);
    }

    CHash256& Write(const unsigned char* data, size_t len)
    {
        sha.Write(data, len);
        return *this;
    }

    CHash256& Reset()
    {
        sha.Reset();
        return *this;
    }
};

class CHash512
{
private:
    CSHA512 sha;

public:
    static const size_t OUTPUT_SIZE = CSHA512::OUTPUT_SIZE;

    void Finalize(unsigned char hash[OUTPUT_SIZE])
    {
        unsigned char buf[CSHA512::OUTPUT_SIZE];
        sha.Finalize(buf);
        sha.Reset().Write(buf, CSHA512::OUTPUT_SIZE).Finalize(hash);
    }

    CHash512& Write(const unsigned char* data, size_t len)
    {
        sha.Write(data, len);
        return *this;
    }

    CHash512& Reset()
    {
        sha.Reset();
        return *this;
    }
};

#ifdef GLOBALDEFINED
#define GLOBAL
#else
#define GLOBAL extern
#endif

GLOBAL sph_blake512_context z_blake;
GLOBAL sph_bmw512_context z_bmw;
GLOBAL sph_groestl512_context z_groestl;
GLOBAL sph_jh512_context z_jh;
GLOBAL sph_keccak512_context z_keccak;
GLOBAL sph_skein512_context z_skein;
GLOBAL sph_luffa512_context     z_luffa;
GLOBAL sph_cubehash512_context  z_cubehash;
GLOBAL sph_shavite512_context   z_shavite;
GLOBAL sph_simd512_context      z_simd;
GLOBAL sph_echo512_context      z_echo;

#define fillz() do { \
    sph_blake512_init(&z_blake); \
    sph_bmw512_init(&z_bmw); \
    sph_groestl512_init(&z_groestl); \
    sph_jh512_init(&z_jh); \
    sph_keccak512_init(&z_keccak); \
    sph_skein512_init(&z_skein); \
    sph_luffa512_init(&z_luffa); \
    sph_cubehash512_init(&z_cubehash); \
    sph_shavite512_init(&z_shavite); \
    sph_simd512_init(&z_simd); \
    sph_echo512_init(&z_echo); \
} while (0)

#define ZBLAKE (memcpy(&ctx_blake, &z_blake, sizeof(z_blake)))
#define ZBMW (memcpy(&ctx_bmw, &z_bmw, sizeof(z_bmw)))
#define ZGROESTL (memcpy(&ctx_groestl, &z_groestl, sizeof(z_groestl)))
#define ZJH (memcpy(&ctx_jh, &z_jh, sizeof(z_jh)))
#define ZKECCAK (memcpy(&ctx_keccak, &z_keccak, sizeof(z_keccak)))
#define ZSKEIN (memcpy(&ctx_skein, &z_skein, sizeof(z_skein)))

/* ----------- Bitcoin Hash ------------------------------------------------- */
/** A hasher class for Bitcoin's 160-bit hash (SHA-256 + RIPEMD-160). */
class CHash160
{
private:
    CSHA256 sha;

public:
    static const size_t OUTPUT_SIZE = CRIPEMD160::OUTPUT_SIZE;

    void Finalize(unsigned char hash[OUTPUT_SIZE])
    {
        unsigned char buf[CSHA256::OUTPUT_SIZE];
        sha.Finalize(buf);
        CRIPEMD160().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(hash);
    }

    CHash160& Write(const unsigned char* data, size_t len)
    {
        sha.Write(data, len);
        return *this;
    }

    CHash160& Reset()
    {
        sha.Reset();
        return *this;
    }
};

/** Compute the 256-bit hash of a std::string */
inline std::string Hash(std::string input)
{
    unsigned char hash[SHA256_DIGEST_LENGTH];
    SHA256_CTX sha256;
    SHA256_Init(&sha256);
    SHA256_Update(&sha256, input.c_str(), input.size());
    SHA256_Final(hash, &sha256);
    std::stringstream ss;
    for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) {
        ss << std::hex << std::setw(2) << std::setfill('0') << (int)hash[i];
    }
    return ss.str();
}

/** Compute the 256-bit hash of a void pointer */
inline void Hash(void* in, unsigned int len, unsigned char* out)
{
    SHA256_CTX sha256;
    SHA256_Init(&sha256);
    SHA256_Update(&sha256, in, len);
    SHA256_Final(out, &sha256);
}

/** Compute the 512-bit hash of an object. */
template <typename T1>
inline uint512 Hash512(const T1 pbegin, const T1 pend)
{
    static const unsigned char pblank[1] = {};
    uint512 result;
    CHash512().Write(pbegin == pend ? pblank : (const unsigned char*)&pbegin[0], (pend - pbegin) * sizeof(pbegin[0])).Finalize((unsigned char*)&result);
    return result;
}
template <typename T1, typename T2>
inline uint512 Hash512(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end)
{
    static const unsigned char pblank[1] = {};
    uint512 result;
    CHash512().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of an object. */
template <typename T1>
inline uint256 Hash(const T1 pbegin, const T1 pend)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(pbegin == pend ? pblank : (const unsigned char*)&pbegin[0], (pend - pbegin) * sizeof(pbegin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of the concatenation of two objects. */
template <typename T1, typename T2>
inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of the concatenation of three objects. */
template <typename T1, typename T2, typename T3>
inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of the concatenation of three objects. */
template <typename T1, typename T2, typename T3, typename T4>
inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0])).Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of the concatenation of three objects. */
template <typename T1, typename T2, typename T3, typename T4, typename T5>
inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0])).Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0])).Write(p5begin == p5end ? pblank : (const unsigned char*)&p5begin[0], (p5end - p5begin) * sizeof(p5begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 256-bit hash of the concatenation of three objects. */
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end, const T6 p6begin, const T6 p6end)
{
    static const unsigned char pblank[1] = {};
    uint256 result;
    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0])).Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0])).Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0])).Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0])).Write(p5begin == p5end ? pblank : (const unsigned char*)&p5begin[0], (p5end - p5begin) * sizeof(p5begin[0])).Write(p6begin == p6end ? pblank : (const unsigned char*)&p6begin[0], (p6end - p6begin) * sizeof(p6begin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 160-bit hash an object. */
template <typename T1>
inline uint160 Hash160(const T1 pbegin, const T1 pend)
{
    static unsigned char pblank[1] = {};
    uint160 result;
    CHash160().Write(pbegin == pend ? pblank : (const unsigned char*)&pbegin[0], (pend - pbegin) * sizeof(pbegin[0])).Finalize((unsigned char*)&result);
    return result;
}

/** Compute the 160-bit hash of a vector. */
inline uint160 Hash160(const std::vector<unsigned char>& vch)
{
    return Hash160(vch.begin(), vch.end());
}

/** A writer stream (for serialization) that computes a 256-bit hash. */
class CHashWriter
{
private:
    CHash256 ctx;

public:
    int nType;
    int nVersion;

    CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {}

    CHashWriter& write(const char* pch, size_t size)
    {
        ctx.Write((const unsigned char*)pch, size);
        return (*this);
    }

    // invalidates the object
    uint256 GetHash()
    {
        uint256 result;
        ctx.Finalize((unsigned char*)&result);
        return result;
    }

    template <typename T>
    CHashWriter& operator<<(const T& obj)
    {
        // Serialize to this stream
        ::Serialize(*this, obj, nType, nVersion);
        return (*this);
    }
};

/** Compute the 256-bit hash of an object's serialization. */
template <typename T>
uint256 SerializeHash(const T& obj, int nType = SER_GETHASH, int nVersion = PROTOCOL_VERSION)
{
    CHashWriter ss(nType, nVersion);
    ss << obj;
    return ss.GetHash();
}

unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);

void BIP32Hash(const ChainCode chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]);

//int HMAC_SHA512_Init(HMAC_SHA512_CTX *pctx, const void *pkey, size_t len);
//int HMAC_SHA512_Update(HMAC_SHA512_CTX *pctx, const void *pdata, size_t len);
//int HMAC_SHA512_Final(unsigned char *pmd, HMAC_SHA512_CTX *pctx);

/* ----------- Quark Hash ------------------------------------------------ */
template <typename T1>
inline uint256 HashX11(const T1 pbegin, const T1 pend)
{
    sph_blake512_context     ctx_blake;
    sph_bmw512_context       ctx_bmw;
    sph_groestl512_context   ctx_groestl;
    sph_jh512_context        ctx_jh;
    sph_keccak512_context    ctx_keccak;
    sph_skein512_context     ctx_skein;
    sph_luffa512_context     ctx_luffa;
    sph_cubehash512_context  ctx_cubehash;
    sph_shavite512_context   ctx_shavite;
    sph_simd512_context      ctx_simd;
    sph_echo512_context      ctx_echo;
    static unsigned char pblank[1];

    uint512 hash[17];

    sph_blake512_init(&ctx_blake);
    sph_blake512(&ctx_blake, (pbegin == pend ? pblank : static_cast<const void*>(&pbegin[0])), (pend - pbegin) * sizeof(pbegin[0]));
    sph_blake512_close(&ctx_blake, static_cast<void*>(&hash[0]));

    sph_bmw512_init(&ctx_bmw);
    sph_bmw512(&ctx_bmw, static_cast<const void*>(&hash[0]), 64);
    sph_bmw512_close(&ctx_bmw, static_cast<void*>(&hash[1]));

    sph_groestl512_init(&ctx_groestl);
    sph_groestl512(&ctx_groestl, static_cast<const void*>(&hash[1]), 64);
    sph_groestl512_close(&ctx_groestl, static_cast<void*>(&hash[2]));

    sph_skein512_init(&ctx_skein);
    sph_skein512(&ctx_skein, static_cast<const void*>(&hash[2]), 64);
    sph_skein512_close(&ctx_skein, static_cast<void*>(&hash[3]));

    sph_jh512_init(&ctx_jh);
    sph_jh512(&ctx_jh, static_cast<const void*>(&hash[3]), 64);
    sph_jh512_close(&ctx_jh, static_cast<void*>(&hash[4]));

    sph_keccak512_init(&ctx_keccak);
    sph_keccak512(&ctx_keccak, static_cast<const void*>(&hash[4]), 64);
    sph_keccak512_close(&ctx_keccak, static_cast<void*>(&hash[5]));

    sph_luffa512_init(&ctx_luffa);
    sph_luffa512(&ctx_luffa, static_cast<void*>(&hash[5]), 64);
    sph_luffa512_close(&ctx_luffa, static_cast<void*>(&hash[6]));

    sph_cubehash512_init(&ctx_cubehash);
    sph_cubehash512(&ctx_cubehash, static_cast<const void*>(&hash[6]), 64);
    sph_cubehash512_close(&ctx_cubehash, static_cast<void*>(&hash[7]));

    sph_shavite512_init(&ctx_shavite);
    sph_shavite512(&ctx_shavite, static_cast<const void*>(&hash[7]), 64);
    sph_shavite512_close(&ctx_shavite, static_cast<void*>(&hash[8]));

    sph_simd512_init(&ctx_simd);
    sph_simd512(&ctx_simd, static_cast<const void*>(&hash[8]), 64);
    sph_simd512_close(&ctx_simd, static_cast<void*>(&hash[9]));

    sph_echo512_init(&ctx_echo);
    sph_echo512(&ctx_echo, static_cast<const void*>(&hash[9]), 64);
    sph_echo512_close(&ctx_echo, static_cast<void*>(&hash[10]));

    return hash[10].trim256();
}

void scrypt_hash(const char* pass, unsigned int pLen, const char* salt, unsigned int sLen, char* output, unsigned int N, unsigned int r, unsigned int p, unsigned int dkLen);

#endif // SYNX_HASH_H


text:
<?php

namespace JadeIT\CrudBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class JadeITCrudBundle extends Bundle
{
}


text:
"""Convert Doxygen .xml files to MarkDown (.md files)."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# pylint: disable=g-bad-import-order
from tensorflow.python import flags

import os
import re
import sys
from BeautifulSoup import BeautifulStoneSoup

ANCHOR_RE = re.compile(r'\W+')

PAGE_TEMPLATE = '''# {0} `{1}`

{2}

##Member Summary

{3}

##Member Details

{4}'''

INDEX_TEMPLATE = '''# TensorFlow C++ Session API reference documentation

TensorFlow's public C++ API includes only the API for executing graphs, as of
version 0.5. To control the execution of a graph from C++:

1. Build the computation graph using the [Python API](../python/).
1. Use [`tf.train.write_graph()`](../python/train.md#write_graph) to
write the graph to a file.
1. Load the graph using the C++ Session API. For example:

  ```c++
  // Reads a model graph definition from disk, and creates a session object you
  // can use to run it.
  Status LoadGraph(string graph_file_name, Session** session) {
    GraphDef graph_def;
    TF_RETURN_IF_ERROR(
        ReadBinaryProto(Env::Default(), graph_file_name, &graph_def));
    TF_RETURN_IF_ERROR(NewSession(SessionOptions(), session));
    TF_RETURN_IF_ERROR((*session)->Create(graph_def));
    return Status::OK();
  }
```

1. Run the graph with a call to `session->Run()`

## Env

@@Env
@@RandomAccessFile
@@WritableFile
@@EnvWrapper

## Session

@@Session
@@SessionOptions

## Status

@@Status
@@Status::State

## Tensor

@@Tensor
@@TensorShape
@@TensorShapeDim
@@TensorShapeUtils
@@PartialTensorShape
@@PartialTensorShapeUtils
@@TF_Buffer

## Thread

@@Thread
@@ThreadOptions
'''

FLAGS = flags.FLAGS
flags.DEFINE_string('src_dir', None,
                    'Directory containing the doxygen output.')
flags.DEFINE_string('out_dir', None,
                    'Directory to which docs should be written.')

def member_definition(member_elt):
  def_text = ''

  def_elt = member_elt.find('definition')
  if def_elt:
    def_text = def_elt.text

  return def_text

def member_sig(member_elt):
  def_text = member_definition(member_elt)

  argstring_text = ''
  argstring = member_elt.find('argsstring')
  if argstring:
    argstring_text = argstring.text

  sig = def_text + argstring_text
  return sig

def anchorize(name):
  return ANCHOR_RE.sub('_', name)

def element_text(member_elt, elt_name):
  """Extract all `para` text from (`elt_name` in) `member_elt`."""
  text = []
  if elt_name:
    elt = member_elt.find(elt_name)
  else:
    elt = member_elt

  if elt:
    paras = elt.findAll('para')
    for p in paras:
      text.append(p.getText(separator=u' ').strip())
  return '\n\n'.join(text)

def full_member_entry(member_elt):
  """Generate the description of `member_elt` for "Member Details"."""
  anchor = '{#' + anchorize(member_definition(member_elt)) + '}'
  full_entry = '#### `%s` %s' % (member_sig(member_elt), anchor)

  complete_descr = element_text(member_elt, 'briefdescription') + '\n\n'
  complete_descr += element_text(member_elt, 'detaileddescription')

  if complete_descr:
    full_entry += '\n\n' + complete_descr

  return full_entry

def brief_member_entry(member_elt):
  """Generate the description of `member_elt` for the "Member Summary"."""
  brief_item = ''
  brief_descr = element_text(member_elt, 'briefdescription')
  if brief_descr:
    brief_item = '\n  * ' + brief_descr
  sig = member_sig(member_elt)
  memdef = member_definition(member_elt)
  linkified_sig = '[`{0}`](#{1})'.format(sig, anchorize(memdef))

  return '* ' + linkified_sig + brief_item

def all_briefs(members):
  briefs = [brief_member_entry(member_elt) for member_elt in members]
  return '\n'.join(briefs)

def all_fulls(members):
  fulls = [full_member_entry(member_elt) for member_elt in members]
  return '\n\n'.join(fulls)

def page_overview(class_elt):
  """Returns the contents of the .md file for `class_elt`."""
  overview_brief = ''
  overview_details = ''

  briefs = class_elt.findAll('briefdescription', recursive=False)
  if briefs:
    overview_brief = element_text(briefs[0], None)

  details = class_elt.findAll('detaileddescription', recursive=False)
  if details:
    overview_details = element_text(details[0], None)

  return overview_brief + '\n\n' + overview_details

def page_with_name(pages, name):
  def match(n):
    for i in xrange(len(pages)):
      if pages[i].get_name() == n:
        return i
    return None
  return match(name) or match('tensorflow::' + name)

def get_all_indexed_pages():
  all_pages = set()
  lines = INDEX_TEMPLATE.split('\n')
  for i in range(len(lines)):
    if lines[i].startswith('@@'):
      name = lines[i][2:]
      all_pages.add(name)
  return all_pages

def index_page(pages):
  """Create the index page linking to `pages` using INDEX_TEMPLATE."""
  pages = pages[:]
  lines = INDEX_TEMPLATE.split('\n')
  all_md_files = []
  for i in range(len(lines)):
    if lines[i].startswith('@@'):
      name = lines[i][2:]
      page_index = page_with_name(pages, name)
      if page_index is None:
        raise ValueError('Missing page with name: ' + name)
      lines[i] = '* [{0}]({1})'.format(
          pages[page_index].get_name(), pages[page_index].get_md_filename())
      all_md_files.append(pages[page_index].get_md_filename())
      pages.pop(page_index)

  # Footer
  lines.append('''

' % f) for f in all_md_files])
  lines.extend(['-->', '
'])
  return '\n'.join(lines)

def page_in_name_list(page, names):
  for name in names:
    if page.get_name() == name or page.get_name() == 'tensorflow::' + name:
      return True
  return False

class Page(object):
  """Holds the MarkDown converted contents of a .xml page."""

  def __init__(self, xml_path, deftype):
    self.type = deftype
    xml_file = open(xml_path)
    xml = xml_file.read()
    xml = xml.replace('<computeroutput>', '`').replace('</computeroutput>', '`')
    # TODO(josh11b): Should not use HTML entities inside ```...```.
    soup = BeautifulStoneSoup(
        xml, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
    self.name = soup.find('compoundname').text
    print('Making page with name ' + self.name + ' (from ' + xml_path + ')')
    members = soup('memberdef', prot='public')
    briefs = all_briefs(members)
    fulls = all_fulls(members)
    self.overview = page_overview(soup.find('compounddef'))
    self.page_text = PAGE_TEMPLATE.format(
        self.type, self.name, self.overview, briefs, fulls)

  def get_text(self):
    return self.page_text

  def get_name(self):
    return self.name

  def get_short_name(self):
    parse = self.get_name().split('::')
    return parse[len(parse)-1]

  def get_type(self):
    return self.type

  def get_md_filename(self):
    return self.get_type() + anchorize(self.get_short_name()) + '.md'

def main(unused_argv):
  print('Converting in ' + FLAGS.src_dir)
  pages = []
  all_pages = get_all_indexed_pages()
  xml_files = os.listdir(FLAGS.src_dir)
  for fname in xml_files:
    if len(fname) < 6: continue
    newpage = None
    if fname[0:5] == 'class':
      newpage = Page(os.path.join(FLAGS.src_dir, fname), 'Class')
    elif fname[0:6] == 'struct':
      newpage = Page(os.path.join(FLAGS.src_dir, fname), 'Struct')
    if newpage is not None and page_in_name_list(newpage, all_pages):
      pages.append(newpage)
      md_filename = newpage.get_md_filename()
      print('Writing ' + md_filename)
      md_file = open(os.path.join(FLAGS.out_dir, md_filename), 'w')
      print(newpage.get_text(), file=md_file)

  index_text = index_page(pages)
  index_md_file = open(os.path.join(FLAGS.out_dir, 'index.md'), 'w')
  print(index_text, file=index_md_file)
  return 0

if __name__ == '__main__':
  try:
    argv = FLAGS(sys.argv)  # parse flags
  except flags.FlagsError as e:
    print('%s\\nUsage: %s ARGS\\n%s' % (e, sys.argv[0], FLAGS))
    sys.exit(1)
  main(argv)


text:
export * from './toolbar/elder-toolbar.module';
export * from './nav/elder-nav.module';


text:
@implementation SJUser

#pragma mark Singleton Methods

+ (id)sharedManager {
    static SJUser *sharedSJUser = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedSJUser = [[self alloc] init];
    });
    return sharedSJUser;
}

- (id)init {
    if ( (self = [super init]) ) {
        // your custom initialization
    }
    return self;
}

@end

@implementation SJUserRepository

+ (instancetype)repository {
    return [self repositoryWithClassName:@"users"];
}

- (void)storeAccessTokenInAdapter:(NSString *)accessToken {
    LBRESTAdapter* adapter = (LBRESTAdapter*)self.adapter;
    adapter.accessToken = accessToken;
}

@end


text:
A demo app of [Ember Charts](https://github.com/Addepar/ember-charts) using [Ember App Kit](https://github.com/stefanpenner/ember-app-kit)

# Ember App Kit [![Build Status](https://travis-ci.org/stefanpenner/ember-app-kit.png?branch=master)](https://travis-ci.org/stefanpenner/ember-app-kit)

Ember App Kit aims to be the foundation for ambitious web applications built with Ember. It's intended to be used either on its own or as the base scaffolding for projects using [Ember Tools](https://github.com/rpflorence/ember-tools), [generator-ember](https://github.com/yeoman/generator-ember) and a hypothetical official [executable](https://github.com/stefanpenner/ember-cli) at some point in the future.

This project has been extracted out of several real world applications and is actively used. Currently it covers the basics fairly well, but much still needs to be done. As we learn and as more contributors join in it continues to evolve. If you encounter any bugs, clunky features or missing documentation, just submit an issue and we'll respond ASAP.

We welcome ideas and experiments.

## Getting Started

* [Project Documentation Site](http://stefanpenner.github.io/ember-app-kit/)
* [Getting Started Guide](http://stefanpenner.github.io/ember-app-kit/guides/getting-started.html)
* [ember-app-kit-todos](https://github.com/stefanpenner/ember-app-kit-todos) - the Emberjs [todos](http://emberjs.com/guides/getting-started/) using Ember App Kit
* [ember-app-kit-bloggr](https://github.com/pixelhandler/ember-app-kit-example-with-bloggr-client) - bloggr demo
* *Safari Books Online Blog* - [Introduction to Ember App Kit](http://blog.safaribooksonline.com/2013/09/18/ember-app-kit/) for more experienced Ember developers by @mixonic
* *Ember Sherpa* - [Introduction to Ember App Kit](http://embersherpa.com/articles/introduction-to-ember-app-kit/) for those who are new to the Grunt workflow by @taras

## Features

- Sane project structure
- ES6 module transpiler support (easy, future-proof modules)
- Module system-aware resolver (see [Referencing views](https://github.com/stefanpenner/ember-app-kit/wiki/Referencing-Views) and [Using Ember loaders](https://github.com/stefanpenner/ember-app-kit/wiki/Using-Ember-loaders))
- Transparent project compilation & minification for easy deploys via [Grunt](http://gruntjs.com/)
- Package management via [Bower](https://github.com/bower/bower)
- Optional support for CoffeeScript, SASS, LESS or Stylus
- Testing via QUnit, Ember Testing and Karma (with examples)
- Linting via JSHint (including module syntax)
- Catch-all `index.html` for easy reloading of pushState router apps

## Future Goals

- Source maps for transpiled modules
- Better support for Ember generators
- Easier to install 3rd party packages
- Faster, more intelligent builds

Think anything else is missing? Feel free to open an issue (or, even better, a PR)! Discussion and feedback is always appreciated.

## Special Thanks

Some ideas in ember-app-kit originated in work by Yapp Labs (@yapplabs) with McGraw-Hill Education Labs (@mhelabs) on [yapplabs/glazier](https://github.com/yapplabs/glazier). Thanks to Yapp and MHE for supporting the Ember ecosystem!

## License

Copyright 2013 by Stefan Penner and Ember App Kit Contributors, and licensed under the MIT License. See included
[LICENSE](/stefanpenner/ember-app-kit/blob/master/LICENSE) file for details.


text:
As mentioned in the [Routing](./) chapter, Iris provides several handler registration methods, each of which returns a [`Route`](https://godoc.org/github.com/kataras/iris/core/router#Route) instance.

## Route naming

Route naming is easy, since we just call the returned `*Route` with a `Name` field to define a name:

```go
package main

import "github.com/kataras/iris/v12"

func main() {
    app := iris.New()
    // define a function
    h := func(ctx iris.Context) {
        ctx.HTML("<b>Hi</b1>")
    }

    // handler registration and naming
    home := app.Get("/", h)
    home.Name = "home"
    // or
    app.Get("/about", h).Name = "about"
    app.Get("/page/{id}", h).Name = "page"

    app.Listen(":8080")
}
```

## Route reversing AKA generating URLs from the route name

When we register the handlers for a specific path, we get the ability to create URLs based on the structured data we pass to Iris. In the example above, we've named three routers, one of which even takes parameters. If we're using the default `html/template` view engine, we can use a simple action to reverse the routes (and generae actual URLs):

```bash
Home: {{ urlpath "home" }}
About: {{ urlpath "about" }}
Page 17: {{ urlpath "page" "17" }}
```

Above code would generate the following output:

```bash
Home: http://localhost:8080/
About: http://localhost:8080/about
Page 17: http://localhost:8080/page/17
```

## Using route names in code

We can use the following methods/functions to work with named routes (and their parameters):

* [`GetRoutes`](https://godoc.org/github.com/kataras/iris/core/router#APIBuilder.GetRoutes) function to get all registered routes
* [`GetRoute(routeName string)`](https://godoc.org/github.com/kataras/iris/core/router#APIBuilder.GetRoute) method to retrieve a route by name
* [`URL(routeName string, paramValues ...interface{})`](https://godoc.org/github.com/kataras/iris/core/router#RoutePathReverser.URL) method to generate url string based on supplied parameters
* [`Path(routeName string, paramValues ...interface{}`](https://godoc.org/github.com/kataras/iris/core/router#RoutePathReverser.Path) method to generate just the path (without host and protocol) portion of the URL based on provided values

<!-- slide:break-100 -->


text:
*Current Mac OS X version*: Yosemite

To build a VM running Mac OS X, follow the directions below:

  1. Download the Yosemite installer from Mac App Store (it should be available in the 'Purchases' section if you've acquired it previously). The installer will be placed in your Applications folder.
  2. Run the included `prepare-iso.sh` script (make it executable first, with `chmod 755`, then run `./prepare-iso.sh` from the folder containing the script). A new Yosemite installer iso will eventually be saved to the Desktop.
  3. Open VirtualBox and create a new VM.
  4. Set name, type, and version (set to Mavericks for 'Version').
  5. Follow the rest of the VM creation wizard and either leave the defaults or adjust to your liking.
  6. In Terminal, run the command `VBoxManage modifyvm "osx-yosemite" --cpuidset 00000001 000306a9 00020800 80000201 178bfbff` (where "Mac OS X" is the exact name of the OS X VM set in step 4) so the VM has the right CPU settings for Yosemite.
  7. To prevent choppiness in the VM, go into settings and uncheck the 'Enable Audio' option under 'Audio'.
  8. Click 'Start' to boot the new VM.
  9. Select the iso created in step 2 when VirtualBox asks for it.
  10. Once the Yosemite installer appears, instead of clicking 'Continue', first go to Utilities > Disk Utility and partition/format the VirtualBox disk as a "Mac OS X Extended (Journaled)" drive.
  11. Quit Disk Utility, and then continue with installation as normal.

When the installation is complete, and you have a fresh new Mac OS X VM, you can shut it down and create a snapshot so you can go back to the initial state in the future. I use this technique to test the [`mac-dev-playbook`](https://github.com/geerlingguy/mac-dev-playbook), which I use to set up and configure my own Mac workstation for web and app development.

## Notes

  - Code for this example mostly comes from VirtualBox forums and [this article](http://sqar.blogspot.de/2014/10/installing-yosemite-in-virtualbox.html).
  - I'm currently looking into using Packer (maybe in tandem with Ansible) to automate the process of building an OS X box for VirtualBox. Since the ISO needs to be generated by the end user, it's a bit more involved (i.e. manual download of the original installer image), but not much worse than Packer for linux distros.
    - See also:
      - https://github.com/timsutton/osx-vm-templates
      - https://github.com/AndrewDryga/vagrant-box-osx-mavericks/blob/master/README.md
  - To install command line tools after OS X is booted, open a terminal window and enter `xcode-select --install` (or just try using `git`, `gcc`, or other tools that would be installed with CLI tools).

## Author

This project was created in 2015 by [Jeff Geerling](http://jeffgeerling.com/).


text:
import sys, os
import numpy as np

if os.path.basename(os.getcwd()) == 'emmetrop':
    sys.path.append("./SchematicEye")
else:
    sys.path.append("./emmetrop/SchematicEye")
import eye as eye

def traceEye(object_distance=1e8, off_axis=0, pupil_size=3, diopters=0, wavelength=550):
    '''
    '''

    intensity = eye.py_eye(object_distance, off_axis, pupil_size, diopters, wavelength)

    return intensity


text:
/*
 * ObjectNotSupportedException.java
 *
 * Created on 6 février 2006, 17:51
 */

package Transformations;

/**
 * Exception launched if a transformation can't modify the object passed to it.
 *
 * @author Guilhem Duche.
 */
public class ObjectNotSupportedException extends Exception {

	/** Creates a new instance of ObjectNotSupportedException */
	public ObjectNotSupportedException(String mess) {
		super("Can not apply a transformation to the object of instance "
				+ mess + " !");
	}

}