text:
/**
 * Route Mappings
 * (sails.config.routes)
 *
 * Your routes map URLs to views and controllers.
 *
 * If Sails receives a URL that doesn't match any of the routes below,
 * it will check for matching files (images, scripts, stylesheets, etc.)
 * in your assets directory.  e.g. `http://localhost:1337/images/foo.jpg`
 * might match an image file: `/assets/images/foo.jpg`
 *
 * Finally, if those don't match either, the default 404 handler is triggered.
 * See `api/responses/notFound.js` to adjust your app's 404 logic.
 *
 * Note: Sails doesn't ACTUALLY serve stuff from `assets`-- the default Gruntfile in Sails copies
 * flat files from `assets` to `.tmp/public`.  This allows you to do things like compile LESS or
 * CoffeeScript for the front-end.
 *
 * For more information on configuring custom routes, check out:
 * http://sailsjs.org/#!/documentation/concepts/Routes/RouteTargetSyntax.html
 */
'use strict';
module.exports.routes = {

    /*************************************************************
     *                 JSON API ENDPOINTS                        *
     *************************************************************/

    // 'PUT /login': 'UserController.loginLDAP',
    'PUT /login': 'UserController.login',
    'GET /logout': 'PageController.logout',
    'POST /logout': 'UserController.logout',
    // 'GET /mail/send': 'MailController.send',
    //'GET /ldap': 'UserController.ldapConnect',
    'GET /report/skd': 'SkdController.getReportSkd',

    'PUT /user/remove-profile': 'UserController.removeProfile',
    'PUT /user/restore-profile': 'UserController.restoreProfile',
    'PUT /user/restore-gravatar-URL': 'UserController.restoreGravatarURL',
    'PUT /user/update-profile': 'UserController.updateProfile',
    'PUT /user/change-password': 'UserController.changePasswordProfile',
    'PUT /user/generate-recovery-email': 'UserController.generateRecoveryEmail',
    'PUT /user/update-admin/:id': 'UserController.updateAdmin',

    'PUT /user/update-kadr/:id': 'UserController.updateKadr',
    'PUT /user/update-rows': 'UserController.updateDefaultRows',

    'PUT /user/update-action/:id': 'UserController.updateAction',
    'PUT /user/update-deleted/:id': 'UserController.updateDeleted',
    'PUT /user/updateProfile/:id': 'UserController.updateProfile',
    'POST /file/upload': 'UserController.upload',

    'POST /file/uploadDogs': 'CatalogController.upload',
    'POST /file/uploadTitles': 'PhotoController.uploadTitlePhoto',
    'POST /file/uploadReactions': 'PhotoController.uploadReactionPhoto',
    'POST /file/uploadPedigrees': 'PedigreeController.upload',
    'POST /file/uploadPhoto': 'PhotoController.update',

    'GET /user/getUsersDepartment/:id': 'UserController.getUsersDepartment',
    'POST /users/ldap': 'UserController.searchLDAP',

    /**
     * Тестовые роуты
     */

    /**
     * Skds
     */
    'GET /getListYear': 'SkdController.getListYear',

    // 'GET /getListMonth': 'SkdController.getListMonth',

    /**
     * Department
     */
    'GET /getRootDepartment': 'DepartmentController.getRootDepartment',
    'POST /department/getParent': 'DepartmentController.getParent',

    /**
     * Structure
     */
    'GET /getStructure': 'StructureController.get',
    'GET /getStructure/:id': 'StructureController.get',

    /**
     * Honor
     */
    'POST /honor/upload': 'HonorController.upload',
    'GET /honor/full': 'HonorController.download',
    'GET /honor/date': 'HonorController.date',

    /**
     * Photo
     */
    'POST /photo-show': 'PhotoController.get',

    // !!!! НЕ УДАЛЯТЬ РОУТ!
    'POST /user/signup': 'UserController.signup',

    /***************************************
     *         RESTful routes              *
     ***************************************/

    /**
     * User
     */
    'POST /users': 'UserController.createUser',
    'GET /users': 'UserController.findUsers',
    'PUT /users/changePassword': 'UserController.changePassword',

    'GET /users/:id': 'UserController.findUsers',
    'DELETE /users/:id': 'UserController.destroy',
    'PUT /users/:id': 'UserController.update',

    /**
     * Position
     */
    'GET /positions/:id': 'PositionController.findPositions',
    'GET /positions': 'PositionController.findPositions',
    'PUT /positions/:id': 'PositionController.update',
    'DELETE /positions/:id': 'PositionController.destroy',
    'POST /positions': 'PositionController.createPosition',

    /**
     * Department
     */
    'POST /kennels': 'DepartmentController.createDepartment',
    'GET /kennels': 'DepartmentController.findDepartments',
    'PUT /kennels/:id': 'DepartmentController.update',
    'GET /kennels/:id': 'DepartmentController.findDepartments',
    'DELETE /kennels/:id': 'DepartmentController.destroy',

    /**
     * Calendar
     */
    'GET /calendars/:id': 'CalendarController.findCalendars',
    'GET /calendars': 'CalendarController.findCalendars',
    'PUT /calendars/:id': 'CalendarController.update',

    /**
     * Skds
     */
    'GET /skds': 'SkdController.get', //получить все записи skd
    'POST /skds': 'SkdController.get', //получить все записи skd
    'GET /skds/:id': 'SkdController.get', //получить все записи skd

    /**
     * Structure
     */
    'GET /structures': 'StructureController.get', //получить все записи
    // 'POST /structures': 'StructureController.post', //получить все записи
    'GET /structures/:id': 'StructureController.get', //получить все записи

    /**
     * Furlough
     */
    'GET /furloughs': 'FurloughController.get', //получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /furloughs': 'FurloughController.create', // создать запись
    'DELETE /furloughs/:id': 'FurloughController.destroy', // удалить
    'PUT /furloughs/:id': 'FurloughController.update', // обновить

    /**
     * Vacation
     */
    'GET /vacations': 'VacationController.get', // получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /vacations': 'VacationController.create', // создать запись
    'DELETE /vacations/:id': 'VacationController.destroy', // удалить
    'PUT /vacations/:id': 'VacationController.update', // обновить

    /**
     * Catalogs
     */
    'GET /catalogs': 'CatalogController.get', // получить все записи или одну по http://localhost:1338/catalogs?id=599c4aefc97f011f70a2359b
    'POST /catalogs': 'CatalogController.create', // создать запись
    'DELETE /catalogs/:id': 'CatalogController.destroy', // удалить
    'POST /catalogs/:id': 'CatalogController.update', // удалить
    'PUT /catalogs/:id': 'CatalogController.update', // обновить

    /**
     * Messages
     */
    'GET /messages': 'MessageController.get', // получить все записи или одну по http://localhost:1338/catalogs?id=599c4aefc97f011f70a2359b
    'POST /messages': 'MessageController.create', // создать запись
    'DELETE /messages/:id': 'MessageController.destroy', // удалить
    'POST /messages/:id': 'MessageController.update', // удалить
    'PUT /messages/:id': 'MessageController.update', // обновить

    /**
     * Titles
     */
    'GET /titles': 'TitleController.get', //получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /titles': 'TitleController.create', // создать запись
    'DELETE /titles/:id': 'TitleController.destroy', // удалить
    'PUT /titles/:id': 'TitleController.update', // обновить

    /**
     * Reactions
     */
    'GET /reactions': 'ReactionController.get', //получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /reactions': 'ReactionController.create', // создать запись
    'DELETE /reactions/:id': 'ReactionController.destroy', // удалить
    'PUT /reactions/:id': 'ReactionController.update', // обновить

    /**
     * Diarys
     */
    'GET /diarys': 'DiaryController.get', //получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /diarys': 'DiaryController.create', // создать запись
    'DELETE /diarys/:id': 'DiaryController.destroy', // удалить
    'PUT /diarys/:id': 'DiaryController.update', // обновить

    /**
     * Photos
     */
    'GET /photos': 'PhotoController.get', //получить все записи или одну по http://localhost:1338/furloughs?id=599c4aefc97f011f70a2359b
    'POST /photos': 'PhotoController.create', // создать запись
    'DELETE /photos/:id': 'PhotoController.destroy', // удалить
    'PUT /photos/:id': 'PhotoController.update', // обновить

    /**
     * Pedigrees
     */
    'GET    /pedigrees':     'PedigreeController.get',    // получить все записи или одну по http://localhost:1338/catalogs?id=599c4aefc97f011f70a2359b
    'POST   /pedigrees':     'PedigreeController.create', // создать запись
    'DELETE /pedigrees/:id': 'PedigreeController.destroy', // удалить
    'POST   /pedigrees/:id': 'PedigreeController.update', // удалить
    'PUT    /pedigrees/:id': 'PedigreeController.update', // обновить

    /*************************************************************
     * Server-rendered HTML Pages                                *
     *************************************************************/

    'GET /': 'PageController.showHomePage',
    'GET /profile': 'PageController.showHomePage',
    'GET /about': 'PageController.showHomePage',
    'GET /administration': 'PageController.showAdminPage',
    'GET /signup': 'PageController.showSignupPage',
    'GET /profile/edit': 'PageController.showHomePage',
    'GET /profile/restore': 'PageController.restoreProfile',

    'GET /password-recovery-email': 'PageController.passwordRecoveryEmail',
    'GET /password-recovery-email-sent': 'PageController.passwordRecoveryEmailSent',
    'GET /password-reset-form/:passwordRecoveryToken': 'PageController.passwordReset',

    'GET /admin': 'PageController.showHomePage',
    'GET /admin/users': 'PageController.showHomePage',
    'GET /admin/users/administration': 'PageController.showHomePage',
    'GET /admin/users/create': 'PageController.showHomePage',
    'GET /admin/users/exit': 'PageController.getExitUserPage',

    'GET /admin/kennels': 'PageController.showHomePage',

    'GET /admin/positions': 'PageController.showHomePage',
    'GET /admin/employees': 'PageController.showHomePage',
    'GET /admin/furloughs': 'PageController.showHomePage',
    'GET /admin/vacations': 'PageController.showHomePage',

    'GET /admin/positions/create': 'PageController.showHomePage',
    'GET /admin/user/:id': 'PageController.showHomePage',
    'GET /admin/users/show/:id': 'UserController.findOne',
    'PUT /admin/users/edit/changePassword': 'UserController.changePasswordProfile',
    'GET /admin/users/edit/:id': 'PageController.showHomePage',

    'GET /admin/kennels/create': 'PageController.showHomePage',
    'GET /admin/kennels/:id': 'DepartmentController.findOne',
    'GET /admin/kennels/edit/:id': 'PageController.showHomePage',
    'GET /admin/kennel/:id': 'PageController.showHomePage',
    'GET /admin/depart': 'PageController.showHomePage',
    'GET /admin/depart/:id': 'DepartmentController.addDepartment',

    'GET /admin/positions/:id': 'PositionController.findOne',
    'GET /admin/positions/edit/:id': 'PageController.showHomePage',
    'GET /admin/position/:id': 'PageController.showHomePage',

    'GET /admin/calendars': 'PageController.showHomePage',
    'GET /admin/calendars/:id': 'CalendarController.findOne',
    'GET /admin/calendars/create': 'PageController.showHomePage',
    'GET /admin/calendars/edit/:id': 'CalendarController.findOne',
    'GET /admin/calendar/:id': 'CalendarController.findOne',
    'GET /admin/calendar/:id/:month': 'PageController.showHomePage',
    'GET /admin/calendar/:id/:week': 'PageController.showHomePage',

    'GET /admin/employees/:id': 'PageController.showHomePage',
    'GET /admin/employees/edit/:id': 'PageController.showHomePage',
    'GET /admin/employee/:id': 'PageController.showHomePage',

    'GET /admin/skds': 'PageController.showHomePage',
    'GET /admin/structures': 'PageController.showHomePage',

    'GET /admin/furloughs/edit/:id': 'PageController.showHomePage',
    'GET /admin/furloughs/create/': 'PageController.showHomePage',

    'GET /admin/vacations/edit/:id': 'PageController.showHomePage',
    'GET /admin/vacations/create': 'PageController.showHomePage',

    // 'GET /admin/catalog/:id/diary/:id': 'PageController.showHomePage',
    // 'GET /admin/catalog/:id/diary/': 'PageController.showHomePage',
    'GET /admin/catalogs': 'PageController.showHomePage',
    'GET /admin/catalog/:id': 'PageController.showHomePage',
    'GET /admin/catalogs/create': 'PageController.showHomePage',
    'GET /admin/catalogs/edit/:id': 'PageController.showHomePage',

    'GET /admin/messages': 'PageController.showHomePage',
    'GET /admin/message/:id': 'PageController.showHomePage',
    'GET /admin/messages/create': 'PageController.showHomePage',
    'GET /admin/messages/edit/:id': 'PageController.showHomePage',

    'GET /admin/pedigrees': 'PageController.showHomePage',
    'GET /admin/pedigree/:id': 'PageController.showHomePage',
    'GET /admin/pedigrees/create': 'PageController.showHomePage',
    'GET /admin/pedigrees/edit/:id': 'PageController.showHomePage',

    'GET /admin/titles': 'PageController.showHomePage',
    'GET /admin/titles/edit/:id': 'PageController.showHomePage',
    'GET /admin/titles/create/': 'PageController.showHomePage',
    'GET /admin/title/:id': 'PageController.showHomePage',

    'GET /admin/reactions': 'PageController.showHomePage',
    'GET /admin/reactions/edit/:id': 'PageController.showHomePage',
    'GET /admin/reactions/create/': 'PageController.showHomePage',
    'GET /admin/reactions/:id': 'PageController.showHomePage',

    'GET /admin/photos': 'PageController.showHomePage',
    'GET /admin/photos/edit/:id': 'PageController.showHomePage',
    'GET /admin/photos/create/': 'PageController.showHomePage',
    'GET /admin/photo/:id': 'PageController.showHomePage',

    'GET /admin/diarys/catalog/:id': 'PageController.showHomePage',
    'GET /admin/diarys/catalog/': 'PageController.showHomePage',
    'GET /admin/diarys': 'PageController.showHomePage',
    'GET /admin/diarys/edit/:id': 'PageController.showHomePage',
    'GET /admin/diarys/create/': 'PageController.showHomePage',
    'GET /admin/diarys/:id': 'PageController.showHomePage',

    'GET /admin/sliders/create': 'PageController.showHomePage',
    'GET /admin/sliders/edit/:id': 'PageController.showHomePage',
    'GET /admin/slider/:id': 'PageController.showHomePage',
    'GET /admin/slider': 'PageController.showHomePage',

    'GET /dog': 'PageController.showHomePage',
    'GET /dog/catalogs': 'PageController.showHomePage',
    'GET /dog/catalog/:id': 'PageController.showHomePage',
    'GET /dog/catalogs/create': 'PageController.showHomePage',
    'GET /dog/catalogs/edit/:id': 'PageController.showHomePage',

    'GET /upload': 'PageController.showHomePage',
    'GET /admin/honors': 'PageController.showHomePage',
    'GET /file/upload': 'PageController.showHomePage',

    'GET /user/adminUsers': 'UserController.adminUsers',

    'GET /dashboard/showcases': 'PageController.showHomePage',

    'GET /:login': {
        controller: 'PageController',
        action: 'profile',
        skipAssets: true
    }
};


