text:
module.exports = rm

var fs = require("./graceful-fs")
  , path = require("path")
  , sys = require("./sys")
  , failedToRemove = []
  , log = require("./log")
  , exec = require("./exec")
  , constants = require("constants")

process.on("exit", function () {
  if (failedToRemove.length === 0) return
  sys.error("")
  log("The following files and folders could not be removed", "!")
  log("You should remove them manually.", "!")
  sys.error( "\nsudo rm -rf "
           + failedToRemove.map(JSON.stringify).join(" ") )
  failedToRemove.length = 0
})

var waitBusy = {}
  , maxTries = 3
function rm (p, cb_) {

  if (!p) return cb_(new Error("Trying to rm nothing?"))

  function cb (er) {
    if (er) {
      if (er.message.match(/^EBUSY/)) {
        // give it 3 tries
        // windows takes a while to actually remove files from folders,
        // leading to this odd EBUSY error when you try to rm a directory,
        // even if it's actually been emptied.
        if (!waitBusy.hasOwnProperty(p)) waitBusy[p] = maxTries
        if (waitBusy[p]) {
          waitBusy[p] --
          // give it 100 ms more each time.
          var time = (maxTries - waitBusy[p]) * 100
          return setTimeout(function () { rm(p, cb_) }, time)
        }
      }
      if (er.errno === constants.EACCES) {
        // ask for privs
        var sudoEnv ={SUDO_PROMPT:"[npm rm "+p+"] Password:"}
        for (var i in process.env) sudoEnv[i] = process.env[i]
        log.info("rm "+p, "privilege escalation")
        return exec("sudo", ["rm", "-r", p]
                   ,sudoEnv
                   ,true
                   ,cb)
      }
      failedToRemove.push(p)
      log(p, "rm fail")
      log(er.message, "rm fail")
    } else delete waitBusy[p]
    cb_(null, er)
  }

  fs.lstat(p, function (er, s) {
    if (er) return cb()
    if (s.isFile() || s.isSymbolicLink()) {
      fs.unlink(p, cb)
    } else {
      fs.readdir(p, function (er, files) {
        if (er) return cb(er)
        ;(function rmFile (f) {
          if (!f) fs.rmdir(p, cb)
          else rm(path.join(p, f), function (_, er) {
            if (er) return cb(er)
            rmFile(files.pop())
          })
        })(files.pop())
      })
    }
  })
}


text:
#ifndef _IO_MUX_H
#define _IO_MUX_H

#include <stdio_dev.h>

/*
 * Stuff required to support console multiplexing.
 */

/*
 * Pointers to devices used for each file type.  Defined in console.c
 * but storage is allocated in iomux.c.
 */
extern struct stdio_dev **console_devices[MAX_FILES];
/*
 * The count of devices assigned to each FILE.  Defined in console.c
 * and populated in iomux.c.
 */
extern int cd_count[MAX_FILES];

int iomux_doenv(const int, const char *);
void iomux_printdevs(const int);
struct stdio_dev *search_device(int, const char *);

#endif /* _IO_MUX_H */

redpajama_set_name: RedPajamaGithub


text:
/*
* filename	ResourceManagerEvent.cpp
* fileinfo	¸®¼Ò½º ¸Å´ÏÀú Ŭ·¡½ºÀÇ À̺¥Æ® ±¸Çö ÆÄÀÏ
* author	ÁÖÇå¾ç (Heonyang Ju)
*/

#include "ResourceManagerEvent.h"

COMA_USING_NS

const std::string ResourceManagerEvent::LOAD_BEGIN = "resourceManager_loadBegin";
const std::string ResourceManagerEvent::LOADING = "resourceManager_loading";
const std::string ResourceManagerEvent::LOAD_COMPLETE = "resourceManager_loadComplete";

const std::string ResourceManagerEvent::UNLOAD_BEGIN = "resourceManager_unloadBegin";
const std::string ResourceManagerEvent::UNLOADING = "resourceManager_unloading";
const std::string ResourceManagerEvent::UNLOAD_COMPLETE = "resourceManager_unloadComplete";

ResourceManagerEvent::ResourceManagerEvent(const std::string& type, ResourceManager* target, int resourceNumbers, int processedResourceNumbers)
	:Event(type), target_(target), resourceNumbers_(resourceNumbers), processedResourceNumbers_(processedResourceNumbers), leftResourceNumbers_(resourceNumbers - processedResourceNumbers)
{
}

ResourceManagerEvent::~ResourceManagerEvent()
{
}


text:
@interface SQNavigationController ()<SQLocationViewControllerDelegate>
@property (nonatomic, strong) UIButton *locationBarButton;

@end

@implementation SQNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(locationFinished) name:@"LocationFinishedNotification" object:nil];
}
-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    if ([defaults objectForKey:CommunityName]) {
        [self.locationBarButton setTitle:[defaults objectForKey:CommunityName] forState:UIControlStateNormal];
        [self.locationBarButton sizeToFit];
        return;
    }
    [[SQPublicTools sharedPublicTools]startLocation];

}
+(void)initialize{

    UINavigationBar *bar = [UINavigationBar appearance];
    bar.barTintColor = [UIColor getColor:@"fb4142"];
    bar.tintColor = [UIColor whiteColor];
    bar.translucent = NO;
    bar.shadowImage = [UIImage alloc];
    bar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor getColor:@"FFFFFF"],
                                NSFontAttributeName:SQ_Font(17)};
//    [bar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
}

-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{

    if (self.childViewControllers.count > 0) {

        //返回按钮
        UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [leftButton setImage:[UIImage imageNamed:@"return"] forState:UIControlStateNormal];
        [leftButton sizeToFit];
        leftButton.adjustsImageWhenHighlighted = NO;
        [leftButton addTarget:self action:@selector(popController) forControlEvents:UIControlEventTouchUpInside];
        viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:leftButton];
        viewController.hidesBottomBarWhenPushed = YES;

    }else{
        //扫一扫按钮
        UIButton *scanButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [scanButton setImage:[UIImage imageNamed:@"return"] forState:UIControlStateNormal];
        [scanButton sizeToFit];
        scanButton.adjustsImageWhenHighlighted = NO;
        viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:scanButton];
        [scanButton addTarget:self action:@selector(scanButtonClick) forControlEvents:UIControlEventTouchUpInside];
        //消息按钮
        UIButton *messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [messageButton setImage:[UIImage imageNamed:@"return"] forState:UIControlStateNormal];
        [messageButton sizeToFit];
        messageButton.adjustsImageWhenHighlighted = NO;
        viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:messageButton];
        [messageButton addTarget:self action:@selector(messageButtonClick:) forControlEvents:UIControlEventTouchUpInside];
        //地址按钮
        UIButton *locationBarButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [locationBarButton setImage:[UIImage imageNamed:@"jwh_address"] forState:UIControlStateNormal];
        [self.locationBarButton setTitle:@"定位中..." forState:UIControlStateNormal];
        [locationBarButton setImageEdgeInsets:UIEdgeInsetsMake(0, -10, 0, 10)];
        locationBarButton.titleLabel.font = SQ_Font(15);
        [locationBarButton sizeToFit];
        locationBarButton.adjustsImageWhenHighlighted = NO;
        viewController.navigationItem.titleView = locationBarButton;
        [locationBarButton addTarget:self action:@selector(locationBarButtonClick:) forControlEvents:UIControlEventTouchUpInside];
        self.locationBarButton = locationBarButton;
    }
    [super pushViewController:viewController animated:animated];

}
-(void)popController{
    [self popViewControllerAnimated:YES];
}
//修改状态栏样式
-(UIStatusBarStyle)preferredStatusBarStyle{

    [super preferredStatusBarStyle];

    return UIStatusBarStyleLightContent;
}
-(void)locationView:(SQLocationViewController *)locationView withLocationStr:(NSString *)locationStr{

    [self.locationBarButton setTitle:locationStr forState:UIControlStateNormal];
    [self.locationBarButton sizeToFit];
}

-(void)locationFinished{

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    if ([defaults objectForKey:CommunityName]) {
        [self.locationBarButton setTitle:[defaults objectForKey:CommunityName] forState:UIControlStateNormal];
        [self.locationBarButton sizeToFit];
        return;
    }
    [self.locationBarButton setTitle:[defaults objectForKey:DetailAddress] forState:UIControlStateNormal];
    [self.locationBarButton sizeToFit];
}
#pragma mark
#pragma mark 按钮点击事件
//扫一扫
-(void)scanButtonClick{

    // 1、 获取摄像设备
    AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
    if (device) {
        // 判断授权状态
        PHAuthorizationStatus status = [PHPhotoLibrary authorizationStatus];
        if (status == PHAuthorizationStatusRestricted) { // 因为家长控制, 导致应用无法方法相册(跟用户的选择没有关系)
//            NSLog(@"因为系统原因, 无法访问相册");
        } else if (status == PHAuthorizationStatusDenied) { // 用户拒绝当前应用访问相册
            SGAlertView *alertView = [SGAlertView alertViewWithTitle:@"⚠ 警告" delegate:nil contentTitle:@"请去-> [设置 - 隐私 - 照片 - SGQRCodeExample] 打开访问开关" alertViewBottomViewType:(SGAlertViewBottomViewTypeOne)];
            [alertView show];
        } else if (status == PHAuthorizationStatusAuthorized) { // 用户允许当前应用访问相册
            SGScanningQRCodeVC *scanningQRCodeVC = [[SGScanningQRCodeVC alloc] init];
            [self pushViewController:scanningQRCodeVC animated:YES];
        } else if (status == PHAuthorizationStatusNotDetermined) { // 用户还没有做出选择
            // 弹框请求用户授权
            [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
                if (status == PHAuthorizationStatusAuthorized) { // 用户点击了好
                }
            }];
        }

    } else {
        SGAlertView *alertView = [SGAlertView alertViewWithTitle:@"⚠ 警告" delegate:nil contentTitle:@"未检测到您的摄像头, 请在真机上测试" alertViewBottomViewType:(SGAlertViewBottomViewTypeOne)];
        [alertView show];
    }

}
//定位地址
-(void)locationBarButtonClick:(UIButton*)sender{

    SQLocationViewController *locationVC = [[SQLocationViewController alloc]init];
    locationVC.delegate = self;
    [self pushViewController:locationVC animated:YES];
}
//消息列表
-(void)messageButtonClick:(UIButton*)sender{

}
-(void)dealloc{

    [[NSNotificationCenter defaultCenter]removeObserver:self];

}
@end


