text:
@interface FivethViewController ()
@property (weak) IBOutlet NSTextField *labelDate;
@property (weak) IBOutlet NSDateFormatter *formatterDate;
@property (weak) IBOutlet NSButton *buttonCondition1;
@property (weak) IBOutlet NSButton *buttonCondition2;
@property (weak) IBOutlet NSButton *buttonCondition3;
@property (weak) IBOutlet NSButton *buttonCondition4;
@property (weak) IBOutlet NSDatePicker *fieldBirthday;
@property (weak) IBOutlet NSTextField *fieldHeight;
@property (weak) IBOutlet NSLevelIndicator *barGlobal;
@property (weak) IBOutlet NSLevelIndicator *barVestibular;
@property (weak) IBOutlet NSLevelIndicator *barVisual;
@property (weak) IBOutlet NSLevelIndicator *barSomatic;
@property (weak) IBOutlet NSLevelIndicator *barConsistency;
@property (weak) IBOutlet NSView *areaReport;
@property (weak) IBOutlet NSTextField *globalScoreValue;
@property (weak) IBOutlet NSTextField *betaInfo;
@property (weak) IBOutlet NSTextField *externalData;

@end

@implementation FivethViewController

@synthesize datos;
@synthesize datosCondicion1;
@synthesize datosCondicion2;
@synthesize datosCondicion3;
@synthesize datosCondicion4;

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do view setup here.
    fallenScore = -2.5f;
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(analiza:)
                                                 name:@"InformePosturografia"
                                               object:nil];

    if (@available(macOS 10.13, *)) {[self.barGlobal setFillColor:[NSColor greenColor]];}
    if (@available(macOS 10.13, *)) {[self.barVestibular setFillColor:[NSColor greenColor]];}
    if (@available(macOS 10.13, *)) {[self.barVisual setFillColor:[NSColor greenColor]];}
    if (@available(macOS 10.13, *)) {[self.barSomatic setFillColor:[NSColor greenColor]];}
    if (@available(macOS 10.13, *)) {[self.barConsistency setFillColor:[NSColor greenColor]];}
    //Date set
    NSDate *today = [NSDate date];
    self.labelDate.stringValue = [self.formatterDate stringFromDate:today];
    //Localization error fix
    NSString *userLocale = [[NSLocale currentLocale] localeIdentifier];
    NSString *userLanguage = [userLocale substringToIndex:2];
    if([userLanguage isEqualToString:@"es"]){
        self.externalData.stringValue = @"LOS DATOS A ANALIZAR HAN SIDO INTRODUCIDOS A MANO";
    }
    else {
        self.externalData.stringValue = @"ANALIZED DATA IS NOT FROM REAL POSTUROGRAPHY";
    }

}
- (IBAction)buttonCalculate:(id)sender {
    if ([self Validate]) {
        [self creaInforme];
    }
    else {
        NSAlert *alert = [[NSAlert alloc] init];
        NSString *userLocale = [[NSLocale currentLocale] localeIdentifier];
        NSString *userLanguage = [userLocale substringToIndex:2];
        if([userLanguage isEqualToString:@"es"]){
            [alert setMessageText:@"Campos introducidos incorrectos"];
            [alert setInformativeText:@"Los campos de edad o altura (en centímetros) están incompletos o no son válidos. Estos campos no pueden estar vacíos"];
        }
        else{
            [alert setMessageText:@"Not valid data"];
            [alert setInformativeText:@"Age or height (in centimeters) are incorrect or empty. These fields can not be empty."];
        }
        [alert addButtonWithTitle:@"OK"];
        [alert runModal];
    }
}
- (IBAction)buttonSavePNG:(id)sender {
    //De elemnto a imagen
    NSSize imgSize = self.areaReport.bounds.size;
    NSBitmapImageRep * rep = [self.areaReport bitmapImageRepForCachingDisplayInRect:[self.areaReport bounds]];
    [rep setSize:imgSize];
    [self.areaReport cacheDisplayInRect:[self.areaReport bounds] toBitmapImageRep:rep];
    NSData* data = [rep representationUsingType:NSPNGFileType properties:@{}];
    //Guardar imagen
    NSSavePanel * savePanel = [NSSavePanel savePanel];
    [savePanel setAllowedFileTypes:@[@"png"]];
    [savePanel setDirectoryURL:[NSURL fileURLWithPath:NSHomeDirectory()]];
    [savePanel beginSheetModalForWindow:[[self view] window] completionHandler:^(NSInteger result){
        if (result == NSFileHandlingPanelOKButton) {
            [savePanel orderOut:self]; //Cerrar el panel
            [data writeToURL:savePanel.URL atomically:YES];
        }
    }];
}

-(bool)Validate{
    //get age and height
    int height = [self.fieldHeight.stringValue intValue];
    NSDate *today = [NSDate date];
    NSDate *birth = self.fieldBirthday.dateValue;
    NSTimeInterval rawAge = [today timeIntervalSinceDate:birth];
    int Age = (rawAge/(365*24*60*60));
    //validation
    if (height > 60 && Age > 3) {
        if (height < 250 && Age < 150) {
            return true;
        }
        else{
            return false;
        }
    }
    return false;
}