text:
package com.github.alexfalappa.nbspringboot.templates.controller;

import javax.swing.event.ChangeListener;

import org.openide.WizardDescriptor;
import org.openide.util.ChangeSupport;
import org.openide.util.HelpCtx;

/**
 * Wizard descriptor for new RestController class file wizard.
 *
 * @author Alessandro Falappa
 */
public class RestControllerWizardPanel1 implements WizardDescriptor.Panel<WizardDescriptor> {

    private RestControllerVisualPanel1 component;

    // Get the visual component for the panel. In this template, the component
    // is kept separate. This can be more efficient: if the wizard is created
    // but never displayed, or not all panels are displayed, it is better to
    // create only those which really need to be visible.
    @Override
    public RestControllerVisualPanel1 getComponent() {
        if (component == null) {
            component = new RestControllerVisualPanel1(this);
        }
        return component;
    }

    @Override
    public HelpCtx getHelp() {
        // Show no Help button for this panel:
        return HelpCtx.DEFAULT_HELP;
    }

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

    private final ChangeSupport chgSupport = new ChangeSupport(this);

    @Override
    public final void addChangeListener(ChangeListener l) {
        synchronized (chgSupport) {
            chgSupport.addChangeListener(l);
        }
    }

    @Override
    public final void removeChangeListener(ChangeListener l) {
        synchronized (chgSupport) {
            chgSupport.removeChangeListener(l);
        }
    }

    protected final void fireChangeEvent() {
        chgSupport.fireChange();
    }

    @Override
    public void readSettings(WizardDescriptor wiz) {
        getComponent().read(wiz);
    }

    @Override
    public void storeSettings(WizardDescriptor wiz) {
        getComponent().store(wiz);
    }

}

redpajama_set_name: RedPajamaGithub


text:
/**
 * ============================================================
 * Toki Pona
 * ============================================================
 *
 * Translators:
 *
 * jan Inkepa <analytic@gmail.com>
 */

export default {
	'AdvanceHelp': 'sina ken musi e musi ni kepeken ilo luka anu nena palisa pi ilo sitelen.',
	'AllowPlayback': 'sina wile kute e musi ni la o luka e mi.',
	'Audio': 'kalama',
	'AutoPlay': 'luka ala',
	'AutoPlayButton': 'o open e pali musi kepeken luka ala.',
	'AutoPlaySpeed': 'tenpo tawa pi luka ala',

	'Back': 'tenpo pini',
	'BackButton': 'o tawa tenpo pini.',

	'Cancel': 'ala',
	'Close': 'pini',
	'Confirm': 'sina wile ala wile pini e musi?',
	'Credits': 'pona tawa',

	'Delete': 'weka',
	'DialogLogButton': 'mi wile lukin e lipu pi toki jan.',

	'FullScreen': 'ma ale pi ilo lukin',

	'Gallery': 'ma sitelen',

	'Help': 'kama sona',
	'Hide': 'weka',
	'HideButton': 'o weka e palisa nena.',

	'iOSAudioWarning': 'sina ken ala ante e kalama lon ilo iOS',

	'KeyboardShortcuts': 'pali pi ilo sitelen',

	'Language': 'toki',
	'Load': 'awen musi',
	'LoadAutoSaveSlots': 'musi li awen e musi',
	'LoadButton': 'lipu awen pi tenpo pini.',
	'Loading': 'musi li kama...',
	'LoadingMessage': 'pali e awen',
	'LoadSlots': 'lipu awen',
	'LocalStorageWarning': 'mi ken ala kepeken e ken Local Storage lon ilo ni',
	'Log': 'lipu toki',

	'Music': 'kalama musi',

	'NewContent': 'musi ni li kama sin! sina wile musi e musi sin, la o kama sin tawa lipu ni.',
	'NoSavedGames': 'awen musi pi tenpo pina li lon ala.',
	'NoAutoSavedGames': 'awen musi pi tenpo pina li lon ala.',
	'NoDialogsAvailable': 'tenpo pini la toki jan li lon ala. jan li toki, la sina ken lukin ni lon lipu ni.',

	'OK' : 'pona',
	'OrientationWarning': 'sina wile musi, la o sike e ilo sona sina.',
	'Overwrite': 'ante',

	'QuickButtons': 'nena pi pali wawa',
	'QuickMenu': 'palisa nena',
	'Quit': 'pini',
	'QuitButton': 'o pini e musi.',

	'Resolution': 'suli musi tawa ilo sitelen',

	'Save': 'o awen e musi',
	'SaveButton': 'o lukin e lipu pi awen musi.',
	'SaveInSlot': 'o awen e musi lon ma.',
	'SelectYourLanguage': 'Select your language',
	'Settings': 'ante',
	'SettingsButton': 'o ante e musi.',
	'Show': 'open',
	'Skip': 'tawa tenpo kama',
	'SkipButton': 'o tawa tenpo kama.',
	'SlotDeletion': 'sina wile ala wile weka e awen musi ni?',
	'SlotOverwrite': 'sina wile ala wile ante e awen musi ni?',
	'Sound': 'kalama ijo',
	'Start': 'musi sin',
	'Stop': 'pini',

	'TextSpeed': 'tenpo kama pi sitelen toki',

	'Video': 'kalama pi sitelen tawa',
	'Voice': 'kalama toki',

	'Windowed': 'ma lili pi ilo lukin',
};


text:
@import AFNetworking;
@import SBObjectiveCWrapper;

// Override the readonly status property so we get a free KVO setter
@interface ZNGNetworkLookout()
@property (nonatomic, assign) ZNGNetworkLookoutStatus status;
@end

static const NSTimeInterval delayAfterLoginBeforeCheckingSocket = 3.0;
NSString * const ZNGNetworkLookoutStatusChanged = @"ZNGNetworkLookoutStatusChanged";

@implementation ZNGNetworkLookout
{
    NSTimer * checkSocketAfterDelayTimer;
}

- (void) setStatus:(ZNGNetworkLookoutStatus)status
{
    if (_status != status) {
        SBLogDebug(@"Status changing from %@ to %@", [self debugDescriptionForStatus:_status], [self debugDescriptionForStatus:status]);
        _status = status;

        [[NSNotificationCenter defaultCenter] postNotificationName:ZNGNetworkLookoutStatusChanged object:self];
    }
}

- (NSString *) debugDescriptionForStatus:(ZNGNetworkLookoutStatus)status
{
    switch (status) {
        case ZNGNetworkStatusConnected:
            return @"Connected";
        case ZNGNetworkStatusConnectedToDevelopmentInstance:
            return @"Connected to a development instance";
        case ZNGNetworkStatusZingleAPIUnreachable:
            return @"API unreachable";
        case ZNGNetworkStatusInternetUnreachable:
            return @"Internet unreachable";
        case ZNGNetworkStatusZingleSocketDisconnected:
            return @"Socket disconnected";
        case ZNGNetworkStatusUnknown:
        default:
            return @"Unknown";
    }
}

#pragma mark - Status changes
- (void) recordLogin
{
    // Set status to connected.  This will allow the socket connection some time to connect.
    [self _setStatusToConnected];

    // If our socket server has not yet connected (likely,) we will delay and then check it again before marking failure
    if (!self.session.socketClient.connected) {
        [self checkSocketAfterDelay];
    }
}

- (void) checkSocketAfterDelay
{
    [checkSocketAfterDelayTimer invalidate];
    checkSocketAfterDelayTimer = [NSTimer scheduledTimerWithTimeInterval:delayAfterLoginBeforeCheckingSocket
                                                                  target:self
                                                                selector:@selector(checkSocketConnectionSomeTimeAfterLogin:)
                                                                userInfo:nil
                                                                 repeats:NO];
}