text:
"""Routes for albums and photos."""
from django.conf.urls import url
from imager_images.models import Photo
from imager_images.views import (
    AlbumView,
    PhotoView,
    AlbumGalleryView,
    PhotoGalleryView,
    LibraryView,
    AddAlbumView,
    AddPhotoView,
    EditAlbumView,
    EditPhotoView,
    TagPhotoGalleryView,
)

urlpatterns = [
    url(r'^library/$', LibraryView.as_view(), name='library'),
    url(r'albums/(?P<albumid>\d+)/$', AlbumView.as_view(), name='album'),
    url(r'albums/$', AlbumGalleryView.as_view(), name='album_gallery'),
    url(r'photos/$', PhotoGalleryView.as_view(), name='photo_gallery'),
    url(r'photos/(?P<pk>\d+)/$', PhotoView.as_view(), name='photo'),
    url(r'albums/add/$', AddAlbumView.as_view(), name='add_album'),
    url(r'photos/add/$', AddPhotoView.as_view(), name='add_photo'),
    url(r'albums/(?P<pk>\d+)/edit/$', EditAlbumView.as_view(), name='edit_album'),
    url(r'photos/(?P<pk>\d+)/edit/$', EditPhotoView.as_view(), name='edit_photo'),
    url(r'photos/tagged/(?P<slug>[-\w]+)/$', TagPhotoGalleryView.as_view(), name="tagged_photos"),
]


text:
package org.keycloak.testsuite.console.authentication;

import org.jboss.arquillian.graphene.page.Page;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.testsuite.console.AbstractConsoleTest;
import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicy;
import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.Digits;
import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.OTPHashAlg;
import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.OTPType;

/**
 *
 * @author Vlastislav Ramik
 */
public class OTPPolicyTest extends AbstractConsoleTest {

    @Page
    private OTPPolicy otpPolicyPage;

    @Before
    public void beforeOTPPolicyTest() {
        otpPolicyPage.navigateTo();
    }

    @Test
    public void otpPolicyTest() {
        otpPolicyPage.form().setValues(OTPType.COUNTER_BASED, OTPHashAlg.SHA256, Digits.EIGHT, "10", "50");
        assertEquals("Success! Your changes have been saved to the realm.", otpPolicyPage.getSuccessMessage());

        RealmRepresentation realm = testRealmResource().toRepresentation();
        assertEquals("hotp", realm.getOtpPolicyType());
        assertEquals("HmacSHA256", realm.getOtpPolicyAlgorithm());
        assertEquals(Integer.valueOf(8), realm.getOtpPolicyDigits());
        assertEquals(Integer.valueOf(10), realm.getOtpPolicyLookAheadWindow());
        assertEquals(Integer.valueOf(50), realm.getOtpPolicyInitialCounter());

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA512, Digits.EIGHT, "10", "40");
        assertEquals("Success! Your changes have been saved to the realm.", otpPolicyPage.getSuccessMessage());

        realm = testRealmResource().toRepresentation();
        assertEquals(Integer.valueOf(40), realm.getOtpPolicyPeriod());
    }

    @Test
    public void invalidValuesTest() {
        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, "", "30");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();// workaround: input.clear() doesn't work when <input type="number" ...

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, " ", "30");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, "no number", "30");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        RealmRepresentation realm = testRealmResource().toRepresentation();
        assertEquals(Integer.valueOf(1), realm.getOtpPolicyLookAheadWindow());

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", "");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", " ");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        otpPolicyPage.form().setValues(OTPType.TIME_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", "no number");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        realm = testRealmResource().toRepresentation();
        assertEquals(Integer.valueOf(30), realm.getOtpPolicyPeriod());

        otpPolicyPage.form().setValues(OTPType.COUNTER_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", "");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        otpPolicyPage.form().setValues(OTPType.COUNTER_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", " ");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        otpPolicyPage.form().setValues(OTPType.COUNTER_BASED, OTPHashAlg.SHA1, Digits.SIX, "1", "no number");
        assertEquals("Error! Missing or invalid field(s). Please verify the fields in red.", otpPolicyPage.getErrorMessage());
        otpPolicyPage.closeNotification();
        otpPolicyPage.navigateTo();

        realm = testRealmResource().toRepresentation();
        assertEquals(Integer.valueOf(0), realm.getOtpPolicyInitialCounter());
    }
}


text:
namespace astra { namespace hand {

    void convert_depth_to_world_f(const conversion_cache_t& depthToWorldData,
                                  float depthX, float depthY, float depthZ,
                                  float& worldX, float& worldY, float& worldZ)
    {
        float normalizedX = depthX / depthToWorldData.resolutionX - .5f;
        float normalizedY = .5f - depthY / depthToWorldData.resolutionY;

        worldX = normalizedX * depthZ * depthToWorldData.xzFactor;
        worldY = normalizedY * depthZ * depthToWorldData.yzFactor;
        worldZ = depthZ;
    }

    Vector3f cv_convert_depth_to_world(const conversion_cache_t& depthToWorldData,
                                       float depthX, float depthY, float depthZ)
    {
        float worldX, worldY, worldZ;

        convert_depth_to_world_f(depthToWorldData,
                                 depthX, depthY, depthZ,
                                 worldX, worldY, worldZ);

        return Vector3f(worldX, worldY, worldZ);
    }

    Vector3f cv_convert_depth_to_world(const conversion_cache_t& depthToWorldData,
                                       int depthX, int depthY, float depthZ)
    {
        return cv_convert_depth_to_world(depthToWorldData,
                                         static_cast<float>(depthX),
                                         static_cast<float>(depthY),
                                         depthZ);
    }

    Vector3f cv_convert_depth_to_world(const conversion_cache_t& depthToWorldData,
                                       const Vector3f& depth)
    {
        return cv_convert_depth_to_world(depthToWorldData, depth.x, depth.y, depth.z);
    }

    Vector3f cv_convert_world_to_depth(const conversion_cache_t& depthToWorldData,
                                       float worldX, float worldY, float worldZ)
    {
        float depthX = depthToWorldData.coeffX * worldX / worldZ + depthToWorldData.halfResX;
        float depthY = depthToWorldData.halfResY - depthToWorldData.coeffY * worldY / worldZ;
        float depthZ = worldZ;

        return Vector3f(depthX, depthY, depthZ);
    }

    Vector3f cv_convert_world_to_depth(const conversion_cache_t& depthToWorldData,
                                       const Vector3f& world)
    {
        return cv_convert_world_to_depth(depthToWorldData, world.x, world.y, world.z);
    }

    Point2i scaling_coordinate_mapper::offset_pixel_location_by_mm(const Point2i& position,
                                                                   float offsetX,
                                                                   float offsetY,
                                                                   float depthZ) const
    {
        if (depthZ == 0)
        {
            return position;
        }

        const conversion_cache_t& depthToWorldData = depthToWorldData_;

        const float scaledDepth = depthZ * scale_;

        //This bakes the world to depth conversion and full size to scaled conversion into
        //a single factor that we apply to the requested offset.
        //This process is equivalent to depth_to_world, adding offsetX/Y to world position,
        //then doing world_to_depth.

        const float xFactor = depthToWorldData.resolutionX / (scaledDepth * depthToWorldData.xzFactor);
        const float finalDepthX = position.x + offsetX * xFactor;

        const float yFactor = depthToWorldData.resolutionY / (scaledDepth * depthToWorldData.yzFactor);
        const float finalDepthY = position.y - offsetY * yFactor;

        return Point2i(static_cast<int>(finalDepthX), static_cast<int>(finalDepthY));
    }
}}


text:
'use strict';
moduloObra.controller('ObraNewController', ['$scope', '$routeParams', '$location', 'serverService', 'sharedSpaceService', '$filter',
    function ($scope, $routeParams, $location, serverService, sharedSpaceService, $filter) {

        $scope.ob = 'obra';
        $scope.op = 'new';

        $scope.title = "Edición de obra";
        $scope.icon = "fa-file-text-o";

        $scope.result = null;

        $scope.obj = {};
//        $scope.obj.obj_tipodocumento = {"id": 0};
        $scope.obj.obj_usuario = {"id": 0};
        $scope.obj.obj_tonalidadobra = {"id": 0};
        $scope.obj.obj_genero = {"id": 0};
        $scope.obj.obj_instrumento = {"id": 0};
        $scope.obj.obj_numpapel = {"id": 0};
        $scope.obj.obj_tipoobra = {"id": 0};

        if (sharedSpaceService.getFase() == 0) {
//            if ($routeParams.tipodocumento && $routeParams.tipodocumento > 0) {
//                $scope.obj.obj_tipodocumento.id = $routeParams.tipodocumento;
//            }
            if ($routeParams.usuario && $routeParams.usuario > 0) {
                $scope.obj.obj_usuario.id = $routeParams.usuario;
            }
            if ($routeParams.genero && $routeParams.genero > 0) {
                $scope.obj.obj_genero.id = $routeParams.genero;
            }
            if ($routeParams.tonalidadobra && $routeParams.tonalidadobra > 0) {
                $scope.obj.obj_tonalidadobra.id = $routeParams.tonalidadobra;
            }
        } else {
            $scope.obj = sharedSpaceService.getObject();
            sharedSpaceService.setFase(0);
        }

        $scope.chooseOne = function (foreignObjectName) {
            sharedSpaceService.setObject($scope.obj);
            sharedSpaceService.setReturnLink('/' + $scope.ob + '/' + $scope.op);
            sharedSpaceService.setFase(1);
            $location.path('/' + foreignObjectName + '/selection/1/10');
        }

        $scope.save = function () {
            var dateSubidaAsString = $filter('date')($scope.obj.fecha_subida, "dd/MM/yyyy");
            var dateModificacionAsString = $filter('date')($scope.obj.fecha_modificacion, "dd/MM/yyyy");
            $scope.obj.fecha_subida = dateSubidaAsString;
            $scope.obj.fecha_modificacion = dateModificacionAsString;
            //console.log({json: JSON.stringify(serverService.array_identificarArray($scope.obj))});
            serverService.getDataFromPromise(serverService.promise_setOne($scope.ob, {json: JSON.stringify(serverService.array_identificarArray($scope.obj))})).then(function (data) {
                $scope.result = data;
            });
        };

//        $scope.$watch('obj.obj_tipodocumento.id', function () {
//            if ($scope.obj) {
//                serverService.getDataFromPromise(serverService.promise_getOne('tipodocumento', $scope.obj.obj_tipodocumento.id)).then(function (data2) {
//                    $scope.obj.obj_tipodocumento = data2.message;
//                });
//            }
//        });
        $scope.$watch('obj.obj_usuario.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('usuario', $scope.obj.obj_usuario.id)).then(function (data2) {
                    $scope.obj.obj_usuario = data2.message;
                });
            }
        });
        $scope.$watch('obj.obj_tonalidadobra.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('tonalidadobra', $scope.obj.obj_tonalidadobra.id)).then(function (data2) {
                    $scope.obj.obj_genero = data2.message;
                });
            }
        });
        $scope.$watch('obj.obj_genero.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('genero', $scope.obj.obj_genero.id)).then(function (data2) {
                    $scope.obj.obj_genero = data2.message;
                });
            }
        });
        $scope.$watch('obj.obj_instrumento.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('instrumento', $scope.obj.obj_instrumento.id)).then(function (data2) {
                    $scope.obj.obj_instrumento = data2.message;
                });
            }
        });
        $scope.$watch('obj.obj_numpapel.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('numpapel', $scope.obj.obj_numpapel.id)).then(function (data2) {
                    $scope.obj.obj_numpapel = data2.message;
                });
            }
        });
        $scope.$watch('obj.obj_tipoobra.id', function () {
            if ($scope.obj) {
                serverService.getDataFromPromise(serverService.promise_getOne('tipoobra', $scope.obj.obj_tipoobra.id)).then(function (data2) {
                    $scope.obj.obj_tipoobra = data2.message;
                });
            }
        });

        $scope.back = function () {
            window.history.back();
        };
        $scope.close = function () {
            $location.path('/home');
        };
        $scope.plist = function () {
            $location.path('/obra/plist');
        };

        //datepicker
        $scope.open1 = function () {
            $scope.popup1.opened = true;
        };
        $scope.popup1 = {
            opened: false
        };
        $scope.disabled = function (date, mode) {
            return mode === 'day' && (date.getDay() === 0 || date.getDay() === 6);
        };
        $scope.dateOptions = {
            formatYear: 'yyyy',
            startingDay: 1
        };
        $scope.open2 = function () {
            $scope.popup2.opened = true;
        };
        $scope.popup2 = {
            opened: false
        };
    }]);