//metod to compute scores
-(void)creaInforme{
    //get age and height
    int height = [self.fieldHeight.stringValue intValue];
    NSDate *today = [NSDate date];
    NSDate *birth = self.fieldBirthday.dateValue;
    NSTimeInterval rawAge = [today timeIntervalSinceDate:birth];
    int age = (rawAge/(365*24*60*60));
    NSLog(@"Age: %i height:%i",age,height);
    float areaUno = A1;
    float areaDos = A2;
    float areaTres = A3;
    float areaCuatro = A4;
    //Scores
    NSArray *TestScores = [self getScores:areaUno :areaDos :areaTres :areaCuatro];
    float scGlob = [TestScores[0] floatValue];
    float scVest = [TestScores[1] floatValue];
    float scVis = [TestScores[2] floatValue];
    float scSomat = [TestScores[3] floatValue];
    float scInt = [TestScores[4] floatValue];
    //Normalized limits
    //Fit in table range
    if (age < 18) {age = 18;}
    if (age > 68) {age = 68;}
    if (height < 150) {height = 150;}
    if (height > 193) {height = 193;}
    //
    NSArray *TestNormals = [self getNormalValues:age :height];
    float limGlob = [TestNormals[0] floatValue];
    float limVest = [TestNormals[1] floatValue];
    float limVis = [TestNormals[2] floatValue];
    float limSomat = [TestNormals[3] floatValue];
    //  Put results in view
    int sc = round(scGlob*100);
    //    Check for NaN values
    if (limGlob != limGlob){limGlob = 0;}
    if (limVest != limVest){limVest = 0;}
    if (limVis != limVis){limVis = 0;}
    if (limSomat != limSomat){limSomat = 0;}
    //    output results
    self.globalScoreValue.stringValue = [NSString stringWithFormat:@"%i/100",sc];
    self.barGlobal.floatValue = scGlob;
    if (scGlob-limGlob > 0){
        [self.barVestibular setHidden:TRUE];
        [self.barVisual setHidden:TRUE];
        [self.barSomatic setHidden:TRUE];
        [self.barConsistency setHidden:TRUE];
        if (@available(macOS 10.13, *)) {[self.barGlobal setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barVestibular setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barVisual setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barSomatic setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barConsistency setFillColor:[NSColor greenColor]];}
    }
    else {
        [self.barVestibular setHidden:FALSE];
        [self.barVisual setHidden:FALSE];
        [self.barSomatic setHidden:FALSE];
        [self.barConsistency setHidden:FALSE];
        if (@available(macOS 10.13, *)) {[self.barGlobal setFillColor:[NSColor redColor]];}
        if (@available(macOS 10.13, *)) {[self.barVestibular setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barVisual setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barSomatic setFillColor:[NSColor greenColor]];}
        if (@available(macOS 10.13, *)) {[self.barConsistency setFillColor:[NSColor greenColor]];}
        self.barVestibular.floatValue = scVest;
        self.barVisual.floatValue = scVis;
        self.barSomatic.floatValue = scSomat;
        self.barConsistency.floatValue = scInt;
        if(scVest-limVest < 0){
            if (@available(macOS 10.13, *)) {[self.barVestibular setFillColor:[NSColor redColor]];}
        }
        if(scVis-limVis < 0) {
            if (@available(macOS 10.13, *)) {[self.barVisual setFillColor:[NSColor redColor]];}
        }
        if(scSomat-limSomat < 0){
            if (@available(macOS 10.13, *)) {[self.barSomatic setFillColor:[NSColor redColor]];}
        }
        if(scInt < 0.2){
            if (@available(macOS 10.13, *)) {[self.barConsistency setFillColor:[NSColor redColor]];}
        }
    }
    self.betaInfo.stringValue = [NSString stringWithFormat:@"Global: %f/%f Vestibular:%f/%f Visual:%f/%f Somat:%f/%f",scGlob,limGlob,scVest,limVest,scVis,limVis,scSomat,limSomat];
}
//Scores calculation method
-(NSArray *)getScores:(float)area1 :(float)area2 :(float)area3 :(float)area4{
    //Conditions Normalization
    float scoreUno = (((35.87)-(area1-3.95))/(35.87));
    float scoreDos = ((40.03-(area2-3.74))/(40.03));
    float scoreTres = ((179.33-(area3-19.18))/(179.33));
    float scoreCuatro = ((743.22-(area4-39.11))/(743.22));
    //Falls & Negative Counting
    if (_buttonCondition1.state == TRUE) {scoreUno = fallenScore;}
    if (_buttonCondition2.state == TRUE) {scoreDos = fallenScore;}
    if (_buttonCondition3.state == TRUE) {scoreTres = fallenScore;}
    if (_buttonCondition4.state == TRUE) {scoreCuatro = fallenScore;}
    //Global score
    float ScoreGlobal = ((scoreUno+scoreDos+scoreTres+scoreCuatro)/4);
    float ScoreVestibular = scoreCuatro;
    float ScoreVisual = scoreTres;
    float ScoreSomatosensorial = scoreDos;
    //Integrity
    float ScoreIntegrity = 0;
    if (scoreCuatro != 0){
        ScoreIntegrity = (scoreUno/scoreCuatro);

    }
    else {
        ScoreIntegrity = (scoreUno/0.1f);
    }
    NSArray *Scores = [NSArray arrayWithObjects:[NSNumber numberWithFloat:ScoreGlobal],[NSNumber numberWithFloat:ScoreVestibular],[NSNumber numberWithFloat:ScoreVisual],[NSNumber numberWithFloat:ScoreSomatosensorial],[NSNumber numberWithFloat:ScoreIntegrity],nil];
    return Scores;
}
-(NSArray *)getNormalValues:(int)age :(int)height{
    float limiteGlobal = 0.0f;
    float limiteVestibular = 0.0f;
    float limiteVisual = 0.0f;
    float limiteSomatosensorial = 0.0f;
    //TABULATION 18-68 150-193
    int ageGroup = 1;
    int heightGroup = 1;
    //Age Gropups
    if (age >17 && age <34){
        ageGroup = 4;
    }
    else if (age > 33 && age <46){
        ageGroup = 2;

    }
    else if (age > 45 && age <55) {
        ageGroup = 1;
    }
    else if ( age > 54 && age <69) {
        ageGroup = 3;
    }
    //Height groups
    if (height >149 && height <165){
        heightGroup = 4;
    }
    else if (height > 164 && height <176){
        heightGroup = 3;

    }
    else if (height > 175 && height <184) {
        heightGroup = 1;
    }
    else if ( height > 183 && height <194) {
        heightGroup = 2;
    }
    NSLog(@"AgeGroup: %i HeightGroup: %i",ageGroup,heightGroup);
    //Get limits from calculated groups
    limiteGlobal = [self limiteGlobal:ageGroup :heightGroup];
    limiteVestibular = [self limiteVestibular:ageGroup :heightGroup];
    limiteVisual = [self limiteVisual:ageGroup :heightGroup];
    limiteSomatosensorial = [self limiteSomatosensorial:ageGroup :heightGroup];
    //Send array of limits as method result
    NSArray *Limits = [NSArray arrayWithObjects:[NSNumber numberWithFloat:limiteGlobal],[NSNumber numberWithFloat:limiteVestibular],[NSNumber numberWithFloat:limiteVisual],[NSNumber numberWithFloat:limiteSomatosensorial], nil];
    return Limits;
}
-(float)limiteGlobal:(int)ageGroup :(int)heightGroup{
    float limite = 0.0f;
    int agePos = ageGroup-1;
    int heightPos = heightGroup-1;
    //Limit Calculation
    //Matrix definition from statistical clinical trial
    //Modifications: If mean <0.5 is corrected to = 0.5
    //Modifications: If SD > 0.2 is corrected to 0.2
    float globalMeanMatrix[4][4];
    globalMeanMatrix[0][0] = 0.503f;
    globalMeanMatrix[0][1] = 0.500f;
    globalMeanMatrix[0][2] = 0.616f;
    globalMeanMatrix[0][3] = 0.789f;
    globalMeanMatrix[1][0] = 0.691f;
    globalMeanMatrix[1][1] = 0.712f;
    globalMeanMatrix[1][2] = 0.732f;
    globalMeanMatrix[1][3] = 0.808f;
    globalMeanMatrix[2][0] = 0.500f;
    globalMeanMatrix[2][1] = 0.500f;
    globalMeanMatrix[2][2] = 0.592f;
    globalMeanMatrix[2][3] = 0.678f;
    globalMeanMatrix[3][0] = 0.703f;
    globalMeanMatrix[3][1] = 0.596f;
    globalMeanMatrix[3][2] = 0.801f;
    globalMeanMatrix[3][3] = 0.830f;
    float globalSdMatrix[4][4];
    globalSdMatrix[0][0] = 0.200f;
    globalSdMatrix[0][1] = 0.200f;
    globalSdMatrix[0][2] = 0.200f;
    globalSdMatrix[0][3] = 0.134f;
    globalSdMatrix[1][0] = 0.165f;
    globalSdMatrix[1][1] = 0.096f;
    globalSdMatrix[1][2] = 0.200f;
    globalSdMatrix[1][3] = 0.164f;
    globalSdMatrix[2][0] = 0.200f;
    globalSdMatrix[2][1] = 0.200f;
    globalSdMatrix[2][2] = 0.220f;
    globalSdMatrix[2][3] = 0.176f;
    globalSdMatrix[3][0] = 0.138f;
    globalSdMatrix[3][1] = 0.183f;
    globalSdMatrix[3][2] = 0.153f;
    globalSdMatrix[3][3] = 0.154f;
    //Limit Calculation
    limite = (globalMeanMatrix[agePos][heightPos]-(globalSdMatrix[agePos][heightPos]));
    return limite;
}
-(float)limiteVestibular:(int)ageGroup :(int)heightGroup{
    float limite = 0.0f;
    int agePos = ageGroup-1;
    int heightPos = heightGroup-1;
    //Limit Calculation
    //Matrix definition from statistical clinical trial
    float vestibularMeanMatrix[4][4];
    vestibularMeanMatrix[0][0] = 1.000f;
    vestibularMeanMatrix[0][1] = 0.720f;
    vestibularMeanMatrix[0][2] = 1.000f;
    vestibularMeanMatrix[0][3] = 1.000f;
    vestibularMeanMatrix[1][0] = 1.000f;
    vestibularMeanMatrix[1][1] = 0.720f;
    vestibularMeanMatrix[1][2] = 1.000f;
    vestibularMeanMatrix[1][3] = 1.000f;
    vestibularMeanMatrix[2][0] = 1.000f;
    vestibularMeanMatrix[2][1] = 0.720f;
    vestibularMeanMatrix[2][2] = 1.000f;
    vestibularMeanMatrix[2][3] = 1.000f;
    vestibularMeanMatrix[3][0] = 1.000f;
    vestibularMeanMatrix[3][1] = 0.720f;
    vestibularMeanMatrix[3][2] = 1.000f;
    vestibularMeanMatrix[3][3] = 1.000f;
    float vestibularSdMatrix[4][4];
    vestibularSdMatrix[0][0] = 0.300f;
    vestibularSdMatrix[0][1] = 0.300f;
    vestibularSdMatrix[0][2] = 0.300f;
    vestibularSdMatrix[0][3] = 0.300f;
    vestibularSdMatrix[1][0] = 0.300f;
    vestibularSdMatrix[1][1] = 0.300f;
    vestibularSdMatrix[1][2] = 0.300f;
    vestibularSdMatrix[1][3] = 0.300f;
    vestibularSdMatrix[2][0] = 0.300f;
    vestibularSdMatrix[2][1] = 0.300f;
    vestibularSdMatrix[2][2] = 0.300f;
    vestibularSdMatrix[2][3] = 0.300f;
    vestibularSdMatrix[3][0] = 0.300f;
    vestibularSdMatrix[3][1] = 0.300f;
    vestibularSdMatrix[3][2] = 0.300f;
    vestibularSdMatrix[3][3] = 0.300f;
    //Limit Calculation
    limite = (vestibularMeanMatrix[agePos][heightPos]-2*(vestibularSdMatrix[agePos][heightPos]));
    return limite;
}
-(float)limiteVisual:(int)ageGroup :(int)heightGroup{
    float limite = 0.0f;
    int agePos = ageGroup-1;
    int heightPos = heightGroup-1;
    //Limit Calculation
    //Matrix definition from statistical clinical trial
    float visualMeanMatrix[4][4];
    visualMeanMatrix[0][0] = 0.950f;
    visualMeanMatrix[0][1] = 0.750f;
    visualMeanMatrix[0][2] = 0.950f;
    visualMeanMatrix[0][3] = 1.010f;
    visualMeanMatrix[1][0] = 0.950f;
    visualMeanMatrix[1][1] = 0.750f;
    visualMeanMatrix[1][2] = 0.950f;
    visualMeanMatrix[1][3] = 1.010f;
    visualMeanMatrix[2][0] = 0.950f;
    visualMeanMatrix[2][1] = 0.750f;
    visualMeanMatrix[2][2] = 0.950f;
    visualMeanMatrix[2][3] = 1.010f;
    visualMeanMatrix[3][0] = 0.950f;
    visualMeanMatrix[3][1] = 0.750f;
    visualMeanMatrix[3][2] = 0.950f;
    visualMeanMatrix[3][3] = 1.010f;
    float visualSdMatrix[4][4];
    visualSdMatrix[0][0] = 0.300f;
    visualSdMatrix[0][1] = 0.300f;
    visualSdMatrix[0][2] = 0.300f;
    visualSdMatrix[0][3] = 0.300f;
    visualSdMatrix[1][0] = 0.300f;
    visualSdMatrix[1][1] = 0.300f;
    visualSdMatrix[1][2] = 0.300f;
    visualSdMatrix[1][3] = 0.300f;
    visualSdMatrix[2][0] = 0.300f;
    visualSdMatrix[2][1] = 0.300f;
    visualSdMatrix[2][2] = 0.300f;
    visualSdMatrix[2][3] = 0.300f;
    visualSdMatrix[3][0] = 0.300f;
    visualSdMatrix[3][1] = 0.300f;
    visualSdMatrix[3][2] = 0.300f;
    visualSdMatrix[3][3] = 0.300f;
    //Limit Calculation
    limite = (visualMeanMatrix[agePos][heightPos]-2*(visualSdMatrix[agePos][heightPos]));
    return limite;
}
-(float)limiteSomatosensorial:(int)ageGroup :(int)heightGroup{
    float limite = 0.0f;
    int agePos = ageGroup-1;
    int heightPos = heightGroup-1;
    //Limit Calculation
    //Matrix definition from statistical clinical trial
    float somatosensorialMeanMatrix[4][4];
    somatosensorialMeanMatrix[0][0] = 1.009f;
    somatosensorialMeanMatrix[0][1] = 1.009f;
    somatosensorialMeanMatrix[0][2] = 1.009f;
    somatosensorialMeanMatrix[0][3] = 1.009f;
    somatosensorialMeanMatrix[1][0] = 1.009f;
    somatosensorialMeanMatrix[1][1] = 1.009f;
    somatosensorialMeanMatrix[1][2] = 1.009f;
    somatosensorialMeanMatrix[1][3] = 1.009f;
    somatosensorialMeanMatrix[2][0] = 1.009f;
    somatosensorialMeanMatrix[2][1] = 1.009f;
    somatosensorialMeanMatrix[2][2] = 1.009f;
    somatosensorialMeanMatrix[2][3] = 1.009f;
    somatosensorialMeanMatrix[3][0] = 1.009f;
    somatosensorialMeanMatrix[3][1] = 1.009f;
    somatosensorialMeanMatrix[3][2] = 1.009f;
    somatosensorialMeanMatrix[3][3] = 1.009f;

    float somatosensorialSdMatrix[4][4];
    //adjusted if > 0.2 = 0.2 and if < 0.05 = 0.05
    somatosensorialSdMatrix[0][0] = 0.300f;
    somatosensorialSdMatrix[0][1] = 0.300f;
    somatosensorialSdMatrix[0][2] = 0.300f;
    somatosensorialSdMatrix[0][3] = 0.300f;
    somatosensorialSdMatrix[1][0] = 0.300f;
    somatosensorialSdMatrix[1][1] = 0.300f;
    somatosensorialSdMatrix[1][2] = 0.300f;
    somatosensorialSdMatrix[1][3] = 0.300f;
    somatosensorialSdMatrix[2][0] = 0.300f;
    somatosensorialSdMatrix[2][1] = 0.300f;
    somatosensorialSdMatrix[2][2] = 0.300f;
    somatosensorialSdMatrix[2][3] = 0.300f;
    somatosensorialSdMatrix[3][0] = 0.300f;
    somatosensorialSdMatrix[3][1] = 0.300f;
    somatosensorialSdMatrix[3][2] = 0.300f;
    somatosensorialSdMatrix[3][3] = 0.300f;
    //Limit Calculation
    limite = (somatosensorialMeanMatrix[agePos][heightPos]-2*(somatosensorialSdMatrix[agePos][heightPos]));
    return limite;
}