- (void) checkSocketConnectionSomeTimeAfterLogin:(NSTimer *)timer
{
    checkSocketAfterDelayTimer = nil;

    if (self.session == nil) {
        SBLogInfo(@"We do not have a session object set, so we are unable to verify socket server status.");
        return;
    }

    if (self.session.socketClient.connected) {
        // Looks like we recovered.  Hooray!
        [self _setStatusToConnected];
        return;
    }

    // We have a problem.  Diagnose and report.
    [self diagnoseFailure];
}

- (void) _setStatusToConnected
{
    BOOL isProduction = [self.session.sessionManager.baseURL isZingleProduction];
    self.status = (isProduction) ? ZNGNetworkStatusConnected : ZNGNetworkStatusConnectedToDevelopmentInstance;
}

- (void) recordSocketConnected
{
    // Everything is great now!
    [self _setStatusToConnected];

    [checkSocketAfterDelayTimer invalidate];
    checkSocketAfterDelayTimer = nil;
}

- (void) recordSocketDisconnected
{
    // If we do not have a session object set, we have to immediately mark this as a problem (since we are unable to recheck in a moment.)
    if (self.session == nil) {
        SBLogInfo(@"Socket disconnected.  We do not have a session weak reference, so this is immediately being marked as a connection failure.");
        [self diagnoseFailure];
        return;
    }

    // We do have a session, so we will delay a moment to give the socket a chance to recover
    [self checkSocketAfterDelay];
}

#pragma mark - Diagnosis
- (void) diagnoseFailure
{
    // Do they even have internet access?
    ZNGReachability * internetReachability = [ZNGReachability reachabilityForInternetConnection];

    if ([internetReachability currentReachabilityStatus] == NotReachable) {
        self.status = ZNGNetworkStatusInternetUnreachable;
        return;
    }

    // They have internet access.  We will first mark this as a socket connection failure.
    self.status = ZNGNetworkStatusZingleSocketDisconnected;

    // We will then check if we can even reach the API
    if (self.session.userAuthorizationClient != nil) {
        [self.session.userAuthorizationClient userAuthorizationWithSuccess:^(ZNGUserAuthorization *userAuthorization, ZNGStatus *status) {
            SBLogInfo(@"We are still able to reach the API.  This looks like a socket only problem.  Leaving status as Socket Disconnected.");
        } failure:^(ZNGError *error) {
            SBLogInfo(@"Unable to reach Zingle API: %@", error);
            self.status = ZNGNetworkStatusZingleAPIUnreachable;
        }];
    }
}

@end


text:
using System.Windows.Forms;
using SvnBridge.Presenters;

namespace SvnBridge.Views
{
    public interface ISettingsView
    {
        SettingsViewPresenter Presenter { set; }
        DialogResult DialogResult { get; }
        void Show();
    }
}


text:
title: File Metadata Microservice
localeTitle: 文件元数据微服务
---
## 文件元数据微服务

这是一个存根。 [帮助我们的社区扩展它](https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/apis-and-microservices/apis-and-microservices-projects/file-metadata-microservice/index.md) 。

[这种快速风格指南有助于确保您的拉取请求被接受](https://github.com/freecodecamp/guides/blob/master/README.md) 。


text:
/*
 * test_order.cpp
 *
 *  Created on: 2016年9月17日
 *      Author: jing.q.xu
 */

#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "local_warehouse.h"
#include "order.h"

struct OrderTest : ::testing::Test {
protected:
	void SetUp () {
		_warehouse.add("book", 100);
		_warehouse.add("cd", 100);
	}
	LocalWarehouse _warehouse;
};

TEST(OrderTest, SBAT_fill_order_with_enough_inventory) {
	LocalWarehouse warehouse;
	warehouse.add("book", 100);
	Order order("book", 10);
	ASSERT_EQ(SUCCESS, order.fill(warehouse));
	ASSERT_EQ(100 - 10, warehouse.get_inventory("book"));
}


text:
sethfri
=======

My personal website - VERY much a work-in-progress


text:
cd /festi
python manage.py syncdb --noinput
python manage.py makemigrations --noinput
python manage.py migrate --noinput
python manage.py collectstatic --noinput
/usr/bin/redis-server &
python manage.py celery worker --events &
gunicorn festi.wsgi -b:8000


text:
namespace athena {

// This wrapper interface provides a common interface that handles global
// accelerators as well as local accelerators.
class AcceleratorManagerImpl::AcceleratorWrapper {
 public:
  virtual ~AcceleratorWrapper() {}
  virtual void Register(const ui::Accelerator& accelerator,
                        ui::AcceleratorTarget* target) = 0;
  virtual void Unregister(const ui::Accelerator& accelerator,
                          ui::AcceleratorTarget* target) = 0;
  virtual bool Process(const ui::Accelerator& accelerator) = 0;
  virtual ui::AcceleratorTarget* GetCurrentTarget(
      const ui::Accelerator& accelerator) const = 0;
};

namespace {

// Accelerators inside nested message loop are handled by
// wm::NestedAcceleratorController while accelerators in normal case are
// handled by wm::AcceleratorFilter. These delegates act bridges in these
// two different environment so that AcceleratorManagerImpl can handle
// accelerators in an uniform way.

class NestedAcceleratorDelegate : public wm::NestedAcceleratorDelegate {
 public:
  explicit NestedAcceleratorDelegate(
      AcceleratorManagerImpl* accelerator_manager)
      : accelerator_manager_(accelerator_manager) {}
  ~NestedAcceleratorDelegate() override {}

 private:
  // wm::NestedAcceleratorDelegate:
  Result ProcessAccelerator(const ui::Accelerator& accelerator) override {
    return accelerator_manager_->Process(accelerator) ? RESULT_PROCESSED
                                                      : RESULT_NOT_PROCESSED;
  }

  AcceleratorManagerImpl* accelerator_manager_;

  DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorDelegate);
};

class AcceleratorDelegate : public wm::AcceleratorDelegate {
 public:
  explicit AcceleratorDelegate(AcceleratorManagerImpl* accelerator_manager)
      : accelerator_manager_(accelerator_manager) {}
  ~AcceleratorDelegate() override {}

 private:
  // wm::AcceleratorDelegate:
  bool ProcessAccelerator(const ui::KeyEvent& event,
                          const ui::Accelerator& accelerator,
                          KeyType key_type) override {
    aura::Window* target = static_cast<aura::Window*>(event.target());
    if (!target->IsRootWindow() &&
        !accelerator_manager_->IsRegistered(accelerator, AF_RESERVED)) {
      // TODO(oshima): do the same when the active window is in fullscreen.
      return false;
    }
    return accelerator_manager_->Process(accelerator);
  }

  AcceleratorManagerImpl* accelerator_manager_;

  DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate);
};

class FocusManagerDelegate : public views::FocusManagerDelegate {
 public:
  explicit FocusManagerDelegate(AcceleratorManagerImpl* accelerator_manager)
      : accelerator_manager_(accelerator_manager) {}
  ~FocusManagerDelegate() override {}

  bool ProcessAccelerator(const ui::Accelerator& accelerator) override {
    return accelerator_manager_->Process(accelerator);
  }

  ui::AcceleratorTarget* GetCurrentTargetForAccelerator(
      const ui::Accelerator& accelerator) const override {
    return accelerator_manager_->IsRegistered(accelerator, AF_NONE)
               ? accelerator_manager_
               : nullptr;
  }

 private:
  AcceleratorManagerImpl* accelerator_manager_;

  DISALLOW_COPY_AND_ASSIGN(FocusManagerDelegate);
};

// Key strokes must be sent to web contents to give them a chance to
// consume them unless they are reserved, and unhandled key events are
// sent back to focus manager asynchronously. This installs the athena's
// focus manager that handles athena shell's accelerators.
class FocusManagerFactory : public views::FocusManagerFactory {
 public:
  explicit FocusManagerFactory(AcceleratorManagerImpl* accelerator_manager)
      : accelerator_manager_(accelerator_manager) {}
  ~FocusManagerFactory() override {}

  views::FocusManager* CreateFocusManager(views::Widget* widget,
                                          bool desktop_widget) override {
    return new views::FocusManager(
        widget,
        desktop_widget ? nullptr
                       : new FocusManagerDelegate(accelerator_manager_));
  }

 private:
  AcceleratorManagerImpl* accelerator_manager_;

  DISALLOW_COPY_AND_ASSIGN(FocusManagerFactory);
};

class UIAcceleratorManagerWrapper
    : public AcceleratorManagerImpl::AcceleratorWrapper {
 public:
  UIAcceleratorManagerWrapper()
      : ui_accelerator_manager_(new ui::AcceleratorManager) {}
  ~UIAcceleratorManagerWrapper() override {}

  virtual void Register(const ui::Accelerator& accelerator,
                        ui::AcceleratorTarget* target) override {
    ui_accelerator_manager_->Register(
        accelerator, ui::AcceleratorManager::kNormalPriority, target);
  }

  virtual void Unregister(const ui::Accelerator& accelerator,
                          ui::AcceleratorTarget* target) override {
    ui_accelerator_manager_->Unregister(accelerator, target);
  }

  virtual bool Process(const ui::Accelerator& accelerator) override {
    return ui_accelerator_manager_->Process(accelerator);
  }

  virtual ui::AcceleratorTarget* GetCurrentTarget(
      const ui::Accelerator& accelerator) const override {
    return ui_accelerator_manager_->GetCurrentTarget(accelerator);
  }

 private:
  scoped_ptr<ui::AcceleratorManager> ui_accelerator_manager_;

  DISALLOW_COPY_AND_ASSIGN(UIAcceleratorManagerWrapper);
};

class FocusManagerWrapper : public AcceleratorManagerImpl::AcceleratorWrapper {
 public:
  explicit FocusManagerWrapper(views::FocusManager* focus_manager)
      : focus_manager_(focus_manager) {}
  ~FocusManagerWrapper() override {}

  virtual void Register(const ui::Accelerator& accelerator,
                        ui::AcceleratorTarget* target) override {
    return focus_manager_->RegisterAccelerator(
        accelerator, ui::AcceleratorManager::kNormalPriority, target);
  }

  virtual void Unregister(const ui::Accelerator& accelerator,
                          ui::AcceleratorTarget* target) override {
    focus_manager_->UnregisterAccelerator(accelerator, target);
  }

  virtual bool Process(const ui::Accelerator& accelerator) override {
    NOTREACHED();
    return true;
  }

  virtual ui::AcceleratorTarget* GetCurrentTarget(
      const ui::Accelerator& accelerator) const override {
    return focus_manager_->GetCurrentTargetForAccelerator(accelerator);
  }

 private:
  views::FocusManager* focus_manager_;

  DISALLOW_COPY_AND_ASSIGN(FocusManagerWrapper);
};

}  // namespace

class AcceleratorManagerImpl::InternalData {
 public:
  InternalData(int command_id, AcceleratorHandler* handler, int flags)
      : command_id_(command_id), handler_(handler), flags_(flags) {}

  bool IsNonAutoRepeatable() const { return flags_ & AF_NON_AUTO_REPEATABLE; }
  bool IsDebug() const { return flags_ & AF_DEBUG; }
  int flags() const { return flags_; }

  bool IsCommandEnabled() const {
    return handler_->IsCommandEnabled(command_id_);
  }