text:
<?php

namespace M4bTool\Executables\Tasks;

use M4bTool\Audio\Traits\LogTrait;
use Psr\Log\LoggerInterface;
use Throwable;

abstract class AbstractTask  implements  RunnableInterface, LoggerInterface
{
    use LogTrait;

    /** @var Throwable */
    protected $lastException;

    /** @var bool */
    protected $finished = false;

    protected $skipped = false;
    /** @var float */
    protected $weight = 1;

    abstract public function run();

    abstract public function isRunning();

    public function setWeight($weight)
    {
        $this->weight = $weight;
    }

    public function getWeight()
    {
        return $this->weight;
    }

    public function isSkipped()
    {
        return $this->skipped;
    }

    public function skip()
    {
        $this->skipped = true;
    }

    public function finish()
    {
        $this->finished = true;
    }

    public function isFinished()
    {
        return $this->finished;
    }

    public function isFailed()
    {
        return $this->lastException instanceof Throwable;
    }

    public function getLastException()
    {
        return $this->lastException;
    }
}


text:
<?php

namespace Sidus\FilterBundle\Query\Handler\Configuration;

use Sidus\FilterBundle\Filter\FilterInterface;
use UnexpectedValueException;

/**
 * Holds the configuration of a query handler
 *
 * @author Vincent Chalnot <vincent@sidus.fr>
 */
interface QueryHandlerConfigurationInterface
{
    /**
     * @return string
     */
    public function getCode(): string;

    /**
     * @return string
     */
    public function getProvider(): string;

    /**
     * @param FilterInterface $filter
     * @param int             $index
     *
     * @throws UnexpectedValueException
     */
    public function addFilter(FilterInterface $filter, int $index = null);

    /**
     * @return FilterInterface[]
     */
    public function getFilters(): array;

    /**
     * @param string $code
     *
     * @throws UnexpectedValueException
     *
     * @return FilterInterface
     */
    public function getFilter(string $code): FilterInterface;

    /**
     * @return array
     */
    public function getSortable(): array;

    /**
     * @param string $sortable
     */
    public function addSortable(string $sortable);

    /**
     * @return array[]
     */
    public function getDefaultSort(): array;

    /**
     * @return int
     */
    public function getResultsPerPage(): int;

    /**
     * @return array
     */
    public function getOptions(): array;

    /**
     * @param string $code
     * @param null   $fallback
     *
     * @return mixed
     */
    public function getOption(string $code, $fallback = null);
}


text:
/**
 * \ingroup MRS
 * Domain classes for MRS
 */
package org.motechproject.openmrs.model;

import org.apache.commons.lang.ObjectUtils;
import org.motechproject.mrs.domain.MRSAttribute;

/**
 * Used for storing user attributes in property => value format
 */
public class OpenMRSAttribute implements MRSAttribute {

    private String name;
    private String value;

    /**
     * Creates an attribute with the given name (property) and value
     *
     * @param name
     *            Property of the information
     * @param value
     *            Value for the property
     */
    public OpenMRSAttribute(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String name() {
        return name;
    }

    public String value() {
        return value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof OpenMRSAttribute)) {
            return false;
        }
        OpenMRSAttribute a = (OpenMRSAttribute) o;
        if (!ObjectUtils.equals(name, a.name)) {
            return false;
        }
        if (!ObjectUtils.equals(value, a.value)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 1;
        hash = hash * 31 + ObjectUtils.hashCode(name);
        hash = hash * 31 + ObjectUtils.hashCode(value);
        return hash;
    }
}


text:
package com.emitrom.ti4j.mobile.client.core.handlers;

import com.emitrom.ti4j.mobile.client.core.events.UpdateEvent;
import com.google.gwt.event.shared.EventHandler;

public interface UpdateHandler extends EventHandler {
    public void onUpdate(UpdateEvent event);
}


text:
package ar.com.larreta.stepper;

public interface DocumentTypeLoadBusiness extends Step {
	public static final String BUSINESS_NAME = "DocumentTypeLoadBusiness";
}


text:
class Profile;
class ServiceProcessControl;

namespace base {
class DictionaryValue;
}  // namespace base

namespace cloud_print {
struct CloudPrintProxyInfo;
}  // namespace cloud_print

// Layer between the browser user interface and the cloud print proxy code
// running in the service process.
class CloudPrintProxyService : public BrowserContextKeyedService {
 public:
  explicit CloudPrintProxyService(Profile* profile);
  virtual ~CloudPrintProxyService();

  // Initializes the object. This should be called every time an object of this
  // class is constructed.
  void Initialize();

  // Enables/disables cloud printing for the user
  virtual void EnableForUserWithRobot(
      const std::string& robot_auth_code,
      const std::string& robot_email,
      const std::string& user_email,
      const base::DictionaryValue& user_settings);
  virtual void DisableForUser();

  // Query the service process for the status of the cloud print proxy and
  // update the browser prefs.
  void RefreshStatusFromService();

  // Disable the service if the policy to do so is set, and once the
  // disablement is verified, quit the browser. Returns true if the policy is
  // not set or the connector was not enabled.
  bool EnforceCloudPrintConnectorPolicyAndQuit();

  std::string proxy_id() const { return proxy_id_; }

  // Returns list of printer names available for registration.
  static void GetPrintersAvalibleForRegistration(
      std::vector<std::string>* printers);

 private:
  // NotificationDelegate implementation for the token expired notification.
  class TokenExpiredNotificationDelegate;
  friend class TokenExpiredNotificationDelegate;

  // Methods that send an IPC to the service.
  void RefreshCloudPrintProxyStatus();
  void EnableCloudPrintProxyWithRobot(
      const std::string& robot_auth_code,
      const std::string& robot_email,
      const std::string& user_email,
      const base::DictionaryValue* user_preferences);
  void DisableCloudPrintProxy();

  // Callback that gets the cloud print proxy info.
  void ProxyInfoCallback(
    const cloud_print::CloudPrintProxyInfo& proxy_info);

  // Invoke a task that gets run after the service process successfully
  // launches. The task typically involves sending an IPC to the service
  // process.
  bool InvokeServiceTask(const base::Closure& task);

  // Checks the policy. Returns true if nothing needs to be done (the policy is
  // not set or the connector is not enabled).
  bool ApplyCloudPrintConnectorPolicy();

  Profile* profile_;
  std::string proxy_id_;

  // Virtual for testing.
  virtual ServiceProcessControl* GetServiceProcessControl();

  base::WeakPtrFactory<CloudPrintProxyService> weak_factory_;

  // For watching for connector policy changes.
  PrefChangeRegistrar pref_change_registrar_;

  // If set, continue trying to disable the connector, and quit the process
  // once successful.
  bool enforcing_connector_policy_;

  DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyService);
};

#endif  // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_H_


text:
package com.intellij.openapi.vcs.history;

import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.vcs.RepositoryLocation;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.IOException;
import java.util.Date;

public class CurrentRevision implements VcsFileRevision {
  private static final Logger LOG = Logger.getInstance(CurrentRevision.class);

  private final VirtualFile myFile;
  private final VcsRevisionNumber myRevisionNumber;

  public CurrentRevision(@NotNull VirtualFile file, @NotNull VcsRevisionNumber revision) {
    myFile = file;
    myRevisionNumber = revision;
  }

  @Override
  public String getCommitMessage() {
    return "[" + getCurrent() + "]";
  }

  @Override
  public byte[] getContent() {
    return loadContent();
  }

  @Override
  public Date getRevisionDate() {
    return new Date(myFile.getTimeStamp());
  }

  @Override
  public byte[] loadContent() {
    try {
      Document document = ReadAction.compute(() -> FileDocumentManager.getInstance().getDocument(myFile));
      if (document != null) {
        return document.getText().getBytes(myFile.getCharset().name());
      }
      else {
        return myFile.contentsToByteArray();
      }
    }
    catch (final IOException e) {
      LOG.warn(e);
      return null;
    }
  }

  @Override
  public String getAuthor() {
    return "";
  }