-(void)analiza:(NSNotification*)notificacion{
    NSString *isReal = [notificacion.userInfo objectForKey:@"isReal"];
    if ([isReal  isEqual: @"true"]){
        // se ejecuta si viene de posturografía
        isRealPostur = true;
        [self.externalData setHidden:true];
        //Metodo para cargar los datos en esta clase
        datos = (NSMutableArray *)notificacion.object;
        datosCondicion1 = [NSMutableArray array];
        datosCondicion2 = [NSMutableArray array];
        datosCondicion3 = [NSMutableArray array];
        datosCondicion4 = [NSMutableArray array];

        NSMutableArray *DatosX = [NSMutableArray array];
        NSMutableArray *DatosY = [NSMutableArray array];
        NSMutableArray *Modo = [NSMutableArray array];
        float Prueba;

        for (int i = 0;i < [datos count];i++){
            [DatosX addObject:datos[i][3]];
            [DatosY addObject:datos[i][4]];
            [Modo addObject:datos[i][0]];
        }

        for (int i = 0;i < [datos count];i++){

            Prueba = [[Modo objectAtIndex:i] floatValue];
            if(Prueba == 3.1f){
                float valorX = [[DatosX objectAtIndex:i] doubleValue];
                float valorY = [[DatosY objectAtIndex:i] doubleValue];
                [datosCondicion1 addObject:[NSValue valueWithPoint:NSMakePoint(valorX, valorY)]];
            }
            if(Prueba == 3.2f){
                float valorX = [[DatosX objectAtIndex:i] doubleValue];
                float valorY = [[DatosY objectAtIndex:i] doubleValue];
                [datosCondicion2 addObject:[NSValue valueWithPoint:NSMakePoint(valorX, valorY)]];
            }
            if(Prueba == 3.3f){
                float valorX = [[DatosX objectAtIndex:i] doubleValue];
                float valorY = [[DatosY objectAtIndex:i] doubleValue];
                [datosCondicion3 addObject:[NSValue valueWithPoint:NSMakePoint(valorX, valorY)]];
            }
            if(Prueba == 3.4f){
                float valorX = [[DatosX objectAtIndex:i] doubleValue];
                float valorY = [[DatosY objectAtIndex:i] doubleValue];
                [datosCondicion4 addObject:[NSValue valueWithPoint:NSMakePoint(valorX, valorY)]];
            }
        }

        A1 = 0.0f;
        A2 = 0.0f;
        A3 = 0.0f;
        A4 = 0.0f;

        if ([datosCondicion1 count]){
            [self AreaUno];
        }
        if ([datosCondicion2 count]){
            [self AreaDos];
        }
        if ([datosCondicion3 count]){
            [self AreaTres];
        }
        if ([datosCondicion4 count]){
            [self AreaCuatro];
        }
    }
    else {
        isRealPostur = false;
        [self.externalData setHidden:false];
        NSArray *importedAreas = (NSArray *)notificacion.object;
        A1 = [[importedAreas objectAtIndex:0]floatValue];
        A2 = [[importedAreas objectAtIndex:1]floatValue];
        A3 = [[importedAreas objectAtIndex:2]floatValue];
        A4 = [[importedAreas objectAtIndex:3]floatValue];
    }

    if(A1+A2+A3+A4>0){
        NSLog(@"Areas: %0.2f %0.2f %0.2f %0.2f", A1, A2, A3, A4);
    }
    else{
        NSLog(@"NO AREAS");
    }
}

//AREAS CALCULATION THE SAME AS THIRD VIEW CONTROLLER

