text:
@interface GameViewController ()

// music stuff

@property (strong, nonatomic) IBOutlet UIButton *duck1;
@property (weak, nonatomic) IBOutlet UIView *duck1View;
@property (strong, nonatomic) IBOutlet UIButton *duck2;
@property (strong, nonatomic) IBOutlet UIButton *duck3;
@property (strong, nonatomic) IBOutlet UIButton *duck4;
@property (strong, nonatomic) IBOutlet UIButton *duck5;
@property (strong, nonatomic) IBOutlet UIButton *duck6;
@property (strong, nonatomic) IBOutlet UIButton *duck7;
@property (strong, nonatomic) IBOutlet UIButton *duck8;
@property (strong, nonatomic) IBOutlet UIButton *duck9;
@property (strong, nonatomic) IBOutlet UIButton *duck10;
@property (nonatomic) NSInteger points;
@property (strong, nonatomic) IBOutlet UILabel *scoresLabel;
@property (nonatomic) NSInteger ducksAlive;
@property (strong, nonatomic) IBOutlet UILabel *ducksAliveLabel;
@property (nonatomic) NSTimer *startTimer;
@property (nonatomic) NSTimer *runningTimer;

@property (nonatomic) BOOL timeIsOver;
@property (strong, nonatomic) IBOutlet UILabel *timeLabel;

@end

@implementation GameViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.ducksAliveLabel.text = @("0");
    self.scoresLabel.text = @("0");

    self.ducksAliveLabel.hidden = NO;
    self.scoresLabel.hidden=NO;

    //hide all ducks
    self.duck1.hidden = YES;
    self.duck2.hidden = YES;
    self.duck3.hidden = YES;
    self.duck4.hidden = YES;
    self.duck5.hidden = YES;
    self.duck6.hidden = YES;
    self.duck7.hidden = YES;
    self.duck8.hidden = YES;
    self.duck9.hidden = YES;
    self.duck10.hidden = YES;

    //load sound tracks
    NSString *path = [NSString stringWithFormat:@"%@/startRound.mp3", [[NSBundle mainBundle] resourcePath]];
    NSURL *soundUrl = [NSURL fileURLWithPath:path];
    // Create audio player object and initialize with URL to sound
    _audioPlayerStartRound = [[AVAudioPlayer alloc] initWithContentsOfURL:soundUrl error:nil];

    NSString *path2 = [NSString stringWithFormat:@"%@/hit.mp3", [[NSBundle mainBundle] resourcePath]];
    NSURL *soundUrl2 = [NSURL fileURLWithPath:path2];
    _audioPlayerHit = [[AVAudioPlayer alloc] initWithContentsOfURL:soundUrl2 error:nil];

    [_audioPlayerStartRound play];

    //duck moving
//    RBBSpringAnimation *spring = [RBBSpringAnimation animationWithKeyPath:@"position.y"];
//
//    spring.fromValue = @(-100.0f);
//    spring.toValue = @(100.0f);
//    spring.velocity = 0;
//    spring.mass = 1;
//    spring.damping = 10;
//    spring.stiffness = 100;
//
//    spring.additive = YES;
//    spring.duration = [spring durationForEpsilon:0.01];
//    [self.duck1.layer addAnimation:spring forKey:@"basic"];
//

    self.startTimer = [NSTimer timerWithTimeInterval:6 target:self selector:@selector(duck1timerFired:) userInfo:nil repeats:NO];
    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

 }

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
 }

- (void)duck1timerFired: (NSTimer *)timer{

    self.duck1.hidden = NO;
    //duck 1 moving
//    CABasicAnimation *animation = [CABasicAnimation animation];
//    animation.keyPath = @"position.x";
//    animation.fromValue = @60;
//    animation.toValue = @190;
//    animation.duration = 3;
//    animation.fillMode = kCAFillModeForwards;
//    animation.removedOnCompletion = NO;
//    animation.beginTime = CACurrentMediaTime();
//    NSLog(@"duck 1 moving");
//
//    [self.duck1.layer addAnimation:animation forKey:@"basic"];

    RBBTweenAnimation *sinus = [RBBTweenAnimation animationWithKeyPath:@"position.y"];
    sinus.fromValue = @(100);
    sinus.toValue = @(220);
    sinus.removedOnCompletion = YES;

    sinus.easing = ^CGFloat (CGFloat fraction) {
        return sin((fraction) * 2 * M_PI);
    };

    sinus.additive = YES;
    sinus.duration = 5;
     NSLog(@"duck 1 moving");

    [self.duck1.layer addAnimation:sinus forKey:@"basic"];

    //call the timer
    self.runningTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:YES];

    if (self.timeIsOver == YES) {
    self.duck1.hidden = YES;

    self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
    self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
    [[NSRunLoop currentRunLoop] addTimer:self.runningTimer forMode:NSRunLoopCommonModes];

}

- (void)viewWillAppear:(BOOL)animated {
    [UIView animateWithDuration:1.0
                          delay:2.0
                        options:UIViewAnimationOptionTransitionCrossDissolve
                     animations:^{
                         //yourAnimation
                     } completion:^(BOOL finished){
                         NSLog(@"Animation is finished");
                         self.timeLabel.text = @"0:00";
                     }];
}

- (void)duckTimer: (NSTimer *)timer{

    CGFloat currentNumber = [self.timeLabel.text floatValue];
    CGFloat nextNumber = currentNumber + 0.001;

    if (nextNumber == 0.5) {
        [timer invalidate];
        NSLog(@"stoppppppppppp");
        self.timeIsOver = YES;
    }

    self.timeLabel.text = [NSString stringWithFormat:@"%f", nextNumber];

         // should fix this one
//    while (nextNumber < 1) {
//         currentNumber = [self.timeLabel.text floatValue];
//         nextNumber = currentNumber + 0.001;
//
//        self.timeLabel.text = [NSString stringWithFormat:@"%f", nextNumber];
//
//           }
//
//
//    [timer invalidate];
//    self.timeIsOver = YES;
    //self.timeLabel.text = @"aaa";

}

- (IBAction)duck1:(UIButton *)sender {
    NSLog(@"Hit duck 1");
   // self.points = self.points + 1;
    [_audioPlayerHit stop];

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck1.hidden = YES;
    self.duck2.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:6 target:self selector:@selector(duck2timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];
}