  bool OnAcceleratorFired(const ui::Accelerator& accelerator) {
    return handler_->OnAcceleratorFired(command_id_, accelerator);
  }

 private:
  int command_id_;
  AcceleratorHandler* handler_;
  int flags_;

  // This class is copyable by design.
};

// static
AcceleratorManagerImpl*
AcceleratorManagerImpl::CreateGlobalAcceleratorManager() {
  return new AcceleratorManagerImpl(new UIAcceleratorManagerWrapper(), true);
}

scoped_ptr<AcceleratorManager> AcceleratorManagerImpl::CreateForFocusManager(
    views::FocusManager* focus_manager) {
  return scoped_ptr<AcceleratorManager>(
             new AcceleratorManagerImpl(new FocusManagerWrapper(focus_manager),
                                        false)).Pass();
}

AcceleratorManagerImpl::~AcceleratorManagerImpl() {
  nested_accelerator_controller_.reset();
  accelerator_filter_.reset();
  // Reset to use the default focus manager because the athena's
  // FocusManager has the reference to this object.
  if (global_)
    views::FocusManagerFactory::Install(nullptr);
}

void AcceleratorManagerImpl::Init() {
  if (global_)
    views::FocusManagerFactory::Install(new FocusManagerFactory(this));

  ui::EventTarget* toplevel = InputManager::Get()->GetTopmostEventTarget();
  nested_accelerator_controller_.reset(
      new wm::NestedAcceleratorController(new NestedAcceleratorDelegate(this)));

  scoped_ptr<wm::AcceleratorDelegate> accelerator_delegate(
      new AcceleratorDelegate(this));

  accelerator_filter_.reset(
      new wm::AcceleratorFilter(accelerator_delegate.Pass(),
                                accelerator_history_.get()));
  toplevel->AddPreTargetHandler(accelerator_filter_.get());
}

void AcceleratorManagerImpl::OnRootWindowCreated(aura::Window* root_window) {
  aura::client::SetDispatcherClient(root_window,
                                    nested_accelerator_controller_.get());
}

bool AcceleratorManagerImpl::Process(const ui::Accelerator& accelerator) {
  return accelerator_wrapper_->Process(accelerator);
}

bool AcceleratorManagerImpl::IsRegistered(const ui::Accelerator& accelerator,
                                          int flags) const {
  std::map<ui::Accelerator, InternalData>::const_iterator iter =
      accelerators_.find(accelerator);
  if (iter == accelerators_.end())
    return false;
  DCHECK(accelerator_wrapper_->GetCurrentTarget(accelerator));
  return flags == AF_NONE || iter->second.flags() & flags;
}

AcceleratorManagerImpl::AcceleratorManagerImpl(
    AcceleratorWrapper* accelerator_wrapper,
    bool global)
    : accelerator_wrapper_(accelerator_wrapper),
      accelerator_history_(new ui::AcceleratorHistory),
      debug_accelerators_enabled_(switches::IsDebugAcceleratorsEnabled()),
      global_(global) {
}

void AcceleratorManagerImpl::RegisterAccelerators(
    const AcceleratorData accelerators[],
    size_t num_accelerators,
    AcceleratorHandler* handler) {
  for (size_t i = 0; i < num_accelerators; ++i)
    RegisterAccelerator(accelerators[i], handler);
}

void AcceleratorManagerImpl::SetDebugAcceleratorsEnabled(bool enabled) {
  debug_accelerators_enabled_ = enabled;
}

bool AcceleratorManagerImpl::AcceleratorPressed(
    const ui::Accelerator& accelerator) {
  std::map<ui::Accelerator, InternalData>::iterator iter =
      accelerators_.find(accelerator);
  DCHECK(iter != accelerators_.end());
  if (iter == accelerators_.end())
    return false;
  InternalData& data = iter->second;
  if (data.IsDebug() && !debug_accelerators_enabled_)
    return false;
  if (accelerator.IsRepeat() && data.IsNonAutoRepeatable())
    return false;
  return data.IsCommandEnabled() ? data.OnAcceleratorFired(accelerator) : false;
}

bool AcceleratorManagerImpl::CanHandleAccelerators() const {
  return true;
}

void AcceleratorManagerImpl::RegisterAccelerator(
    const AcceleratorData& accelerator_data,
    AcceleratorHandler* handler) {
  ui::Accelerator accelerator(accelerator_data.keycode,
                              accelerator_data.keyevent_flags);
  accelerator.set_type(accelerator_data.trigger_event == TRIGGER_ON_PRESS
                           ? ui::ET_KEY_PRESSED
                           : ui::ET_KEY_RELEASED);
  accelerator_wrapper_->Register(accelerator, this);
  accelerators_.insert(
      std::make_pair(accelerator,
                     InternalData(accelerator_data.command_id,
                                  handler,
                                  accelerator_data.accelerator_flags)));
}

void AcceleratorManagerImpl::UnregisterAccelerator(
    const AcceleratorData& accelerator_data,
    AcceleratorHandler* handler) {
  ui::Accelerator accelerator(accelerator_data.keycode,
                              accelerator_data.keyevent_flags);
  accelerator.set_type(accelerator_data.trigger_event == TRIGGER_ON_PRESS
                           ? ui::ET_KEY_PRESSED
                           : ui::ET_KEY_RELEASED);
  accelerator_wrapper_->Unregister(accelerator, this);
  accelerators_.erase(accelerator);
}

// static
AcceleratorManager* AcceleratorManager::Get() {
  return InputManager::Get()->GetAcceleratorManager();
}

// static
scoped_ptr<AcceleratorManager> AcceleratorManager::CreateForFocusManager(
    views::FocusManager* focus_manager) {
  return AcceleratorManagerImpl::CreateForFocusManager(focus_manager).Pass();
}

}  // namespace athena


text:
using System;
using System.IO;

namespace Public.Common.Granby
{
    public static class Utilities
    {
        public static string FormatDateTime(DateTime dateTime)
        {
            string output = String.Format(@"{0:yyyyMMdd}-{0:hh.mm.ss}", dateTime);
            return output;
        }

        public static string FormatDateTimeNow()
        {
            string output = Utilities.FormatDateTime(DateTime.Now);
            return output;
        }

        public static string GetTestFilePath(string testFileName)
        {
            string output = Path.Combine(@"..\..\..\..\Lib\Files", testFileName);
            return output;
        }

        public static string GetLogFilePath(string prefix)
        {
            string now = Utilities.FormatDateTimeNow();

            string fileName = String.Format(@"{0} {1}.txt", prefix, now);

            string output = Path.Combine(@"C:\temp\logs\Granby", fileName);
            return output;
        }
    }
}


text:
#import "BlockBasedSonarPlugin.h"

@implementation BlockBasedSonarPlugin {
  NSString* _identifier;
  ConnectBlock _connect;
  DisconnectBlock _disconnect;
  BOOL _runInBackground;
}

- (instancetype)initIdentifier:(NSString*)identifier
                       connect:(ConnectBlock)connect
                    disconnect:(DisconnectBlock)disconnect {
  if (self = [super init]) {
    _identifier = identifier;
    _connect = connect;
    _disconnect = disconnect;
    _runInBackground = false;
  }
  return self;
}

- (instancetype)initIdentifier:(NSString*)identifier
                       connect:(ConnectBlock)connect
                    disconnect:(DisconnectBlock)disconnect
               runInBackground:(BOOL)runInBackground {
  if (self = [super init]) {
    _identifier = identifier;
    _connect = connect;
    _disconnect = disconnect;
    _runInBackground = runInBackground;
  }
  return self;
}

- (NSString*)identifier {
  return _identifier;
}

- (void)didConnect:(id<FlipperConnection>)connection {
  if (_connect) {
    _connect(connection);
  }
}

- (void)didDisconnect {
  if (_disconnect) {
    _disconnect();
  }
}

- (BOOL)runInBackground {
  return _runInBackground;
}

@end


text:
package testdata

import (
	"regexp"
	"testing"

	"github.com/stretchr/testify/assert"
	old "sqlflow.org/sqlflow/go/sql/testdata"
)

func TestDatabaseTestDataIrisMySQL(t *testing.T) {
	a := assert.New(t)
	// TODO(wangkuiyi): The +"\n" and removeBlankLines are all
	// trick to match without editing the old package.  We will
	// remove them once after the construction of the new testdata
	// package.
	a.Equal(removeBlankLines(old.IrisSQL+"\n"),
		IrisMySQL("iris"))
}

func TestDatabaseTestDataIrisHive(t *testing.T) {
	a := assert.New(t)
	a.Equal(removeBlankLines(old.IrisHiveSQL+"\n"),
		IrisHive("iris"))
}

func TestDatabaseTestDataIrisMaxCompute(t *testing.T) {
	a := assert.New(t)
	a.Equal(removeBlankLines(old.IrisMaxComputeSQL+"\n"),
		IrisMaxCompute(`%[1]s`))
}

func removeBlankLines(s string) string {
	regex, err := regexp.Compile("\n\n")
	if err != nil {
		return ""
	}
	return regex.ReplaceAllString(s, "\n")
}


text:
import { injectReducer } from '../../store/reducers'

export default (store) => ({
path : 'diary',
  /*  Async getComponent is only invoked when route matches   */
  getComponent (nextState, cb) {
    /*  Webpack - use 'require.ensure' to create a split point
        and embed an async module loader (jsonp) when bundling   */
    require.ensure([], (require) => {
      /*  Webpack - use require callback to define
          dependencies for bundling   */
      const DiaryContainer = require('./containers/DiaryContainer').default
      const reducer = require('./modules/dailyEntry').default

      /*  Add the reducer to the store on key 'diary'  */
      injectReducer(store, { key: 'diary', reducer })
      /*  Return getComponent   */
      cb(null, DiaryContainer)

    /* Webpack named bundle   */
  }, 'diary')
  }
})


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

[AddComponentMenu("NGUI/Interaction/Toggled Components"), ExecuteInEditMode, RequireComponent(typeof(UIToggle))]
public class UIToggledComponents : MonoBehaviour
{
	public List<MonoBehaviour> activate;

	public List<MonoBehaviour> deactivate;

	[HideInInspector, SerializeField]
	private MonoBehaviour target;

	[HideInInspector, SerializeField]
	private bool inverse;

	private void Awake()
	{
		if (this.target != null)
		{
			if (this.activate.Count == 0 && this.deactivate.Count == 0)
			{
				if (this.inverse)
				{
					this.deactivate.Add(this.target);
				}
				else
				{
					this.activate.Add(this.target);
				}
			}
			else
			{
				this.target = null;
			}
		}
		UIToggle component = base.GetComponent<UIToggle>();
		EventDelegate.Add(component.onChange, new EventDelegate.Callback(this.Toggle));
	}

	public void Toggle()
	{
		if (base.enabled)
		{
			for (int i = 0; i < this.activate.Count; i++)
			{
				MonoBehaviour monoBehaviour = this.activate[i];
				monoBehaviour.enabled = UIToggle.current.value;
			}
			for (int j = 0; j < this.deactivate.Count; j++)
			{
				MonoBehaviour monoBehaviour2 = this.deactivate[j];
				monoBehaviour2.enabled = !UIToggle.current.value;
			}
		}
	}
}


text:
"""This example retrieves available creative fields for a given string and
displays the name, ID, advertiser ID, and number of values. Results are
limited to the first 10.

Tags: creativefield.getCreativeFields
"""