-(void) AreaUno{

    NSMutableArray *DatosX = [NSMutableArray array];
    NSMutableArray *DatosY = [NSMutableArray array];

    for (int i = 0;i < [datosCondicion1 count];i++){
        NSValue *nx = [datosCondicion1 objectAtIndex:i];
        NSPoint cord = nx.pointValue;
        double x = cord.x;
        double y = cord.y;
        [DatosX addObject:[NSNumber numberWithDouble:x]];
        [DatosY addObject:[NSNumber numberWithDouble:y]];
    }

    double meanx = [[DatosX valueForKeyPath:@"@avg.self"]doubleValue];
    double meany = [[DatosY valueForKeyPath:@"@avg.self"]doubleValue];

    NSMutableArray *nfx = [NSMutableArray array];
    NSMutableArray *nfy = [NSMutableArray array];
    NSMutableArray *xy  = [NSMutableArray array];
    double sumaxy = 0.0f;

    //Obtener las normalizaciones
    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [nfx addObject:[NSNumber numberWithDouble:nx]];
        [nfy addObject:[NSNumber numberWithDouble:ny]];
    }

    //nuevo array con los elemntos de x e y multiplicados
    for (int i = 0;i<[nfx count];i++){
        double mxy = [[nfx objectAtIndex:i]doubleValue]*[[nfy objectAtIndex:i]doubleValue];
        [xy addObject:[NSNumber numberWithDouble:mxy]];
    }

    //suma de los elementos del array nuevo
    for (int i = 0;i<[xy count];i++){
        sumaxy = sumaxy + [[xy objectAtIndex:i] doubleValue];
    }

    //COVARIANZA
    float covxy = (sumaxy)/([nfx  count]-1);

    //Varianza de X y Varianza de Y

    NSMutableArray *varx = [NSMutableArray array];
    NSMutableArray *vary = [NSMutableArray array];

    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [varx addObject:[NSNumber numberWithDouble:(nx*nx)]];
        [vary addObject:[NSNumber numberWithDouble:(ny*ny)]];
    }

    double sumny = 0.0f;
    double sumnx = 0.0f;

    for (int i = 0;i<[varx count];i++){
        sumnx = sumnx + [[varx objectAtIndex:i] doubleValue];
        sumny = sumny + [[vary objectAtIndex:i] doubleValue];
    }

    double varX = sumnx/([varx count]-1);
    double varY = sumny/([vary count]-1);

    ///LA MATRIX DE COVARIANZA ES [(varX),(covxy):(covyx),(vary)]---[(1.1),(1.2):(2.1),(2.2)]
    //Ahora calculamos los valores propios o "eigenvaluen"

    double L1 = (((varX+varY)+(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);
    double L2 = (((varX+varY)-(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);

    //AND THE AREA !!! assuming a confidence of 0.9

    double chi = 0.2107f;//(inverse of the chi-square cumulative distribution function with 2 degrees of freedom at P . GET IN MATLAB = chi2inv((1-0.9),2))

    double area = M_PI*chi*(sqrt(L1)*sqrt(L2));

    A1 = area;
}
-(void) AreaDos{

    NSMutableArray *DatosX = [NSMutableArray array];
    NSMutableArray *DatosY = [NSMutableArray array];

    for (int i = 0;i < [datosCondicion2 count];i++){
        NSValue *nx = [datosCondicion2 objectAtIndex:i];
        NSPoint cord = nx.pointValue;
        double x = cord.x;
        double y = cord.y;
        [DatosX addObject:[NSNumber numberWithDouble:x]];
        [DatosY addObject:[NSNumber numberWithDouble:y]];
    }

    double meanx = [[DatosX valueForKeyPath:@"@avg.self"]doubleValue];
    double meany = [[DatosY valueForKeyPath:@"@avg.self"]doubleValue];

    NSMutableArray *nfx = [NSMutableArray array];
    NSMutableArray *nfy = [NSMutableArray array];
    NSMutableArray *xy  = [NSMutableArray array];
    double sumaxy = 0.0f;

    //Obtener las normalizaciones
    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [nfx addObject:[NSNumber numberWithDouble:nx]];
        [nfy addObject:[NSNumber numberWithDouble:ny]];
    }

    //nuevo array con los elemntos de x e y multiplicados
    for (int i = 0;i<[nfx count];i++){
        double mxy = [[nfx objectAtIndex:i]doubleValue]*[[nfy objectAtIndex:i]doubleValue];
        [xy addObject:[NSNumber numberWithDouble:mxy]];
    }

    //suma de los elementos del array nuevo
    for (int i = 0;i<[xy count];i++){
        sumaxy = sumaxy + [[xy objectAtIndex:i] doubleValue];
    }

    //COVARIANZA
    float covxy = (sumaxy)/([nfx  count]-1);

    //Varianza de X y Varianza de Y

    NSMutableArray *varx = [NSMutableArray array];
    NSMutableArray *vary = [NSMutableArray array];

    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [varx addObject:[NSNumber numberWithDouble:(nx*nx)]];
        [vary addObject:[NSNumber numberWithDouble:(ny*ny)]];
    }

    double sumny = 0.0f;
    double sumnx = 0.0f;

    for (int i = 0;i<[varx count];i++){
        sumnx = sumnx + [[varx objectAtIndex:i] doubleValue];
        sumny = sumny + [[vary objectAtIndex:i] doubleValue];
    }

    double varX = sumnx/([varx count]-1);
    double varY = sumny/([vary count]-1);

    ///LA MATRIX DE COVARIANZA ES [(varX),(covxy):(covyx),(vary)]---[(1.1),(1.2):(2.1),(2.2)]
    //Ahora calculamos los valores propios o "eigenvaluen"

    double L1 = (((varX+varY)+(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);
    double L2 = (((varX+varY)-(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);

    //AND THE AREA !!! assuming a confidence of 0.9

    double chi = 0.2107f;//(inverse of the chi-square cumulative distribution function with 2 degrees of freedom at P . GET IN MATLAB = chi2inv((1-0.9),2))

    double area = M_PI*chi*(sqrt(L1)*sqrt(L2));

    A2 = area;
}
-(void) AreaTres{

    NSMutableArray *DatosX = [NSMutableArray array];
    NSMutableArray *DatosY = [NSMutableArray array];

    for (int i = 0;i < [datosCondicion3 count];i++){
        NSValue *nx = [datosCondicion3 objectAtIndex:i];
        NSPoint cord = nx.pointValue;
        double x = cord.x;
        double y = cord.y;
        [DatosX addObject:[NSNumber numberWithDouble:x]];
        [DatosY addObject:[NSNumber numberWithDouble:y]];
    }

    double meanx = [[DatosX valueForKeyPath:@"@avg.self"]doubleValue];
    double meany = [[DatosY valueForKeyPath:@"@avg.self"]doubleValue];

    NSMutableArray *nfx = [NSMutableArray array];
    NSMutableArray *nfy = [NSMutableArray array];
    NSMutableArray *xy  = [NSMutableArray array];
    double sumaxy = 0.0f;

    //Obtener las normalizaciones
    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [nfx addObject:[NSNumber numberWithDouble:nx]];
        [nfy addObject:[NSNumber numberWithDouble:ny]];
    }

    //nuevo array con los elemntos de x e y multiplicados
    for (int i = 0;i<[nfx count];i++){
        double mxy = [[nfx objectAtIndex:i]doubleValue]*[[nfy objectAtIndex:i]doubleValue];
        [xy addObject:[NSNumber numberWithDouble:mxy]];
    }

    //suma de los elementos del array nuevo
    for (int i = 0;i<[xy count];i++){
        sumaxy = sumaxy + [[xy objectAtIndex:i] doubleValue];
    }

    //COVARIANZA
    float covxy = (sumaxy)/([nfx  count]-1);

    //Varianza de X y Varianza de Y

    NSMutableArray *varx = [NSMutableArray array];
    NSMutableArray *vary = [NSMutableArray array];

    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [varx addObject:[NSNumber numberWithDouble:(nx*nx)]];
        [vary addObject:[NSNumber numberWithDouble:(ny*ny)]];
    }

    double sumny = 0.0f;
    double sumnx = 0.0f;

    for (int i = 0;i<[varx count];i++){
        sumnx = sumnx + [[varx objectAtIndex:i] doubleValue];
        sumny = sumny + [[vary objectAtIndex:i] doubleValue];
    }

    double varX = sumnx/([varx count]-1);
    double varY = sumny/([vary count]-1);

    ///LA MATRIX DE COVARIANZA ES [(varX),(covxy):(covyx),(vary)]---[(1.1),(1.2):(2.1),(2.2)]
    //Ahora calculamos los valores propios o "eigenvaluen"

    double L1 = (((varX+varY)+(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);
    double L2 = (((varX+varY)-(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);

    //AND THE AREA !!! assuming a confidence of 0.9

    double chi = 0.2107f;//(inverse of the chi-square cumulative distribution function with 2 degrees of freedom at P . GET IN MATLAB = chi2inv((1-0.9),2))

    double area = M_PI*chi*(sqrt(L1)*sqrt(L2));

    A3 = area;
}

-(void) AreaCuatro{

    NSMutableArray *DatosX = [NSMutableArray array];
    NSMutableArray *DatosY = [NSMutableArray array];

    for (int i = 0;i < [datosCondicion4 count];i++){
        NSValue *nx = [datosCondicion4 objectAtIndex:i];
        NSPoint cord = nx.pointValue;
        double x = cord.x;
        double y = cord.y;
        [DatosX addObject:[NSNumber numberWithDouble:x]];
        [DatosY addObject:[NSNumber numberWithDouble:y]];
    }

    double meanx = [[DatosX valueForKeyPath:@"@avg.self"]doubleValue];
    double meany = [[DatosY valueForKeyPath:@"@avg.self"]doubleValue];

    NSMutableArray *nfx = [NSMutableArray array];
    NSMutableArray *nfy = [NSMutableArray array];
    NSMutableArray *xy  = [NSMutableArray array];
    double sumaxy = 0.0f;

    //Obtener las normalizaciones
    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [nfx addObject:[NSNumber numberWithDouble:nx]];
        [nfy addObject:[NSNumber numberWithDouble:ny]];
    }

    //nuevo array con los elemntos de x e y multiplicados
    for (int i = 0;i<[nfx count];i++){
        double mxy = [[nfx objectAtIndex:i]doubleValue]*[[nfy objectAtIndex:i]doubleValue];
        [xy addObject:[NSNumber numberWithDouble:mxy]];
    }

    //suma de los elementos del array nuevo
    for (int i = 0;i<[xy count];i++){
        sumaxy = sumaxy + [[xy objectAtIndex:i] doubleValue];
    }

    //COVARIANZA
    float covxy = (sumaxy)/([nfx  count]-1);

    //Varianza de X y Varianza de Y

    NSMutableArray *varx = [NSMutableArray array];
    NSMutableArray *vary = [NSMutableArray array];

    for (int i = 0;i<[DatosX count];i++){
        double nx = [[DatosX objectAtIndex:i]doubleValue] - meanx;
        double ny = [[DatosY objectAtIndex:i]doubleValue] - meany;
        [varx addObject:[NSNumber numberWithDouble:(nx*nx)]];
        [vary addObject:[NSNumber numberWithDouble:(ny*ny)]];
    }

    double sumny = 0.0f;
    double sumnx = 0.0f;

    for (int i = 0;i<[varx count];i++){
        sumnx = sumnx + [[varx objectAtIndex:i] doubleValue];
        sumny = sumny + [[vary objectAtIndex:i] doubleValue];
    }

    double varX = sumnx/([varx count]-1);
    double varY = sumny/([vary count]-1);

    ///LA MATRIX DE COVARIANZA ES [(varX),(covxy):(covyx),(vary)]---[(1.1),(1.2):(2.1),(2.2)]
    //Ahora calculamos los valores propios o "eigenvaluen"

    double L1 = (((varX+varY)+(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);
    double L2 = (((varX+varY)-(sqrt((4*(covxy*covxy))+(pow(varX-varY,2)))))/2);

    //AND THE AREA !!! assuming a confidence of 0.9

    double chi = 0.2107f;//(inverse of the chi-square cumulative distribution function with 2 degrees of freedom at P . GET IN MATLAB = chi2inv((1-0.9),2))

    double area = M_PI*chi*(sqrt(L1)*sqrt(L2));

    A4 = area;
}

@end


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\FixturesBundle\Loader;

use Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface;
use Sylius\Bundle\FixturesBundle\Suite\SuiteInterface;

/**
 * @author Kamil Kokot <kamil@kokot.me>
 */
final class SuiteLoader implements SuiteLoaderInterface
{
    /**
     * @var FixtureLoaderInterface
     */
    private $fixtureLoader;

    /**
     * @param FixtureLoaderInterface $fixtureLoader
     */
    public function __construct(FixtureLoaderInterface $fixtureLoader)
    {
        $this->fixtureLoader = $fixtureLoader;
    }

    /**
     * {@inheritdoc}
     */
    public function load(SuiteInterface $suite): void
    {
        /**
         * @var FixtureInterface $fixture
         * @var array $fixtureOptions
         */
        foreach ($suite->getFixtures() as $fixture => $fixtureOptions) {
            $this->fixtureLoader->load($suite, $fixture, $fixtureOptions);
        }
    }
}

redpajama_set_name: RedPajamaGithub


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

<ui-command xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>416c9fe1-d3cf-4b9f-95f1-6d29d139d780</uuid>
    <file-application>eFapsApp-HumanResource</file-application>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <application-dependencies>
            <application name="eFapsApp-Archives" />
        </application-dependencies>
        <name>HumanResource_EmployeeTree_File</name>
        <target>
            <menu>HumanResource_EmployeeTree_File_Menu</menu>

Archives_ArchiveTable

            <evaluate program="org.efaps.esjp.archives.ArchiveStructurBrowser">
                <property name="Type">Archives_ArchiveRoot</property>
                <property name="Type2Structure">HumanResource_Employee2ArchiveAbstract</property>
                <property name="checkStructure">true</property>
                <property name="Child_Type">Archives_ArchiveNode</property>
                <property name="Child_LinkFrom">ParentLink</property>
            </evaluate>
        </target>
        <property name="Target">content</property>
        <property name="TargetShowCheckBoxes">true</property>
        <property name="TargetStructurBrowserField">name</property>
    </definition>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <application-dependencies>
            <application name="eFapsApp-Archives" exclude="true" />
        </application-dependencies>
        <name>HumanResource_EmployeeTree_File</name>
        <target>
            <trigger program="org.efaps.esjp.admin.access.AccessCheck4UI"
                method="check4Application"
                name="HumanResource_EmployeeTree_File.UI_ACCESSCHECK"
                event="UI_ACCESSCHECK">
                <property name="Application">eFapsApp-Archives</property>
            </trigger>
        </target>
   </definition>
</ui-command>


text:
import mongoose from 'mongoose';
import {createSeedModel} from 'mongoose-plugin-seed';
import seed from './thing.seed';
const Schema = mongoose.Schema;

const ThingSchema = new Schema({
  name: {
    required: true,
    type: String
  },
  info: {
    required: true,
    type: String
  }
});

export default createSeedModel('Thing', ThingSchema, seed);


text:
.PHONY: dev notebook build

help:
	@echo 'Makefile for DeepOSM'
	@echo ''
	@echo 'make dev             build and run /bin/bash'
	@echo 'make notebook        build and run jupyter notebook server'

IMAGE_NAME = deeposm

build:
	docker build -t $(IMAGE_NAME) .

dev: build
	docker run -v `pwd`:/DeepOSM \
               -w /DeepOSM \
               -e CPLUS_INCLUDE_PATH=/usr/include/gdal \
               -e C_INCLUDE_PATH=/usr/include/gdal \
               -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) \
               -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) \
               -it $(IMAGE_NAME) /bin/bash

dev-gpu:
	docker build -f Dockerfile.devel-gpu -t $(IMAGE_NAME) .
	sh ./docker_run_gpu.sh

notebook: build
	docker run -p 8888:8888 \
               -e AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) \
               -e AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) \
               -v `pwd`:/DeepOSM \
               -it $(IMAGE_NAME) /run_jupyter.sh


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class SymmetricCipher
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class SymmetricCipher
   ">
    <meta name="generator" content="docfx 2.28.2.0">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Class SymmetricCipher

Defines a class that simplifies the use of symmetric cryptographic service providers.

Inheritance

System.Object

SymmetricCipher

Inherited Members

      System.Object.Equals(System.Object)

      System.Object.Equals(System.Object, System.Object)

      System.Object.GetHashCode()

      System.Object.GetType()

      System.Object.MemberwiseClone()

      System.Object.ReferenceEquals(System.Object, System.Object)

      System.Object.ToString()

Namespace: Juhta.Net.Common

Assembly: Juhta.Net.dll

Syntax

public class SymmetricCipher

Constructors

    |
    Improve this Doc

    View Source

SymmetricCipher()

Initializes a new instance.

Declaration

public SymmetricCipher()

Remarks

Instances created with this constructor use the System.Security.Cryptography.TripleDES algorithm.

    |
    Improve this Doc

    View Source

SymmetricCipher(SymmetricAlgorithm)

Initializes a new instance.

Declaration

public SymmetricCipher(SymmetricAlgorithm symmetricAlgorithm)

Parameters

        Type
        Name
        Description

        System.Security.Cryptography.SymmetricAlgorithm
        symmetricAlgorithm

Specifies a System.Security.Cryptography.SymmetricAlgorithm object.

Methods

    |
    Improve this Doc

    View Source

DecryptData(String, Byte[])

Decrypts a specified array of bytes containing encrypted data.

Declaration

public byte[] DecryptData(string cipherKey, byte[] encryptedData)

Parameters

        Type
        Name
        Description

        System.String
        cipherKey

Specifies a cipher key.

        System.Byte[]
        encryptedData

Specifies an array of bytes containing encrypted data.

Returns

        Type
        Description

        System.Byte[]

Returns an array of bytes containing the plain data.

    |
    Improve this Doc

    View Source

EncryptData(String, Byte[])

Encrypts a specified array of bytes containing plain data.

Declaration

public byte[] EncryptData(string cipherKey, byte[] plainData)

Parameters

        Type
        Name
        Description

        System.String
        cipherKey

Specifies a cipher key.

        System.Byte[]
        plainData

Specifies an array of bytes containing plain data.

Returns

        Type
        Description

        System.Byte[]

Returns an array of bytes containing the encrypted data.

                    Improve this Doc

                    View Source

              Back to top

            Copyright © 2017-2018 Juha Lähteenmäki
Generated by DocFX


text:
**In Development**

Please run with wsgicli.

```console
$ pip install kobin wsgicli
$ wsgicli hello.py app --reload
```

**In Production**

And if you want to run in production, please run with gunicorn.

```console
$ pip install kobin gunicorn
$ gunicorn -w 1 hello:app
```


text:
<?php

namespace Google\Service\Baremetalsolution;

class BaremetalsolutionEmpty extends \Google\Model
{
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BaremetalsolutionEmpty::class, 'Google_Service_Baremetalsolution_BaremetalsolutionEmpty');


text:
package com.datawar.argdata_warfare;

import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public class SplashScreen extends AppCompatActivity {

    TextView txtyour;
    Button connect;
    EditText ip;
    Typeface font;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash_screen);

        txtyour = (TextView) findViewById(R.id.textView5);
        connect = (Button) findViewById(R.id.button5);
        ip = (EditText) findViewById(R.id.editText);
        txtyour.setTextColor(Color.GREEN);
        connect.setTextColor(Color.GREEN);
        ip.setTextColor(Color.GREEN);
        font = Typeface.createFromAsset(getAssets(), "digital.ttf");
        txtyour.setTypeface(font);
        connect.setTypeface(font);
        ip.setTypeface(font);
        ip.isFocused();

        Random r =  new Random();
        final String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/logged/";
        String helloText = "This is new order, this is new world!\nNow enjoy and hack with your fellows!";

        for(int i = 0; i < helloText.length(); i++){
            String newText = new StringBuilder(txtyour.getText()).append(helloText.charAt(i)).toString();
            txtyour.setText(newText);
            try {
                TimeUnit.MILLISECONDS.sleep(r.nextInt(30)+20);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        connect.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                    if(ip.getText().toString().contains("")){

                        Intent intent  = new Intent(SplashScreen.this,MainActivity.class);
                        startActivity(intent);
                    }
                    else{
                        Toast.makeText(getApplicationContext(), "Wrong connection command!", Toast.LENGTH_SHORT).show();
                    }

            }
        });

//
//        Thread myThread = new Thread(){
//           @Override
//            public void run(){
//               try {
//                   sleep(3000);
//                   Intent intent  = new Intent(SplashScreen.this,MainActivity.class);
//                   startActivity(intent);
//                   finish();
//               } catch (InterruptedException e) {
//                   e.printStackTrace();
//               }
//           }
//        };
//        myThread.start();
    }

}


text:
FROM b.gcr.io/tensorflow/tensorflow-full
MAINTAINER Brody Huval <brodyh@stanford.edu>

#### From nvidia-docker/ubuntu-14.04/cuda/7.0/Dockerfile ####
RUN apt-get update && apt-get install -y wget

RUN wget -q -O - http://developer.download.nvidia.com/compute/cuda/repos/GPGKEY | apt-key add - && \
    echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
    apt-get update

ENV CUDA_VERSION 7.0
LABEL com.nvidia.cuda.version="7.0"

RUN apt-get install -y --no-install-recommends --force-yes "cuda-toolkit-7.0"

RUN echo "/usr/local/cuda/lib" >> /etc/ld.so.conf.d/cuda.conf && \
    echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/cuda.conf && \
    ldconfig

RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
    echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf

ENV PATH /usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

#### Install cudnn v2 ####
COPY cudnn/cudnn-6.5-linux-x64-v2/libcudnn.so /usr/local/cuda/lib64/libcudnn.so
COPY cudnn/cudnn-6.5-linux-x64-v2/libcudnn.so.6.5 /usr/local/cuda/lib64/libcudnn.so.6.5
COPY cudnn/cudnn-6.5-linux-x64-v2/libcudnn.so.6.5.48 /usr/local/cuda/lib64/libcudnn.so.6.5.48
COPY cudnn/cudnn-6.5-linux-x64-v2/cudnn.h /usr/local/cuda/include/cudnn.h

#### uninstall base tensorflow and reinstall it with cuda ####
COPY configure-cuda /tensorflow/configure-cuda
RUN pip uninstall -y tensorflow \
    && cd /tensorflow \
    && ./configure-cuda \
    && bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package \
    && bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg \
    && pip install /tmp/tensorflow_pkg/tensorflow-0.5.0-cp27-none-linux_x86_64.whl


text:
//! [0]
#include <QApplication>
#include <QCommandLineParser>
#include <QCommandLineOption>

#include "mainwindow.h"

int main(int argc, char *argv[])
{
    Q_INIT_RESOURCE(application);

    QApplication app(argc, argv);
    QCoreApplication::setOrganizationName("QtProject");
    QCoreApplication::setApplicationName("Application Example");
    QCoreApplication::setApplicationVersion(QT_VERSION_STR);
    QCommandLineParser parser;
    parser.setApplicationDescription(QCoreApplication::applicationName());
    parser.addHelpOption();
    parser.addVersionOption();
    parser.addPositionalArgument("file", "The file to open.");
    parser.process(app);

    MainWindow mainWin;
    if (!parser.positionalArguments().isEmpty())
        mainWin.loadFile(parser.positionalArguments().first());
    mainWin.showFullScreen();
    return app.exec();
}
//! [0]


text:
<?php

class Services_Twilio_Rest_Token extends Services_Twilio_InstanceResource {

}


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Deprecated List (Commons Lang 3.1 API)
</TITLE>

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

      Overview
      Package
      Class
      Use
      Tree
    Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Deprecated API

Contents

Deprecated Methods

Deprecated Methods

org.apache.commons.lang3.StringUtils.chomp(String, String)

          This feature will be removed in Lang 4.0, use StringUtils.removeEnd(String, String) instead

org.apache.commons.lang3.exception.ExceptionUtils.getCause(Throwable)

          This feature will be removed in Lang 4.0

org.apache.commons.lang3.exception.ExceptionUtils.getCause(Throwable, String[])

          This feature will be removed in Lang 4.0

org.apache.commons.lang3.exception.ExceptionUtils.getDefaultCauseMethodNames()

          This feature will be removed in Lang 4.0

org.apache.commons.lang3.CharUtils.toCharacterObject(char)

          Java 5 introduced Character.valueOf(char) which caches chars 0 through 127.

      Overview
      Package
      Class
      Use
      Tree
    Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.


text:
package be.rufer.swissunihockey.client.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR,
        reason = "Could not convert calendar domain returned from swiss unihockey API v2 to calendar")