- (void)duck2timerFired: (NSTimer *)timer{

    //duck 2 moving
    CABasicAnimation *animation2 = [CABasicAnimation animation];
    animation2.keyPath = @"position.x";
    animation2.fromValue = @200;
    animation2.toValue = @88;
    animation2.duration = 3;

    animation2.fillMode = kCAFillModeForwards;
    animation2.removedOnCompletion = NO;
    animation2.beginTime = CACurrentMediaTime();
    NSLog(@"duck 2 moving");

    [self.duck2.layer addAnimation:animation2 forKey:@"basic"];

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck2.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck2:(UIButton *)sender {
    [_audioPlayerHit stop];

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck2.hidden = YES;
    self.duck3.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck3timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck3timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck3.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck3:(UIButton *)sender {
    [_audioPlayerHit stop];

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck3.hidden = YES;
    self.duck4.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck4timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck4timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck4.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck4:(UIButton *)sender {

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck4.hidden = YES;
    self.duck5.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck5timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck5timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck5.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck5:(UIButton *)sender {

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck5.hidden = YES;
    self.duck6.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck6timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck6timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck6.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck6:(UIButton *)sender {
    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck6.hidden = YES;
    self.duck7.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck7timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];
}

- (void)duck7timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck7.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}
- (IBAction)duck7:(UIButton *)sender {
    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck7.hidden = YES;
    self.duck8.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck8timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck8timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck8.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck8:(UIButton *)sender {
    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck8.hidden = YES;
    self.duck9.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck9timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck9timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck9.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck9:(UIButton *)sender {

    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck9.hidden = YES;
    self.duck10.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck10timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

- (void)duck10timerFired: (NSTimer *)timer{

    //call the timer
    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duckTimer:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

    if (self.timeIsOver == YES) {
        self.duck10.hidden = YES;

        self.ducksAlive = [self.ducksAliveLabel.text integerValue] + 1;
        self.ducksAliveLabel.text = [NSString stringWithFormat: @"%li",(long)self.ducksAlive];
    }
}

- (IBAction)duck10:(UIButton *)sender {
    [_audioPlayerHit play];
    self.points = [self.scoresLabel.text integerValue] + 1;
    self.scoresLabel.text = [NSString stringWithFormat: @"%li",(long)self.points];
    self.duck10.hidden = YES;
    self.duck1.hidden = NO;

    self.startTimer = [NSTimer timerWithTimeInterval:0.0001 target:self selector:@selector(duck1timerFired:) userInfo:nil repeats:NO];

    [[NSRunLoop currentRunLoop] addTimer:self.startTimer forMode:NSRunLoopCommonModes];

}

@end


text:
package com.sirtrack.construct;

import static org.junit.Assert.*;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import com.sirtrack.construct.lib.Containers.Container;
import com.sirtrack.construct.lib.Containers.ContainerError;

public class ContainerTest
{
  @Rule
  public ExpectedException exception = ExpectedException.none();

  @Test
  public void test_getattr() {
      Container c = new Container( "a",1 );
      assertEquals( 1, c.get("a") );
  }
  @Test
  public void test_setattr() {
      Container c = new Container();
      c.set("a", 1);
      assertEquals( 1, c.get("a") );
  }
  @Test
  public void test_delattr() {
      Container c = new Container( "a",1 );
      c.del("a");
      assertFalse( c.contains("a") );
  }
  @Test
  public void test_update() {
      Container c = new Container( "a",1 );
      Container d = new Container();
      d.update(c);
      assertEquals( 1, d.get("a") );
  }
  @Test
  public void test_eq_eq() {
      Container c = new Container( "a",1 );
      Container d = new Container( "a",1 );
      assertTrue( c.equals(d) );
  }
      /*
      def test_ne_wrong_type(self):
          c = Container(a=1)
          d = {"a": 1}
          self.assertNotEqual(c, d)
*/
  @Test
  public void test_ne_wrong_key() {
      Container c = new Container( "a",1 );
      Container d = new Container( "b",1 );
      assertFalse( c.equals(d) );
  }
  @Test
  public void test_ne_wrong_value() {
      Container c = new Container( "a",1 );
      Container d = new Container( "a",2 );
      assertFalse( c.equals(d) );
  }
  @Test
  public void test_copy() {
      Container c = new Container( "a",1 );
      Container d = c.clone();
      assertTrue( c.equals(d) );
      assertNotSame( c, d );
  }
  /*
      def test_bool_false(self):
          c = Container()
          self.assertFalse(c)

      def test_bool_true(self):
          c = Container(a=1)
          self.assertTrue(c)
*/
  @Test
  public void test_in() {
      Container c = new Container( "a",1 );
      assertTrue( c.contains("a") );
  }
  @Test
  public void test_not_in() {
      Container c = new Container();
      assertFalse( c.contains("a") );
  }

  /*
      def test_repr(self):
          c = Container(a=1, b=2)
          repr(c)

      def test_repr_recursive(self):
          c = Container(a=1, b=2)
          c.c = c
          repr(c)

      def test_str(self):
          c = Container(a=1, b=2)
          str(c)

      def test_str_recursive(self):
          c = Container(a=1, b=2)
          c.c = c
          str(c)

  class TestListContainer(unittest.TestCase):

      def test_str(self):
          l = ListContainer(range(5))
          str(l)
   */
  @Test
  public void testContainer(){
  	Container c, d;

    c = new Container("name1",1,"name2",2);
    assertEquals( 1, c.get("name1"));
    assertEquals( 2, c.get("name2"));

    d = c.reverse();
    assertEquals( "name1", d.get(1));
    assertEquals( "name2", d.get(2));

    exception.expect( ContainerError.class );
    c = new Container(1,2,3);

  }

}

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Ramalina scopulorum var. conturbata Motyka

### Remarks
null


text:
/*
A simple shim to generate a testable module
*/

import '../../src/style-placeholder'


text:
layout: post
title: "June 19 - Meetup at The Home Depot Technology Center"
description: "The next Austin Apple Admins meetup will be back at The Home Depot's Austin Technology Center in Tech Ridge."
date: 2019-06-09
tags: [news]
comments: true
share: true
---

June 19 - Meetup at The Home Depot Technology Center

---

Hey everyone! Happy 4th Anniversary to our modest little meetup group.

Please join us on June 19th for our next meetup hosted by [The Home Depot Austin Technology Center in Tech Ridge](https://goo.gl/maps/AQ1NJvvzuDC2). This month's meetup will feature presentations on automation with Python and [Twocanoe's Mac Deploy Stick](http://twocanoes.com/products/mac/mac-deploy-stick/).

## Agenda

6:00pm - Arrive, mingle, eat 🍕
6:30pm - Welcome and Introductions
 6:45pm - [Michael Le-Zakes](https://github.com/zakes-it/guilib), Automating with Python
 7:30pm - [Chris Miller](https://www.linkedin.com/in/chris-miller-27551212/), Mac Deploy Stick
 8:00pm - Q&A, Open Discussion

## Venue Information

- [The Austin Technology Center North (ATN)](https://goo.gl/maps/AQ1NJvvzuDC2) is located on the corner of Parmer and McCallen Pass in the Tech Ridge area. You'll see a sign off the road with an entrance to the open parking lot.

- Parking is free and the lot will be largely unoccupied in the evening. Enter through the main entrance off of McCallen Pass.

- Check in with security when you arrive and they'll alert our hosts to your arrival. **It's important that you RSVP on Eventbrite prior to the meetup to streamline the check-in process. Make sure you bring a valid form of government ID.**

- DM @emily on the MacAdmins slack or email emily@austinappleadmins.org if you have any questions.

If you'd like to speak at a future meetup in Austin please [let us know](https://goo.gl/forms/SlplkdmkkyKpG7982).

## Registration

Registration is now available on Eventbrite. **Please RSVP on Eventbrite prior to the event, as this will streamline the check-in process and ensure enough food is ordered.**

## Upcoming meetups

We're super happy to announce that meetups in 2019 will happen at a regular cadence on the **third Wedneday of every month**. Odd months will be happy hours, and even months will be presentation-based meetups.

[Subscribe to the Austin Apple Admins calendar](https://goo.gl/2TUFjl) to keep up with upcoming events.


text:
package jws

import (
	"encoding/json"
	"time"

	"github.com/SermoDigital/jose"
	"github.com/SermoDigital/jose/jwt"
)

// Claims represents a set of JOSE Claims.
type Claims jwt.Claims

// Get retrieves the value corresponding with key from the Claims.
func (c Claims) Get(key string) interface{} {
	return jwt.Claims(c).Get(key)
}

// Set sets Claims[key] = val. It'll overwrite without warning.
func (c Claims) Set(key string, val interface{}) {
	jwt.Claims(c).Set(key, val)
}

// Del removes the value that corresponds with key from the Claims.
func (c Claims) Del(key string) {
	jwt.Claims(c).Del(key)
}

// Has returns true if a value for the given key exists inside the Claims.
func (c Claims) Has(key string) bool {
	return jwt.Claims(c).Has(key)
}

// MarshalJSON implements json.Marshaler for Claims.
func (c Claims) MarshalJSON() ([]byte, error) {
	return jwt.Claims(c).MarshalJSON()
}

// Base64 implements the Encoder interface.
func (c Claims) Base64() ([]byte, error) {
	return jwt.Claims(c).Base64()
}

// UnmarshalJSON implements json.Unmarshaler for Claims.
func (c *Claims) UnmarshalJSON(b []byte) error {
	if b == nil {
		return nil
	}

	b, err := jose.DecodeEscaped(b)
	if err != nil {
		return err
	}

	// Since json.Unmarshal calls UnmarshalJSON,
	// calling json.Unmarshal on *p would be infinitely recursive
	// A temp variable is needed because &map[string]interface{}(*p) is
	// invalid Go.

	tmp := map[string]interface{}(*c)
	if err = json.Unmarshal(b, &tmp); err != nil {
		return err
	}
	*c = Claims(tmp)
	return nil
}

// Issuer retrieves claim "iss" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.1
func (c Claims) Issuer() (string, bool) {
	return jwt.Claims(c).Issuer()
}

// Subject retrieves claim "sub" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.2
func (c Claims) Subject() (string, bool) {
	return jwt.Claims(c).Subject()
}

// Audience retrieves claim "aud" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.3
func (c Claims) Audience() ([]string, bool) {
	return jwt.Claims(c).Audience()
}

// Expiration retrieves claim "exp" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.4
func (c Claims) Expiration() (time.Time, bool) {
	return jwt.Claims(c).Expiration()
}

// NotBefore retrieves claim "nbf" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.5
func (c Claims) NotBefore() (time.Time, bool) {
	return jwt.Claims(c).NotBefore()
}

// IssuedAt retrieves claim "iat" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.6
func (c Claims) IssuedAt() (time.Time, bool) {
	return jwt.Claims(c).IssuedAt()
}

// JWTID retrieves claim "jti" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.7
func (c Claims) JWTID() (string, bool) {
	return jwt.Claims(c).JWTID()
}

// RemoveIssuer deletes claim "iss" from c.
func (c Claims) RemoveIssuer() {
	jwt.Claims(c).RemoveIssuer()
}

// RemoveSubject deletes claim "sub" from c.
func (c Claims) RemoveSubject() {
	jwt.Claims(c).RemoveIssuer()
}

// RemoveAudience deletes claim "aud" from c.
func (c Claims) RemoveAudience() {
	jwt.Claims(c).Audience()
}

// RemoveExpiration deletes claim "exp" from c.
func (c Claims) RemoveExpiration() {
	jwt.Claims(c).RemoveExpiration()
}

// RemoveNotBefore deletes claim "nbf" from c.
func (c Claims) RemoveNotBefore() {
	jwt.Claims(c).NotBefore()
}

// RemoveIssuedAt deletes claim "iat" from c.
func (c Claims) RemoveIssuedAt() {
	jwt.Claims(c).IssuedAt()
}

// RemoveJWTID deletes claim "jti" from c.
func (c Claims) RemoveJWTID() {
	jwt.Claims(c).RemoveJWTID()
}

// SetIssuer sets claim "iss" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.1
func (c Claims) SetIssuer(issuer string) {
	jwt.Claims(c).SetIssuer(issuer)
}

// SetSubject sets claim "iss" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.2
func (c Claims) SetSubject(subject string) {
	jwt.Claims(c).SetSubject(subject)
}

// SetAudience sets claim "aud" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.3
func (c Claims) SetAudience(audience ...string) {
	jwt.Claims(c).SetAudience(audience...)
}

// SetExpiration sets claim "exp" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.4
func (c Claims) SetExpiration(expiration time.Time) {
	jwt.Claims(c).SetExpiration(expiration)
}

// SetNotBefore sets claim "nbf" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.5
func (c Claims) SetNotBefore(notBefore time.Time) {
	jwt.Claims(c).SetNotBefore(notBefore)
}

// SetIssuedAt sets claim "iat" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.6
func (c Claims) SetIssuedAt(issuedAt time.Time) {
	jwt.Claims(c).SetIssuedAt(issuedAt)
}

// SetJWTID sets claim "jti" per its type in
// https://tools.ietf.org/html/rfc7519#section-4.1.7
func (c Claims) SetJWTID(uniqueID string) {
	jwt.Claims(c).SetJWTID(uniqueID)
}

var (
	_ json.Marshaler   = (Claims)(nil)
	_ json.Unmarshaler = (*Claims)(nil)
)


text:
void CefBrowserHostWrapper::StartDownload(String^ url)
{
    ThrowIfDisposed();

    _browserHost->StartDownload(StringUtils::ToNative(url));
}

void CefBrowserHostWrapper::Print()
{
    ThrowIfDisposed();

    _browserHost->Print();
}

void CefBrowserHostWrapper::SetZoomLevel(double zoomLevel)
{
    ThrowIfDisposed();

    _browserHost->SetZoomLevel(zoomLevel);
}

Task<double>^ CefBrowserHostWrapper::GetZoomLevelAsync()
{
    ThrowIfDisposed();

    if (CefCurrentlyOn(TID_UI))
    {
        TaskCompletionSource<double>^ taskSource = gcnew TaskCompletionSource<double>();
        taskSource->SetResult(GetZoomLevelOnUI());
        return taskSource->Task;
    }
    return Cef::UIThreadTaskFactory->StartNew(gcnew Func<double>(this, &CefBrowserHostWrapper::GetZoomLevelOnUI));
}

IntPtr CefBrowserHostWrapper::GetWindowHandle()
{
    ThrowIfDisposed();

    return IntPtr(_browserHost->GetWindowHandle());
}

void CefBrowserHostWrapper::CloseBrowser(bool forceClose)
{
    ThrowIfDisposed();

    _browserHost->CloseBrowser(forceClose);
}

void CefBrowserHostWrapper::ShowDevTools()
{
    ThrowIfDisposed();

    CefWindowInfo windowInfo;
    CefBrowserSettings settings;

    windowInfo.SetAsPopup(_browserHost->GetWindowHandle(), "DevTools");

    _browserHost->ShowDevTools(windowInfo, _browserHost->GetClient(), settings, CefPoint());
}

void CefBrowserHostWrapper::CloseDevTools()
{
    ThrowIfDisposed();

    _browserHost->CloseDevTools();
}

void CefBrowserHostWrapper::AddWordToDictionary(String^ word)
{
    ThrowIfDisposed();

    _browserHost->AddWordToDictionary(StringUtils::ToNative(word));
}

void CefBrowserHostWrapper::ReplaceMisspelling(String^ word)
{
    ThrowIfDisposed();

    _browserHost->ReplaceMisspelling(StringUtils::ToNative(word));
}

void CefBrowserHostWrapper::Find(int identifier, String^ searchText, bool forward, bool matchCase, bool findNext)
{
    ThrowIfDisposed();

    _browserHost->Find(identifier, StringUtils::ToNative(searchText), forward, matchCase, findNext);
}

void CefBrowserHostWrapper::StopFinding(bool clearSelection)
{
    ThrowIfDisposed();

    _browserHost->StopFinding(clearSelection);
}

void CefBrowserHostWrapper::SetFocus(bool focus)
{
    ThrowIfDisposed();

    _browserHost->SetFocus(focus);
}

void CefBrowserHostWrapper::SendFocusEvent(bool setFocus)
{
    ThrowIfDisposed();

    _browserHost->SendFocusEvent(setFocus);
}

void CefBrowserHostWrapper::SendKeyEvent(KeyEvent keyEvent)
{
    CefKeyEvent nativeKeyEvent;
    nativeKeyEvent.focus_on_editable_field = keyEvent.FocusOnEditableField == 1;
    nativeKeyEvent.is_system_key = keyEvent.IsSystemKey == 1;
    nativeKeyEvent.modifiers = (uint32)keyEvent.Modifiers;
    nativeKeyEvent.type = (cef_key_event_type_t)keyEvent.Type;
    nativeKeyEvent.native_key_code = keyEvent.NativeKeyCode;
    nativeKeyEvent.windows_key_code = keyEvent.WindowsKeyCode;

    _browserHost->SendKeyEvent(nativeKeyEvent);
}

double CefBrowserHostWrapper::GetZoomLevelOnUI()
{
    ThrowIfDisposed();

    CefTaskScheduler::EnsureOn(TID_UI, "CefBrowserHostWrapper::GetZoomLevel");

    //Don't throw exception if no browser host here as it's not easy to handle
    if(_browserHost.get())
    {
        return _browserHost->GetZoomLevel();
    }

    return 0.0;
}

void CefBrowserHostWrapper::SendMouseWheelEvent(int x, int y, int deltaX, int deltaY, CefEventFlags modifiers)
{
    ThrowIfDisposed();

    if (_browserHost.get())
    {
        CefMouseEvent mouseEvent;
        mouseEvent.x = x;
        mouseEvent.y = y;
        mouseEvent.modifiers = (uint32)modifiers;

        _browserHost->SendMouseWheelEvent(mouseEvent, deltaX, deltaY);
    }
}

void CefBrowserHostWrapper::Invalidate(PaintElementType type)
{
    ThrowIfDisposed();

    _browserHost->Invalidate((CefBrowserHost::PaintElementType)type);
}

void CefBrowserHostWrapper::SendMouseClickEvent(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
    ThrowIfDisposed();

    CefMouseEvent mouseEvent;
    mouseEvent.x = x;
    mouseEvent.y = y;
    mouseEvent.modifiers = (uint32)modifiers;

    _browserHost->SendMouseClickEvent(mouseEvent, (CefBrowserHost::MouseButtonType) mouseButtonType, mouseUp, clickCount);
}

void CefBrowserHostWrapper::SendMouseMoveEvent(int x, int y, bool mouseLeave, CefEventFlags modifiers)
{
    ThrowIfDisposed();

    CefMouseEvent mouseEvent;
    mouseEvent.x = x;
    mouseEvent.y = y;

    mouseEvent.modifiers = (uint32)modifiers;

    _browserHost->SendMouseMoveEvent(mouseEvent, mouseLeave);
}

void CefBrowserHostWrapper::ThrowIfDisposed()
{
    if (_disposed)
    {
        throw gcnew ObjectDisposedException(gcnew String(L"This CefSharp IBrowserHost instance has been disposed!"));
    }
}


text:
package com.qiumingkui.sample.imedia.asset.domain.model.account;

public class RmbBalance {

}


text:
package config

import (
  "fmt"
  "strings"
  "strconv"
  "os"
)

type Config struct {
  Port string
  DlvPath string
  DebugSession struct {
    File string
    Args []string
  }
}

func fileFromArg(c *Config, fileToDebug string) bool {
  if !fileExists(fileToDebug) {
    fmt.Println("Invalid file path for first argument")
    return false
  }
  c.DebugSession.File = fileToDebug
  return true
}

func portFromArg(c *Config, port string) bool {
  if _, err := strconv.Atoi(port); err != nil {
    fmt.Println("Value for 'port' must be a valid number.")
    return false
  }
  c.Port = port
  return true
}

func fileExists(path string) bool {
  if finfo, err := os.Stat(path); err != nil || finfo.IsDir() {
    return false
  }
  return true
}

func dlvFromArg(c *Config, dlvPath string) bool {
  if !fileExists(dlvPath) {
    fmt.Println("Invalid file for 'dlv' argument.")
    return false
  }
  c.DlvPath = dlvPath
  return true
}

var boundArgsInfo = map[string]func(*Config, string)bool{
  "0": fileFromArg,
  "--port": portFromArg,
  "--dlv": dlvFromArg,
  "--help": func (_ *Config, _ string) bool {
    printHelp()
    return false
  },
}

func NewFromArgs(args []string) *Config {
  if len(args) <= 0 {
    printHelp();
    return nil
  }

  defaultDlvPath := ""
  if val, ok := os.LookupEnv("PATH"); ok {
    for _, folder := range strings.Split(val, ":") {
      file := folder + "/dlv"
      if fileExists(file) {
        defaultDlvPath = file
        break
      }
    }
  }

  config := &Config{
    Port: "9922",
    DlvPath: defaultDlvPath,
  }

  curNumbPos := 0
  i := 0
  for ; i < len(args); i++ {
    arg := args[i]
    if !strings.HasPrefix(arg, "--") {
      fn, ok := boundArgsInfo[strconv.Itoa(curNumbPos)]
      curNumbPos++
      if ok {
        if fn(config, arg) {
          continue
        }
      } else {
        fmt.Println("Unknown arguemnt '" + arg + "'")
      }
      return nil
    }
    keyValue := strings.SplitN(arg, "=", 2)
    fn, ok := boundArgsInfo[keyValue[0]]
    if !ok {
      fmt.Println("Unknown argument '" + args[i] + "'")
      return nil
    }

    value := keyValue[0]
    if len(keyValue) >= 2 {
      value = keyValue[1]
    }
    ok = fn(config, value)
    if !ok {
      return nil
    }
  }
  return config
}

func printHelp() {
  data := []string{
    "GDD is a simple debuger that binds Chrome Devtools debugger as a front-end and",
    "uses DLV as a backend.",
    "",
    "Usage:",
    "",
    "  gdd go-file-to-debug [options] [-- args-to-pass-to-file ...]",
    "",
    "Options:",
    "",
    "  --port=PORT        Port Number to use to communicate to Chrome Devtools",
    "                     front-end. Default 9922.",
    "  --dlv=FILE         Location of DLV installed on machine. Default (tries to",
    "                     find 'dlv' in system path.",
    "  --help             Prints this help dialog.",
    "",
  }
  for _, line := range data {
    fmt.Println(line)
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cosmos.Core.Managed_Memory_System
{
    public class ObjectMemory
    {
        protected uint startAddress = 0;
        protected uint endAddress = 0;
        protected bool full = false;
        protected bool aSmall = false;
        protected uint processId = 0; //only use when allocation memory in MangaedMemory.

        public ObjectMemory(uint thisStartAddress, uint thisEndAddress, bool thisSmall)
        {
            startAddress = thisStartAddress;
            endAddress = thisEndAddress;
            aSmall = thisSmall;
        }
        public ObjectMemory()
        {
        }

        public uint ObjectStart
        {
            get
            {
                return startAddress;
            }
            set
            {
                startAddress = value;
            }
        }

        public bool MemorySmall
        {
            get
            {
                return aSmall;
            }
        }

        public uint ObjectEndAddress
        {
            get
            {
                return endAddress;
            }
            set
            {
                endAddress = value;
            }
        }

        public bool MemoryFull
        {
            get
            {
                return full;
            }
            set
            {
                full = value;
            }
        }

        public uint Process
        {
            get
            {
                return processId;
            }
            set
            {
                processId = value;
            }
        }

    }
}


text:
namespace syn {

#ifdef _DEBUG

	void SYNTAX_API log(const char* format, ...);
	void SYNTAX_API logWarning(const char* format, ...);
	void SYNTAX_API logError(const char* format, ...);
	void SYNTAX_API logC(bool condition, const char* format, ...);
	void SYNTAX_API logWarningC(bool condition, const char* format, ...);
	void SYNTAX_API logErrorC(bool condition, const char* format, ...);

#else

	static void SYNTAX_API log(const char* format, ...) {}
	static void SYNTAX_API logWarning(const char* format, ...) {}
	static void SYNTAX_API logError(const char* format, ...) {}
	static void SYNTAX_API logC(bool condition, const char* format, ...) {}
	static void SYNTAX_API logWarningC(bool condition, const char* format, ...) {}
	static void SYNTAX_API logErrorC(bool condition, const char* format, ...) {}

#endif // _DEBUG

	void SYNTAX_API __stdcall logGLDebugCallback(unsigned int source,
		unsigned int type,
		unsigned int id,
		unsigned int severity,
		int length,
		const char* message,
		const void* userParam);

} // namespace syn


text:
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-comp-2844',
  templateUrl: './comp-2844.component.html',
  styleUrls: ['./comp-2844.component.css']
})
export class Comp2844Component implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;

namespace Azure.ResourceManager.ContainerService
{
    /// <summary>
    /// A class representing a collection of <see cref="ContainerServiceAgentPoolResource" /> and their operations.
    /// Each <see cref="ContainerServiceAgentPoolResource" /> in the collection will belong to the same instance of <see cref="ContainerServiceManagedClusterResource" />.
    /// To get a <see cref="ContainerServiceAgentPoolCollection" /> instance call the GetContainerServiceAgentPools method from an instance of <see cref="ContainerServiceManagedClusterResource" />.
    /// </summary>
    public partial class ContainerServiceAgentPoolCollection : ArmCollection, IEnumerable<ContainerServiceAgentPoolResource>, IAsyncEnumerable<ContainerServiceAgentPoolResource>
    {
        private readonly ClientDiagnostics _containerServiceAgentPoolAgentPoolsClientDiagnostics;
        private readonly AgentPoolsRestOperations _containerServiceAgentPoolAgentPoolsRestClient;

        /// <summary> Initializes a new instance of the <see cref="ContainerServiceAgentPoolCollection"/> class for mocking. </summary>
        protected ContainerServiceAgentPoolCollection()
        {
        }

        /// <summary> Initializes a new instance of the <see cref="ContainerServiceAgentPoolCollection"/> class. </summary>
        /// <param name="client"> The client parameters to use in these operations. </param>
        /// <param name="id"> The identifier of the parent resource that is the target of operations. </param>
        internal ContainerServiceAgentPoolCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _containerServiceAgentPoolAgentPoolsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ContainerServiceAgentPoolResource.ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(ContainerServiceAgentPoolResource.ResourceType, out string containerServiceAgentPoolAgentPoolsApiVersion);
            _containerServiceAgentPoolAgentPoolsRestClient = new AgentPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceAgentPoolAgentPoolsApiVersion);
#if DEBUG
			ValidateResourceId(Id);
#endif
        }

        internal static void ValidateResourceId(ResourceIdentifier id)
        {
            if (id.ResourceType != ContainerServiceManagedClusterResource.ResourceType)
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceManagedClusterResource.ResourceType), nameof(id));
        }

        /// <summary>
        /// Gets the specified managed cluster agent pool.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
        /// Operation Id: AgentPools_Get
        /// </summary>
        /// <param name="agentPoolName"> The name of the agent pool. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentException"> <paramref name="agentPoolName"/> is an empty string, and was expected to be non-empty. </exception>
        /// <exception cref="ArgumentNullException"> <paramref name="agentPoolName"/> is null. </exception>
        public virtual async Task<Response<ContainerServiceAgentPoolResource>> GetAsync(string agentPoolName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));

            using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.Get");
            scope.Start();
            try
            {
                var response = await _containerServiceAgentPoolAgentPoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, cancellationToken).ConfigureAwait(false);
                if (response.Value == null)
                    throw new RequestFailedException(response.GetRawResponse());
                return Response.FromValue(new ContainerServiceAgentPoolResource(Client, response.Value), response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Gets the specified managed cluster agent pool.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
        /// Operation Id: AgentPools_Get
        /// </summary>
        /// <param name="agentPoolName"> The name of the agent pool. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentException"> <paramref name="agentPoolName"/> is an empty string, and was expected to be non-empty. </exception>
        /// <exception cref="ArgumentNullException"> <paramref name="agentPoolName"/> is null. </exception>
        public virtual Response<ContainerServiceAgentPoolResource> Get(string agentPoolName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));

            using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.Get");
            scope.Start();
            try
            {
                var response = _containerServiceAgentPoolAgentPoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, cancellationToken);
                if (response.Value == null)
                    throw new RequestFailedException(response.GetRawResponse());
                return Response.FromValue(new ContainerServiceAgentPoolResource(Client, response.Value), response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Gets a list of agent pools in the specified managed cluster.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools
        /// Operation Id: AgentPools_List
        /// </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <returns> An async collection of <see cref="ContainerServiceAgentPoolResource" /> that may take multiple service requests to iterate over. </returns>
        public virtual AsyncPageable<ContainerServiceAgentPoolResource> GetAllAsync(CancellationToken cancellationToken = default)
        {
            async Task<Page<ContainerServiceAgentPoolResource>> FirstPageFunc(int? pageSizeHint)
            {
                using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.GetAll");
                scope.Start();
                try
                {
                    var response = await _containerServiceAgentPoolAgentPoolsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
                    return Page.FromValues(response.Value.Value.Select(value => new ContainerServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }
            async Task<Page<ContainerServiceAgentPoolResource>> NextPageFunc(string nextLink, int? pageSizeHint)
            {
                using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.GetAll");
                scope.Start();
                try
                {
                    var response = await _containerServiceAgentPoolAgentPoolsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
                    return Page.FromValues(response.Value.Value.Select(value => new ContainerServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }
            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
        }

        /// <summary>
        /// Gets a list of agent pools in the specified managed cluster.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools
        /// Operation Id: AgentPools_List
        /// </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <returns> A collection of <see cref="ContainerServiceAgentPoolResource" /> that may take multiple service requests to iterate over. </returns>
        public virtual Pageable<ContainerServiceAgentPoolResource> GetAll(CancellationToken cancellationToken = default)
        {
            Page<ContainerServiceAgentPoolResource> FirstPageFunc(int? pageSizeHint)
            {
                using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.GetAll");
                scope.Start();
                try
                {
                    var response = _containerServiceAgentPoolAgentPoolsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
                    return Page.FromValues(response.Value.Value.Select(value => new ContainerServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }
            Page<ContainerServiceAgentPoolResource> NextPageFunc(string nextLink, int? pageSizeHint)
            {
                using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.GetAll");
                scope.Start();
                try
                {
                    var response = _containerServiceAgentPoolAgentPoolsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
                    return Page.FromValues(response.Value.Value.Select(value => new ContainerServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }
            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
        }

        /// <summary>
        /// Checks to see if the resource exists in azure.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
        /// Operation Id: AgentPools_Get
        /// </summary>
        /// <param name="agentPoolName"> The name of the agent pool. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentException"> <paramref name="agentPoolName"/> is an empty string, and was expected to be non-empty. </exception>
        /// <exception cref="ArgumentNullException"> <paramref name="agentPoolName"/> is null. </exception>
        public virtual async Task<Response<bool>> ExistsAsync(string agentPoolName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));

            using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.Exists");
            scope.Start();
            try
            {
                var response = await _containerServiceAgentPoolAgentPoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, cancellationToken: cancellationToken).ConfigureAwait(false);
                return Response.FromValue(response.Value != null, response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Checks to see if the resource exists in azure.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
        /// Operation Id: AgentPools_Get
        /// </summary>
        /// <param name="agentPoolName"> The name of the agent pool. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentException"> <paramref name="agentPoolName"/> is an empty string, and was expected to be non-empty. </exception>
        /// <exception cref="ArgumentNullException"> <paramref name="agentPoolName"/> is null. </exception>
        public virtual Response<bool> Exists(string agentPoolName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));

            using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolCollection.Exists");
            scope.Start();
            try
            {
                var response = _containerServiceAgentPoolAgentPoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, cancellationToken: cancellationToken);
                return Response.FromValue(response.Value != null, response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        IEnumerator<ContainerServiceAgentPoolResource> IEnumerable<ContainerServiceAgentPoolResource>.GetEnumerator()
        {
            return GetAll().GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetAll().GetEnumerator();
        }

        IAsyncEnumerator<ContainerServiceAgentPoolResource> IAsyncEnumerable<ContainerServiceAgentPoolResource>.GetAsyncEnumerator(CancellationToken cancellationToken)
        {
            return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
        }
    }
}


text:
name: Bug report
about: Create a report to help us improve
title: ''
labels: new
assignees: ''

---

**Please complete the following information:**
 - Android API level: [e.g. 21]
 - Library Version: [e.g. 2.0.0]
 - Recyclerview Version [e.g. 2.0.0]


text:
Lose = function() {
};

Lose.prototype = {
	preload:function() {
		//preload da tela de Lose
		game.load.image('bgLose', fp_bgLose);
	},

	create:function() {
		var bg = game.add.sprite(0, 0, 'bgLose');

		game.input.onDown.add(function() {
			var fadeout = game.add.tween(bg).to( { alpha: 0 }, 500, Phaser.Easing.Linear.None, true, 0, 0, true);
			fadeout.onComplete.add(function() {
				game.state.start('highScoresInput');
			});
		});
	}
};


text:
import LoraPacket, { LorawanVersion } from "./LoraPacket";
import { reverseBuffer } from "./util";

import { AesCmac } from "aes-cmac";
import { Buffer } from "buffer";

// calculate MIC from payload
function calculateMIC(
  payload: LoraPacket,
  NwkSKey?: Buffer, //NwkSKey for DataUP/Down; SNwkSIntKey in data 1.1; SNwkSIntKey in Join 1.1
  AppKey?: Buffer, //AppSKey for DataUP/Down; FNwkSIntKey in data 1.1; JSIntKey in Join 1.1
  FCntMSBytes?: Buffer,
  ConfFCntDownTxDrTxCh?: Buffer
): Buffer {
  let LWVersion: LorawanVersion = LorawanVersion.V1_0;
  if (payload.isJoinRequestMessage()) {
    if (AppKey && AppKey.length !== 16) throw new Error("Expected a AppKey with length 16");
    if (!payload.MHDR) throw new Error("Expected MHDR to be defined");
    if (!payload.AppEUI) throw new Error("Expected AppEUI to be defined");
    if (!payload.DevEUI) throw new Error("Expected DevEUI to be defined");
    if (!payload.DevNonce) throw new Error("Expected DevNonce to be defined");
    if (!payload.MACPayload) throw new Error("Expected DevNonce to be defined");

    // const msgLen = payload.MHDR.length + payload.AppEUI.length + payload.DevEUI.length + payload.DevNonce.length;

    // CMAC over MHDR | AppEUI | DevEUI | DevNonce
    // the seperate fields are not in little-endian format, use the concatenated field
    const cmacInput = Buffer.concat([payload.MHDR, payload.MACPayload]);

    // CMAC calculation (as RFC4493)
    let fullCmac = new AesCmac(AppKey).calculate(cmacInput);
    if (!(fullCmac instanceof Buffer)) fullCmac = Buffer.from(fullCmac);
    // only first 4 bytes of CMAC are used as MIC
    const MIC = fullCmac.slice(0, 4);

    return MIC;
  } else if (payload.isReJoinRequestMessage()) {
    if (payload.RejoinType[0] === 1 && (!AppKey || AppKey.length !== 16))
      throw new Error("Expected a JSIntKey with length 16");
    if ((payload.RejoinType[0] === 0 || payload.RejoinType[0] === 2) && (!NwkSKey || NwkSKey.length !== 16))
      throw new Error("Expected a SNwkSIntKey with length 16");
    if (AppKey && AppKey.length !== 16) throw new Error("Expected a AppKey with length 16");
    if (!payload.MHDR) throw new Error("Expected MHDR to be defined");
    if (!payload.RejoinType) throw new Error("Expected RejoinType to be defined");
    if (!payload.NetID && !payload.AppEUI) throw new Error("Expected NetID or JoinEUI to be defined");
    if (!payload.DevEUI) throw new Error("Expected DevEUI to be defined");
    if (!payload.RJCount0 && !payload.RJCount1) throw new Error("Expected RJCount0 or RJCount1 to be defined");
    // const msgLen = payload.MHDR.length + payload.AppEUI.length + payload.DevEUI.length + payload.DevNonce.length;

    // CMAC over MHDR | AppEUI | DevEUI | DevNonce
    // the seperate fields are not in little-endian format, use the concatenated field
    const cmacInput = Buffer.concat([payload.MHDR, payload.MACPayload]);

    // CMAC calculation (as RFC4493)
    const calcKey = payload.RejoinType[0] === 1 ? AppKey : NwkSKey;
    let fullCmac = new AesCmac(calcKey).calculate(cmacInput);
    if (!(fullCmac instanceof Buffer)) fullCmac = Buffer.from(fullCmac);
    // only first 4 bytes of CMAC are used as MIC
    const MIC = fullCmac.slice(0, 4);

    return MIC;
  } else if (payload.isJoinAcceptMessage()) {
    if (AppKey && AppKey.length !== 16) throw new Error("Expected a AppKey with length 16");
    if (!payload.MHDR) throw new Error("Expected MHDR to be defined");
    if (!payload.AppNonce) throw new Error("Expected AppNonce to be defined");
    if (!payload.NetID) throw new Error("Expected NetID to be defined");
    if (!payload.DevAddr) throw new Error("Expected DevAddr to be defined");
    if (!payload.DLSettings) throw new Error("Expected DLSettings to be defined");
    if (!payload.RxDelay) throw new Error("Expected RxDelay to be defined");
    if (!payload.CFList) throw new Error("Expected CFList to be defined");
    if (!payload.MACPayload) throw new Error("Expected MACPayload to be defined");
    if (payload.getDLSettingsOptNeg()) LWVersion = LorawanVersion.V1_1;

    let cmacInput: Buffer = Buffer.alloc(0);

    let cmacKey: Buffer = AppKey;
    if (LWVersion === LorawanVersion.V1_0) {
      // const msgLen =
      //   payload.MHDR.length +
      //   payload.AppNonce.length +
      //   payload.NetID.length +
      //   payload.DevAddr.length +
      //   payload.DLSettings.length +
      //   payload.RxDelay.length +
      //   payload.CFList.length;

      // CMAC over MHDR | AppNonce | NetID | DevAddr | DLSettings | RxDelay | CFList
      // the seperate fields are not encrypted, use the encrypted concatenated field

      cmacInput = Buffer.concat([payload.MHDR, payload.MACPayload]);
    } else if (LWVersion === LorawanVersion.V1_1) {
      if (!payload.JoinReqType) throw new Error("Expected JoinReqType to be defined");
      if (!payload.JoinEUI) throw new Error("Expected JoinEUI to be defined");
      if (!payload.DevNonce) throw new Error("Expected DevNonce to be defined");
      if (!NwkSKey || NwkSKey.length !== 16) throw new Error("Expected a NwkSKey with length 16");
      cmacKey = NwkSKey;
      cmacInput = Buffer.concat([
        payload.JoinReqType,
        reverseBuffer(payload.JoinEUI),
        reverseBuffer(payload.DevNonce),
        payload.MHDR,
        payload.MACPayload,
      ]);
    }

    // CMAC calculation (as RFC4493)
    let fullCmac = new AesCmac(cmacKey).calculate(cmacInput);
    if (!(fullCmac instanceof Buffer)) fullCmac = Buffer.from(fullCmac);
    // only first 4 bytes of CMAC are used as MIC
    const MIC = fullCmac.slice(0, 4);

    return MIC;
  } else {
    // ConfFCntDownTxDrTxCh = ConfFCntDownTxDrTxCh || Buffer.alloc(2, 0);
    if (NwkSKey && NwkSKey.length !== 16) throw new Error("Expected a NwkSKey with length 16");
    if (payload.DevAddr && payload.DevAddr.length !== 4) throw new Error("Expected a payload DevAddr with length 4");
    if (payload.FCnt && payload.FCnt.length !== 2) throw new Error("Expected a payload FCnt with length 2");
    if (!payload.MHDR) throw new Error("Expected MHDR to be defined");
    if (!payload.DevAddr) throw new Error("Expected DevAddr to be defined");
    if (!payload.FCnt) throw new Error("Expected FCnt to be defined");
    if (!payload.MACPayload) throw new Error("Expected MACPayload to be defined");
    if (!FCntMSBytes) {
      FCntMSBytes = Buffer.from("0000", "hex");
    }

    if (ConfFCntDownTxDrTxCh) {
      if (!AppKey || AppKey?.length !== 16) throw new Error("Expected a FNwkSIntKey with length 16");
      LWVersion = LorawanVersion.V1_1;
    }

    // if (NwkSKey && AppKey) {
    //   LWVersion = LorawanVersion.V1_1;
    // }

    let dir;
    const isUplinkAndIs1_1 = payload.getDir() === "up" && LWVersion === LorawanVersion.V1_1;
    const isDownlinkAndIs1_1 = payload.getDir() === "down" && LWVersion === LorawanVersion.V1_1;

    if (payload.getDir() == "up") {
      dir = Buffer.alloc(1, 0);
    } else if (payload.getDir() == "down") {
      dir = Buffer.alloc(1, 1);
      if (!ConfFCntDownTxDrTxCh) {
        ConfFCntDownTxDrTxCh = Buffer.alloc(4, 0);
      } else if (ConfFCntDownTxDrTxCh && ConfFCntDownTxDrTxCh?.length !== 2) {
        throw new Error("Expected a ConfFCntDown with length 2");
      } else {
        ConfFCntDownTxDrTxCh = Buffer.concat([ConfFCntDownTxDrTxCh, Buffer.alloc(2, 0)]);
      }
    } else {
      throw new Error("expecting direction to be either 'up' or 'down'");
    }

    if (isUplinkAndIs1_1) {
      if (!ConfFCntDownTxDrTxCh || ConfFCntDownTxDrTxCh?.length !== 4) {
        throw new Error("Expected a ConfFCntDownTxDrTxCh with length 4 Expected ( ConfFCnt | TxDr | TxCh)");
      }

      if (payload.getFCtrlACK() || (isUplinkAndIs1_1 && payload.getFPort() === 0)) {
        ConfFCntDownTxDrTxCh.writeUInt16BE(ConfFCntDownTxDrTxCh.readUInt16LE(0));
      } else {
        ConfFCntDownTxDrTxCh.writeUInt16BE(0);
      }
    }

    const msgLen = payload.MHDR.length + payload.MACPayload.length;

    const B0 = Buffer.concat([
      Buffer.from([0x49]), // as spec
      isDownlinkAndIs1_1 ? ConfFCntDownTxDrTxCh : Buffer.alloc(4, 0), // LoraWan Spec 1.1, pag. 27
      dir, // direction ('Dir')
      reverseBuffer(payload.DevAddr),
      reverseBuffer(payload.FCnt),
      FCntMSBytes, // upper 2 bytes of FCnt (zeroes)
      Buffer.alloc(1, 0), // 0x00
      Buffer.alloc(1, msgLen), // len(msg)
    ]);

    // CMAC over B0 | MHDR | MACPayload
    const cmacInput = Buffer.concat([B0, payload.MHDR, payload.MACPayload]);

    // CMAC calculation (as RFC4493)
    let key = NwkSKey;
    if (isDownlinkAndIs1_1) key = AppKey;
    let fullCmac = new AesCmac(key).calculate(cmacInput);
    if (!(fullCmac instanceof Buffer)) fullCmac = Buffer.from(fullCmac);

    // only first 4 bytes of CMAC are used as MIC
    const MIC = fullCmac.slice(0, 4);

    if (isUplinkAndIs1_1) {
      const B1 = Buffer.concat([
        Buffer.from([0x49]), // as spec
        ConfFCntDownTxDrTxCh, // LoraWan Spec 1.1, pag. 27
        dir, // direction ('Dir')
        reverseBuffer(payload.DevAddr),
        reverseBuffer(payload.FCnt),
        FCntMSBytes, // upper 2 bytes of FCnt (zeroes)
        Buffer.alloc(1, 0), // 0x00
        Buffer.alloc(1, msgLen), // len(msg)
      ]);

      const cmacSInput = Buffer.concat([B1, payload.MHDR, payload.MACPayload]);
      let fullCmacS = new AesCmac(AppKey).calculate(cmacSInput);
      if (!(fullCmacS instanceof Buffer)) fullCmacS = Buffer.from(fullCmacS);

      // only first 2 bytes of CMAC and CMACS are used as MIC
      const MICS = fullCmacS.slice(0, 4);

      return Buffer.concat([MICS.slice(0, 2), MIC.slice(0, 2)]);
    }

    return MIC;
  }
}

// verify is just calculate & compare
function verifyMIC(
  payload: LoraPacket,
  NwkSKey?: Buffer,
  AppKey?: Buffer,
  FCntMSBytes?: Buffer,
  ConfFCntDownTxDrTxCh?: Buffer
): boolean {
  if (payload.MIC && payload.MIC.length !== 4) throw new Error("Expected a payload payload.MIC with length 4");

  const calculated = calculateMIC(payload, NwkSKey, AppKey, FCntMSBytes, ConfFCntDownTxDrTxCh);
  if (!payload.MIC) return false;
  return Buffer.compare(payload.MIC, calculated) === 0;
}

// calculate MIC & store
function recalculateMIC(
  payload: LoraPacket,
  NwkSKey?: Buffer,
  AppKey?: Buffer,
  FCntMSBytes?: Buffer,
  ConfFCntDownTxDrTxCh?: Buffer
): void {
  const calculated = calculateMIC(payload, NwkSKey, AppKey, FCntMSBytes, ConfFCntDownTxDrTxCh);
  payload.MIC = calculated;
  if (!payload.MHDR) throw new Error("Missing MHDR");
  if (!payload.MACPayload) throw new Error("Missing MACPayload");
  if (!payload.MIC) throw new Error("Missing MIC");
  if (!payload.MHDR) throw new Error("Missing MHDR");
  payload.PHYPayload = Buffer.concat([payload.MHDR, payload.MACPayload, payload.MIC]);
  payload.MACPayloadWithMIC = payload.PHYPayload.slice(payload.MHDR.length, payload.PHYPayload.length);
}

export { calculateMIC, verifyMIC, recalculateMIC };


text:
package com.lachesis.mnisqm.module.qualityForm.dao;

import java.util.List;
import java.util.Map;

import com.lachesis.mnisqm.module.qualityForm.domain.QualityTask;

public interface QualityTaskMapper {
    int deleteByPrimaryKey(Long seqId);

    int insert(QualityTask record);

    QualityTask selectByPrimaryKey(Long seqId);

    List<QualityTask> selectAll();

    int updateByPrimaryKey(QualityTask record);

    int updateForDelete(QualityTask record);

    List<QualityTask> queryByTimeAndTypeAndDeptCode(Map<String,Object> map);

    List<QualityTask> queryByHandUserName(String handUserName);

    /**
     * 通过计划id查询计划内的任务
     * @param planId
     * @return
     */
    List<QualityTask> queryByPlanId(Long planId);
}


text:
'use strict';

const firebase = require('firebase-admin');
const appConfig = require('../config/defaults/appConfig');
const dbConfig = require('../config/defaults/dbConfig');
const authenticator = require('../helpers/authenticator');
const dbMessage = require('../db/connectors/message');
const errorCreator = require('../error/errorCreator');
const objectValidator = require('../utils/objectValidator');
const roomManager = require('./rooms');
const textTools = require('../utils/textTools');
const managerHelper = require('../helpers/manager');
const userManager = require('./users');
const aliasManager = require('./aliases');
const imager = require('../helpers/imager');

/**
 * Get an emit type based on the message type
 * @param {Object} message The message to generate an emit type from.
 * @return {string} Emit type
 */
function generateEmitType(message) {
  switch (message.messageType) {
    case dbConfig.MessageTypes.WHISPER: { return dbConfig.EmitTypes.WHISPER; }
    case dbConfig.MessageTypes.BROADCAST: { return dbConfig.EmitTypes.BROADCAST; }
    default: { return dbConfig.EmitTypes.CHATMSG; }
  }
}

/**
 * Store and send a message.
 * @param {Object} params Parameters.
 * @param {Object} params.message Message to store and send.
 * @param {Function} params.callback Callback.
 * @param {Object} params.io Socket.io.
 * @param {string} params.emitType Type of emit event.
 * @param {Object} [params.image] Image attached to the message.
 */
function sendAndStoreMessage({
  message,
  callback,
  io,
  emitType,
  image,
  socket,
  room,
  disableNotifications,
  senderName = '',
  receiverName = '',
  pushTokens = [],
}) {
  const messageCallback = (chatMsg) => {
    dbMessage.createMessage({
      message: chatMsg,
      callback: ({ error, data }) => {
        if (error) {
          callback({ error });

          return;
        }

        const dataToSend = {
          data: {
            message: data.message,
            changeType: dbConfig.ChangeTypes.CREATE,
          },
        };

        if (socket) {
          socket.broadcast.to(message.roomId).emit(emitType, dataToSend);
        } else {
          io.to(message.roomId).emit(emitType, dataToSend);
        }

        callback(dataToSend);

        if (firebase.app && !disableNotifications && pushTokens.length > 0) {
          firebase.messaging().sendMulticast({
            notification: {
              title: room
                ? `${senderName} -> ${room.roomName}`
                : `${senderName} -> ${receiverName}`,
              body: message.text.join(' '),
            },
            tokens: pushTokens,
          }).catch((pushError) => {
            console.log('send error', pushError);
          });
        }
      },
    });
  };

  if (image) {
    imager.createImage({
      image,
      callback: ({ error: imageError, data: imageData }) => {
        if (imageError) {
          callback({ error: imageError });

          return;
        }

        const { image: createdImage } = imageData;
        const chatMsg = message;
        chatMsg.image = createdImage;

        messageCallback(chatMsg);
      },
    });

    return;
  }

  messageCallback(message);
}

/**
 * Get a message by Id.
 * @param {Object} params Parameters.
 * @param {string} params.token jwt.
 * @param {Function} params.callback Callback.
 * @param {string} params.messageId Id of the message to retrieve.
 */
function getMessageById({
  token,
  callback,
  messageId,
  internalCallUser,
}) {
  managerHelper.getObjectById({
    token,
    internalCallUser,
    callback,
    objectId: messageId,
    objectType: 'message',
    objectIdType: 'messageId',
    dbCallFunc: dbMessage.getMessageById,
    commandName: dbConfig.apiCommands.GetMessage.name,
  });
}

/**
 * Get messages by room
 * @param {Object} params Parameters.
 * @param {string} params.token jwt.
 * @param {Function} params.callback Callback.
 * @param {string} params.roomId Id of the room to retrieve messages from.
 * @param {Date} [params.startDate] Date for when to start the span of messages.
 * @param {boolean} [params.shouldGetFuture] Should messages from the future of the start date be retrieved?
 */
function getMessagesByRoom({
  token,
  callback,
  shouldGetFuture,
  startDate,
  roomId,
}) {
  authenticator.isUserAllowed({
    token,
    commandName: dbConfig.apiCommands.GetHistory.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      const { user: authUser } = data;

      if (!authUser.accessLevel < dbConfig.AccessLevels.ADMIN && !authUser.followingRooms.includes(roomId)) {
        callback({ error: new errorCreator.NotAllowed({ name: `${dbConfig.apiCommands.GetHistory.name}. User: ${authUser.objectId}. Access: messages room ${roomId}` }) });

        return;
      }

      roomManager.getRoomById({
        roomId,
        internalCallUser: authUser,
        needsAccess: true,
        callback: ({ error: roomError }) => {
          if (roomError) {
            callback({ error: roomError });

            return;
          }

          dbMessage.getMessagesByRoom({
            startDate,
            shouldGetFuture,
            roomId,
            callback,
            user: authUser,
          });
        },
      });
    },
  });
}

/**
 * Get messages from all the rooms that the user is following.
 * @param {Object} params Parameters.
 * @param {string} params.token jwt
 * @param {Function} params.callback Callback.
 */
function getMessagesByUser({
  token,
  callback,
}) {
  managerHelper.getObjects({
    token,
    callback,
    shouldSort: true,
    sortName: 'customTimeCreated',
    fallbackSortName: 'timeCreated',
    commandName: dbConfig.apiCommands.GetMessage.name,
    objectsType: 'messages',
    dbCallFunc: dbMessage.getMessagesByUser,
  });
}

/**
 * Get all messages from all rooms. Ids of the users and aliases are translated to names.
 * It returns rooms that includes messages.
 * @param {Object} params Parameters.
 * @param {string} params.token jwt.
 * @param {Function} params.callback Callback.
 */
function getFullHistory({ token, callback }) {
  authenticator.isUserAllowed({
    token,
    commandName: dbConfig.apiCommands.GetAllMessages.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      const { user: authUser } = data;

      dbMessage.getAllMessages({
        callback: ({ error: messagesError, data: messagesData }) => {
          if (messagesError) {
            callback({ error: messagesError });

            return;
          }

          roomManager.getAllRooms({
            internalCallUser: authUser,
            callback: ({ error: roomsError, data: roomsData }) => {
              if (roomsError) {
                callback({ error: roomsError });

                return;
              }

              userManager.getAllUsers({
                internalCallUser: authUser,
                callback: ({ error: usersError, data: usersData }) => {
                  if (usersError) {
                    callback({ error: usersError });

                    return;
                  }

                  aliasManager.getAllAliases({
                    internalCallUser: authUser,
                    callback: ({ error: aliasesError, data: aliasesData }) => {
                      if (aliasesError) {
                        callback({ error: aliasesError });

                        return;
                      }

                      const { aliases } = aliasesData;
                      const { users } = usersData;
                      const { rooms } = roomsData;
                      const roomsCollection = rooms.map((room) => {
                        const roomToSave = room;

                        if (room.isWhisper) {
                          const firstParticipant = users[room.participantIds[0]] || aliases[room.participantIds[0]];
                          const secondParticipant = users[room.participantIds[1]] || aliases[room.participantIds[1]];

                          roomToSave.roomName = `Whisper: ${firstParticipant.username || firstParticipant.aliasName} <-> ${secondParticipant.username || secondParticipant.aliasName}`;
                        }

                        return roomToSave;
                      });

                      messagesData.messages.sort((a, b) => {
                        const aTime = a.customTimeCreated || a.timeCreated;
                        const bTime = b.customTimeCreated || b.timeCreated;

                        if (aTime < bTime) {
                          return -1;
                        }

                        if (aTime > bTime) {
                          return 1;
                        }

                        return 0;
                      }).forEach((message) => {
                        const messageToSave = {
                          username: message.ownerAliasId
                            ? aliases[message.ownerAliasId].aliasName
                            : users[message.ownerId].username,
                          roomName: roomsCollection[message.roomId].roomName,
                          time: message.customTimeCreated || message.timeCreated,
                        };

                        roomsCollection[messageToSave.roomId].messages.push(messageToSave);
                      });

                      callback({
                        data: {
                          rooms: roomsCollection,
                        },
                      });
                    },
                  });
                },
              });
            },
          });
        },
      });
    },
  });
}

/**
 * Send broadcast message.
 * @param {Object} params Parameters.
 * @param {Object} params.message Message to be sent.
 * @param {Object} params.io Socket.io. Used by API, when no socket is available.
 * @param {Function} params.callback Client callback.
 * @param {Object} [params.socket] Socket.io socket.
 * @param {Object} [params.image] Image attached to the message.
 */
function sendBroadcastMsg({
  token,
  message,
  socket,
  callback,
  io,
  image,
  internalCallUser,
}) {
  authenticator.isUserAllowed({
    token,
    internalCallUser,
    commandName: dbConfig.apiCommands.SendBroadcast.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      if (!objectValidator.isValidData({ message, io }, { message: { text: true }, io: true })) {
        callback({ error: new errorCreator.InvalidData({ expected: '{ message: { text }, io }' }) });

        return;
      }

      const text = message.text.join('');

      if (!image && (text.length > appConfig.broadcastMaxLength || text.length <= 0)) {
        callback({ error: new errorCreator.InvalidLength({ expected: `text length ${appConfig.broadcastMaxLength}` }) });

        return;
      }

      const { user: authUser } = data;
      const newMessage = message;
      newMessage.text = textTools.cleanText(message.text);
      newMessage.messageType = dbConfig.MessageTypes.BROADCAST;
      newMessage.roomId = dbConfig.rooms.bcast.objectId;

      const aliasAccess = authenticator.checkAliasAccess({ object: newMessage, user: authUser, text: dbConfig.apiCommands.SendBroadcast.name });

      if (aliasAccess.error) { callback({ error: aliasAccess.error }); }

      userManager.getPushTokens({
        internalCallUser: authUser,
        callback: ({ error: pushError, data: pushData }) => {
          if (pushError) {
            callback({ error: pushError });

            return;
          }

          const { pushTokens } = pushData;

          sendAndStoreMessage({
            socket,
            io,
            callback,
            image,
            pushTokens,
            disableNotifications: authUser.disableNotifications,
            senderName: 'BROADCAST',
            emitType: dbConfig.EmitTypes.BROADCAST,
            message: newMessage,
          });
        },
      });
    },
  });
}

/**
 * Send a chat message.
 * @param {Object} params Parameters.
 * @param {Object} params.message Message to be sent.
 * @param {Object} params.io Socket.io. Used by API, when no socket is available.
 * @param {Function} params.callback Client callback.
 * @param {Object} [params.socket] Socket.io socket.
 * @param {Object} [params.image] Image attached to the message.
 */
function sendChatMsg({
  token,
  message,
  socket,
  callback,
  io,
  image,
  internalCallUser,
}) {
  authenticator.isUserAllowed({
    token,
    internalCallUser,
    commandName: dbConfig.apiCommands.SendMessage.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      if (!objectValidator.isValidData({ message, io }, { message: { text: true, roomId: true }, io: true })) {
        callback({ error: new errorCreator.InvalidData({ expected: '{ message: { text }, io }' }) });

        return;
      }

      const text = message.text.join('');

      if (!image && (text.length > appConfig.messageMaxLength || text.length <= 0)) {
        callback({ error: new errorCreator.InvalidCharacters({ expected: `text length ${appConfig.messageMaxLength}` }) });

        return;
      }

      const { user: authUser } = data;
      const newMessage = message;
      newMessage.text = textTools.cleanText(message.text);
      newMessage.messageType = dbConfig.MessageTypes.CHAT;
      newMessage.ownerId = authUser.objectId;

      const aliasAccess = authenticator.checkAliasAccess({ object: newMessage, user: authUser, text: dbConfig.apiCommands.SendMessage.name });

      if (aliasAccess.error) { callback({ error: aliasAccess.error }); }

      roomManager.getRoomById({
        needsAccess: true,
        internalCallUser: authUser,
        roomId: newMessage.roomId,
        callback: ({ error: roomError, data: roomData }) => {
          if (roomError) {
            callback({ error: roomError });

            return;
          }

          const { room } = roomData;
          const { followers } = room;

          userManager.getPushTokens({
            identities: followers,
            internalCallUser: authUser,
            callback: ({ error: pushError, data: pushData }) => {
              if (pushError) {
                callback({ error: pushError });

                return;
              }

              const { pushTokens } = pushData;

              if (newMessage.ownerAliasId) {
                aliasManager.getAliasById({
                  internalCallUser: authUser,
                  aliasId: newMessage.ownerAliasId,
                  callback: ({ error: aliasError, data: aliasData }) => {
                    if (aliasError) {
                      callback({ error: aliasError });

                      return;
                    }

                    const { alias: authAlias } = aliasData;

                    sendAndStoreMessage({
                      socket,
                      io,
                      callback,
                      image,
                      room,
                      pushTokens,
                      disableNotifications: authUser.disableNotifications,
                      senderName: authAlias.aliasName,
                      emitType: dbConfig.EmitTypes.CHATMSG,
                      message: newMessage,
                    });
                  },
                });
              }

              sendAndStoreMessage({
                socket,
                io,
                callback,
                image,
                room,
                pushTokens,
                disableNotifications: authUser.disableNotifications,
                senderName: authUser.username,
                emitType: dbConfig.EmitTypes.CHATMSG,
                message: newMessage,
              });
            },
          });
        },
      });
    },
  });
}

/**
 * Send whisper message.
 * @param {Object} params Parameters.
 * @param {Object} params.message Message to be sent.
 * @param {Object} params.io Socket.io. Used by API, when no socket is available.
 * @param {Function} params.callback Client callback.
 * @param {string} params.participantIds Id of the users.
 * @param {Object} [params.socket] Socket.io socket.
 * @param {Object} [params.image] Image attached to the message.
 */
function sendWhisperMsg({
  token,
  participantIds,
  message,
  socket,
  callback,
  io,
  image,
}) {
  authenticator.isUserAllowed({
    token,
    commandName: dbConfig.apiCommands.SendWhisper.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      if (!objectValidator.isValidData({ message, io }, { message: { text: true, roomId: true }, io: true })) {
        callback({ error: new errorCreator.InvalidData({ expected: '{ message: { text }, io }' }) });

        return;
      }

      const text = message.text.join('');

      if (!image && (text.length > appConfig.messageMaxLength || text.length <= 0)) {
        callback({ error: new errorCreator.InvalidCharacters({ expected: `text length ${appConfig.messageMaxLength}` }) });

        return;
      }

      const { user: authUser } = data;
      const newMessage = message;
      newMessage.text = textTools.cleanText(message.text);
      newMessage.messageType = dbConfig.MessageTypes.WHISPER;
      newMessage.ownerId = authUser.objectId;
      newMessage.ownerAliasId = participantIds.find((participant) => authUser.aliases.includes(participant));

      if (message.ownerAliasId && !authUser.aliases.includes(message.ownerAliasId)) {
        callback({ error: new errorCreator.NotAllowed({ name: `${dbConfig.apiCommands.SendWhisper.name}. User: ${authUser.objectId}. Access alias ${message.ownerAliasId}` }) });

        return;
      }

      roomManager.doesWhisperRoomExist({
        participantIds,
        callback: ({ error: existsError, data: existsData }) => {
          if (existsError) {
            callback({ error: existsError });

            return;
          }

          const sendCall = (roomData) => {
            if (roomData.error) {
              callback({ error: roomData.error });

              return;
            }

            userManager.getUserOrAliasOwner({
              identityId: participantIds.find((participant) => {
                return participant !== newMessage.ownerId && participant !== newMessage.ownerAliasId;
              }),
              internalCallUser: authUser,
              callback: ({ error: userError, data: userData }) => {
                if (userError) {
                  callback({ error: userError });

                  return;
                }

                const {
                  user,
                  alias,
                } = userData;

                if (newMessage.ownerAliasId) {
                  aliasManager.getAliasById({
                    internalCallUser: authUser,
                    aliasId: newMessage.ownerAliasId,
                    callback: ({ error: aliasError, data: aliasData }) => {
                      if (aliasError) {
                        callback({ error: aliasError });

                        return;
                      }

                      const { alias: authAlias } = aliasData;

                      sendAndStoreMessage({
                        socket,
                        io,
                        callback,
                        image,
                        disableNotifications: authUser.disableNotifications,
                        receiverName: alias
                          ? alias.aliasName
                          : user.username,
                        senderName: authAlias.aliasName,
                        pushTokens: [userData.user].map((usr) => { return usr.pushToken; }),
                        emitType: dbConfig.EmitTypes.WHISPER,
                        message: newMessage,
                      });
                    },
                  });

                  return;
                }

                sendAndStoreMessage({
                  socket,
                  io,
                  callback,
                  image,
                  disableNotifications: authUser.disableNotifications,
                  receiverName: alias
                    ? alias.aliasName
                    : user.username,
                  senderName: authUser.username,
                  pushTokens: [userData.user].map((usr) => { return usr.pushToken; }),
                  emitType: dbConfig.EmitTypes.WHISPER,
                  message: newMessage,
                });
              },
            });
          };
          const { exists } = existsData;

          if (!exists) {
            roomManager.createAndFollowWhisperRoom({
              participantIds,
              socket,
              io,
              token,
              user: authUser,
              callback: (newWhisperData) => {
                if (newWhisperData.error) {
                  callback({ error: newWhisperData.error });

                  return;
                }

                const { room: newRoom } = newWhisperData.data;
                newMessage.roomId = newRoom.objectId;

                roomManager.getRoomById({
                  roomId: newMessage.roomId,
                  internalCallUser: authUser,
                  callback: sendCall,
                });
              },
            });

            return;
          }

          roomManager.getRoomById({
            needsAccess: true,
            roomId: newMessage.roomId,
            internalCallUser: authUser,
            callback: sendCall,
          });
        },
      });
    },
  });
}

/**
 * Remove a message.
 * @param {Object} params Parameters.
 * @param {string} params.messageId Id of the message.
 * @param {Function} params.callback Callback.
 * @param {string} params.token jwt.
 * @param {Object} params.io Socket.io.
 */
function removeMessage({
  messageId,
  callback,
  token,
  io,
  socket,
  internalCallUser,
}) {
  managerHelper.removeObject({
    callback,
    token,
    io,
    socket,
    internalCallUser,
    getDbCallFunc: dbMessage.getMessageById,
    getCommandName: dbConfig.apiCommands.GetMessage.name,
    objectId: messageId,
    commandName: dbConfig.apiCommands.RemoveMessage.name,
    objectType: 'message',
    dbCallFunc: dbMessage.removeMessage,
    emitTypeGenerator: generateEmitType,
    objectIdType: 'messageId',
  });
}

/**
 * Update a message.
 * @param {Object} params Parameters.
 * @param {Object} params.message Message to update with.
 * @param {string} params.messageId Id of the message.
 * @param {Function} params.callback Callback.
 * @param {string} params.token jwt.
 * @param {Object} params.io Socket.io.
 * @param {Object} params.options Update options.
 */
function updateMessage({
  messageId,
  message,
  callback,
  token,
  io,
  options,
  internalCallUser,
}) {
  authenticator.isUserAllowed({
    token,
    internalCallUser,
    commandName: dbConfig.apiCommands.UpdateMessage.name,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      const authUser = internalCallUser || data.user;

      getMessageById({
        messageId,
        internCallUser: authUser,
        callback: ({ error: getError, data: getData }) => {
          if (getError) {
            callback({ error: getError });

            return;
          }

          const { message: oldMessage } = getData;
          const {
            hasFullAccess,
          } = authenticator.hasAccessTo({
            objectToAccess: oldMessage,
            toAuth: authUser,
          });

          if (!hasFullAccess) {
            callback({ error: new errorCreator.NotAllowed({ name: `${dbConfig.apiCommands.UpdateMessage.name}. User: ${authUser.objectId}. Access message ${messageId}` }) });

            return;
          }

          dbMessage.updateMessage({
            messageId,
            message,
            options,
            callback: ({ error: updateError, data: updateData }) => {
              if (updateError) {
                callback({ error: updateError });

                return;
              }

              const { message: updatedMessage } = updateData;

              const emitType = generateEmitType(updatedMessage);
              const oldRoomId = oldMessage.roomId;
              const sendToId = updatedMessage.roomId;
              const dataToSend = {
                data: {
                  message: updatedMessage,
                  changeType: dbConfig.ChangeTypes.UPDATE,
                },
              };

              if (oldRoomId !== sendToId) {
                const oldDataToSend = {
                  data: {
                    message: { objectId: oldMessage.objectId },
                    changeType: dbConfig.ChangeTypes.REMOVE,
                  },
                };

                io.to(oldRoomId).emit(emitType, oldDataToSend);
              }

              io.to(sendToId).emit(emitType, dataToSend);

              callback(dataToSend);
            },
          });
        },
      });
    },
  });
}

exports.sendBroadcastMsg = sendBroadcastMsg;
exports.sendChatMsg = sendChatMsg;
exports.sendWhisperMsg = sendWhisperMsg;
exports.removeMesssage = removeMessage;
exports.updateMessage = updateMessage;
exports.getMessagesByRoom = getMessagesByRoom;
exports.getMessageById = getMessageById;
exports.getMessagesByUser = getMessagesByUser;
exports.getFullHistory = getFullHistory;


text:
const csv = require('@fast-csv/format');

const csvStream = csv.format({ headers: ['header1', 'header2'], quoteHeaders: [false, true] });

csvStream.pipe(process.stdout).on('end', () => process.exit());

csvStream.write({ header1: 'value1a', header2: 'value2a' });
csvStream.write({ header1: 'value1a', header2: 'value2a' });
csvStream.write({ header1: 'value1a', header2: 'value2a' });
csvStream.write({ header1: 'value1a', header2: 'value2a' });
csvStream.end();

// Output:
// header1,"header2"
// value1a,value2a
// value1a,value2a
// value1a,value2a
// value1a,value2a


text:
namespace content {

// Provided customized ack response for input events.
class CONTENT_EXPORT InputAckHandler {
 public:
  virtual ~InputAckHandler() {}

  // Called upon event ack receipt from the renderer.
  virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event,
                                  InputEventAckState ack_result) = 0;
  virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event,
                               InputEventAckState ack_result) = 0;
  virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
                               InputEventAckState ack_result) = 0;
  virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
                                 InputEventAckState ack_result) = 0;

  enum UnexpectedEventAckType {
    UNEXPECTED_ACK,
    UNEXPECTED_EVENT_TYPE,
    BAD_ACK_MESSAGE
  };
  virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) = 0;
};

} // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_


text:
import findSection from '../findSection';

const sections = [
	{
		name: 'General',
		sections: [
			{
				name: 'Particles',
				components: [
					{
						name: 'Button',
					},
					{
						name: 'Image',
					},
				],
			},
		],
	},
];

describe('findSection', () => {
	it('should return top level section', () => {
		const result = findSection(sections, 'General');
		expect(result).toEqual(sections[0]);
	});

	it('should return nested sections', () => {
		const result = findSection(sections, 'Particles');
		expect(result).toEqual(sections[0].sections[0]);
	});

	it('should return undefined when no sections found', () => {
		const result = findSection(sections, 'Pizza');
		expect(result).toBeFalsy();
	});
});


text:
package client

import (
	"github.com/cenkalti/rpc2"
	"github.com/oscp/openshift-monitoring/models"
	"log"
	"os"
	"time"
)

func registerOnHub(h string, dc *models.DaemonClient) {
	log.Println("registring on the hub:", h)
	var rep string
	for {
		err := dc.Client.Call("register", dc.Daemon, &rep)
		if err != nil {
			log.Println("error registring on hub. Will try again in 5 seconds. Error: ", err)
			time.Sleep(5 * time.Second)
		} else {
			break
		}
	}
	if rep != "ok" {
		log.Fatalf("expected the hub to answer with ok. he did with: %+v", rep)
	}
}

func unregisterOnHub(c *rpc2.Client) {
	var rep string
	host, _ := os.Hostname()
	err := c.Call("unregister", host, &rep)
	if err != nil {
		log.Fatalf("error when unregistring from hub: %s", err)
	}
	c.Close()
}

func HandleCheckStarted(dc *models.DaemonClient) {
	dc.Daemon.StartedChecks++
	updateDaemonOnHub(dc)
}

func HandleCheckFinished(dc *models.DaemonClient, err error, t string) {
	// Update check counts
	if err == nil {
		dc.ToHub <- models.CheckResult{Type: t, IsOk: true, Message: ""}
		dc.Daemon.SuccessfulChecks++
	} else {
		dc.ToHub <- models.CheckResult{Type: t, IsOk: false, Message: err.Error()}
		dc.Daemon.FailedChecks++
	}
	updateDaemonOnHub(dc)
}

func HandleChecksStopped(dc *models.DaemonClient) {
	log.Println("stopped checks")
	updateDaemonOnHub(dc)
}

func updateDaemonOnHub(dc *models.DaemonClient) {
	var rep string
	err := dc.Client.Call("updateCheckcount", dc.Daemon, &rep)
	if err != nil {
		log.Println("error updating Checkcounts on hub: ", err)
	}
}

func handleCheckResultToHub(dc *models.DaemonClient) {
	for {
		var r = <-dc.ToHub
		r.Hostname = dc.Daemon.Hostname

		if err := dc.Client.Call("checkResult", r, nil); err != nil {
			log.Println("error sending CheckResult to hub", err)
		}
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Platygloea laplata Lindsey

### Remarks
null


text:
#pragma checksum "C:\Users\DonCampos\Source\Workspaces\InfoApp\InfoAppWindows8\App8\App8.WindowsPhone\ADGAT.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3A12A5D4117D4FDCF927FB7C0A634819"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace App8
{
    partial class ADGAT : global::Windows.UI.Xaml.Controls.Page
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
        private global::Windows.UI.Xaml.Controls.Grid LayoutRoot;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
        private global::Windows.UI.Xaml.Controls.Grid ContentRoot;
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
        private bool _contentLoaded;

        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            global::Windows.UI.Xaml.Application.LoadComponent(this, new global::System.Uri("ms-appx:///ADGAT.xaml"), global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);

            LayoutRoot = (global::Windows.UI.Xaml.Controls.Grid)this.FindName("LayoutRoot");
            ContentRoot = (global::Windows.UI.Xaml.Controls.Grid)this.FindName("ContentRoot");
        }
    }
}


text:
layout: post
title:
categories: blog
excerpt:
tags: []
image:
  feature:
link:
date:
modified:
share: true
---

To create a new blog post:

1. Make a copy of this file and save it in the `_posts/blog` directory with a name that follows the convention: `YYYY-MM-DD-name-of-post.md`
  * For example: `_posts/blog/2017-04-28-Hello-world.md`
2. In your new file update the header information:
  * Update the title by replacing "INSERT TITLE" on line 3 with the title
  * Add an excerpt if you'd like. This will be seen on the blog landing page or the search page. Try to keep the excerpt only one short sentence long.
  * Update the tags by removing "INSERT TAGS IF APPLICABLE" with comma separated tags
    * Eg: `onboarding, data science`
  * Update the date with today's date (or the date you want the post to go live) by replacing the date on line 9.

3. Write the blog post! You can use markdown to format the text. Check out this handy dandy [markdown cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) by [adam-p](https://github.com/adam-p).


text:
CKEDITOR.plugins.setLang( 'find', 'en-ca', {
	find: 'Find',
	findOptions: 'Find Options',
	findWhat: 'Find what:',
	matchCase: 'Match case',
	matchCyclic: 'Match cyclic',
	matchWord: 'Match whole word',
	notFoundMsg: 'The specified text was not found.',
	replace: 'Replace',
	replaceAll: 'Replace All',
	replaceSuccessMsg: '%1 occurrence(s) replaced.',
	replaceWith: 'Replace with:',
	title: 'Find and Replace'
} );