  @Override
  @NotNull
  public VcsRevisionNumber getRevisionNumber() {
    return myRevisionNumber;
  }

  @Override
  public String getBranchName() {
    return null;
  }

  @Nullable
  @Override
  public RepositoryLocation getChangedRepositoryPath() {
    return null;  // use initial url..
  }

  public static String getCurrent() {
    return VcsBundle.message("vcs.revision.name.current");
  }
}


text:
package net.catchpole.B9.devices.gps;

import net.catchpole.B9.spacial.Location;

public interface Gps {
    Location getLocation();
}


text:
package org.broadinstitute.hellbender.tools.walkers.validation.basicshortmutpileup;

import htsjdk.samtools.util.OverlapDetector;
import org.broadinstitute.hellbender.CommandLineProgramTest;
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions;
import org.broadinstitute.hellbender.engine.GATKPath;
import org.broadinstitute.hellbender.tools.walkers.validation.Concordance;
import org.broadinstitute.hellbender.utils.SimpleInterval;
import org.broadinstitute.hellbender.utils.io.IOUtils;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.File;
import java.util.*;

public class ValidateBasicSomaticShortMutationsIntegrationTest extends CommandLineProgramTest {

    private static final String TEST_DREAM_BAM_DIR = largeFileTestDir + "mutect/dream_synthetic_bams/";
    private static final String TEST_DREAM_NORMAL_BAM = TEST_DREAM_BAM_DIR + "normal.bam";
    private static final String TEST_DREAM_TUMOR_BAM = TEST_DREAM_BAM_DIR + "tumor.bam";
    private static final String TEST_DREAM_VCF = toolsTestDir + "/walkers/validation/basicshortmutpileup/synthetic.challenge.set1.tumor-vs-synthetic.challenge.set1.normal-filtered.vcf";
    private static final String TEST_DREAM_NORMAL_BAM_INDEL_TEST = TEST_DREAM_BAM_DIR + "normal_3.bam";
    private static final String TEST_DREAM_TUMOR_BAM_INDEL_TEST = TEST_DREAM_BAM_DIR + "tumor_3.bam";
    private static final String TEST_DREAM_VCF_INDEL_TEST = toolsTestDir + "/walkers/validation/basicshortmutpileup/IS3.snv.indel.sv-vs-G15512.prenormal.sorted.vcf";
    private static final String REFERENCE = largeFileTestDir + "human_g1k_v37.20.21.fasta";