public class CalendarConversionException extends RuntimeException {

}


text:
from .._compat import basestring
from ..adapters.teradata import Teradata
from .base import SQLDialect
from . import dialects, sqltype_for

@dialects.register_for(Teradata)
class TeradataDialect(SQLDialect):
    @sqltype_for('integer')
    def type_integer(self):
        return 'INT'

    @sqltype_for('text')
    def type_text(self):
        return 'VARCHAR(2000)'

    @sqltype_for('json')
    def type_json(self):
        return 'VARCHAR(4000)'

    @sqltype_for('float')
    def type_float(self):
        return 'REAL'

    @sqltype_for('list:integer')
    def type_list_integer(self):
        return self.types['json']

    @sqltype_for('list:string')
    def type_list_string(self):
        return self.types['json']

    @sqltype_for('list:reference')
    def type_list_reference(self):
        return self.types['json']

    @sqltype_for('bigint')
    def type_bigint(self):
        return 'BIGINT'

    @sqltype_for('id')
    def type_id(self):
        return 'INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL'

    @sqltype_for('big-id')
    def type_big_id(self):
        return 'BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL'

    @sqltype_for('reference')
    def type_reference(self):
        return 'INT'

    @sqltype_for('big-reference')
    def type_big_reference(self):
        return 'BIGINT'

    @sqltype_for('geometry')
    def type_geometry(self):
        return 'ST_GEOMETRY'

    @sqltype_for('reference FK')
    def type_reference_fk(self):
        return ' REFERENCES %(foreign_key)s '

    @sqltype_for('reference TFK')
    def type_reference_tfk(self):
        return ' FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s' + \
            ' (%(foreign_key)s)'

    def left_join(self, val, query_env={}):
        # Left join must always have an ON clause
        if not isinstance(val, basestring):
            val = self.expand(val, query_env=query_env)
        return 'LEFT OUTER JOIN %s' % val

    def select(self, fields, tables, where=None, groupby=None, having=None,
               orderby=None, limitby=None, distinct=False, for_update=False):
        dst, whr, grp, order, limit, offset, upd = '', '', '', '', '', '', ''
        if distinct is True:
            dst = ' DISTINCT'
        elif distinct:
            dst = ' DISTINCT ON (%s)' % distinct
        if where:
            whr = ' %s' % self.where(where)
        if groupby:
            grp = ' GROUP BY %s' % groupby
            if having:
                grp += ' HAVING %s' % having
        if orderby:
            order = ' ORDER BY %s' % orderby
        if limitby:
            (lmin, lmax) = limitby
            limit = ' TOP %i' % lmax
        if for_update:
            upd = ' FOR UPDATE'
        return 'SELECT%s%s %s FROM %s%s%s%s%s%s;' % (
            dst, limit, fields, tables, whr, grp, order, offset, upd)

    def truncate(self, table, mode=''):
        return ['DELETE FROM %s ALL;' % table._rname]