__author__ = 'api.jdilallo@gmail.com (Joseph DiLallo)'

import os
import sys
sys.path.insert(0, os.path.join('..', '..', '..', '..'))

# Import appropriate classes from the client library.
from adspygoogle import DfaClient

ADVERTISER_ID = 'INSERT_ADVERTISER_ID_HERE'

def main(client, advertiser_id):
  # Initialize appropriate service.
  creative_field_service = client.GetCreativeFieldService(
      'https://advertisersapitest.doubleclick.net', 'v1.19')

  # Set up creative field search criteria structure.
  creative_field_search_criteria = {
      'advertiserIds': [advertiser_id],
      'pageSize': '10'
  }

  # Get creative fields for the selected criteria.
  results = creative_field_service.GetCreativeFields(
      creative_field_search_criteria)[0]

  # Display creative field names, IDs, advertiser IDs, and number of values.
  if results['records']:
    for creative_field in results['records']:
      print ('Creative field with name \'%s\', ID \'%s\', advertiser ID \'%s\','
             ' and containing \'%s\' values was found.'
             % (creative_field['name'], creative_field['id'],
                creative_field['advertiserId'],
                creative_field['totalNumberOfValues']))
  else:
    print 'No creative fields found for your criteria.'

if __name__ == '__main__':
  # Initialize client object.
  client = DfaClient(path=os.path.join('..', '..', '..', '..'))
  main(client, ADVERTISER_ID)


text:
require 'rails_helper'

describe ExerciseDecorator, type: :model do
  before :each do
    rnd_id = ((rand * 500) % Exercise.count).to_i + 1
    @random_seed_row = Exercise.find_by_id( rnd_id )
    @decorated_instance = ExerciseDecorator.decorate( @random_seed_row )
  end

  subject { @decorated_instance }

  it "has a not nil source row" do
    expect( @random_seed_row ).not_to be_nil
  end
  it "has a valid source row" do
    expect( @random_seed_row ).to be_valid
  end

  context "[implemented methods]" do
    it_behaves_like( "(the existance of a method returning a non-empty Hash)",
      [
        :drop_down_attrs
      ]
    )
    it_behaves_like( "(the existance of a method returning non-empty strings)",
      [
        :get_full_name
      ]
    )
  end
  #-- -------------------------------------------------------------------------
  #++

  describe "#drop_down_attrs" do
    it "returns an Hash with the expected keys" do
      result = subject.drop_down_attrs()
      expect( result.keys ).to include(
        :label, :value, :tot_distance, :tot_secs, :is_arm_aux_allowed,
        :is_kick_aux_allowed, :is_body_aux_allowed, :is_breath_aux_allowed
      )
    end
  end
  #-- -------------------------------------------------------------------------
  #++
end


text:
import svgMarkup from './CalendarIcon.svg';

import React from 'react';
import Icon from '../private/Icon/Icon';

export default function CalendarIcon(props) {
  return <Icon markup={svgMarkup} {...props} />;
}

CalendarIcon.displayName = 'CalendarIcon';


text:
package zipkin

import (
	"compress/gzip"
	"io/ioutil"
	"net/http"
	"strings"
	"sync"

	"github.com/apache/thrift/lib/go/thrift"
	"github.com/gorilla/mux"
	"github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
)

// SpanHandler is an implementation of a Handler which accepts zipkin thrift
// span data and sends it to the recorder
type SpanHandler struct {
	Path      string
	recorder  Recorder
	waitGroup *sync.WaitGroup
}

// NewSpanHandler returns a new server instance given path to handle
func NewSpanHandler(path string) *SpanHandler {
	return &SpanHandler{
		Path: path,
	}
}

func cors(next http.HandlerFunc) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		if origin := r.Header.Get("Origin"); origin != "" {
			w.Header().Set(`Access-Control-Allow-Origin`, origin)
			w.Header().Set(`Access-Control-Allow-Methods`, strings.Join([]string{
				`OPTIONS`,
				`POST`,
			}, ", "))

			w.Header().Set(`Access-Control-Allow-Headers`, strings.Join([]string{
				`Accept`,
				`Accept-Encoding`,
				`Content-Length`,
				`Content-Type`,
			}, ", "))

			w.Header().Set(`Access-Control-Expose-Headers`, strings.Join([]string{
				`Date`,
			}, ", "))
		}

		if r.Method == "OPTIONS" {
			return
		}

		next.ServeHTTP(w, r)
	}
}

// Register implements the Service interface. Register accepts zipkin thrift data
// POSTed to the path of the mux router
func (s *SpanHandler) Register(router *mux.Router, recorder Recorder) error {
	handler := cors(http.HandlerFunc(s.Spans))
	router.Handle(s.Path, handler).Methods("POST", "OPTIONS")
	s.recorder = recorder
	return nil
}