    @Test
    public void testBasic() {
        // This test is simply running the full tool and making sure that there are no serious errors.
        //  No variants should validate, since the validation bam is not the same one used for calling.
        final File outputFile = IOUtils.createTempFile("basicTest", ".seg");
        final File summaryFile = IOUtils.createTempFile("summary", ".txt");
        final File annotatedVcf = IOUtils.createTempFile("annotated", ".vcf");
        final List<String> arguments = new ArrayList<>();
        arguments.add("--" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_DISCOVERY_VCF_LONG_NAME);
        arguments.add("synthetic.challenge.set1.tumor");
        arguments.add("-" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_VALIDATION_CASE);
        arguments.add("synthetic.challenge.set1.tumor");
        arguments.add("-" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_VALIDATION_CONTROL);
        arguments.add("synthetic.challenge.set1.normal");

        arguments.add("-" + StandardArgumentDefinitions.VARIANT_SHORT_NAME);
        arguments.add(TEST_DREAM_VCF);

        arguments.add("-" + StandardArgumentDefinitions.INPUT_SHORT_NAME);
        arguments.add(TEST_DREAM_TUMOR_BAM);
        arguments.add("-" + StandardArgumentDefinitions.INPUT_SHORT_NAME);
        arguments.add(TEST_DREAM_NORMAL_BAM);

        arguments.add("-L");
        arguments.add(TEST_DREAM_VCF);

        arguments.add("-" + StandardArgumentDefinitions.REFERENCE_SHORT_NAME);
        arguments.add(REFERENCE);

        arguments.add("-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME);
        arguments.add(outputFile.getAbsolutePath());
        arguments.add("-" + Concordance.SUMMARY_LONG_NAME);
        arguments.add(summaryFile.getAbsolutePath());
        arguments.add("--" + ValidateBasicSomaticShortMutations.ANNOTATED_VCF_LONG_NAME);
        arguments.add(annotatedVcf.getAbsolutePath());
        arguments.add("--verbosity");
        arguments.add("INFO");
        runCommandLine(arguments);

        Assert.assertTrue(outputFile.exists());
        Assert.assertTrue(summaryFile.exists());

        final List<BasicValidationResult> variantValidationResults = BasicValidationResult.read(new GATKPath(outputFile.getAbsolutePath()));

        //final List<AnnotatedInterval> variantValidationResults =
        //        AnnotatedIntervalCollection.create(outputFile.toPath(), new HashSet<>(Arrays.asList(ValidateBasicSomaticShortMutations.headers))).getRecords();

        Assert.assertEquals(variantValidationResults.size(), 2);

        Assert.assertEquals(variantValidationResults.get(0).getInterval(), new SimpleInterval("20", 10022820, 10022820));
        // The variant in the VCF is A>C, the bam file has A>T, so alt count should be zero.
        Assert.assertEquals(variantValidationResults.get(0).getValidationAltCount(), 0);
        Assert.assertEquals(variantValidationResults.get(0).getValidationRefCount(), 18);
        Assert.assertFalse(variantValidationResults.get(0).isOutOfNoiseFloor());
        Assert.assertEquals(variantValidationResults.get(0).getFilters(), "");
        Assert.assertEquals(variantValidationResults.get(0).getNumAltSupportingReadsInNormal(), 0);

        Assert.assertEquals(variantValidationResults.get(1).getInterval(), new SimpleInterval("20", 10080550, 10080550));
        Assert.assertEquals(variantValidationResults.get(1).getValidationAltCount(), 0);
        Assert.assertEquals(variantValidationResults.get(1).getValidationRefCount(), 16);
        Assert.assertFalse(variantValidationResults.get(1).isOutOfNoiseFloor());
        Assert.assertEquals(variantValidationResults.get(1).getFilters(), "artifact_in_normal;germline_risk;t_lod");
        Assert.assertEquals(variantValidationResults.get(1).getNumAltSupportingReadsInNormal(), 0);
    }

    @Test
    public void testIndelCase() {
        // This test is simply running the full tool and making sure that there are no serious errors.
        //  All variants should validate (or be unpowered)

        final File outputFile = IOUtils.createTempFile("basicTest", ".seg");
        final File summaryFile = IOUtils.createTempFile("summary", ".txt");

        final List<String> arguments = new ArrayList<>();
        arguments.add("--" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_DISCOVERY_VCF_LONG_NAME);
        arguments.add("IS3.snv.indel.sv");
        arguments.add("-" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_VALIDATION_CASE);
        arguments.add("IS3.snv.indel.sv");
        arguments.add("-" + ValidateBasicSomaticShortMutations.SAMPLE_NAME_VALIDATION_CONTROL);
        arguments.add("G15512.prenormal.sorted");

        arguments.add("-" + StandardArgumentDefinitions.VARIANT_SHORT_NAME);
        arguments.add(TEST_DREAM_VCF_INDEL_TEST);

        arguments.add("-" + StandardArgumentDefinitions.INPUT_SHORT_NAME);
        arguments.add(TEST_DREAM_NORMAL_BAM_INDEL_TEST);
        arguments.add("-" + StandardArgumentDefinitions.INPUT_SHORT_NAME);
        arguments.add(TEST_DREAM_TUMOR_BAM_INDEL_TEST);

        arguments.add("-L");
        arguments.add(TEST_DREAM_VCF_INDEL_TEST);

        arguments.add("-" + StandardArgumentDefinitions.REFERENCE_SHORT_NAME);
        arguments.add(REFERENCE);
        arguments.add("-" + ValidateBasicSomaticShortMutations.CUTOFF_LONG_NAME);
        arguments.add(String.valueOf(ValidateBasicSomaticShortMutations.DEFAULT_MIN_BQ_CUTOFF));

        arguments.add("-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME);
        arguments.add(outputFile.getAbsolutePath());
        arguments.add("-" + Concordance.SUMMARY_LONG_NAME);
        arguments.add(summaryFile.getAbsolutePath());

        arguments.add("--verbosity");
        arguments.add("INFO");
        runCommandLine(arguments);

        Assert.assertTrue(outputFile.exists());
        Assert.assertTrue(summaryFile.exists());

        final List<BasicValidationResult> variantValidationResults = BasicValidationResult.read(new GATKPath(outputFile.getAbsolutePath()));

        Assert.assertEquals(variantValidationResults.size(), 336);

        // DEL: 20	1330646	.	CCTTGGCTTATTCCA	C
        // INS1: 20	3076247	.	AT	ATT
        // INS2: 20	3076299	.	A	AAGAAGCATGC

        assertValidationResult(variantValidationResults, new SimpleInterval("20", 1330646, 1330646),
                "CCTTGGCTTATTCCA", "C", 7, 21, 10,
                26, 0);

        // TODO: This next one actually has an incorrect gtNumAltReadsInValidationNormal, since the validator thinks of this as AT<insT>.  There are supporting reads in the validation normal for A<insT>T.  See https://github.com/broadinstitute/gatk/issues/5061
        assertValidationResult(variantValidationResults, new SimpleInterval("20", 3076247, 3076247),
                "AT", "ATT", 4, 33, 4,
                25,0);
        assertValidationResult(variantValidationResults, new SimpleInterval("20", 3076299, 3076299),
                "A", "AAGAAGCATGC", 9, 41, 12,
                37, 0);  // One read has low BQ in the insertion, so 9, instead of 10
    }

    private void assertValidationResult(final List<BasicValidationResult> variantValidationResults,
                                        final SimpleInterval firstBaseInVariant, final String refString,
                                        final String altString, int gtValidationAltCoverage, int gtValidationRefCoverage,
                                        int gtDiscoveryAltCoverage, int gtDiscoveryRefCoverage, int gtNumAltReadsInValidationNormal) {
        final OverlapDetector<BasicValidationResult> overlapDetector = OverlapDetector.create(variantValidationResults);
        final BasicValidationResult indel = overlapDetector.getOverlaps(firstBaseInVariant).iterator().next();

        Assert.assertEquals(indel.getReference().getBaseString(), refString);
        Assert.assertTrue(indel.getReference().isReference());
        Assert.assertTrue(indel.getAlternate().isNonReference());
        Assert.assertEquals(indel.getAlternate().getBaseString(), altString);

        final int validationAltCoverage = indel.getValidationAltCount();
        final int validationRefCoverage = indel.getValidationRefCount();
        final int discoveryAltCoverage = indel.getDiscoveryAltCount();
        final int discoveryRefCoverage = indel.getDiscoveryRefCount();
        final double power = indel.getPower();
        final int minCount = indel.getMinValidationReadCount();
        final long numSupportingAltReadsInValidationNormal = indel.getNumAltSupportingReadsInNormal();

        Assert.assertEquals(validationAltCoverage, gtValidationAltCoverage);
        Assert.assertEquals(validationRefCoverage, gtValidationRefCoverage);
        Assert.assertEquals(discoveryAltCoverage, gtDiscoveryAltCoverage);
        Assert.assertEquals(discoveryRefCoverage, gtDiscoveryRefCoverage);
        Assert.assertEquals(power,
                PowerCalculationUtils.calculatePower(validationAltCoverage + validationRefCoverage,
                        discoveryAltCoverage, discoveryAltCoverage + discoveryRefCoverage,
                        minCount));
        Assert.assertEquals(numSupportingAltReadsInValidationNormal, gtNumAltReadsInValidationNormal, "Discordance in alt count in validation normal at " + firstBaseInVariant);
    }
}


text:
declare module 'twit' {
  declare class Stream extends events$EventEmitter {
    stop(): void;
    start(): void;
  }
  declare class Twit {
    constructor(options: {
      consumer_key: string,
      consumer_secret: string,
      access_token: string,
      access_token_secret: string,
      timeout_ms?: number,
      trusted_cert_fingerprints?: string[],
    }): Twit;
    post(endpoint: string, options: Object, cb?: (err: ?Error, data: any, response: any) => mixed): Promise<any>;
    postMediaChunked(options: Object, cb?: (err: ?Error, data: any, response: any) => mixed): Promise<any>;
    get(endpoint: string, options: Object, cb?: (err: ?Error, data: any, response: any) => mixed): Promise<any>;
    stream(path: string, params?: Object): Stream;
  }
  declare module.exports: Class<Twit>;
}


text:
SOAP Interop Round2 base 007 (php/direct): echoStringArray(one)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
$client->__soapCall("echoStringArray", array(array('good')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
echo "ok\n";
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">good</item></param0></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
ok


text:
using System;
using System.Windows;
using settings = HappyBin.AutoUpdater.Properties.Settings;

namespace HappyBin.AutoUpdater
{
    public partial class App : Application
    {
        MainDlg _mainDlg = null;

        public static Updater Updater { get; private set; }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup( e );

            Updater = new Updater( new UpdaterSettings()
            {
                DownloadFolder = settings.Default.DownloadFolder,
                RuntimeExe = settings.Default.RuntimeExe,
                ServiceName = settings.Default.ServiceName,
                StartProcessAfterInstall = settings.Default.StartProcessAfterInstall,
                UpdateConfigUri = settings.Default.UpdateConfigUri,
                WaitForExitMillseconds = settings.Default.WaitForExitMillseconds
            } );

            _mainDlg = new MainDlg();

            Updater.IsAboutBox = false;  //just being explicit
            if( e.Args.Length > 0 )
            {
                string arg = e.Args[0].ToLower();

                if( arg == "/install" )
                {
                    this.InstallPatchesAndExit();
                }
                else
                {
                    Updater.IsAboutBox = arg == "/about";
                }
            }

            if( Updater.IsAboutBox )
            {
                _mainDlg.Show();
            }
            else
            {
                this.CheckForPatches();
            }
        }

        private void InstallPatchesAndExit()
        {
            _mainDlg.Show();
            _mainDlg.InstallExistingPatchesAsync();
        }

        private void CheckForPatches()
        {
            Updater.InitializePatchStatus();

            if( Updater.Status.PatchIsValid )
            {
                _mainDlg.Show();
            }
            else
            {
                Updater = null;
                App.Current.Shutdown();
            }
        }
    }
}


text:
//By ilovecolors.com.ar
//www.ilovecolors.com.ar/multiple-jquery-tabs/

//arrays of objects to collect previous and current tab
var previous = [];
var current = [];
//array to store IDs of our tabs
//store setInterval reference
var tablist = [];

//change tab and highlight current tab title
function change(block){
	//show proper tab, catch IE6 bug
	if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0")
		jQuery(block + ' .tab#' + current[block].reference).show();
	else
		jQuery(block + ' .tab#' + current[block].reference).fadeIn();

	//clear highlight from previous tab title
	jQuery(block + ' .htabs a[href=#' + previous[block].reference + ']').removeClass('select');

	//highlight currenttab title
	jQuery(block + ' .htabs a[href=#' + current[block].reference + ']').addClass('select');

	//hide the other tabs
	jQuery("#" + previous[block].reference).hide();
	previous[block].reference = current[block].reference;
}
function Tab(blockid){
	var z = 0;
	this.block = blockid;
	this.next = function (){
		previous[this.block].reference = jQuery(this.block + ' .htabs a').get()[z].href.split('#')[1];
		if(z >= jQuery(this.block + ' .htabs a').get().length-1) z = 0; else z++;
		current[this.block].reference  = jQuery(this.block + ' .htabs a').get()[z].href.split('#')[1];
		change(this.block);
	};
}

function Reference(reference){ this.reference = reference; }
function tabs(tobj){

		for (key in tobj) {
			var params = tobj[key].split('&');
			var block = params[0];

			//initialize tabs, display the current tab
			jQuery(block + " .tab:not(:first)").hide();

            file = jQuery(block + " .tab:first")[0].id + '.html';
            $.get(file, function(data) {
                $("#" + jQuery(block + " .tab:first")[0].id ).html(data);
            });

            jQuery(block + " .tab:first").show();

			//highlight the current tab title
			jQuery(block + ' .htabs a:first').addClass('select');

			previous[block] = new Reference(jQuery(block + " .htabs a:first").attr("href").split('#')[1]);

			//is actually a reference to the second tab
			current[block]  = new Reference(jQuery(block + ' .htabs a').get()[1].href.split('#')[1]);

			//create new Tab to store values for rotation and setInterval id
			tablist[block] = new Tab(block);

			if (params[1] != undefined) {
				//set interval to repeat - next line commented
				interid = setInterval("tablist['" + block + "'].next()", params[1]);
				//store in - next line commented
				tablist[block].intervalid = interid;
			}

			//handler for clicking on tabs
			jQuery(block + " .htabs a").click(function(event){

				//store reference to clicked tab
				target = "#"+event.target.getAttribute("href").split('#')[1];
                file = event.target.getAttribute("href").split('#')[1] + '.html';
                tblock = "#"+jQuery(target).parent().parent().attr("id");

				current[tblock].reference = jQuery(this).attr("href").split('#')[1];

                 // Ajax for the selected TAB
                /*$.ajax({
                    url: url,
                    data: data,
                    success: success,
                    dataType: dataType
                });*/
                //alert(tblock);
                $.get(file, function(data) {
                    $("#" + event.target.getAttribute("href").split('#')[1]).html(data);
                    });

				//display referenced tab
				change(tblock);

				//if tab is clicked, stop rotating
				clearInterval(tablist[tblock].intervalid);

				return false;
			});
		}
	}


text:
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="format-detection" content="telephone=no">
  <title>Niko Matses | Web Developer & UX Designer</title>
  <link rel="apple-touch-icon" sizes="180x180" href="img/icons/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png">
  <link rel="manifest" href="img/icons/manifest.json">
  <link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#45b649">
  <link rel="shortcut icon" href="img/icons/favicon.ico">
  <meta name="msapplication-config" content="img/icons/browserconfig.xml">
  <meta name="theme-color" content="#ffffff">
  <link href="css/index.css" rel="stylesheet" type="text/css">

        Niko Matses

          Projects

          Experience

          Skills

          About

          Contact

UX Designer & Web Developer

          Intro

          Projects

          Experience

          Skills

          Testimonials

          Contact

  Open navigation

Hello,

I'm a full-stack developer, passionate about front-end mobile design. My
          work begins with Design Thinking, UX planning, and goal setting to achieve new business goals and user goals
          alike.

Recent Projects

Here are some web apps I helped to plan, design, build, and launch.

Acorn Health

Connecting families with an ABA network to find care for children with
              autism.

Features:Zip & Geolocation Search, State &
              Local Resources

Role:Full-Stack Developer

Tools: HTML, Gulp, SASS, JS, Timber

              Visit Website

Ideal Cap Group

A fresh look for a family-owned firm with decades of investment experience.

Features:UI Animation, Portfolio, Property Map

Role:Front-End Developer

Tools: React, Gatsby, JSX, SASS, JS

              Visit Website

FlingGolf

Getting today's generation to try this sport's new spin on traditional
              golf.

Features:Custom eCommerce, Course Locator,
              Event Calendar

Role: UX Designer, Front-End Developer

Tools: HTML, SASS, Shopify, ThemeKit, Liquid

              Visit Website

Long Wharf Capital

Building trust between real estate investors and this Boston-based team.

Features:UI Animation, Portfolio, CMS, Site
              Search

Role: Mobile UI Designer, Full-Stack Developer

Tools:HTML, Gulp, SASS, JS, Timber

              Visit Website

Primary360

Transforming how an integrated marketing agency presents itself online.

Features:UI Animation, Portfolio, Blog,
              Bespoke Theme

Role: UX Designer, Full-Stack Developer

Tools: HTML, Gulp, SASS, JS, Nunjucks

              Visit Website

Woodmont Properties

Promoting partnership for a real estate company now in business over half a
              century.

Features:Property Filter, CMS, Bespoke Theme

Role: Mobile UI Designer, Full Stack Developer

Tools: HTML, Gulp, SASS, JS, Timber

              Visit Website

We Are Merrimack Valley

Bringing economic development to the region with real estate listings,
              entrepreneur interviews and other resources.

Features:Property Search / Filter, .CSV Data
              Import, Business Toolkit

Role: Mobile UI Designer, Full Stack Developer

Tools:HTML, Gulp, SASS, JS, Timber, EagleView
              API

              Visit Website

Past Experience

2007 - 2011
 I got started as a freelance designer and web developer
            in 2007, networking and learning more new skills in the field year after year.

2012
 For the Summer I was an ID Tech Camps instructor of Photography
            and Web Development courses to kids and teens on the MIT campus in Cambridge, MA.

2013 - 2020
My first agency experience began at Primary Design as a
            Junior Developer. I learned so much while too helping Primary grow over seven years.

2016
As my expanding role in the planning of Web projects matured, I
            earned an official title of (the agency's first) UX Designer!

2018
I jumped from building single page applications with Meteor to
            pursue the more popular JavaScript framework, React.

2020
Today, I freelance full-time as a UX Designer & Front-End
            Developer, seeking future work with a fun and talented digital product team.

Dev Skills

Full Stack

Handling server-side duties like hosting, DNS, databases, SSL certificates
          and SEO best practices has been my job for over 50 web products.

GIT & Github

I've pushed over 350 commits in the past year. I know my way around Terminal,
          Bitbucket.com, GitHub.com and Git to collaborate with a team of developers.

HTML5

I enjoy coding with semantic HTML5 — it's more meaningful to my fellow
          developers and better-suited for modern devices, browsers and search engines.

SASS

Who knew styling could be so much fun? Not only does SASS make my days coding
          easier, it's helped me improve as a front-end developer.

Task Runners

Gulp, Webpack etc. have saved countless hours from my development workflow.
          They can be used to live-update, prefix, preprocess, concatenate, minify, template, theme, and more.

Design Skills

User Experience

Learning and applying UXD has transformed my web design workflow. Research
          and planning can align the objectives of a product's stakeholders with its users.

User Interface

A good UI begins with competitive research and plenty of sketching.
          Understand the problem and let usability testing solve the rest. Last but not least, apply strong visual
          design.

Responsive / Web

Always mobile-first, BrowserSync device testing aids in my quality
          assessments. When I'm crafting web components and design systems, no screen size goes overlooked.

Graphic

While majoring in Visual Communications I gained a deeper understanding of
          graphic design and its principles. I'm still learning and use Adobe CC's design apps on a weekly basis.

Motion

Since drawing flipbooks as a kid I've always dabbled in animation. Today my
          motion design chops apply to projects in Adobe Animate, Premiere Pro, CSS3 and JavaScript.

Testimonials

Here are some web apps I helped to design, build, launch and maintain.

Niko has a natural
              interest in learning new things and creative problem solving. He is open to new ideas, listens to feedback
              and continuously pushes for a more positive user experience.

Victoria Tran

Digital Media Marketer
International Data Group

He is a level head,
              from discussing the rationale behind development standards to providing valued feedback on design
              prototypes.

Nelson Lourenço

User Interface Designer
TSD Rental

Niko opened our eyes to
              the creative possibilites and his up-to-date knowledge excited us. He delivered a great looking site and
              continually offers suggestions for better functionality. He knows his stuff and continues to learn.

Phillip Dunn

Supervisor
Wise Construction

He's a very organized,
              determined and intelligent guy who brings a growth mindset to every assignment, and rises to meet new
              challenges.

Michael Bourne

Vice President
Matter Communications

Niko works well
              independently as well as with a group. When a task was delegated to him, he would extend himself further;
              seeing if there was anything else he could do to help out. It's nice to work with someone who genuinely
              cares about what they're doing and the mark they're leaving behind. Simply put, this is a guy you want on
              your team because day in and out, he gives it his all.

Kwadwo Amo-Mensah

Camp Director (Fairfield, CT)
ID Tech Camps

      Call
      Email
      ©2020 Niko Matses / 978.289.0008 / gigs@nikomatses.com


text:
#include "httpd.h"
#include "http_core.h"
#include "http_config.h"
#include "http_log.h"
#include "http_protocol.h"
#include "ap_config.h"
#include "apr_optional.h"

#include "modsecurity.h"

/**
 * This function will be invoked by
 * ModSecurity to transform input.
 */
static int reverse(apr_pool_t *mptmp, unsigned char *input,
    long int input_len, char **rval, long int *rval_len)
{
    /* Transformation functions can choose to do their
     * thing in-place, overwriting the existing content. This
     * is normally possible only if the transformed content
     * is of equal length or shorter.
     *
     * If you need to expand the content use the temporary
     * memory pool mptmp to allocate the space.
     */

    /* Reverse the string in place, but only if it's long enough. */
    if (input_len > 1) {
        long int i = 0;
        long int j = input_len - 1;
        while(i < j) {
            char c = input[i];
            input[i] = input[j];
            input[j] = c;
            i++;
            j--;
        }
    }

    /* Tell ModSecurity about the content
     * we have generated. In this case we
     * merely point back to the input buffer.
     */
    *rval = (char *)input;
    *rval_len = input_len;

    /* Must return 1 if the content was
     * changed, or 0 otherwise.
     */
    return 1;
}

static int hook_pre_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_temp) {
    void (*fn)(const char *name, void *fn);

    /* Look for the registration function
     * exported by ModSecurity.
     */
    fn = APR_RETRIEVE_OPTIONAL_FN(modsec_register_tfn);
    if (fn) {
        /* Use it to register our new
         * transformation function under the
         * name "reverse".
         */
        fn("reverse", (void *)reverse);
    } else {
        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL,
            "mod_tfn_reverse: Unable to find modsec_register_tfn.");
    }

    return OK;
}

static void register_hooks(apr_pool_t *p) {
    ap_hook_pre_config(hook_pre_config, NULL, NULL, APR_HOOK_LAST);
}

/* Dispatch list for API hooks */
module AP_MODULE_DECLARE_DATA tfn_reverse_module = {
    STANDARD20_MODULE_STUFF,
    NULL,                  /* create per-dir    config structures */
    NULL,                  /* merge  per-dir    config structures */
    NULL,                  /* create per-server config structures */
    NULL,                  /* merge  per-server config structures */
    NULL,                  /* table of config file commands       */
    register_hooks         /* register hooks                      */
};


text:
package com.imagero.uio.impl;

import com.imagero.uio.io.IOutils;

import java.io.File;
import java.io.IOException;

/**
 * TmpRandomAccessFile closes itself on finalization and tries to delete file.
 * @author Andrey Kuznetsov
 */
public class TmpRandomAccessFile extends RandomAccessFileX {
    File f;

    public TmpRandomAccessFile(String name, String mode) throws IOException {
        this(new File(name), mode);
    }

    public TmpRandomAccessFile(File file, String mode) throws IOException {
        super(file, mode);
        this.f = file;
    }

    public void close() throws IOException {
        super.close();
        f.delete();
    }

    protected void finalize() throws Throwable {
        IOutils.closeStream(this);
        if (f.exists()) {
            f.delete();
        }
    }
}


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

    <title>Chatmessage</title>
    <meta name="date" content="2016-11-16">
    <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

de.ich05.Chatlog

Class Chatmessage

java.lang.Object

de.ich05.Chatlog.Chatmessage

public class Chatmessage
extends java.lang.Object

Constructor Summary

Constructors

                                Constructor and Description

                                Chatmessage(java.lang.String player,
                                    java.lang.String message,
                                    Chatlog chatlog,
                                    java.util.Date timestamp)

Method Summary

All Methods Instance Methods Concrete Methods

                                Modifier and Type
                                Method and Description

                                Chatlog
                                getChatlog()

                                java.lang.String
                                getMessage()

                                java.lang.String
                                getPlayer()

                                java.util.Date
                                getSendTime()

                                java.lang.String
                                toString()

Methods inherited from class java.lang.Object

                                equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Chatmessage

public Chatmessage(java.lang.String player,
                   java.lang.String message,
                   Chatlog chatlog,
                   java.util.Date timestamp)

Method Detail

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

getMessage

public java.lang.String getMessage()

getPlayer

public java.lang.String getPlayer()

getChatlog

public Chatlog getChatlog()

getSendTime

public java.util.Date getSendTime()

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text: - Updated the Docker image to: *demisto/carbon-black-cloud:1.0.0.25451*.


text:
<!doctype html public "-//w3c//dtd html 3.2//en">

<title>caption dir test</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">

is the question mark on the left side with style?

			table cell

is the question mark on the left side without style?

			table cell


text:
package io.opensec.oval.model.windows;

import io.opensec.oval.model.ComponentType;
import io.opensec.oval.model.Family;
import io.opensec.oval.model.common.CheckEnumeration;
import io.opensec.oval.model.definitions.StateRefType;
import io.opensec.oval.model.definitions.SystemObjectRefType;
import io.opensec.oval.model.definitions.TestType;

/**
 * The user access control test is used to check setting
 * related to User Access Control within Windows.
 *
 * @author  Akihito Nakamura, AIST
 * @see OVAL Language
 */
public class UacTest
    extends TestType
{

    /**
     * Constructor.
     */
    public UacTest()
    {
        this( null, 0 );
    }

    public UacTest(
                    final String id,
                    final int version
                    )
    {
        this( id, version, null, null );
    }

    public UacTest(
                    final String id,
                    final int version,
                    final String comment,
                    final CheckEnumeration check
                    )
    {
        this( id, version, comment, check, null, null );
    }

    public UacTest(
                    final String id,
                    final int version,
                    final String comment,
                    final CheckEnumeration check,
                    final SystemObjectRefType object,
                    final StateRefType[] stateList
                    )
    {
        super( id, version, comment, check, object, stateList );

//        _oval_platform_type = OvalPlatformType.windows;
//        _oval_component_type = OvalComponentType.uac;
        _oval_family = Family.WINDOWS;
        _oval_component = ComponentType.UAC;
    }

    //**************************************************************
    //  java.lang.Object
    //**************************************************************

    @Override
    public int hashCode()
    {
        return super.hashCode();
    }

    @Override
    public boolean equals(
                    final Object obj
                    )
    {
        if (!(obj instanceof UacTest)) {
            return false;
        }

        return super.equals( obj );
    }

    @Override
    public String toString()
    {
        return "uac_test[" + super.toString() + "]";
    }

}
//UacTest


text:
<?php

declare(strict_types=1);

namespace Onion\Framework\Console\Components;

use Onion\Framework\Console\Interfaces\ComponentInterface;
use Onion\Framework\Console\Interfaces\ConsoleInterface;

class Buffer implements ComponentInterface
{
    /** @var resource */
    private mixed $content;
    private int $size = 0;

    public function __construct()
    {
        $this->content = fopen('php://temp', 'r+b');
    }

    public function clear()
    {
        $this->size = 0;
        fseek($this->content, 0);
        ftruncate($this->content, 0);
    }

    public function add(string $text): bool
    {
        $size = fwrite($this->content, $text);
        $this->size += $size;

        return $size === strlen($text);
    }

    public function addLine(string $line): bool
    {
        return $this->add("{$line}\n");
    }

    public function getSize(): int
    {
        return $this->size;
    }

    public function flush(ConsoleInterface $console): void
    {
        fseek($this->content, 0);
        while (!feof($this->content)) {
            $console->write(fread($this->content, 1024));
        }
    }
}


text:
<?xml version="1.0"?>
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.yahoo.vespa</groupId>
        <artifactId>parent</artifactId>
        <version>8-SNAPSHOT</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>
    <artifactId>controller-api</artifactId>
    <packaging>container-plugin</packaging>
    <version>8-SNAPSHOT</version>

    <dependencies>

        <!-- provided -->
        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>container-dev</artifactId>
            <scope>provided</scope>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>container-apache-http-client-bundle</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>config-provisioning</artifactId>
            <scope>provided</scope>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>vespa-athenz</artifactId>
            <scope>provided</scope>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>flags</artifactId>
            <scope>provided</scope>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>vespajlib</artifactId>
            <scope>provided</scope>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>jdisc-security-filters</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>security-utils</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- compile -->

        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>annotations</artifactId>
            <version>9.0.4</version>
        </dependency>

        <!-- test -->

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>configdefinitions</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.yahoo.vespa</groupId>
                <artifactId>bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <attachBundleArtifact>true</attachBundleArtifact>
                    <bundleClassifierName>deploy</bundleClassifierName>
                    <useCommonAssemblyIds>false</useCommonAssemblyIds>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
@interface SXMainViewController : UITableViewController

@end


text:
package edu.asu.qstore4s.converter;

import java.util.List;

import org.json.JSONException;

import edu.asu.qstore4s.domain.elements.impl.Element;
import edu.asu.qstore4s.domain.events.impl.CreationEvent;

/**
 * This file contains the interface class for Converter class which has the
 * following methods. convertToXML and convertToJson
 *
 * @author Bhargav Desai
 *
 */
public interface IConverter {

	/**
	 * This method is used to convert list of creation event into XML.
	 *
	 * @param creationEventList
	 * @return XML
	 */
	String convertToXML(List<CreationEvent> creationEventList);

	/**
	 * This method is used to convert list of creation event into JSON
	 *
	 * @param creationEventList
	 * @return JSON
	 * @throws JSONException
	 */
	String convertToJson(List<CreationEvent> creationEventList)
			throws JSONException;

	/**
	 * This method is used to convert element into JSON.
	 *
	 * @param element
	 * @return JSON
	 * @throws JSONException
	 */

	String convertToJson(Element element) throws JSONException;

	/**
	 * This method is used to convert element into XML.
	 *
	 * @param element
	 * @return XML
	 */
	String convertToXML(Element element);

	/**
	 * This is shallow convert method which convert element to XML.
	 *
	 * @param element
	 * @return XML
	 */
	String convertToXMLShallow(Element element);

	/**
	 * This is shallow convert method which convert element to JSON.
	 *
	 * @param element
	 * @return JSON
	 * @throws JSONException
	 */
	String convertToJsonShallow(Element element) throws JSONException;

}


text:
{{ title }}

			<form name="search" ng-submit="searchiTunes(artist)">

				<input type="text" class="form-control" required placeholder="e.g. The Commitments" ng-model="artist" />
				<button class="btn-lg btn-warning" type="submit">Submit</button>

			</form>

{{ albumart }}

{{ track }}

{{ preview }}

{{ trackCost }}

					{{ song.trackName }}

					Play

						£{{song.trackPrice}}

		{{ error }}


text:
package config;

/**
 * Created by zzz40500 on 15/5/31.
 */
public class Strings {

    public static final String privateStr="   private String name;\n" +
            "\n" +
            "    public void setName(String name){\n" +
            "        this.name=name;\n" +
            "    }\n" +
            "\n" +
            "    public String getName(){\n" +
            "        return name;\n" +
            "    }";
    public static final String publicStr="    public String name;";
    public static final String privateUseSerializedNameStr="    @SerializedName(\"name\")\n" +
            "    private String name;\n" +
            "\n" +
            "    public void setName(String name){\n" +
            "        this.name=name;\n" +
            "    }\n" +
            "\n" +
            "    public String getName(){\n" +
            "        return name;\n" +
            "    }";
    public static final String publicUseSerializedNameStr="    @SerializedName(\"name\")\n" +
            "    public String name;";
}


text:
using System;

namespace LinqToDB.ServiceModel
{
	using SqlQuery;

	public class LinqServiceQuery
	{
		public SelectQuery    Query      { get; set; }
		public SqlParameter[] Parameters { get; set; }
	}
}


text:
package fr.reivon.formation.spring2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.*;

/**
 * Hello world!
 */
@Configuration
@ComponentScan
public class Application {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(Application.class);
        MessagePrinter printer = context.getBean(MessagePrinter.class);
        printer.printMessage();
    }
}


text:
namespace Loki
{
////////////////////////////////////////////////////////////////////////////////
// class template AssocVectorCompare
// Used by AssocVector
////////////////////////////////////////////////////////////////////////////////