text:
--TEST--
Test ctype_upper() function : usage variations - different data types
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
/* Prototype  : bool ctype_upper(mixed $c)
 * Description: Checks for uppercase character(s)
 * Source code: ext/ctype/ctype.c
 */

/*
 * Pass different data types as $c argument to ctype_upper() to test behaviour
 */

echo "*** Testing ctype_upper() : usage variations ***\n";

$orig = setlocale(LC_CTYPE, "C");

//get an unset variable
$unset_var = 10;
unset ($unset_var);

// get a class
class classA
{
	public function __toString() {
		return "HELLO";
	}
}

// heredoc string
$heredoc = <<<EOT
HI
EOT;

// get a resource variable
$fp = fopen(__FILE__, "r");

// unexpected values to be passed to $c argument
$inputs = array(

       // int data
/*1*/  0,
       1,
       12345,
       -2345,

       // float data
/*5*/  10.5,
       -10.5,
       12.3456789000e10,
       12.3456789000E-10,
       .5,

       // null data
/*10*/ NULL,
       null,

       // boolean data
/*12*/ true,
       false,
       TRUE,
       FALSE,

       // empty data
/*16*/ "",
       '',
       array(),

       // string data
/*19*/ "STRING",
       'STRING',
       $heredoc,

       // object data
/*22*/ new classA(),

       // undefined data
/*23*/ @$undefined_var,

       // unset data
/*24*/ @$unset_var,

       // resource variable
/*25*/ $fp
);

// loop through each element of $inputs to check the behavior of ctype_upper()
$iterator = 1;
foreach($inputs as $input) {
	echo "\n-- Iteration $iterator --\n";
	var_dump( ctype_upper($input) );
	$iterator++;
};

fclose($fp);

setlocale(LC_CTYPE, $orig);
?>
===DONE===
--EXPECTF--
*** Testing ctype_upper() : usage variations ***

-- Iteration 1 --
bool(false)

-- Iteration 2 --
bool(false)

-- Iteration 3 --
bool(false)

-- Iteration 4 --
bool(false)

-- Iteration 5 --
bool(false)

-- Iteration 6 --
bool(false)

-- Iteration 7 --
bool(false)

-- Iteration 8 --
bool(false)

-- Iteration 9 --
bool(false)

-- Iteration 10 --
bool(false)

-- Iteration 11 --
bool(false)

-- Iteration 12 --
bool(false)

-- Iteration 13 --
bool(false)

-- Iteration 14 --
bool(false)

-- Iteration 15 --
bool(false)

-- Iteration 16 --
bool(false)

-- Iteration 17 --
bool(false)

-- Iteration 18 --
bool(false)

-- Iteration 19 --
bool(true)

-- Iteration 20 --
bool(true)

-- Iteration 21 --
bool(true)

-- Iteration 22 --
bool(false)

-- Iteration 23 --
bool(false)

-- Iteration 24 --
bool(false)

-- Iteration 25 --
bool(false)
===DONE===


text:
  Jezainville est
       un village
       localisé dans le département de Meurthe-et-Moselle en Lorraine. Elle comptait 942 habitants en 2008.

Si vous pensez demenager à Jezainville, vous pourrez aisément trouver une maison à acheter.

À Jezainville, la valeur moyenne à la vente d'un appartement s'évalue à 1 866 € du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 1 025 € du m². À la location le prix moyen se situe à 7,78 € du m² par mois.

À coté de Jezainville sont situées les communes de
Maidières à 3 km, 1 521 habitants,
Pont-à-Mousson localisée à 4 km, 13 879 habitants,
Bezaumont localisée à 5 km, 255 habitants,
Villers-en-Haye localisée à 5 km, 167 habitants,
Dieulouard à 3 km, 4 609 habitants,
Griscourt à 4 km, 119 habitants,
 entre autres. De plus, Jezainville est située à seulement 28 km de Metz.

Le parc de logements, à Jezainville, se décomposait en 2011 en 45 appartements et 342 maisons soit
 un marché relativement équilibré.

La ville offre de multiples  équipements sportifs, elle dispose, entre autres, de un terrain de tennis, un centre d'équitation, un terrain de sport et une boucle de randonnée.


text:
package com.android.ex.photo;

import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

/**
 * View pager for photo view fragments. Define our own class so we can specify the
 * view pager in XML.
 */
public class PhotoViewPager extends ViewPager {
    /**
     * A type of intercept that should be performed
     */
    public static enum InterceptType { NONE, LEFT, RIGHT, BOTH }

    /**
     * Provides an ability to intercept touch events.
     *

     * {@link ViewPager} intercepts all touch events and we need to be able to override this
     * behavior. Instead, we could perform a similar function by declaring a custom
     * {@link android.view.ViewGroup} to contain the pager and intercept touch events at a higher
     * level.
     */
    public static interface OnInterceptTouchListener {
        /**
         * Called when a touch intercept is about to occur.
         *
         * @param origX the raw x coordinate of the initial touch
         * @param origY the raw y coordinate of the initial touch
         * @return Which type of touch, if any, should should be intercepted.
         */
        public InterceptType onTouchIntercept(float origX, float origY);
    }

    private static final int INVALID_POINTER = -1;

    private float mLastMotionX;
    private int mActivePointerId;
    /** The x coordinate where the touch originated */
    private float mActivatedX;
    /** The y coordinate where the touch originated */
    private float mActivatedY;
    private OnInterceptTouchListener mListener;

    public PhotoViewPager(Context context) {
        super(context);
        initialize();
    }

    public PhotoViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
        initialize();
    }

    private void initialize() {
        // Set the page transformer to perform the transition animation
        // for each page in the view.
        setPageTransformer(true, new PageTransformer() {
            @Override
            public void transformPage(View page, float position) {

                // The >= 1 is needed so that the page
                // (page A) that transitions behind the newly visible
                // page (page B) that comes in from the left does not
                // get the touch events because it is still on screen
                // (page A is still technically on screen despite being
                // invisible). This makes sure that when the transition
                // has completely finished, we revert it to its default
                // behavior and move it off of the screen.
                if (position < 0 || position >= 1.f) {
                    page.setTranslationX(0);
                    page.setAlpha(1.f);
                    page.setScaleX(1);
                    page.setScaleY(1);
                } else {
                    page.setTranslationX(-position * page.getWidth());
                    page.setAlpha(Math.max(0,1.f - position));
                    final float scale = Math.max(0, 1.f - position * 0.3f);
                    page.setScaleX(scale);
                    page.setScaleY(scale);
                }
            }
        });
    }

    /**
     * {@inheritDoc}
     *

     * We intercept touch event intercepts so we can prevent switching views when the
     * current view is internally scrollable.
     */
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        final InterceptType intercept = (mListener != null)
                ? mListener.onTouchIntercept(mActivatedX, mActivatedY)
                : InterceptType.NONE;
        final boolean ignoreScrollLeft =
                (intercept == InterceptType.BOTH || intercept == InterceptType.LEFT);
        final boolean ignoreScrollRight =
                (intercept == InterceptType.BOTH || intercept == InterceptType.RIGHT);

        // Only check ability to page if we can't scroll in one / both directions
        final int action = ev.getAction() & MotionEventCompat.ACTION_MASK;

        if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) {
            mActivePointerId = INVALID_POINTER;
        }

        switch (action) {
            case MotionEvent.ACTION_MOVE: {
                if (ignoreScrollLeft || ignoreScrollRight) {
                    final int activePointerId = mActivePointerId;
                    if (activePointerId == INVALID_POINTER) {
                        // If we don't have a valid id, the touch down wasn't on content.
                        break;
                    }

                    final int pointerIndex =
                            MotionEventCompat.findPointerIndex(ev, activePointerId);
                    final float x = MotionEventCompat.getX(ev, pointerIndex);

                    if (ignoreScrollLeft && ignoreScrollRight) {
                        mLastMotionX = x;
                        return false;
                    } else if (ignoreScrollLeft && (x > mLastMotionX)) {
                        mLastMotionX = x;
                        return false;
                    } else if (ignoreScrollRight && (x < mLastMotionX)) {
                        mLastMotionX = x;
                        return false;
                    }
                }
                break;
            }

            case MotionEvent.ACTION_DOWN: {
                mLastMotionX = ev.getX();
                // Use the raw x/y as the children can be located anywhere and there isn't a
                // single offset that would be meaningful
                mActivatedX = ev.getRawX();
                mActivatedY = ev.getRawY();
                mActivePointerId = MotionEventCompat.getPointerId(ev, 0);
                break;
            }

            case MotionEventCompat.ACTION_POINTER_UP: {
                final int pointerIndex = MotionEventCompat.getActionIndex(ev);
                final int pointerId = MotionEventCompat.getPointerId(ev, pointerIndex);
                if (pointerId == mActivePointerId) {
                    // Our active pointer going up; select a new active pointer
                    final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
                    mLastMotionX = MotionEventCompat.getX(ev, newPointerIndex);
                    mActivePointerId = MotionEventCompat.getPointerId(ev, newPointerIndex);
                }
                break;
            }
        }

        return super.onInterceptTouchEvent(ev);
    }

    /**
     * sets the intercept touch listener.
     */
    public void setOnInterceptTouchListener(OnInterceptTouchListener l) {
        mListener = l;
    }
}