// Spans handles zipkin thrift spans
func (s *SpanHandler) Spans(w http.ResponseWriter, r *http.Request) {
	defer r.Body.Close()
	body := r.Body
	var err error
	// Handle gzip decoding of the body
	if r.Header.Get("Content-Encoding") == "gzip" {
		body, err = gzip.NewReader(r.Body)
		if err != nil {
			s.recorder.Error(err)
			w.WriteHeader(http.StatusInternalServerError)
			return
		}
		defer body.Close()
	}

	octets, err := ioutil.ReadAll(body)
	if err != nil {
		s.recorder.Error(err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	spans, err := unmarshalThrift(octets)
	if err != nil {
		s.recorder.Error(err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	trace := NewTrace(spans)

	if err = s.recorder.Record(trace); err != nil {
		s.recorder.Error(err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	w.WriteHeader(http.StatusNoContent)
}

func unmarshalThrift(body []byte) ([]*zipkincore.Span, error) {
	buffer := thrift.NewTMemoryBuffer()
	if _, err := buffer.Write(body); err != nil {
		return nil, err
	}

	transport := thrift.NewTBinaryProtocolTransport(buffer)
	_, size, err := transport.ReadListBegin()
	if err != nil {
		return nil, err
	}

	spans := make([]*zipkincore.Span, size)
	for i := 0; i < size; i++ {
		zs := &zipkincore.Span{}
		if err = zs.Read(transport); err != nil {
			return nil, err
		}
		spans[i] = zs
	}

	if err = transport.ReadListEnd(); err != nil {
		return nil, err
	}

	return spans, nil
}


text:
package org.apache.jmeter.report.processor.graph.impl;

import java.util.HashMap;
import java.util.Map;

import org.apache.jmeter.report.processor.ListResultData;
import org.apache.jmeter.report.processor.MapResultData;
import org.apache.jmeter.report.processor.PercentileAggregatorFactory;
import org.apache.jmeter.report.processor.ValueResultData;
import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
import org.apache.jmeter.report.processor.graph.ElapsedTimeValueSelector;
import org.apache.jmeter.report.processor.graph.GraphKeysSelector;
import org.apache.jmeter.report.processor.graph.GroupInfo;
import org.apache.jmeter.report.processor.graph.IndexedNameSelector;
import org.apache.jmeter.report.processor.graph.StaticSeriesSelector;
import org.apache.jmeter.util.JMeterUtils;

/**
 * The class ResponseTimePerSampleGraphConsumer provides a graph to visualize
 * percentiles of response time for each sample name.
 * NOT USED FOR NOW as of 3.0
 *
 * @since 3.0
 */
public class ResponseTimePerSampleGraphConsumer extends AbstractGraphConsumer {

    /**
     * Instantiates a new response time per sample graph consumer.
     */
    public ResponseTimePerSampleGraphConsumer() {
    }

    @Override
    public void initialize() {
        super.initialize();
        setRevertKeysAndValues(true);
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
     * createKeysSelector()
     */
    @Override
    protected final GraphKeysSelector createKeysSelector() {
        return new IndexedNameSelector();
    }

    /**
     * Creates the group info for elapsed time percentile depending on jmeter
     * properties.
     *
     * @param propertyKey  the property key
     * @param defaultValue the default value
     * @return the group info
     */
    private GroupInfo createGroupInfo(String propertyKey, int defaultValue) {
        int property = JMeterUtils.getPropDefault(propertyKey, defaultValue);
        PercentileAggregatorFactory factory = new PercentileAggregatorFactory();
        factory.setPercentileIndex(property);
        StaticSeriesSelector seriesSelector = new StaticSeriesSelector();
        seriesSelector.setSeriesName(String.format(
                "%dth percentile", property));

        return new GroupInfo(factory, seriesSelector,
                // We include Transaction Controller results
                new ElapsedTimeValueSelector(false), false, false);
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
     * createGroupInfos()
     */
    @Override
    protected Map<String, GroupInfo> createGroupInfos() {
        HashMap<String, GroupInfo> groupInfos = new HashMap<>(6);

        groupInfos.put("aggregate_rpt_pct1",
                createGroupInfo("aggregate_rpt_pct1", 90));

        groupInfos.put("aggregate_rpt_pct2",
                createGroupInfo("aggregate_rpt_pct2", 95));

        groupInfos.put("aggregate_rpt_pct3",
                createGroupInfo("aggregate_rpt_pct3", 99));

        return groupInfos;
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.jmeter.report.processor.graph.AbstractGraphConsumer#
     * initializeExtraResults(org.apache.jmeter.report.processor.MapResultData)
     */
    @Override
    protected void initializeExtraResults(MapResultData parentResult) {
        ListResultData samples = new ListResultData();
        IndexedNameSelector indexedNameSelector = (IndexedNameSelector) getKeysSelector();
        int size = indexedNameSelector.getNames().size();
        for (int i = 0; i < size; i++) {
            samples.addResult(
                    new ValueResultData(indexedNameSelector.getNames().get(i)));
        }
        parentResult.setResult("sampleNames", samples);
    }
}


text:
<?php

return [
  'fields'=>[
    'text'=>[
      'type'=>'paragraph',
      'allow_tags'=>true,
      'default'=>'
Your Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
'
    ],
    'image'=>[
      'type'=>'media2',
      'default'=>'$p=s1.jpg'
    ],
    'side'=>[
      'type'=>'radio',
      'options'=>['Left', 'Right']
    ]
  ]
];


text:
/**
 * Created by ScrumTools on 10/8/14.
 */
'use strict';

/**
 * Module dependencies.
 */
var users = require('../../app/controllers/users.server.controller');
var sprints = require('../../app/controllers/sprints.server.controller');

module.exports = function(app) {

    app.route('/projects/:projectId/sprints')
        .get(users.requiresLogin, sprints.hasAuthorization, sprints.list)
        .post(users.requiresLogin, sprints.hasAuthorization, sprints.create);

    app.route('/projects/:projectId/sprints/:sprintId')
        .get(users.requiresLogin, sprints.hasAuthorization, sprints.load)
        .put(users.requiresLogin, sprints.hasAuthorization, sprints.update)
        .delete(users.requiresLogin, sprints.hasAuthorization, sprints.delete);

    app.route('/projects/:projectId/sprints/:sprintId/backlog')
        .get(users.requiresLogin, sprints.hasAuthorization, sprints.backlog);

    app.route('/projects/:projectId/sprintNotFinished')
        .get(users.requiresLogin, sprints.hasAuthorization, sprints.notFinished);

};


text:
layout: post
date: 2018-04-03
title: "Alessandro Angelozzi 70 Sleeveless Chapel Train Ballgown"
category: Alessandro Angelozzi
tags: [Alessandro Angelozzi,Alessandro Angelozzi ,Ballgown,Sweetheart,Chapel Train,Sleeveless]
---
### Alessandro Angelozzi 70
Just **$309.99**
###   Sleeveless Chapel Train Ballgown

BRANDS	Alessandro Angelozzi

Silhouette	Ballgown

Neckline	Sweetheart

Hemline/Train	Chapel Train

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/alessandro-angelozzi/14041-alessandro-angelozzi-70.html](https://www.readybrides.com/en/alessandro-angelozzi/14041-alessandro-angelozzi-70.html)


text:
'use strict';

import { module } from 'angular';

export const CORE_VALIDATION_VALIDATIONERROR_DIRECTIVE = 'spinnaker.core.validation.error.directive';
export const name = CORE_VALIDATION_VALIDATIONERROR_DIRECTIVE; // for backwards compatibility
module(CORE_VALIDATION_VALIDATIONERROR_DIRECTIVE, []).directive('validationError', function () {
  return {
    restrict: 'E',
    templateUrl: require('./validationError.html'),
    scope: {
      message: '@',
    },
  };
});


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

{% block pageTitle %}
About - GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
	{{ govukBreadcrumbs({
	  items: [
	    {
	      text: "GOV.UK Prototype Kit",
	      href: "/docs"
	    }
	  ]
	}) }}
{% endblock %}

{% block content %}

Privacy policy

We collect certain information and data about you when you use the GOV.UK Prototype Kit.

We collect:

questions, queries or feedback you leave

your email address, if you contact us

your Internet Protocol (IP) address, and which version of web browser you used

information on how you use the site, using cookies and page-tagging techniques

This data can be viewed by authorised people in the Government Digital Service (GDS) and our suppliers, to:

improve the site by monitoring how you use it

gather feedback to improve our services

respond to any feedback you send us, if you've asked us to.

Where your data is stored

We store your data on secure servers in the European Economic Area (EEA).

Keeping your data secure

Sending information over the internet is generally not completely secure, and we can't guarantee the security of your data while it's in transit.

Any data you send is at your own risk.

We have procedures and security features in place to keep your data secure once we receive it.

Disclosing your information

We may pass on your personal information if we have a legal obligation to do so, or if we have to enforce or apply our terms of use and other agreements. This includes exchanging information with other government departments for legal reasons.

We won't share your information with any other organisations for marketing, market research or commercial purposes, and we don't pass on your details to other websites.

Your rights

You can find out what information we hold about you, and ask us not to use any of the information we collect.

Links to other websites

The GOV.UK Prototype Kit contains links to other websites.

This privacy policy only applies to the GOV.UK Prototype Kit, and doesn't cover other government services and transactions that we link to. These services have their own terms and conditions and privacy policies.

Following a link to another website

If you go to another website from this one, read the privacy policy on that website to find out what it does with your information.

Following a link to the GOV.UK Prototype Kit from another website

If you come to the GOV.UK Prototype Kit from another website, we may receive information from the other website. We don't use this data. You should read the privacy policy of the website you came from to find out more about this.

{% endblock %}


text:
package org.apache.ignite.internal.processors.cache;

import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;

/**
 *
 */
public interface CacheLockCandidates {
    /**
     * @param idx Candidate index.
     * @return Candidate.
     */
    public GridCacheMvccCandidate candidate(int idx);

    /**
     * @return Number of candidates.
     */
    public int size();

    /**
     * @param ver Candidate version.
     * @return {@code True} if contains candidate with given version.
     */
    public boolean hasCandidate(GridCacheVersion ver);
}


text:
/*global expect */
import { beforeEach, describe } from '../../test-helper';
import { it } from 'ember-mocha';

export function shouldBindAttrs() {
  describe('native select element attributes', function() {
    beforeEach(function() {
      this.controller.setProperties({
        attrName: 'person-select',
        attrForm: 'person-form',
        title: 'person title',
        attrSize: '3',
        isRequired: true,
        hasAutofocus: true
      });
    });

    it('renders the name attribute', function() {
      expect(this.$().attr('name')).to.equal('person-select');
    });
    it('renders the form attribute', function() {
      expect(this.$().attr('form')).to.equal('person-form');
    });
    it('renders the title attribute', function() {
      expect(this.$().attr('title')).to.equal('person title');
    });
    it('renders the size attribute', function() {
      expect(this.$().attr('size')).to.equal('3');
    });
    it('renders the required attribute', function() {
      expect(this.$().attr('required')).to.equal('required');
    });
    it('renders the autofocus attribute', function() {
      expect(this.$().attr('autofocus')).to.equal('autofocus');
    });
    it('renders the tabindex attribute with 0', function() {
      expect(this.$().attr('tabindex')).to.equal('0');
    });

    describe('setting tabindex', function() {
      beforeEach(function() {
        this.component.set('tabindex', 2);
      });

      it('has the correct tabindex value', function() {
        expect(this.$().attr('tabindex')).to.equal('2');
      });
    });
  });
}


text:
package com.github.neuralnetworks.calculation.neuronfunctions;

import com.github.neuralnetworks.util.Tensor;

/**
 * Threshold binary activation function
 */
public class ThresholdFunction implements TensorFunction {

    private static final long serialVersionUID = 1L;

    private float threshold;

    @Override
    public void value(Tensor inputOutput) {
	float[] elements = inputOutput.getElements();
	for (int i = 0; i < elements.length; i++) {
	    elements[i] = elements[i] >= threshold ? 1 : 0;
	}
    }
}


text:
<?php declare(strict_types=1);

namespace Dms\Web\Laravel\Renderer\Table;

use Dms\Core\Table\IColumnComponent;

/**
 * The column component renderer interface.
 *
 * @author Elliot Levin <elliotlevin@hotmail.com>
 */
interface IColumnComponentRenderer
{
    /**
     * @param IColumnComponent $component
     *
     * @return bool
     */
    public function accepts(IColumnComponent $component) : bool;

    /**
     * Renders the supplied column component value as a html string.
     *
     * @param IColumnComponent $component
     * @param mixed            $value
     *
     * @return string
     */
    public function render(IColumnComponent $component, $value) : string;
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="scroller" table-class="display nowrap" order="3">

<css lib="datatables scroller" />
<js lib="jquery datatables scroller">
<![CDATA[
	$(document).ready(function() {
		var data = [];
		for ( var i=0 ; i<50000 ; i++ ) {
			data.push( [ i, i, i, i, i ] );
		}

		$('#example').DataTable( {
			data:           data,
			deferRender:    true,
			scrollY:        200,
			scrollCollapse: true,
			scroller:       true
		} );
	} );
]]>
</js>

<title lib="Scroller">Client-side data source (50,000 rows)</title>

<info><![CDATA[

This example is completely artificial in that the data generated is created on the client-side by just looping around a Javascript array and then passing that to DataTables. However, it does show quite nicely that DataTables and Scroller can cope with large amounts of data on the client-side quite nicely. Typically data such as this would be Ajax sourced and server-side processing should be considered.

Please be aware that the performance of this page will depend on your browser as the array of data is generated - for example IE6 will crawl!

]]></info>

</dt-example>


text:
class CreateReleases < ActiveRecord::Migration
  DOWNTIME = false

  def change
    create_table :releases do |t|
      t.string :tag
      t.text :description
      t.integer :project_id

      t.timestamps null: true
    end

    add_index :releases, :project_id
    add_index :releases, [:project_id, :tag]
  end
end


text:
<?php

require file_exists(__DIR__.'/../../../autoload-dev.php') ? __DIR__.'/../../../autoload-dev.php' : __DIR__.'/../../vendor/autoload.php';
require __DIR__.'/../config.php';

require 'Game.php';

$newGame = new Game();

if (is_numeric($_REQUEST['difficulty']) && (int) $_REQUEST['difficulty'] >= 1 && (int) $_REQUEST['difficulty'] <= 3) {
  $newGame->difficulty = (int) $_REQUEST['difficulty'];
}

$time = microtime(true);
$newGame->generateBoard();
$timeTaken = round(microtime(true) - $time, 3);

$time = microtime(true);
$newGame->makeItFun();
$timeTakenFun = round(microtime(true) - $time, 3);

$optionDistribution = $newGame->optionDistribution(true);
$optionGrid = $optionDistribution['grid'];
$optionCoords = $optionDistribution['coords'];
ksort($optionCoords);

?>
<!DOCTYPE html>

  <title>Nymph Sudoku Test</title>

Nymph Sudoku Test

    Set difficulty: easy : medium : hard

It took the Game class <?php echo $timeTaken; ?> seconds to generate this board:

        <?php foreach ($newGame->solvedBoard as $y => $curRow): ?>

          <?php foreach ($curRow as $x => $curVal): ?>
          <?php echo "($x, $y) =>
$curVal"; ?>
          <?php endforeach; ?>

        <?php endforeach; ?>

It took <?php echo $timeTakenFun; ?> seconds to make it fun on <?php echo $newGame->difficulty == 1 ? 'easy' : ($newGame->difficulty == 2 ? 'medium' : 'hard'); ?> difficulty:

    <?php foreach ($optionCoords as $key => $squares): ?>
    <?php echo count($squares) < 10 ? ' '.count($squares) : count($squares); ?> square<?php echo count($squares) > 1 ? 's' : ' '; ?> with <?php echo $key; ?> possible values.

    <?php endforeach; ?>

        <?php foreach ($newGame->board as $y => $curRow): ?>

          <?php foreach ($curRow as $x => $curVal): ?>
          <?php echo $curVal ? "$curVal" : "{$optionGrid[$y][$x]} option".($optionGrid[$y][$x] > 1 ? 's' : '').""; ?>
          <?php endforeach; ?>

        <?php endforeach; ?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2005-2014 The Kuali Foundation

    Licensed under the Educational Community License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.opensource.org/licenses/ecl2.php

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<data xmlns="ns:workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ns:workflow resource:WorkflowData">
  <documentTypes xmlns="ns:workflow/DocumentType" xsi:schemaLocation="ns:workflow/DocumentType resource:DocumentType">
    <documentType>
      <name>IdentityManagementGroupDocument</name>
      <parent>IdentityManagementDocument</parent>
      <label>Group</label>
      <docHandler>${kim.url}/identityManagementGroupDocument.do?methodToCall=docHandler</docHandler>
      <helpDefinitionURL>http://site.kuali.org/rice/${rice.version}/reference/html/Help.html#group</helpDefinitionURL>
      <active>true</active>
      <routingVersion>2</routingVersion>
      <routePaths>
        <routePath>
          <start name="AdHoc" nextNode="GroupType" />
          <role name="GroupType" />
        </routePath>
      </routePaths>
      <routeNodes>
        <start name="AdHoc" />
        <role name="GroupType">
          <qualifierResolverClass>org.kuali.rice.kim.impl.type.KimTypeQualifierResolver</qualifierResolverClass>
          <activationType>P</activationType>
        </role>
      </routeNodes>
    </documentType>
  </documentTypes>
</data>


text:
var gatherFiles= require("./gatherFiles.js"),
  lazy= require("lazy")

var mainGather

/**
* complement of `gatherFiles` for programs whose only input is files: use stdin and argv for inupt, find files.
*/
module.exports= mainGather= function(argv,stdin){
	var gather= gatherFiles(),
	  haveStdin= false

	// pump a stream of filenames into gather
	function pumpStream(stream){
		// break stream into lines
		var lines= lazy()
			.lines
			.forEach(function(line){
				// push into gather
				gather.gather(line)
			})
		// pump stream into linebreaker
		stream.on("data",function(chunk){
			lines.emit("data",chunk)
		})
	}

	// pump our argv into gather
	if(argv && argv.length){
		for(var i in argv){
			var arg= argv[i]
			if(arg != "-"){
				gather.gather(arg)
			}else{
				// special case, stdin designator.
				haveStdin= true
				pumpStream(process.stdin)
			}
		}
	}

	// pump stdin into gather
	if(stdin && (!haveStdin || stdin != process.stdin)){
		pumpStream(stdin)
	}

	return gather
}


text:
package de.metanome.algorithms.taney;

import java.util.ArrayList;

import de.metanome.algorithm_integration.AlgorithmConfigurationException;
import de.metanome.algorithm_integration.AlgorithmExecutionException;
import de.metanome.algorithm_integration.algorithm_types.BooleanParameterAlgorithm;
import de.metanome.algorithm_integration.algorithm_types.FunctionalDependencyAlgorithm;
import de.metanome.algorithm_integration.algorithm_types.IntegerParameterAlgorithm;
import de.metanome.algorithm_integration.algorithm_types.RelationalInputParameterAlgorithm;
import de.metanome.algorithm_integration.algorithm_types.StringParameterAlgorithm;
import de.metanome.algorithm_integration.configuration.ConfigurationRequirement;
import de.metanome.algorithm_integration.configuration.ConfigurationRequirementRelationalInput;
import de.metanome.algorithm_integration.input.RelationalInputGenerator;
import de.metanome.algorithm_integration.result_receiver.FunctionalDependencyResultReceiver;

public class Taney extends TaneyAlgorithm 				// Separating the algorithm implementation and the Metanome interface implementation is good practice
						  implements FunctionalDependencyAlgorithm, 			// Defines the type of the algorithm, i.e., the result type, for instance, FunctionalDependencyAlgorithm or InclusionDependencyAlgorithm; implementing multiple types is possible
						  			 RelationalInputParameterAlgorithm,	// Defines the input type of the algorithm; relational input is any relational input from files or databases; more specific input specifications are possible
						  			 StringParameterAlgorithm, IntegerParameterAlgorithm, BooleanParameterAlgorithm {	// Types of configuration parameters this algorithm requires; all these are optional

	public enum Identifier {
		INPUT_GENERATOR
	};

	@Override
	public String getAuthors() {
		return "Soeren Oldag, Tamara Slosarek"; // A string listing the author(s) of this algorithm
	}

	@Override
	public String getDescription() {
		return "An FD algorithm returning minimal functional dependencies"; // A string briefly describing what this algorithm does
	}

	@Override
	public ArrayList<ConfigurationRequirement<?>> getConfigurationRequirements() { // Tells Metanome which and how many parameters the algorithm needs
		ArrayList<ConfigurationRequirement<?>> conf = new ArrayList<>();
		conf.add(new ConfigurationRequirementRelationalInput(Taney.Identifier.INPUT_GENERATOR.name()));

		return conf;
	}

	@Override
	public void setStringConfigurationValue(String identifier, String... values) throws AlgorithmConfigurationException {
		this.handleUnknownConfiguration(identifier, values);
	}

	@Override
	public void setIntegerConfigurationValue(String identifier, Integer... values) throws AlgorithmConfigurationException {
		this.handleUnknownConfiguration(identifier, values);
	}

	@Override
	public void setBooleanConfigurationValue(String identifier, Boolean... values) throws AlgorithmConfigurationException {
		this.handleUnknownConfiguration(identifier, values);
	}

	@Override
	public void setRelationalInputConfigurationValue(String identifier, RelationalInputGenerator... values) throws AlgorithmConfigurationException {
		if (!Taney.Identifier.INPUT_GENERATOR.name().equals(identifier))
			this.handleUnknownConfiguration(identifier, values);
		this.inputGenerator = values[0];
	}

	@Override
	public void setResultReceiver(FunctionalDependencyResultReceiver resultReceiver) {
		this.resultReceiver = resultReceiver;
	}

	@Override
	public void execute() throws AlgorithmExecutionException {
		super.execute();
	}

	private void handleUnknownConfiguration(String identifier, Object[] values) throws AlgorithmConfigurationException {
		throw new AlgorithmConfigurationException("Unknown configuration: " + identifier + " -> [" + concat(values, ",") + "]");
	}

	private static String concat(Object[] objects, String separator) {
		if (objects == null)
			return "";

		StringBuilder buffer = new StringBuilder();
		for (int i = 0; i < objects.length; i++) {
			buffer.append(objects[i].toString());
			if ((i + 1) < objects.length)
				buffer.append(separator);
		}
		return buffer.toString();
	}
}


text:
require 'spec_helper'

describe AdultsController do

end


text:
CREATE OR REPLACE package s2sAttachmentsV11Pkg as

procedure get_count_attachments (as_proposal_number IN osp$eps_proposal.proposal_number%type,
           				   cur_type IN OUT result_sets.cur_generic) ;

END;
/

CREATE OR REPLACE package body s2sAttachmentsV11Pkg as

-------------------------------
-- procedure get_count_attachments
--  GETS COUNT OF OTHER ATTACHMENTS
-------------------------------

procedure get_count_attachments (as_proposal_number IN osp$eps_proposal.proposal_number%type,
           				   cur_type IN OUT result_sets.cur_generic)

 IS

li_count			number;

BEGIN

      li_count :=0;
	SELECT COUNT(*)
	INTO   li_count
	FROM	 OSP$NARRATIVE
	WHERE  PROPOSAL_NUMBER = as_proposal_number
	AND    NARRATIVE_TYPE_CODE = 61;

 open cur_type for

 	SELECT 	li_count as COUNT_ATTACHMENTS
 	FROM		DUAL;

end;
 End;
/


text:
  <link rel="stylesheet" href="maven-theme.css">
  <title>AppSecInc. MSI Extensions</title>

Main Page

Related Pages

Namespaces

Classes

Files

Class List

Class Hierarchy

Class Members

AppSecInc

Wix

Extensions

SystemToolsExtension

Public Member Functions |
Properties |
List of all members

AppSecInc.Wix.Extensions.SystemToolsExtension Class Reference

A wix extension for SystemTools custom action library.
 More...

Inheritance diagram for AppSecInc.Wix.Extensions.SystemToolsExtension:

  <map id="AppSecInc.Wix.Extensions.SystemToolsExtension_map" name="AppSecInc.Wix.Extensions.SystemToolsExtension_map">
</map>

Public Member Functions

override Library 	GetLibrary (TableDefinitionCollection tableDefinitions)

 	Gets the library associated with this extension.  More...

Properties

override CompilerExtension 	CompilerExtension [get]

 	Gets the optional compiler extension.  More...

override TableDefinitionCollection 	TableDefinitions [get]

 	Gets the optional table definitions for this extension.  More...

override string 	DefaultCulture [get]

 	Gets the default culture.  More...

Detailed Description

A wix extension for SystemTools custom action library.

Member Function Documentation

          override Library AppSecInc.Wix.Extensions.SystemToolsExtension.GetLibrary
          (
          TableDefinitionCollection
          tableDefinitions	)

inline

Gets the library associated with this extension.

Parameters

tableDefinitions	The table definitions to use while loading the library.

Returns

The library for this extension.

Property Documentation

          override CompilerExtension AppSecInc.Wix.Extensions.SystemToolsExtension.CompilerExtension

get

Gets the optional compiler extension.

The optional compiler extension.

          override string AppSecInc.Wix.Extensions.SystemToolsExtension.DefaultCulture

get

Gets the default culture.

The default culture.

          override TableDefinitionCollection AppSecInc.Wix.Extensions.SystemToolsExtension.TableDefinitions

get

Gets the optional table definitions for this extension.

The optional table definitions for this extension.

The documentation for this class was generated from the following file:

src/WixExtensions/SystemToolsExtension/wixext/SystemToolsExtension.cs

     © Application Security Inc. - All Rights Reserved

     http://msiext.codeplex.com

  <link href="tabs.css" rel="stylesheet" type="text/css">


text: puppet apply --modulepath=/src/base/build/modules /src/base/build/build.pp


text:
package newick

import (
	"bytes"
	"fmt"
	"strings"
)

// Tree corresponds to any value representable in a Newick format. Each
// tree value corresponds to a single node.
type Tree struct {
	// All children of this node, which may be empty.
	Children []Tree

	// The label of this node. If it's empty, then this node does
	// not have a name.
	Label string

	// The branch length of this node corresponding to the distance between
	// it and its parent node. If it's `nil`, then no distance exists.
	Length *float64
}

// String recursively converts a tree to a string, with whitespace indenting
// to indicate depth.
func (tree *Tree) String() string {
	buf := new(bytes.Buffer)
	pf := func(format string, v ...interface{}) {
		fmt.Fprintf(buf, format, v...)
	}

	var out func(t *Tree, depth int)
	out = func(t *Tree, depth int) {
		name, length := t.Label, ""
		if len(name) == 0 {
			name = "N/A"
		}
		if t.Length != nil {
			length = fmt.Sprintf(" (%f)", *t.Length)
		}
		pf("%s%s%s\n", strings.Repeat("  ", depth), name, length)
		for _, child := range t.Children {
			out(&child, depth+1)
		}
	}
	out(tree, 0)
	return buf.String()
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using eFormCore;
using Microsoft.EntityFrameworkCore;
using Microting.eForm.Dto;
using Microting.eForm.Helpers;
using Microting.eForm.Infrastructure;
using Microting.eForm.Infrastructure.Constants;
using Microting.eForm.Infrastructure.Data.Entities;
using Microting.eForm.Infrastructure.Helpers;
using NUnit.Framework;
using Tag = Microting.eForm.Infrastructure.Data.Entities.Tag;

namespace eFormSDK.Integration.Base.CoreTests
{
    [Parallelizable(ParallelScope.Fixtures)]
    [TestFixture]
    public class CoreTestTag : DbTestFixture
    {
        private Core sut;
        private TestHelpers testHelpers;
        private string path;

        public override async Task DoSetup()
        {
            #region Setup SettingsTableContent

            DbContextHelper dbContextHelper = new DbContextHelper(ConnectionString);
            SqlController sql = new SqlController(dbContextHelper);
            await sql.SettingUpdate(Settings.token, "abc1234567890abc1234567890abcdef");
            await sql.SettingUpdate(Settings.firstRunDone, "true");
            await sql.SettingUpdate(Settings.knownSitesDone, "true");
            #endregion

            sut = new Core();
            sut.HandleCaseCreated += EventCaseCreated;
            sut.HandleCaseRetrived += EventCaseRetrived;
            sut.HandleCaseCompleted += EventCaseCompleted;
            sut.HandleCaseDeleted += EventCaseDeleted;
            sut.HandleFileDownloaded += EventFileDownloaded;
            sut.HandleSiteActivated += EventSiteActivated;
            await sut.StartSqlOnly(ConnectionString);
            path = Assembly.GetExecutingAssembly().Location;
            path = Path.GetDirectoryName(path).Replace(@"file:", "");
            await sut.SetSdkSetting(Settings.fileLocationPicture, Path.Combine(path, "output", "dataFolder", "picture"));
            await sut.SetSdkSetting(Settings.fileLocationPdf, Path.Combine(path, "output", "dataFolder", "pdf"));
            await sut.SetSdkSetting(Settings.fileLocationJasper, Path.Combine(path, "output", "dataFolder", "reports"));
            testHelpers = new TestHelpers(ConnectionString);
            await testHelpers.GenerateDefaultLanguages();
            //sut.StartLog(new CoreBase());
        }

        #region tag
        [Test]
        public async Task Core_Tags_CreateTag_DoesCreateNewTag()
        {
            // Arrance
            string tagName = "Tag1";

            // Act
            await sut.TagCreate(tagName);

            // Assert
            var tag = DbContext.Tags.ToList();

            Assert.AreEqual(tag[0].Name, tagName);
            Assert.AreEqual(1, tag.Count());
        }

        [Test]
        public async Task Core_Tags_DeleteTag_DoesMarkTagAsRemoved()
        {
            // Arrance
            string tagName = "Tag1";
            Tag tag = new Tag {Name = tagName, WorkflowState = Constants.WorkflowStates.Created};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            // Act
            await sut.TagDelete(tag.Id);

            // Assert
            var result = DbContext.Tags.AsNoTracking().ToList();

            Assert.AreEqual(result[0].Name, tagName);
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(Constants.WorkflowStates.Removed, result[0].WorkflowState);
        }

        [Test]
        public async Task Core_Tags_CreateTag_DoesRecreateRemovedTag()
        {
            // Arrance
            string tagName = "Tag1";
            Tag tag = new Tag {Name = tagName, WorkflowState = Constants.WorkflowStates.Removed};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            // Act
            await sut.TagCreate(tagName);

            // Assert
            var result = DbContext.Tags.AsNoTracking().ToList();

            Assert.AreEqual(result[0].Name, tagName);
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(Constants.WorkflowStates.Created, result[0].WorkflowState);
        }

        [Test]
        public async Task Core_Tags_GetAllTags_DoesReturnAllTags()
        {
            // Arrance
            string tagName1 = "Tag1";
            Tag tag = new Tag {Name = tagName1, WorkflowState = Constants.WorkflowStates.Removed};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            string tagName2 = "Tag2";
            tag = new Tag {Name = tagName2, WorkflowState = Constants.WorkflowStates.Removed};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);
            string tagName3 = "Tag3";
            tag = new Tag {Name = tagName3, WorkflowState = Constants.WorkflowStates.Removed};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);
            //int tagId3 = await sut.TagCreate(tagName3);

            // Act
            var tags = await sut.GetAllTags(true);

            // Assert
            Assert.True(true);
            Assert.AreEqual(3, tags.Count());
            Assert.AreEqual(tagName1, tags[0].Name);
            Assert.AreEqual(0, tags[0].TaggingCount);
            Assert.AreEqual(tagName2, tags[1].Name);
            Assert.AreEqual(0, tags[1].TaggingCount);
            Assert.AreEqual(tagName3, tags[2].Name);
            Assert.AreEqual(0, tags[2].TaggingCount);
        }

        [Test]
        public async Task Core_Tags_TemplateSetTags_DoesAssignTagToTemplate()
        {
            // Arrance
            CheckList cl1 = new CheckList
            {
                CreatedAt = DateTime.UtcNow,
                UpdatedAt = DateTime.UtcNow,
                Label = "A",
                Description = "D",
                WorkflowState = Constants.WorkflowStates.Created,
                CaseType = "CheckList",
                FolderName = "Template1FolderName",
                DisplayIndex = 1,
                Repeated = 1
            };

            DbContext.CheckLists.Add(cl1);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            string tagName1 = "Tag1";
            Tag tag = new Tag {Name = tagName1, WorkflowState = Constants.WorkflowStates.Created};

            DbContext.Tags.Add(tag);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            // Act
            List<int> tags = new List<int> {tag.Id};
            await sut.TemplateSetTags(cl1.Id, tags);

            // Assert
            List<Tagging> result = DbContext.Taggings.AsNoTracking().ToList();

            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(tag.Id, result[0].TagId);
            Assert.AreEqual(cl1.Id, result[0].CheckListId);
            Assert.True(true);
        }

        [Test]
        public async Task Core_Tags_TemplateSetTags_DoesAssignTagToTemplateWithoutDuplicates()
        {
            // Arrance
            CheckList cl1 = new CheckList
            {
                CreatedAt = DateTime.UtcNow,
                UpdatedAt = DateTime.UtcNow,
                Label = "A",
                Description = "D",
                WorkflowState = Constants.WorkflowStates.Created,
                CaseType = "CheckList",
                FolderName = "Template1FolderName",
                DisplayIndex = 1,
                Repeated = 1
            };

            DbContext.CheckLists.Add(cl1);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            #region Tags

            string tagName1 = "TagFor1CL";
            Tag tag1 = new Tag();
            tag1.Name = tagName1;
            tag1.WorkflowState = Constants.WorkflowStates.Created;

            DbContext.Tags.Add(tag1);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            string tagName2 = "TagFor2CLs";
            Tag tag2 = new Tag();
            tag2.Name = tagName2;
            tag2.WorkflowState = Constants.WorkflowStates.Created;

            DbContext.Tags.Add(tag2);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            string tagName3 = "Tag3";
            Tag tag3 = new Tag();
            tag3.Name = tagName3;
            tag3.WorkflowState = Constants.WorkflowStates.Created;

            DbContext.Tags.Add(tag3);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            string tagName4 = "Tag4";
            Tag tag4 = new Tag();
            tag4.Name = tagName4;
            tag4.WorkflowState = Constants.WorkflowStates.Created;

            DbContext.Tags.Add(tag4);
            await DbContext.SaveChangesAsync().ConfigureAwait(false);

            #endregion

            // Act
            List<int> tags = new List<int> {tag1.Id, tag3.Id};
            await sut.TemplateSetTags(cl1.Id, tags);
            await sut.TemplateSetTags(cl1.Id, tags);

            //// Assert
            List<Tagging> result = DbContext.Taggings.AsNoTracking().ToList();

            Assert.AreEqual(2, result.Count());
            Assert.AreEqual(tag1.Id, result[0].TagId);
            Assert.AreEqual(tag3.Id, result[1].TagId);
            Assert.AreEqual(cl1.Id, result[0].CheckListId);
            // Assert.True(true);

        }
        #endregion

        #region eventhandlers
        public void EventCaseCreated(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }

        public void EventCaseRetrived(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }

        public void EventCaseCompleted(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }

        public void EventCaseDeleted(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }

        public void EventFileDownloaded(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }

        public void EventSiteActivated(object sender, EventArgs args)
        {
            // Does nothing for web implementation
        }
        #endregion
    }

}


text:
@interface ZJRequestDataHandler : NSObject

- (id)handleResultString:(NSString *)resultString error:(NSError **)error;

@end


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

{% load metron_tags %}
{% load i18n %}

{% block nav %}
    {% if user.is_authenticated %}

{% spaceless %}

{% trans "Profile" %}

            {#
{% trans "Notices" %}{% if notice_unseen_count %} ({{ notice_unseen_count }}){% endif %}
 #}

Scoreboard

Submit

        {% endspaceless %}

    {% endif %}
{% endblock %}

{% block footer %}
    {% include "_footer.html" %}
{% endblock %}

{% block extra_body_base %}

    {% analytics %}
    {% block extra_body %}{% endblock %}
{% endblock %}


text:
package com.tesshu.subsonic.client.fx.command.logic;

import static com.tesshu.subsonic.client.model.ResponseStatus.OK;

import com.tesshu.subsonic.client.controller.PingController;
import com.tesshu.subsonic.client.fx.command.param.SimpleObjectParam;
import com.tesshu.subsonic.client.fx.view.preference.ConnectionPreference;
import com.tesshu.subsonic.client.fx.view.preference.PingDialog;
import com.tesshu.subsonic.client.util.SubsonicConnectionConfig;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javafx.animation.AnimationTimer;
import javafx.beans.property.LongProperty;
import javafx.beans.property.SimpleLongProperty;

import javax.annotation.Resource;

@Scope("prototype")
@Component
@Lazy
public final class InitializePingDialogLogicImpl extends AbstractLogic<SimpleObjectParam<ConnectionPreference>>
    implements InitializePingDialogLogic {

  @Resource
  private SubsonicConnectionConfig config;

  @Resource
  private PingController           ping;

  @Override
  public double getDelay() {
    return 0;
  }

  @Override
  public void invoke(PingDialog component) {

    component.setMessage("waiting...");
    LongProperty timeMillis = new SimpleLongProperty(0);

    AnimationTimer timer = new AnimationTimer() {
      private static final long STOPPED   = -1;
      private long              startTime = STOPPED;

      @Override
      public void handle(long timestamp) {
        if (startTime == STOPPED) {
          startTime = timestamp;
        }
        long elapsedNanos = timestamp - startTime;
        long elapsedMillis = elapsedNanos / 1_000_000;
        timeMillis.set(elapsedMillis);

        if (5000 < elapsedMillis) {
          stop();
          component.setMessage("5s over...(failed?)");
          component.silentClose();
        }

      }

      @Override
      public void stop() {
        startTime = STOPPED;
        super.stop();
      }
    };

    ConnectionPreference preference = getParameter().getObject();
    config.setConnectionInfo(preference.getHostName(), preference.getUserName(), preference.getPassword());
    config.setClientName(preference.getClientName());

    timer.start();
    ping.get((subject, status, error, version) -> {
      timer.stop();
      if (OK == status) {
        component.setMessage(preference.getName() + "(" + status.name() + ") : " + timeMillis.doubleValue() + "ms");
      } else {
        component.setMessage(error.getCode() + " : " + error.getMessage());
      }
    });
    component.silentClose();
  }

}


text:
title: "Flowers, Fruits, & Leaves... Oh my!"
date: "2018-10-05 00:00:00 -06:00"
categories:
- whats-blooming
layout: "post"
blog-banner: "whats-blooming-now-fall.jpg"
post-date: "October 5, 2018"
post-time: "12:00 PM"
blog-image: "2018-10-05-wbn.jpg"
published: true
---

Fall is here and it brought a diversity of color! Yes there are flowers, yes there are fruits, and... wait for it... LEAVES!

Fabulous Rose     Rosa 'JACrex'

This is just one of the many roses still in flower. It can be seen in the Rose Garden.

Brilliant Red Chokeberry     Aronia arbutifolia 'Brilliantissima'

This shrub offers beauty year round. Right now its fruit has stolen the show, pretty soon its leaves will take the spotlight, so stay tuned, or better yet, come see for yourself!

Gro-low Fragrant Sumac     Rhus aromatica 'Gro-low'

 Fall is this shrubs time to shine! Believe it or not, its leaf change is just getting started, can't wait to see it in a couple weeks!

Cream Puff Cedar     Cedrus deodara 'Cream Puff'

 Conifers like to take the stage this time of year, check out the contrast between the lighter colored new growth, and the darker green old growth.

Golden Ghost Japanese Red Pine     Pinus densiflora 'Golden Ghost'

 Another conifer making its appearance apparent with its variegated yellow and green pine needles.

 Come enjoy the cooler weather that fall has brought, along with the spectacular display of color in all of its plant forms!

Photos by Heidi M. Simper


text:
exports.version = "0.0.1";

exports.text = function(a) {
// switch statement used to return descriptions
  switch(a) {

    case 0 :
    return "The application was not able to obtain any previous state about the user ";
    break;

    case 1 :
    return " The user was found in memory, there is no persistence of the user over the lifetime of the application. ";
    break;

    case 2 :
    return " The user was fond on a file on disk, there is limited persistence.";
    break;

    case 3 :
    return " The user was found on a external database, there is high persistence of the data";
    break;
  }

}