    namespace Private
    {
        template <class Value, class C>
        class AssocVectorCompare : public C
        {
            typedef std::pair<typename C::first_argument_type, Value>
                Data;
            typedef typename C::first_argument_type first_argument_type;

        public:
            AssocVectorCompare()
            {}

            AssocVectorCompare(const C& src) : C(src)
            {}

            bool operator()(const first_argument_type& lhs,
                const first_argument_type& rhs) const
            { return C::operator()(lhs, rhs); }

            bool operator()(const Data& lhs, const Data& rhs) const
            { return operator()(lhs.first, rhs.first); }

            bool operator()(const Data& lhs,
                const first_argument_type& rhs) const
            { return operator()(lhs.first, rhs); }

            bool operator()(const first_argument_type& lhs,
                const Data& rhs) const
            { return operator()(lhs, rhs.first); }
        };
    }

////////////////////////////////////////////////////////////////////////////////
// class template AssocVector
// An associative vector built as a syntactic drop-in replacement for std::map
// BEWARE: AssocVector doesn't respect all map's guarantees, the most important
//     being:
// * iterators are invalidated by insert and erase operations
// * the complexity of insert/erase is O(N) not O(log N)
// * value_type is std::pair<K, V> not std::pair<const K, V>
// * iterators are random
////////////////////////////////////////////////////////////////////////////////