text:
<?php

namespace Symfony\Component\Form\Extension\Core\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader;
use Symfony\Component\Intl\Locales;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

class LocaleType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'choice_loader' => function (Options $options) {
                $choiceTranslationLocale = $options['choice_translation_locale'];

                return new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale) {
                    return array_flip(Locales::getNames($choiceTranslationLocale));
                });
            },
            'choice_translation_domain' => false,
            'choice_translation_locale' => null,
        ]);

        $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']);
    }

    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return ChoiceType::class;
    }

    /**
     * {@inheritdoc}
     */
    public function getBlockPrefix()
    {
        return 'locale';
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/lightgray"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="@color/white"
        android:gravity="center_vertical"
        android:orientation="horizontal" >

        <ImageButton
            android:id="@+id/imagebtn_left"
            android:layout_width="35dp"
            android:layout_height="35dp"
            android:layout_gravity="center_vertical"
            android:layout_margin="8dp"
            android:background="@color/white"
            android:src="@drawable/left" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="45dp"
            android:layout_marginRight="10dp"
            android:layout_weight="1"
            android:background="@drawable/edit_frame"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:padding="0dp" >

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="12dp"
                android:background="@drawable/suosou" />

            <EditText
                android:id="@+id/mapsearch_edit"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="10dp"
                android:layout_weight="3"
                android:background="@null"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:hint="搜索" />
        </LinearLayout>

        <Button
            android:id="@+id/btn_search_submit"
            android:layout_width="65dp"
            android:layout_height="50dp"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:background="@drawable/u15"
            android:gravity="center"
            android:text="确定"
            android:textColor="@color/white"
            android:textSize="19sp"
            android:visibility="gone" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginTop="5dp"
        android:background="@color/gray_bg"
        android:orientation="vertical" />

	<LinearLayout
	    android:id="@+id/suggest_lin"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="0dp"
        android:background="@color/white"
        android:visibility="gone"
        android:orientation="vertical">
        <ListView
            android:id="@+id/suggest_list"
        	android:layout_width="match_parent"
        	android:layout_height="match_parent"
        	android:dividerHeight="3dp"
        	android:divider="@color/gray_bg"
        	/>
    </LinearLayout>

    <LinearLayout
        android:visibility="visible"
        android:id="@+id/lin_ID"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:gravity="center"
        android:orientation="vertical" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/serach_Id_1"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:gravity="center"
                    android:src="@drawable/u12" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="学院"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginTop="0dp"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_2"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:gravity="center"
                    android:src="@drawable/u22" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="教学楼"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginTop="0dp"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_3"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:gravity="center"
                    android:src="@drawable/u24" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="学生宿舍"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/gray_bg"
            android:orientation="vertical" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/serach_Id_4"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:src="@drawable/u26" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="学校景观"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_5"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:src="@drawable/u28" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="饮食"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginTop="0dp"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_6"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center_vertical"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:src="@drawable/u30" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="商店"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/gray_bg"
            android:orientation="vertical" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/serach_Id_7"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:src="@drawable/u35" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="生活服务"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginTop="0dp"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_8"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_gravity="center"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:src="@drawable/u38" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="教师公寓"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginTop="0dp"
                android:background="@color/gray_bg"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/serach_Id_9"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="8dp"
                    android:layout_weight="0.7"
                    android:gravity="center"
                    android:src="@drawable/u42" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_margin="2dp"
                    android:layout_weight="0.3"
                    android:gravity="center"
                    android:text="其他"
                    android:textColor="@color/black"
                    android:textSize="14sp" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/gray_bg"
            android:orientation="vertical" />
    </LinearLayout>

</LinearLayout>


text:
/****************************************************************************************/
/*                                                                                */
/*                                       Pegasus                                        */
/*                                                                                */
/****************************************************************************************/

//! \file	IMeshManagerProxy.h
//! \author	Kleber Garcia
//! \date	17th June 2014
//! \brief	Proxy object interface, used by the editor to interact with the mesh manager

#ifndef PEGASUS_IMESHMANAGERPROXY_H
#define PEGASUS_IMESHMANAGERPROXY_H

#if PEGASUS_ENABLE_PROXIES

namespace Pegasus
{
namespace Mesh
{

class IMeshEventListener;

//! Proxy interface, used by the editor to interact with the meshes
class IMeshManagerProxy
{
public:

    //! Destructor
    virtual ~IMeshManagerProxy() {}

    //! Sets the event listener to be used for the mesh manager
    //! \param event listener reference
    virtual void RegisterEventListener(IMeshEventListener * eventListener) = 0;
};

}
}

#endif //PEGASUS_ENABLE_PROXIES
#endif // PEGASUS_MESHMANAGERPROXY_H


text:
/**
 * @file
 * @author  Piotr Bartosiewicz (p.bartosiewi@partner.samsung.com)
 * @brief   Callback wrapper
 */

#ifndef COMMON_UTILS_CALLBACK_WRAPPER_HPP
#define COMMON_UTILS_CALLBACK_WRAPPER_HPP

#include "utils/callback-guard.hpp"

namespace utils {

/**
 * Wraps callback and callback tracker into single object
 */
template<class Callback>
class CallbackWrapper {
public:
    CallbackWrapper(const Callback& callback, const CallbackGuard::Tracker& tracker)
        : mCallback(callback)
        , mTracker(tracker)
    {
    }

    /**
     * @return Wrapped callback
     */
    const Callback& get() const
    {
        return mCallback;
    }
private:
    Callback mCallback;
    CallbackGuard::Tracker mTracker;
};

/**
 * Creates callback wrapper. Useful for C callback api.
 */
template<class Callback>
CallbackWrapper<Callback>* createCallbackWrapper(const Callback& callback,
                                                 const CallbackGuard::Tracker& tracker)
{
    return new CallbackWrapper<Callback>(callback, tracker);
}

/**
 * Deletes callback wrapper. Useful for C callback api.
 */
template<class Callback>
void deleteCallbackWrapper(void* pointer)
{
    delete reinterpret_cast<CallbackWrapper<Callback>*>(pointer);
}

/**
 * Recovers callback from wrapper pointer. Useful for C callback api.
 */
template<class Callback>
const Callback& getCallbackFromPointer(const void* pointer)
{
    return reinterpret_cast<const CallbackWrapper<Callback>*>(pointer)->get();
}

} // namespace utils

#endif // COMMON_UTILS_CALLBACK_WRAPPER_HPP


text:
"use strict";

const service = require(__appbase + 'services/mapService');

module.exports = {
    /*
     * for inserting pokemon data to MongoDB
     */
    insertToDb: function () {
        service.search();
    }
};


text:
package procfs

import (
	"testing"
)

func TestCountRunningProcs(t *testing.T) {
	Mountpoint = "./assets/proc"
	c, err := CountRunningProcs()
	if err != nil {
		t.Fatal(err)
	}
	if c != 4 {
		t.Fatalf("expected 2 running processes, got %d", c)
	}
}


text:
<?php

namespace KeyCDN\Adapters;

use KeyCDN\Collections\ReportsCollection;

/**
 * Class TrafficAdapter
 * @package KeyCDN
 */
class TrafficAdapter extends AdapterAbstract
{
    /**
     * @param $start
     * @param $end
     * @param $zoneId
     * @return string
     */
    public function all($start, $end, $zoneId)
    {
        $response = $this->client->get('reports/traffic.json', [
            'query' => [
                'start' => $start,
                'end' => $end,
                'zone_id' => $zoneId
            ]
        ]);

        return ReportsCollection::createFromJson($response->getBody()->getContents());
    }
}


text:
#if !defined(_HexValues_h_)
#define _HexValues_h_

#include "stdafx.h"

//! \brief Determines whether \a c is a hex digit character.
bool isHexDigit(char c);

//! \brief Converts a hexidecimal character to the integer equivalent.
uint8_t hexCharToInt(char c);

//! \brief Converts a hex-encoded byte to the integer equivalent.
uint8_t hexByteToInt(const char * encodedByte);

#endif // _HexValues_h_


text:
import { showcaseConverter } from "@times-components/storybook";
import showcase from "./video.showcase";

showcaseConverter(module, showcase);


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aurora.Utils
{
    public static class ProcessUtils
    {
        public static bool AnyProcessExists(string[] processes)
        {
            foreach(string proc in processes)
            {
                if (Process.GetProcessesByName(proc).Length > 0)
                    return true;
            }

            return false;
        }
    }
}


text:
<?php

namespace spec\PhpSpec\Listener;

use PhpSpec\Event\ExampleEvent;
use PhpSpec\Event\SpecificationEvent;
use PhpSpec\Event\SuiteEvent;
use PhpSpec\Loader\Node\SpecificationNode;
use PhpSpec\Loader\Suite;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class StatisticsCollectorSpec extends ObjectBehavior
{
    function let(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $failingExample->getResult()->willReturn(ExampleEvent::FAILED);
        $passingExample->getResult()->willReturn(ExampleEvent::PASSED);
    }

    function it_is_an_event_listener()
    {
        $this->shouldHaveType('Symfony\Component\EventDispatcher\EventSubscriberInterface');
    }

    function it_listens_to_stats_generating_events()
    {
        $subscribedEvents = $this->getSubscribedEvents();

        $subscribedEvents->shouldHaveKey('afterExample');
        $subscribedEvents->shouldHaveKey('afterSpecification');
        $subscribedEvents->shouldHaveKey('beforeSuite');
    }

    function it_knows_no_specs_have_run_initially()
    {
        $this->getTotalSpecs()->shouldReturn(0);
    }

    function it_counts_how_many_specs_have_run(SpecificationEvent $specEvent1, SpecificationEvent $specEvent2)
    {
        $this->afterSpecification($specEvent1);
        $this->afterSpecification($specEvent2);

        $this->getTotalSpecs()->shouldReturn(2);
    }

    function it_knows_no_examples_have_run_initially()
    {
        $this->getEventsCount()->shouldReturn(0);
    }

    function it_counts_how_many_examples_have_run(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $this->afterExample($passingExample);
        $this->afterExample($failingExample);

        $this->getEventsCount()->shouldReturn(2);
    }

    function it_logs_all_example_events(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $this->afterExample($passingExample);
        $this->afterExample($failingExample);

        $this->getAllEvents()->shouldReturn(array(
            $passingExample,
            $failingExample
        ));
    }

    function it_logs_all_example_events_by_type(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $this->afterExample($passingExample);
        $this->afterExample($failingExample);

        $this->getPassedEvents()->shouldReturn(array($passingExample));
    }

    function it_counts_example_results_by_type(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $this->afterExample($passingExample);
        $this->afterExample($failingExample);

        $this->getCountsHash()->shouldReturn(
            array(
                'passed'  => 1,
                'pending' => 0,
                'skipped' => 0,
                'failed'  => 1,
                'broken'  => 0,
            )
        );
    }

    function it_returns_the_worst_result_as_the_global_result(ExampleEvent $failingExample, ExampleEvent $passingExample)
    {
        $this->afterExample($passingExample);
        $this->afterExample($failingExample);

        $this->getGlobalResult()->shouldReturn(ExampleEvent::FAILED);
    }

    function it_records_how_many_specs_are_in_the_suite(SuiteEvent $suiteEvent, Suite $suite, SpecificationNode $spec)
    {
        $suiteEvent->getSuite()->willReturn($suite);
        $suite->getSpecifications()->willReturn(array($spec));

        $this->beforeSuite($suiteEvent);

        $this->getTotalSpecsCount()->shouldReturn(1);
    }
}


text:
import argparse
import csv
import datetime

from stock_analysis.logic.order_history import BUY_ORDER_TYPE
from stock_analysis.logic.order_history import Order
from stock_analysis.logic.order_history import OrderHistoryLogic
from stock_analysis.constants import USER_ID

# TODO handle symbols that are sold
blacklisted_tickers = ['UAA', 'UA', 'CASY', 'ZOES']

# Not sure why AMT is broken in the api
blacklisted_tickers.append('AMT')

class RowParserException(Exception):
    pass

class EtradeIngestor(object):

    def __init__(self):
        self.arg_parser = argparse.ArgumentParser(description='Process an etrade csv file')
        self.arg_parser.add_argument('--csv-path', help='path to csv file')
        self.order_logic = OrderHistoryLogic()
        self.user_id = USER_ID

    def run(self):
        self.args = self.arg_parser.parse_args()
        orders = self.parse_orders_from_csv(self.args.csv_path)
        self.order_logic.add_orders(orders)

    def parse_orders_from_csv(self, csv_path):
        with open(csv_path) as csv_file:
            reader = csv.reader(csv_file)
            orders = self.parse_orders_from_csv_reader(reader)
            return orders

    def parse_orders_from_csv_reader(self, reader):
        orders = []
        for row in reader:
            try:
                # Ingore lines that don't parse
                order = self.extract_order_from_row(row)
            except RowParserException:
                continue

            if order:
                orders.append(order)

        return orders

    def extract_order_from_row(self, row):
        try:
            date = datetime.datetime.strptime(row[0], "%m/%d/%y").date()
            txn_type = row[1]
            ticker = row[3]
            num_shares = int(row[4])
            share_price = float(row[6])
        except Exception:
            raise RowParserException()

        if ticker in blacklisted_tickers or txn_type != 'Bought':
            return None

        return Order(
            self.user_id,
            BUY_ORDER_TYPE,
            ticker,
            date,
            num_shares,
            share_price
        )

if __name__ == "__main__":
    EtradeIngestor().run()


text:
Exercises: Writing a Simple Parser
-----------------------------------
1. Rewrite parseNumber, without liftM, using
     * do-notation
     * explicit sequencing with the >>= operator

2. Our strings aren't quite R5RS compliant, because they don't support escaping of internal quotes within the string.
   Change parseString so that \" gives a literal quote character instead of terminating the string. You may want to
   replace noneOf "\"" with a new parser action that accepts either a non-quote character or a backslash followed by a quote mark.

3. Modify the previous exercise to support \n, \r, \t, \\, and any other desired escape characters.

4. Change parseNumber to support the Scheme standard for different bases. You may find the readOct and readHex functions useful.

5. Add a Character constructor to LispVal, and create a parser for character literals as described in R5RS.

6. Add a Float constructor to LispVal, and support R5RS syntax for decimals. The Haskell function readFloat may be useful.

7. Add data types and parsers to support the full numeric tower of Scheme numeric types. Haskell has built-in types to
   represent many of these; check the Prelude. For the others, you can define compound types that represent
   eg. a Rational as a numerator and denominator, or a Complex as a real and imaginary part (each itself a Real).
   TODO

Exercises: Recursive Parsers
----------------------------
1. Add support for the backquote syntactic sugar: The Scheme standard details what it should expand into (quasiquote/unquote).
   TODO
2. Add support for vectors. The Haskell representation is up to you: GHC does have an Array data type, but it can be difficult
   to use. Strictly speaking, a vector should have a constant-time indexing and updating, but destructive update in a purely
   functional language is difficult. You may have a better idea how to do this after the section on set!, later in this tutorial.
   TODO
3. Instead of using the try combinator, left-factor the grammar so that the common subsequence is its own parser. You should end
   up with a parser that matches a string of expressions, and one that matches either nothing or a dot and a single expression.
   Combining the return values of these into either a List or a DottedList is left as a (somewhat tricky) exercise for the reader:
   you may want to break it out into another helper function.
   TODO


text:
import {Grid} from 'react-mdl';
import React from 'react';

import './subnav.less';

export default
class Subnav extends React.Component {
  render() {
    return (
      <nav className="sub">
        <Grid>
          {this.props.children}
        </Grid>
      </nav>
    );
  }
}


text:
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {ReportingComponent} from './reporting.component';
import {TranslateModule} from '@ngx-translate/core';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {ActivatedRoute, Router} from '@angular/router';
import {ReportingService} from '../services/reporting/reporting.service';
import {Observable} from 'rxjs/Observable';
import {By} from '@angular/platform-browser';
import {FimsSharedModule} from '../common/common.module';
import {RouterLinkStubDirective, RouterOutletStubComponent} from '../common/testing/router-stubs';
import {MatListModule, MatToolbarModule} from '@angular/material';

describe('Test reporting component', () => {

  const activatedRoute: ActivatedRoute = undefined;

  let fixture: ComponentFixture<ReportingComponent>;

  let testComponent: ReportingComponent;

  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [
        ReportingComponent,
        RouterLinkStubDirective,
        RouterOutletStubComponent
      ],
      imports: [
        TranslateModule.forRoot(),
        FimsSharedModule,
        MatListModule,
        MatToolbarModule,
        NoopAnimationsModule
      ],
      providers: [
        {provide: Router, useValue: jasmine.createSpyObj('Router', ['navigate'])},
        {provide: ActivatedRoute, useValue: activatedRoute},
        {provide: ReportingService, useValue: jasmine.createSpyObj('reportingService', ['fetchCategories'])}
      ]
    });

    fixture = TestBed.createComponent(ReportingComponent);
    testComponent = fixture.componentInstance;

    const reportingService = TestBed.get(ReportingService);
    reportingService.fetchCategories.and.returnValue(Observable.of(['categoryOne', 'categoryTwo']));

    fixture.detectChanges();
  });

  it('should render mat-list-items on the page', () => {
    const listItems = fixture.debugElement.queryAll(By.css('a[mat-list-item]'));

    expect(listItems.length).toBe(2);
  });

  it('should navigate to report definitions page', () => {
    const listItems = fixture.debugElement.queryAll(By.css('a[mat-list-item]'));

    listItems[0].nativeElement.click();

    fixture.detectChanges();

    const linkDebugs = fixture.debugElement
      .queryAll(By.directive(RouterLinkStubDirective));

    const links = linkDebugs
      .map(de => de.injector.get(RouterLinkStubDirective) as RouterLinkStubDirective);

    expect(links[0].navigatedTo).toEqual(['categories', 'categoryOne']);
  });

});