    template
    <
        class K,
        class V,
        class C = std::less<K>,
        class A = std::allocator< std::pair<K, V> >
    >
    class AssocVector
        : private std::vector< std::pair<K, V>, A >
        , private Private::AssocVectorCompare<V, C>
    {
        typedef std::vector<std::pair<K, V>, A> Base;
        typedef Private::AssocVectorCompare<V, C> MyCompare;

    public:
        typedef K key_type;
        typedef V mapped_type;
        typedef typename Base::value_type value_type;

        typedef C key_compare;
        typedef A allocator_type;
        typedef typename A::reference reference;
        typedef typename A::const_reference const_reference;
        typedef typename Base::iterator iterator;
        typedef typename Base::const_iterator const_iterator;
        typedef typename Base::size_type size_type;
        typedef typename Base::difference_type difference_type;
        typedef typename A::pointer pointer;
        typedef typename A::const_pointer const_pointer;
        typedef typename Base::reverse_iterator reverse_iterator;
        typedef typename Base::const_reverse_iterator const_reverse_iterator;

        class value_compare
            : public std::binary_function<value_type, value_type, bool>
            , private key_compare
        {
            friend class AssocVector;

        protected:
            value_compare(key_compare pred) : key_compare(pred)
            {}

        public:
            bool operator()(const value_type& lhs, const value_type& rhs) const
            { return key_compare::operator()(lhs.first, rhs.first); }
        };

        // 23.3.1.1 construct/copy/destroy

        explicit AssocVector(const key_compare& comp = key_compare(),
            const A& alloc = A())
        : Base(alloc), MyCompare(comp)
        {}

        template <class InputIterator>
        AssocVector(InputIterator first, InputIterator last,
            const key_compare& comp = key_compare(),
            const A& alloc = A())
        : Base(first, last, alloc), MyCompare(comp)
        {
            MyCompare& me = *this;
            std::sort(begin(), end(), me);
        }

        AssocVector& operator=(const AssocVector& rhs)
        {
            AssocVector<K, V, C, A>(rhs).swap(*this);  // ### Borland fix: template params added to cast
            return *this;
        }

        // iterators:
        // The following are here because MWCW gets 'using' wrong
        iterator begin() { return Base::begin(); }
        const_iterator begin() const { return Base::begin(); }
        iterator end() { return Base::end(); }
        const_iterator end() const { return Base::end(); }
        reverse_iterator rbegin() { return Base::rbegin(); }
        const_reverse_iterator rbegin() const { return Base::rbegin(); }
        reverse_iterator rend() { return Base::rend(); }
        const_reverse_iterator rend() const { return Base::rend(); }

        // capacity:
        bool empty() const { return Base::empty(); }
        size_type size() const { return Base::size(); }
        size_type max_size() { return Base::max_size(); }

        // 23.3.1.2 element access:
        mapped_type& operator[](const key_type& key)
        { return insert(value_type(key, mapped_type())).first->second; }

        // modifiers:
        std::pair<iterator, bool> insert(const value_type& val)
        {
            bool found(true);
            iterator i(lower_bound(val.first));

            if (i == end() || operator()(val.first, i->first))
            {
                i = Base::insert(i, val);
                found = false;
            }
            return std::make_pair(i, !found);
        }

        iterator insert(iterator pos, const value_type& val)
        {
            if (pos != end() && operator()(*pos, val) &&
                (pos == end() - 1 ||
                    !operator()(val, pos[1]) &&
                        operator()(pos[1], val)))
            {
                return Base::insert(pos, val);
            }
            return insert(val).first;
        }

        template <class InputIterator>
        void insert(InputIterator first, InputIterator last)
        { for (; first != last; ++first) insert(*first); }

        void erase(iterator pos)
        { Base::erase(pos); }

        size_type erase(const key_type& k)
        {
            iterator i(find(k));
            if (i == end()) return 0;
            erase(i);
            return 1;
        }

        void erase(iterator first, iterator last)
        { Base::erase(first, last); }

        void swap(AssocVector& other)
        {
            using std::swap;
            Base::swap(other);
            MyCompare& me = *this;
            MyCompare& rhs = other;
            swap(me, rhs);
        }

        void clear()
        { Base::clear(); }

        // observers:
        key_compare key_comp() const
        { return *this; }

        value_compare value_comp() const
        {
            const key_compare& comp = *this;
            return value_compare(comp);
        }

        // 23.3.1.3 map operations:
        iterator find(const key_type& k)
        {
            iterator i(lower_bound(k));
            if (i != end() && operator()(k, i->first))
            {
                i = end();
            }
            return i;
        }

        const_iterator find(const key_type& k) const
        {
            const_iterator i(lower_bound(k));
            if (i != end() && operator()(k, i->first))
            {
                i = end();
            }
            return i;
        }

        size_type count(const key_type& k) const
        { return find(k) != end(); }

        iterator lower_bound(const key_type& k)
        {
            MyCompare& me = *this;
            return std::lower_bound(begin(), end(), k, me);
        }

        const_iterator lower_bound(const key_type& k) const
        {
            const MyCompare& me = *this;
            return std::lower_bound(begin(), end(), k, me);
        }

        iterator upper_bound(const key_type& k)
        {
            MyCompare& me = *this;
            return std::upper_bound(begin(), end(), k, me);
        }

        const_iterator upper_bound(const key_type& k) const
        {
            const MyCompare& me = *this;
            return std::upper_bound(begin(), end(), k, me);
        }

        std::pair<iterator, iterator> equal_range(const key_type& k)
        {
            MyCompare& me = *this;
            return std::equal_range(begin(), end(), k, me);
        }

        std::pair<const_iterator, const_iterator> equal_range(
            const key_type& k) const
        {
            const MyCompare& me = *this;
            return std::equal_range(begin(), end(), k, me);
        }

        friend bool operator==(const AssocVector& lhs, const AssocVector& rhs)
        {
            const Base& me = lhs;
            return me == rhs;
        }

        bool operator<(const AssocVector& rhs) const
        {
            const Base& me = *this;
            const Base& yo = rhs;
            return me < yo;
        }

        friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs)
        { return !(lhs == rhs); }