text:
This README outlines the details of collaborating on this Ember application.

## Installation

* `git clone` this repository
* `npm install`
* `bower install`

## Running

* `ember server`
* Visit your app at http://localhost:4200.

## Running Tests

* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).


text:
const CTR  = require('ctr').js;
const ctr  = new CTR();

const base = {
  width: '200px',
  height: '400px',
  background: 'red'
};

//init
ctr.create('.test-1', base);

//will not return anything
ctr.setTransform(function (res) {
  if (false) {
    return res;
  }
});

//both should not be processed
ctr.create('.test-2', base);
ctr.create('.test-3', base);

const res = ctr.getRes();

module.exports = {
  res: res
};


text:
namespace cel {

CEL_INTERNAL_TYPE_IMPL(UnknownType);

namespace {

ABSL_CONST_INIT absl::once_flag instance_once;
alignas(Persistent<const UnknownType>) char instance_storage[sizeof(
    Persistent<const UnknownType>)];

}  // namespace

const Persistent<const UnknownType>& UnknownType::Get() {
  absl::call_once(instance_once, []() {
    base_internal::PersistentHandleFactory<const UnknownType>::MakeAt<
        UnknownType>(&instance_storage[0]);
  });
  return *reinterpret_cast<const Persistent<const UnknownType>*>(
      &instance_storage[0]);
}

}  // namespace cel


text:
using Ixy.Core.Interface;
using Ixy.Core;
using Ixy.Infrastructure.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ixy.Infrastructure.Repository.Interface;

namespace Ixy.Infrastructure.Repository
{
    public class TagRepository : BaseRepository<Tag>, ITagRepository
    {
        public TagRepository(IDbContext dbContext) : base(dbContext)
        {

        }
    }
}


text:
class CreateSelectionProcesses < ActiveRecord::Migration
  def change
    create_table :selection_processes do |t|
      t.string :name_process
      t.string :place
      t.string :duration
      t.date :start_date
      t.date :end_date
      t.string :state

      t.timestamps
    end
  end
end

#Duration, se cambia a Integer en otra migracion.