        friend bool operator>(const AssocVector& lhs, const AssocVector& rhs)
        { return rhs < lhs; }

        friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs)
        { return !(lhs < rhs); }

        friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs)
        { return !(rhs < lhs); }
    };

    // specialized algorithms:
    template <class K, class V, class C, class A>
    void swap(AssocVector<K, V, C, A>& lhs, AssocVector<K, V, C, A>& rhs)
    { lhs.swap(rhs); }

} // namespace Loki

////////////////////////////////////////////////////////////////////////////////
// Change log:
// May     20, 2001: change operator= - credit due to Cristoph Koegl
// June    11, 2001: remove paren in equal_range - credit due to Cristoph Koegl
// June    20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
// January 22, 2002: fixed operator= - credit due to Tom Hyer
// June    25, 2002: fixed template insert() - credit due to Robert Minsk
// June    27, 2002: fixed member swap() - credit due to David Brookman
// July    16, 2002: Ported by Terje Slettebø and Pavel Vozenilek to BCC 5.6
////////////////////////////////////////////////////////////////////////////////

#endif // ASSOCVECTOR_INC_


text:
package org.seqcode.projects.sequnwinder;

import java.util.HashMap;

import org.seqcode.projects.sequnwinder.framework.Classifier;
import org.seqcode.projects.sequnwinder.framework.SeqUnwinderConfig;
import org.seqcode.projects.sequnwinder.loaddata.MakeArff;
import org.seqcode.projects.sequnwinder.motifs.Discrim;
import org.seqcode.projects.sequnwinder.motifs.ScoreMotif;
import org.seqcode.projects.sequnwinder.utils.Outputwriter;

import weka.classifiers.Evaluation;

public class SeqUnwinder {
	SeqUnwinderConfig seqConfig;

	public SeqUnwinder(SeqUnwinderConfig seqCon) {
		seqConfig = seqCon;
	}

	// Getters
	public SeqUnwinderConfig getConfig(){return seqConfig;}

	public static void main(String[] args) throws Exception{

		SeqUnwinderConfig seqCon = new SeqUnwinderConfig(args);
		SeqUnwinder sequnwinder = new SeqUnwinder(seqCon);
		Outputwriter scribe = new Outputwriter(seqCon);

		// Now make arff file
		System.err.println("Making Arff file..." );
		MakeArff arffmaker = new MakeArff(sequnwinder.getConfig());
		arffmaker.execute();

		// Now run the classifier
		System.err.println("Training SeqUnwinder's core framework..." );
		Classifier classifier = new Classifier(sequnwinder.getConfig().getKmin(),sequnwinder.getConfig().getNumK());
		String classifierout = "";
		try {
			classifierout = Evaluation.evaluateModel(classifier, sequnwinder.getConfig().getWekaOptions());
		} catch (Exception e) {
			if (((e.getMessage() != null) && (e.getMessage().indexOf(
					"General options") == -1))
					|| (e.getMessage() == null)) {
				e.printStackTrace();
			} else {
				System.err.println(e.getMessage());
			}
		}

		sequnwinder.getConfig().setModelNames(classifier.getModelNames());
		sequnwinder.getConfig().setClassifierOut(classifierout);
		sequnwinder.getConfig().setWeights(classifier.getWeights());
		scribe.writeKmerWeights();

		//Now parse the classifier output and extract the classifier statistics
		HashMap<String,double[]> trainStats = new HashMap<String,double[]>();
		HashMap<String,double[]> testStats = new HashMap<String,double[]>();
		String[] classifierOutputLine = sequnwinder.getConfig().getClassifierOutput().split("\n");
		boolean loadedTrainSetStats=false;
		boolean beginLoadingTrainSetStats = false;
		boolean beginLoadingTestSetStats = false;
		boolean loadedTestSetStats = false;
		for(int s=0; s<classifierOutputLine.length; s++){
			if(!loadedTrainSetStats && classifierOutputLine[s].contains("Detailed Accuracy By Class")){
				beginLoadingTrainSetStats = true;
			}else if(beginLoadingTrainSetStats && !loadedTrainSetStats){
				if(!classifierOutputLine[s].trim().startsWith("Weighted")){
					if(classifierOutputLine[s].equals("") || classifierOutputLine[s].contains("TP Rate"))
						continue;
					String[] pieces = classifierOutputLine[s].trim().split("\\s\\s+");
					trainStats.put(pieces[8], new double[8]);
					for(int p=0; p<pieces.length-1; p++){
						trainStats.get(pieces[8])[p] = Double.parseDouble(pieces[p]);
					}
				}else{
					loadedTrainSetStats=true;
				}
			}else if(loadedTrainSetStats && classifierOutputLine[s].contains("Detailed Accuracy By Class")){
				beginLoadingTestSetStats = true;
			}else if(beginLoadingTestSetStats && !loadedTestSetStats){
				if(!classifierOutputLine[s].trim().startsWith("Weighted")){
					if(classifierOutputLine[s].equals("") || classifierOutputLine[s].contains("TP Rate"))
						continue;
					String[] pieces = classifierOutputLine[s].trim().split("\\s\\s+");
					testStats.put(pieces[8], new double[8]);
					for(int p=0; p<pieces.length-1; p++){
						testStats.get(pieces[8])[p] = Double.parseDouble(pieces[p]);
					}
				}else{
					loadedTestSetStats = true;
				}
			}

		}
		sequnwinder.getConfig().setTrainSetStats(trainStats);
		sequnwinder.getConfig().setTestSetStats(testStats);

		scribe.writeClassifierOutput();

		System.err.println("Converting K-mer models into class-discriminative motifs ..." );

		// Now run Discrim
		Discrim discrim = new Discrim(sequnwinder.getConfig());
		discrim.execute();

		scribe.writeDiscrimMotifs();

		// Now, score motifs
		ScoreMotif scoremotif = new ScoreMotif(sequnwinder.getConfig());
		scoremotif.execute();

		scribe.writeDiscrimScore();
		//scribe.makeDiscrimRHeatmaps();
		scribe.makeDiscrimJavaHeatmaps();
		// Finally, make a html file for output
		scribe.writeHTMLfile();

		//Tidy (deletes intermediate directory)
		sequnwinder.getConfig().close();

		System.err.println("Finished running SeqUnwinder...");
		System.exit(0);

	}

}


text:
/**
 * @namespace JARS~internals.Interceptors
 */
JARS.internalGroup('Interceptors', ['Plugin', 'Property']);


text:
/* Types */

@import 'slide-list.css' screen;
@import 'slide-full.css' screen;

/* Content */

@import 'content/basic.css';
@import 'content/code.css';
@import 'content/footer.css';
@import 'content/inline.css';
@import 'content/lists.css';
@import 'content/quote.css';
@import 'content/table.css';

/* Elements */

@import 'elements/columns.css';
@import 'elements/copyright.css';
@import 'elements/cover.css';
@import 'elements/next.css';
@import 'elements/place.css';
@import 'elements/shout.css';

/* Modifiers */

@import 'modifiers/clear.css';
@import 'modifiers/white.css';
@import 'modifiers/black.css';

/* Slide */

.slide {
    position: relative;
    z-index: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 80px 112px 0 96px;
    width: var(--slide-width);
    height: var(--slide-height);
    background: white;
}

/* Number */

.slide::after {
    position: absolute;
    right: 0;
    bottom: 38px;
    left: 0;
    color: var(--color-light);
    line-height: 18px;
    text-align: center;
    counter-increment: slide;
    content: counter(slide);
}


text:
FROM ubuntu:trusty

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN apt-get update && \
    apt-get -y install \
              python3 \
              python3-pip \
              make \
              build-essential \
              libssl-dev \
              zlib1g-dev \
              libbz2-dev \
              libreadline-dev \
              libsqlite3-dev \
              wget \
              curl \
              llvm \
              libncurses5-dev \
              zip \
              git-core \
              supervisor \
              sqlite

RUN mkdir -p /tmp
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt

COPY deployment/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN mkdir -p /opt/wwc
ADD . /opt/wwc/apartment-finder

RUN mkdir -p /opt/wwc/logs
WORKDIR /opt/wwc/apartment-finder

CMD ["/usr/bin/supervisord"]