text:
@import GLKit;

#import "../QX3D/QX3DObject.h"
#import "../QX3D/QX3DMaterial.h"

#import "CMYKRenderableSquare.h"
#import "CMYKRotationAnimator.h"
#import "CMYKWaveAnimator.h"
#import "CMYKFadeFromWhiteAnimator.h"
#import "CMYKDarkenAnimator.h"
#import "CMYKRenderableDigit.h"

#import "CMYKTileStack.h"
#import "CMYKTetromino.h"

#import "CMYKRenderableTexturedSquare.h"

#define PI 3.141592654

typedef struct tileArray
{
	char data[5][5];
} tileArray;

@interface CMYKScene ()
{
	CMYKTileStack *tiles[5][5];
	CMYKTetromino *tetromino;

	QX3DObject *scale;

	CGSize size;

	GLKTextureInfo *tetrominoTextures[7];
	GLKTextureInfo *colorCircles[3];

	NSArray *digitTextures;

	QX3DObject *sources[4];
	CMYKRenderableTexturedSquare *sourceCircleMaterials[4];
	CMYKRenderableTexturedSquare *sourceTetrominoMaterials[4];
	NSUInteger sourcerotations[4];
	NSUInteger sourcecolors[4];
	NSUInteger sourcetetrominos[4];

	BOOL trackingFromButton;
	NSUInteger trackingButtonIndex;

	CGPoint startPoint;

	GLfloat rotation;
	GLfloat targetRotation;
	GLfloat rotationDirection;

	GLfloat buttonY[4];
	GLfloat buttonTargetY[4];

	BOOL finalizingRotation;

	QX3DMaterial *flatmat;
	QX3DMaterial *colormat;
	QX3DMaterial *texturemat;

	NSTimeInterval idleTimer;
	NSTimeInterval dragTimer;
	NSTimeInterval timeLeftTimer;

	NSInteger blockcount;
	NSInteger score;

	BOOL gameOverState;
	BOOL playingIntroState;

	QX3DObject *darkOverlay;

	CMYKRenderableDigit *digits[3];
	CMYKRenderableDigit *scoreDigits[6];

	QX3DObject *outoftime;
	QX3DObject *outofmoves;
	QX3DObject *gameoverDisplay;
}

@end

@implementation CMYKScene

- (instancetype)init
{
    self = [super init];
    if (self)
	{
		self.baseModelViewMatrix = GLKMatrix4MakeTranslation(0.0f, 0.0f, -4.0f);

		[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadBecauseOfColorsetChangeNotification) name:@"reloadBecauseOfColorsetChangeNotification" object:nil];

    }
    return self;
}

- (void)reloadBecauseOfColorsetChangeNotification
{
	[self initializeWithSize:size];
}

- (void)updateWithSize:(CGSize)_size interval:(NSTimeInterval)timeSinceLastUpdate
{
	size = _size;
	idleTimer += timeSinceLastUpdate;
	dragTimer += timeSinceLastUpdate;
	if (!self.isOccupiedBySomethingElse && !gameOverState) timeLeftTimer -= timeSinceLastUpdate;
	if (timeLeftTimer < 0 && !gameOverState)
	{
		idleTimer = 0;
		gameoverDisplay = outoftime;
		[gameoverDisplay attachToObject:self];
		[self.delegate becomeActive];
		[self gameOver];
	}

	if (idleTimer > 1.0) [self.delegate becomeIdle];

	float rangeX = size.width / 2.0;
	float rangeY = size.height / 2.0;
    self.projectionMatrix = GLKMatrix4MakeOrtho(-rangeX, rangeX, -rangeY, rangeY, -100, 100);

	scale.scale = rangeX / 3.0;
	tetromino.scale = rangeX / 3.0;

	if (targetRotation > rotation) rotation += ((targetRotation - rotation) / 5.0);
	if (targetRotation < rotation) rotation -= ((rotation - targetRotation) / 5.0);

	if (finalizingRotation && fabs(targetRotation - rotation) < 0.01)
	{
		[self normalizeRotationWithTarget:targetRotation];

		rotation = 0;
		targetRotation = 0;
		finalizingRotation = NO;
	}

	scale.orientation = GLKQuaternionMakeWithAngleAndAxis(rotation, 0, 0, 1);

	for (NSInteger i = 0; i < 4; i++)
	{
		if (buttonTargetY[i] > buttonY[i]) buttonY[i] += ((buttonTargetY[i] - buttonY[i]) / 7.0);
		if (buttonTargetY[i] < buttonY[i]) buttonY[i] -= ((buttonY[i] - buttonTargetY[i]) / 7.0);

		sources[i].position = GLKVector3Make(sources[i].position.x, buttonY[i], 0);
	}

	{
		if (timeLeftTimer < 0) timeLeftTimer = 0;

		NSInteger left = (NSInteger)timeLeftTimer;
		for (int i = 0; i < 3; i++)
		{
			NSInteger d = left % 10;
			left /= 10;

			[digits[2 - i] switchToDigit:d];
		}
	}

	{
		NSInteger left = (NSInteger)score;
		for (int i = 0; i < 6; i++)
		{
			NSInteger d = left % 10;
			left /= 10;

			[scoreDigits[5 - i] switchToDigit:d animated:YES];
		}
	}

	[super updateWithSize:size interval:timeSinceLastUpdate];
}

- (tileArray)rotateLeft:(tileArray)input
{
	tileArray res;

	// rotate left
	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			res.data[y][4 - x] = input.data[x][y];
		}
	}

	return res;
}

- (tileArray)rotateRight:(tileArray)input
{
	tileArray res;

	// rotate right
	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			res.data[4 - y][x] = input.data[x][y];
		}
	}

	return res;
}

- (tileArray)rotateTwice:(tileArray)input
{
	tileArray res;

	// rotate left twice
	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			res.data[4 - x][4 - y] = input.data[x][y];
		}
	}

	return res;
}

- (tileArray)rotateNone:(tileArray)input
{
	return input;
}

- (tileArray)tilesToTileArray
{
	tileArray res;

	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			char l1 = tiles[x][y].l1 ? 1 : 0;
			char l2 = tiles[x][y].l2 ? 1 : 0;
			char l3 = tiles[x][y].l3 ? 1 : 0;
			char t = l1 | (l2 << 1) | (l3 << 2);

			res.data[x][y] = t;
		}
	}

	return res;
}

- (void)tileArrayToTiles:(tileArray)input
{
	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			char l1 = input.data[x][y] & 1;
			char l2 = input.data[x][y] & (1 << 1);
			char l3 = input.data[x][y] & (1 << 2);

			tiles[x][y].l1 = l1;
			tiles[x][y].l2 = l2;
			tiles[x][y].l3 = l3;
		}
	}
}

- (void)normalizeRotationWithTarget:(GLfloat)target
{
	tileArray temp;
	tileArray res;

	temp = [self tilesToTileArray];

	if (target < -0.25 * PI && target > -0.75 * PI) res = [self rotateRight:temp];
	if (target > 0.25 * PI && target < 0.75 * PI) res = [self rotateLeft:temp];
	if (target >= -0.25 * PI && target <= 0.25 * PI) res = [self rotateNone:temp];
	if (target <= -0.75 * PI || target >= 0.75 * PI) res = [self rotateTwice:temp];

	[self tileArrayToTiles:res];
}

- (BOOL)tetrominoFitsAtPosition:(CGPoint)pos withTileArray:(tileArray)array
{
	BOOL res = YES;

	for (NSInteger i = 0; i < tetromino.dotCount; i++)
	{
		CGPoint p = [tetromino dotAtIndex:i];
		NSInteger c = tetromino.color;

		char x = array.data[(int)pos.x + (int)p.x][(int)pos.y + (int)p.y];

		char l1 = x & 1;
		char l2 = x & (1 << 1);
		char l3 = x & (1 << 2);

		if (c == 0 && l1) res = NO;
		if (c == 1 && l2) res = NO;
		if (c == 2 && l3) res = NO;
	}

	return res;
}

- (BOOL)checkGameOver
{
	// OK, this is a bit inefficient, but since no animations are running,
	//  we can get away with it...

	tileArray now = [self tilesToTileArray];

	BOOL allowed = NO;

	for (int z = 0; z < 4; z++)
	{
		now = [self rotateLeft:now];

		for (int i = 0; i < 4; i++)
		{
			[tetromino prepareWithTetromino:sourcetetrominos[i]];
			[tetromino setColor:sourcecolors[i]];

			for (int x = 0; x < 5 - tetromino.width; x++)
			{
				for (int y = 0; y < 5 - tetromino.height; y++)
				{
					if ([self tetrominoFitsAtPosition:CGPointMake(x, y) withTileArray:now])
						allowed = YES;
				}
			}
		}
	}

	return !allowed;
}

- (void)gameOver
{
	gameOverState = YES;

	for (NSInteger i = 0; i < 4; i++)
	{
		//buttonTargetY[i] = (-size.height / 2.0) - 100.0;
	}

	[self.delegate gameCompletedWithScore:score];

	QX3DObject *obj = [QX3DObject new];

	CMYKRenderableSquare *sq = [CMYKRenderableSquare renderableForObject:obj];
	sq.material = flatmat;
	CMYKDarkenAnimator *anim = [CMYKDarkenAnimator animatorForObject:obj];
	[anim attachToObject:obj];	// A bit redundant...

	obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
	obj.position = GLKVector3Make(0, 0, 0);
	obj.scale = 6.0;

	[obj attachToObject:scale];
	darkOverlay = obj;

	[tetromino detach];
}

- (void)restartGame
{
	idleTimer = 0;
	[self.delegate becomeActive];

	[self performSelector:@selector(restartGameImpl) withObject:nil afterDelay:0.3];
}

- (void)restartGameImpl
{
	if (darkOverlay) [darkOverlay detach];
	darkOverlay = nil;

	idleTimer = 0;
	score = 0;
	blockcount = 0;
	timeLeftTimer = 60;
	targetRotation = 0;

	if (gameoverDisplay)
	{
		[gameoverDisplay detach];
		gameoverDisplay = nil;
	}

	CGPoint p;

	for (NSInteger x = 0; x < 5; x++)
	{
		for (NSInteger y = 0; y < 5; y++)
		{
			p.x = x; p.y = y;
			p.x -= 2; p.y -= 2;
			p.x *= 1.1; p.y *= 1.1;

			QX3DObject *obj = [QX3DObject new];
			CMYKRenderableSquare *sq = [CMYKRenderableSquare renderableForObject:obj];
			sq.material = flatmat;
			CMYKFadeFromWhiteAnimator *anim = [CMYKFadeFromWhiteAnimator animatorForObject:obj];
			[anim attachToObject:obj];	// A bit redundant...

			obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
			obj.position = GLKVector3Make(p.x, -p.y, 0);

			[obj attachToObject:scale];

			tiles[x][y].l1 = NO;
			tiles[x][y].l2 = NO;
			tiles[x][y].l3 = NO;
		}
	}

	for (NSInteger i = 0; i < 4; i++)
	{
		// Initialize button with new values
		NSInteger random3 = arc4random() % 3;
		NSInteger random7 = arc4random() % 7;

		sourceCircleMaterials[i].glkTexture = colorCircles[i < 3 ? i : random3];
		sourcecolors[i] = i < 3 ? i : random3;

		sourceTetrominoMaterials[i].glkTexture = tetrominoTextures[random7];
		sourcetetrominos[i] = random7;

		buttonTargetY[i] = (-size.height / 2.0) + 40.0;
	}

	[tetromino detach];
	gameOverState = NO;
}

- (void)prepareForRendering
{
	[super prepareForRendering];

	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}

- (void)initializeWithSize:(CGSize)newSize
{
	// Remove all old objects, so we can re-initialize the scene should something important happen...
	{
		NSMutableArray *allObjects = [NSMutableArray array];

		[self.objects enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
			[allObjects addObject:obj];
		}];

		[allObjects enumerateObjectsUsingBlock:^(QX3DObject *obj, NSUInteger idx, BOOL *stop) {
			[obj detach];
		}];
	}

	size = newSize;

	for (int i = 0; i < 7; i++)
	{
		NSString *name = [NSString stringWithFormat:@"tetromino%d@2x", i];

		NSError *err;

		NSString *texPath = [[NSBundle mainBundle] pathForResource:name ofType:@"png"];
		tetrominoTextures[i] = [GLKTextureLoader textureWithContentsOfFile:texPath options:@{GLKTextureLoaderOriginBottomLeft: @(YES)} error:&err];
	}

	{
		NSMutableArray *arr = [NSMutableArray array];

		for (int i = 0; i < 10; i++)
		{
			NSString *name = [NSString stringWithFormat:@"score_%d@2x", i];

			NSError *err;

			NSString *texPath = [[NSBundle mainBundle] pathForResource:name ofType:@"png"];
			[arr addObject:[GLKTextureLoader textureWithContentsOfFile:texPath options:@{GLKTextureLoaderOriginBottomLeft: @(YES)} error:&err]];
		}

		digitTextures = [NSArray arrayWithArray:arr];
	}

	NSString *gameMode = [[NSUserDefaults standardUserDefaults] objectForKey:@"colorSet"];
	if (!gameMode) gameMode = @"CMYK";

	NSArray *arr;
	if ([gameMode isEqualToString:@"CMYK"]) arr = @[@"cyan_circle@2x", @"magenta_circle@2x", @"yellow_circle@2x"];
	if ([gameMode isEqualToString:@"RGB"]) arr = @[@"red_circle@2x", @"green_circle@2x", @"blue_circle@2x"];
	if ([gameMode isEqualToString:@"RYB"]) arr = @[@"red_circle@2x", @"yellow_circle@2x", @"blue_circle@2x"];

	[arr enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
		NSError *err;

		NSString *texPath = [[NSBundle mainBundle] pathForResource:obj ofType:@"png"];
		self->colorCircles[idx] = [GLKTextureLoader textureWithContentsOfFile:texPath options:@{GLKTextureLoaderOriginBottomLeft: @(YES)} error:&err];
	}];

	NSString *pixelProgram;
	if ([gameMode isEqualToString:@"CMYK"]) pixelProgram = @"subtractive";
	if ([gameMode isEqualToString:@"RGB"]) pixelProgram = @"additive";
	if ([gameMode isEqualToString:@"RYB"]) pixelProgram = @"paint";

	colormat = [QX3DMaterial materialWithVertexProgram:@"simplevertex" pixelProgram:pixelProgram attributes:@{@"position": @(GLKVertexAttribPosition)}];

	texturemat = [QX3DMaterial materialWithVertexProgram:@"texturedvertex" pixelProgram:@"textured" attributes:@{@"position": @(GLKVertexAttribPosition), @"texturecoordinate": @(GLKVertexAttribTexCoord0)}];

	flatmat = [QX3DMaterial materialWithVertexProgram:@"simplevertex" pixelProgram:@"flatcolor" attributes:@{@"position": @(GLKVertexAttribPosition)}];

	scale = [QX3DObject new];
	scale.orientation = GLKQuaternionMakeWithAngleAndAxis(rotation, 0, 0, 1);
	scale.position = GLKVector3Make(0, 0, 0);
	[scale attachToObject:self];

	for (int x = -2; x <= 2; x++)
	{
		for (int y = -2; y <= 2; y++)
		{
			QX3DObject *obj = [QX3DObject new];
			obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
			obj.position = GLKVector3Make(x * 1.1, -y * 1.1, 0);

			CMYKRenderableSquare *square = [CMYKRenderableSquare renderableForObject:obj];
			square.color = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1];

			square.material = flatmat;
			[obj attachToObject:scale];

			CMYKTileStack *stack = [[CMYKTileStack alloc] initWithMaterial:colormat];
			stack.position = GLKVector3Make(x * 1.1, -y * 1.1, 0);

			[stack attachToObject:scale];

			tiles[x + 2][y + 2] = stack;
		}
	}

	tetromino = [[CMYKTetromino alloc] initWithMaterial:colormat];
	[tetromino setRotation:0];

	for (NSInteger i = 0; i < 4; i++)
	{
		QX3DObject *obj = [QX3DObject new];
		obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		obj.position = GLKVector3Make(-111 + (i * 74), -500, 0);
		sources[i] = obj;

		buttonY[i] = -500;
		buttonTargetY[i] = (-size.height / 2.0) + 40.0;

		NSInteger random3 = arc4random() % 3;
		NSInteger random7 = arc4random() % 7;

		CMYKRenderableTexturedSquare *s = [CMYKRenderableTexturedSquare renderableForObject:obj];
		s.material = texturemat;
		s.glkTexture = colorCircles[i < 3 ? i : random3];
		sourceCircleMaterials[i] = s;
		sourcecolors[i] = i < 3 ? i : random3;

		CMYKRenderableTexturedSquare *t = [CMYKRenderableTexturedSquare renderableForObject:obj];
		t.material = texturemat;
		t.glkTexture = tetrominoTextures[random7];
		sourceTetrominoMaterials[i] = t;
		sourcetetrominos[i] = random7;

		[obj attachToObject:self];
	}

	for (NSInteger i = 0; i < 3; i++)
	{
		QX3DObject *obj = [QX3DObject new];
		obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		obj.position = GLKVector3Make(15 + i * 14, (size.height / 2.0) - 40, 0);

		CMYKRenderableDigit *digit = [CMYKRenderableDigit renderableForObject:obj];
		digit.material = texturemat;
		[digit setDigitTextures:digitTextures];
		[digit switchToDigit:0];

		digits[i] = digit;

		[obj attachToObject:self];
	}

	for (NSInteger i = 0; i < 6; i++)
	{
		QX3DObject *obj = [QX3DObject new];
		obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		obj.position = GLKVector3Make(-95 + i * 14, (size.height / 2.0) - 40, 0);

		CMYKRenderableDigit *digit = [CMYKRenderableDigit renderableForObject:obj];
		digit.material = texturemat;
		[digit setDigitTextures:digitTextures];
		[digit switchToDigit:0];

		scoreDigits[i] = digit;

		[obj attachToObject:self];
	}

	{
		QX3DObject *obj = [QX3DObject new];
		obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		obj.position = GLKVector3Make(-5, (size.height / 2.0) - 40, 0);

		CMYKRenderableTexturedSquare *clock = [CMYKRenderableTexturedSquare renderableForObject:obj];
		clock.material = texturemat;
		clock.texture = @"clock@2x";

		[obj attachToObject:self];
	}

	{
		outofmoves = [QX3DObject new];
		outofmoves.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		outofmoves.position = GLKVector3Make(0, 0, 0);

		CMYKRenderableTexturedSquare *sq = [CMYKRenderableTexturedSquare renderableForObject:outofmoves];
		sq.material = texturemat;
		sq.texture = @"outofmoves@2x";
	}

	{
		outoftime = [QX3DObject new];
		outoftime.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
		outoftime.position = GLKVector3Make(0, 0, 0);

		CMYKRenderableTexturedSquare *sq = [CMYKRenderableTexturedSquare renderableForObject:outoftime];
		sq.material = texturemat;
		sq.texture = @"outoftime@2x";
	}

	timeLeftTimer = 60;

	[self restartGame];
}

- (void)moveTetrominoToPoint:(CGPoint)point
{
	float rangeX = size.width / 2.0;
	float rangeY = size.height / 2.0;

	CGFloat w = tetromino.width;
	CGFloat h = tetromino.height;
	CGFloat oscale = tetromino.scale;

	CGFloat offX = -(w / 2.0) * oscale;
	CGFloat offY = h * oscale + (oscale / 2.0);

	tetromino.position = GLKVector3Make(point.x - rangeX + offX, (size.height - point.y) - rangeY + offY, 0);
}

- (void)dropTetrominoIfAllowed
{
	NSInteger subscore = 0;

	GLfloat tileScale = scale.scale * 1.1;
	CGPoint topLeft = CGPointMake(size.width / 2.0 - 2.5 * tileScale, size.height / 2.0 - 2.5 * tileScale);

	CGPoint tetrominoTopLeft = CGPointMake(tetromino.position.x - tetromino.scale / 2.0, (-tetromino.position.y) - tetromino.scale / 2.0);
	tetrominoTopLeft.x = tetrominoTopLeft.x + size.width / 2.0;
	tetrominoTopLeft.y = tetrominoTopLeft.y + size.height / 2.0;

	CGFloat tX = (tetrominoTopLeft.x - topLeft.x) / tileScale;
	CGFloat tY = (tetrominoTopLeft.y - topLeft.y) / tileScale;

	NSInteger iX = roundf(tX);
	NSInteger iY = roundf(tY);

	// See if it fits
	BOOL allowed = YES;

	if (iX < 0 || iY < 0) allowed = NO;
	if (iX + tetromino.width > 4) allowed = NO;
	if (iY + tetromino.height > 4) allowed = NO;

	if (allowed)
		allowed = [self tetrominoFitsAtPosition:CGPointMake(iX, iY) withTileArray:[self tilesToTileArray]];

	if (allowed)
	{
		subscore += 100.0 / dragTimer;

		for (NSInteger i = 0; i < tetromino.dotCount; i++)
		{
			CGPoint p = [tetromino dotAtIndex:i];
			NSInteger c = tetromino.color;

			CMYKTileStack *t = tiles[(int)p.x + iX][(int)p.y + iY];

			if (c == 0) { t.l1 = YES; }
			if (c == 1) { t.l2 = YES; }
			if (c == 2) { t.l3 = YES; }
		}

		for (int x = 0; x < 5; x++)
		{
			for (int y = 0; y < 5; y++)
			{
				CMYKTileStack *stack = tiles[x][y];
				if (stack.l1 && stack.l2 && stack.l3)
				{
					stack.l1 = NO;
					stack.l2 = NO;
					stack.l3 = NO;

					subscore += 100.0;
				}
			}
		}

		// Create flash objects
		for (NSInteger i = 0; i < tetromino.dotCount; i++)
		{
			CGPoint p = [tetromino dotAtIndex:i];

			p.x += iX; p.y += iY;
			p.x -= 2; p.y -= 2;
			p.x *= 1.1; p.y *= 1.1;

			QX3DObject *obj = [QX3DObject new];
			CMYKRenderableSquare *sq = [CMYKRenderableSquare renderableForObject:obj];
			sq.material = flatmat;
			CMYKFadeFromWhiteAnimator *anim = [CMYKFadeFromWhiteAnimator animatorForObject:obj];
			[anim attachToObject:obj];	// A bit redundant...

			obj.orientation = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1);
			obj.position = GLKVector3Make(p.x, -p.y, 0);

			[obj attachToObject:scale];
		}

		// Initialize button with new values
		NSInteger random7 = arc4random() % 7;

		if (blockcount < 250)
		{
			NSInteger diff = 0;
			while(diff != 7)
			{
				NSInteger random3 = arc4random() % 3;
				sourceCircleMaterials[trackingButtonIndex].glkTexture = colorCircles[random3];
				sourcecolors[trackingButtonIndex] = random3;

				diff = 0;

				for (int i = 0; i < 4; i++)
					diff |= (1 << sourcecolors[i]);
			}
		}

		sourceTetrominoMaterials[trackingButtonIndex].glkTexture = tetrominoTextures[random7];
		sourcetetrominos[trackingButtonIndex] = random7;

		[tetromino detach];

		buttonTargetY[trackingButtonIndex] = (-size.height / 2.0) + 40.0;

		blockcount++;
		subscore += blockcount * 4.0;

		dragTimer = 0;
		timeLeftTimer += 5;

		score += subscore;
		if (blockcount == 100)
			[self.delegate achievementObtained:Played100];
		if (blockcount == 250)
			[self.delegate achievementObtained:Played250];
		if (blockcount == 500)
			[self.delegate achievementObtained:Played500];

		{
			BOOL empty = YES;
			for (NSInteger x = 0; x < 5; x++)
			{
				for (NSInteger y = 0; y < 5; y++)
				{
					CMYKTileStack *t = tiles[x][y];

					if (t.l1 != 0 || t.l2 != 0 || t.l3 != 0) empty = NO;
				}
			}

			if (empty)
				[self.delegate achievementObtained:CleanSlate];
		}

		{
			BOOL tl1 = tiles[0][0].l1;
			BOOL tl2 = tiles[0][0].l2;
			BOOL tl3 = tiles[0][0].l3;

			BOOL same = YES;
			for (NSInteger x = 0; x < 5; x++)
			{
				for (NSInteger y = 0; y < 5; y++)
				{
					CMYKTileStack *t = tiles[x][y];

					if (t.l1 != tl1 || t.l2 != tl2 || t.l3 != tl3) same = NO;
				}
			}

			if (tl1 == NO && tl2 == NO && tl3 == NO) same = NO;

			if (same)
				[self.delegate achievementObtained:Equal];
		}
	}
	else
	{
		[tetromino detach];
		buttonTargetY[trackingButtonIndex] = (-size.height / 2.0) + 40.0;
	}
}

- (void)beginTrackingFromButton:(NSUInteger)index withFrameSize:(CGSize)newSize position:(CGPoint)position
{
	if (!gameOverState)
	{
		idleTimer = 0;
		[self.delegate becomeActive];

		trackingFromButton = YES;
		trackingButtonIndex = index;

		[tetromino prepareWithTetromino:sourcetetrominos[trackingButtonIndex]];
		[tetromino setColor:sourcecolors[trackingButtonIndex]];
		[tetromino attachToObject:self];

		[self moveTetrominoToPoint:position];

		buttonTargetY[trackingButtonIndex] = (-size.height / 2.0) - 100.0;
	}
}

- (void)beginTrackingWithFrameSize:(CGSize)newSize position:(CGPoint)position
{
	if (!gameOverState)
	{
		idleTimer = 0;
		[self.delegate becomeActive];

		trackingFromButton = NO;
		startPoint = position;
	//	if (position.y > size.height / 2.0) rotationDirection = 1.0;
	//	else rotationDirection = -1.0;
	}
}
- (void)endTrackingWithFrameSize:(CGSize)newSize position:(CGPoint)position
{
	if (!gameOverState)
	{
		idleTimer = 0;
		[self.delegate becomeActive];

		if (!trackingFromButton)
		{
			if (!finalizingRotation)
			{
				if (targetRotation < -0.25 * PI && targetRotation > -0.75 * PI)
					targetRotation = -0.5 * PI;
				if (targetRotation > 0.25 * PI && targetRotation < 0.75 * PI)
					targetRotation = 0.5 * PI;
				if (targetRotation >= -0.25 * PI && targetRotation <= 0.25 * PI)
					targetRotation = 0;
				if (targetRotation <= -0.75 * PI) targetRotation = -PI;
				if (targetRotation >= 0.75 * PI) targetRotation = PI;

				finalizingRotation = YES;
				trackingFromButton = NO;
			}
		}
		else
		{
			{
				[self dropTetrominoIfAllowed];

				BOOL gameOver = [self checkGameOver];
				if (gameOver)
				{
					gameoverDisplay = outofmoves;
					[gameoverDisplay attachToObject:self];
					[self gameOver];
				}
			}
		}
	}
}

- (void)moveTrackingWithFrameSize:(CGSize)newSize position:(CGPoint)position
{
	if (!gameOverState)
	{
		idleTimer = 0;
		[self.delegate becomeActive];

		if (!trackingFromButton)
		{
			if (!finalizingRotation)
			{
				GLKVector3 v1 = GLKVector3Make(startPoint.x - (size.width / 2.0), startPoint.y - (size.height / 2.0), 0);
				GLKVector3 v2 = GLKVector3Make(position.x - (size.width / 2.0), position.y - (size.height / 2.0), 0);

				v1 = GLKVector3Normalize(v1);
				v2 = GLKVector3Normalize(v2);

				GLKVector3 v3 = GLKVector3CrossProduct(v1, v2);

				GLfloat dot = GLKVector3DotProduct(v1, v2);
				GLfloat f = acos(dot);
				GLfloat fac = v3.z > 0 ? -1.0 : 1.0;

				targetRotation = f * fac;
				rotation = f * fac;
			}
		}
		else
		{
			[self moveTetrominoToPoint:position];
		}
	}
}

- (void)cancelTracking
{
	if (!gameOverState)
	{
		idleTimer = 0;
		[self.delegate becomeActive];

		if (!trackingFromButton)
		{
			if (!finalizingRotation)
			{
				if (targetRotation < -0.25 * PI && targetRotation > -0.75 * PI)
					targetRotation = -0.5 * PI;
				if (targetRotation > 0.25 * PI && targetRotation < 0.75 * PI)
					targetRotation = 0.5 * PI;
				if (targetRotation >= -0.25 * PI && targetRotation <= 0.25 * PI)
					targetRotation = 0;
				if (targetRotation <= -0.75 * PI) targetRotation = -PI;
				if (targetRotation >= 0.75 * PI) targetRotation = PI;

				finalizingRotation = YES;
				trackingFromButton = NO;
			}
		}
		else
		{
			// Move button to original position...
			buttonTargetY[trackingButtonIndex] = (-size.height / 2.0) + 40.0;
		}
	}
}

@end


We decided this week while working with the Snuggle Puggle we would check out our peanut butter. The crazy old bat told us that we only use Skippy and it is suppose to be fine. We told her that she had better get some out so we could be the judges.
It looks OK on those spoons, but only a taste will tell. We are all willing to put forth the sacrifice. ( Besides we know that Skippy is not tainted.) Yep, it seems to be fine. Are we clever or just sneaky?
When Brice first came here, he didn't like PB. Can you believe that! Now he understand the joy than can be on a spoon.
That looks delicious. Sure keeps you going for a while doesnt it hehehe.
peanut butter is best! It looks like you and the rest of your pack had a pawsome time with the sticky stuff! Mom always laughs at me when I get some on my nose and try to lick it off. BOL!
Our bedtime snack is Jif in a kong -- and we've never had the opportunity to do a taste test. Do you have any results???
Hey send me some skippy. Mom ordered this peanut butter powder that has less fat and it is no skippy. We don't know what is wrong with her.
Nothing says khwality khontrol inspekhtion like a fine khanine tongue!
I can sees you is hard at work there. It looks yummy! I love your little red bows Moco, that's so pretty.
I am not sure if your test was scientific. Please forward all jars of peanut butter to my estate at once so that I can taste test them for you.
The sounds of you guys licking that glorious peanut butter off the spoon is killing us!
We love your pretty red bows, Moco!
Moco, you must be going to a party; just look at those pretty red bows in your hair!
I love it! Motch puts some in a kong for me every mornng before she leaves for work, and I don't even notice when she leaves.
Now that's the kind of job we want to get. It was interesting to see each of you with your own unique way of testing that pb.
You guys are so smart!!! I better go tell Mom we need to check our peanutbutter, too!!
What a great job you all are doing.. You should get paid overtime for that..
My girl wonders if I've been eating peanut butter, because I do that ALL THE TIME!
Oh, and Moco - you look FABULOUS, darling!!! Love you in red!
I'd say sneaky, but Mom says clever! Great work y'all! I had some peanut butter the other day, its the best!
You look adorable with your red bows!
I can see your working tongues!
oh moco. poor puppy has to wait to go last. what good manners!
Mmm...peanut butter. But we like Jif!
that looks like some serious peanut butter enjoyment going on there. we are sooooo hungry - starving - poor us - can we have some peanut butter too, mom?????
we were very VERY SURPRISED today when the mail lady brought us a package from YOU! that made our day! there was some really good stuff in there and we LOVE IT. you were very sweet to pick out all of those wonderful treats and chews and glow stick and squeaky stuffy bone. our mom let us have the piggy slivers already, but she's making us wait for the rest. oh we are drooling.
thank you so much. that was so very SWEET of you.
we will post about it soon.
Thank dog you are willing to be a sacrificial lamb (so to speak) and try that PB. You are a hero, but man do I want some of that right now!
Oh good job! It was so nice of you to test the PB. I taste all of my ma ape's food, even the vegetables and fruitables.
Wooo peanut butter. Sticks yummily to the tongue and the roof of the mouth! Yum yum!
I think you guys are PAWSOME over there for checking the PB to see if it is safe for your family!
The peanut butter look really tasty but I am never interested to taste it before. perhaps I should try it someday. I behave the same when I was given Manuka Honey too.
My ma ape got the crazy compost idea after seeing Grammie's! She is hoping she can get a new house before planting time. I hope she grows maters. I DO love my maters!
BOL! You three looked so funny! It sure is hard to get the peanut butter off on the top part of our mouths huh? Very sticky!
Hi guys! Sure have missed you all. Looks like I've lots to catch up on.
Ooh yummy...I love peanut butter too!
I bet you all had to take lots of drinks of water after that yummy pb!
Yum, that video made me hungry for some peanut butter!!


text:
Tristan Thompson avoids Game 2 suspension; fined $25,000
The Flagrant 2 foul call that got him ejected in the first place has also been downgraded.
By Ashley Bastock@AshleyBastock42 Jun 1, 2018, 11:00pm CDT
Share All sharing options for: Tristan Thompson avoids Game 2 suspension; fined $25,000
Tristan Thompson will not be suspended for his altercation with Draymond Green during Game 1 of the NBA Finals. He will, however, be fined $25,000.
The league announced Thompson's fine via a press release on Friday night.
With 2.6 seconds remaining in the game, Thompson received a Flagrant 2 foul call and automatic ejection. Golden State's Shaun Livingston pulled up for a jumper and Thompson's elbow appeared to hit him in the side of the head. The NBA has since downgraded the foul to a Flagrant 1 "upon league office review."
The Warriors were leading by eight at the time.
"I contested a shot that shouldn't have been taken," Thompson said Thursday night. "I mean, it's like the unspoken rule in the NBA: If you're up 10 or 11 with about 20 seconds left, you don't take that shot. I make the contest, and next thing I know, I was being kicked out for a good contest that we learn in training camp. I don't know why I got thrown out."
As Thompson was walking off the floor, Green continued to taunt him. That's when Thompson shoved Green and pushed the ball into his face. The shove, combined with "failing to leave the court in a timely manner," is what earned him the fine, per the release.
With all that went wrong for the Cavs down the stretch in Game 1, this is definitely them catching a break. Thompson didn't make a major offensive impact in Game 1, but he obviously offers them an advantage on the boards (the Cavs won the rebounding battle 53-38 in Game 1) and ups the physicality.

redpajama_set_name: RedPajamaCommonCrawl


text:
Research Papers /
RESEARCH PAPER OF JP POGI
24 May, 2018 Research Papers, Thesis 0
In addition, addicts also develop a tolerance to he drug and so doses that once satisfied the craving no longer do so. As a result, addicts need larger and larger doses to achieve the same effect. Three major groups Of drugs can cause addiction: Narcotics, such as heroin and sedatives, including barbiturates and some sleeping pills and tranquilizer and alcohol do. Almost anyone who takes several doses of heroin daily for two weeks becomes addicted to the drug. Sedatives and Alcohol, though less likely than heroin to cause addiction can create even stronger addiction.
With drawl from a narcotic causes aching muscles, chills, ever, runny nose and eyes, stomach cramps, and general body weakness. True symptoms resemble these of a bad cold. Withdrawal illness from sedatives or alcohol causes a high fever and convulsions. It also causes delirium treatments, a condition in which the victim becomes shake and sees and hear things that are not present. Too swift a withdrawal from alcohol or sedatives can cause death the difference between addicting drugs causes a strong psychological craving that may make a drug habit as hard to break as physical dependence does.
In addiction many non-addicting drugs produce a tolerance in regular users. For such reasons, many expert uses the term drug dependence rather than addiction. Many addicts spends so much time under the influence of drugs that they neglect their health, work, family, and friends. They find it difficult to keep a job or to handle family responsibilities. They fail to eat well and to maintain personal cleanliness. As a results many addicts suffers from malnutrition. Addicts who inject drugs may get such diseases as hepatitis or tetanus from an institute needle.
For most drug addicts, the chief goal in life is obtaining more drugs. Narcotics cannot be obtained legally thou a physician's prescription, but they may be bought illegally at extremely high price. Some addicts turn to crime, such as robbery and prostitution, to support their drug habit. An addict may withdraw from using a drug by slightly decreasing the daily deuce's a period of weeks. Gradual withdrawal reduces the severity of withdrawal illness. But even after addicts have withdrawn completely, they feel irritable and restless for weeks or months. Some of the craving for the drugs may remain for months or years.
Many persons who have withdrawn eventually return to drugs and to read diction. They do so partly because they have not solved the problems that first led them to drugs. Some people who treat drugs addiction believe that addicts can profit from treatment in groups composed of other addicts these experts feel that by being confronted by other addicts, drug abusers can achieve a better understanding of their selves and their social responsibilities. These confrontations involve frank discussions of the problems of and motives for drug abuse. One group that uses such treatment, alcoholics.
When people start taking drugs, with time the way their brain functions and looks is altered. First of all, drug taking causes elevation of dopamine level in brain, which results in the feeling of pleasure. Brain remembers this event and wants it repeated. So, the drug a person takes eventually reaches the significance that other physiological needs have. As a result, the person's abilities to think clearly, control behavior, exercise good judgment and feel well without drugs intake becomes affected. This, in its turn, causes problems in relations with family, friends, at work or in university.
It is extremely important to recognize drug addiction at the right moment, preferably in the ginning, so as not to spoil social relationships and health. It is necessary to understand that the sooner the problem will be attended, the better it is for the treatment progress. There are certain symptoms of drug abuse: when drug is getting people into legal trouble, if because of it people start neglecting their responsibilities, when they use drugs under dangerous conditions, and when they cause problems in relationships. (http://www. Appertaining. Mom/free-examples/thesis-paper-on-drug- addiction. HTML#quizzically) Many people do not understand why or how other people become addicted to drugs. It is often mistakenly assumed that drug abusers lack moral principles or willpower and that they could stop using drugs simply by choosing to change their behavior. In reality, drug addiction is a complex disease, and quitting takes more than good intentions or a strong will. In fact, because drugs change the brain in ways that foster compulsive drug abuse, quitting is difficult, even for those who are ready to do so.
Through scientific advances, we know more about how drugs work in the brain than ever, and we also know that drug addiction can be successfully treated to help people stop abusing drugs and lead productive lives. Http://w. Www. Drugless. Gob/ publications/druggists/understanding-drug-abuse-addiction ) Drugs & the Brain Drugs react in the brain to change the way the body feels. The brain is the master control center of the body and it sends messages to the rest of the body based on the signals that it gets from chemical messengers, or drugs. Most of the chemical messengers are actually made in the body to do specific jobs in the brain.
But drugs, which aren't made by the body, are chemical messengers that can send the wrong messages to the brain, which then sends the wrong signals to the body. In essence, if the brain gets the wrong sages from drugs, you can end up seeing or hearing things that aren't real, feeling things that aren't there, or doing things that you wouldn't normally do. Drugs can make your heart beat faster, your body move slower, your throat feel dry, your pupils get bigger, and can make you breathe too fast or too slow. Drugs can affect the way you see, hear, feel, smell, think, move, eat, and even how often you go to the bathroom.
Most people who do drugs for a while develop what is called a "tolerance" to the drug. This means that their body gets used to it. Although some people who do drugs think that his means that their body is "accepting' the drug, it actually means that the person is killing the parts of their body that used to try to resist the drugs. When this happens, the person doing drugs will need to do more and more of the drug to get the same feeling. This is not only expensive, it's dangerous! Some people even try doing drugs that are a lot stronger just to try to get the good feeling back again.
Because drugs can change the way you interpret what is going on around you, they can change the way you act and react in certain situations. You can end up making some bad choices because the rugs you're doing change the way you perceive things. Ultimately, you might make some decisions that put you into unsafe situations like agreeing to unsafe sex, drinking and driving, or walking around after dark in a bad neighborhood. Some drugs, especially drugs like crystal meet, can change your appearance. Many people who do drugs like meet and other amphetamines don't feel hungry so they don't eat and end up very thin and unhealthy.
Meet users also tend to have skin that has lost its elasticity and luster, making them look as much as 20 years older than they really are. Some meet users also get what's called "meet mouth. A user with meet mouth has rotten and broken teeth because meet makes the salivary glands dry out, makes users grind their teeth, and many users forget to brush their teeth because they are too high to care. Many drugs can cause liver damage, make your body unable to fight off infection, make your heart beat too fast, cause your body temperature to get so high you could damage your brain, cause a stroke, and even cause death.
There's just no need to risk the sometimes permanent side effects that come from a few minutes of getting high. By McKay Arnold A US government report in 2009 concluded that illegal drug use was a significant problem in the Philippines due to corruption and poor law enforcement. There was particular concern expressed about the amount of methamphetamine (shabby) and cannabis production in the area. Drug addiction appears to be on the rise in the Philippines. There are believed to be as many as 6. Million drug abusers according to figures from 2004- this is a dramatic increase from 1 972 when there was only believed to have been around 20,000 drug users in the Philippines. The drug that is most abused in the Philippines continues to be Alcohol – they are the second highest consumers of alcoholic drinks in South East Asia. Most Commonly Abused Drugs in the Philippines The most commonly abused drugs in the Philippines include: * Alcohol * Marijuana * Heroin * Cocaine * Methamphetamine (locally known as Shabby) * Inhalants such as nitrates and gasoline.
These can be a cheap way for people to get high. * Opium * Ecstasy (MADAM) Methamphetamine Hydrochloride (Shabby) Methamphetamine hydrochloride is found to have harmful effects to the brain. It changes how the brain functions. Studies have shown that methamphetamine abusers have reduced motor skills and impaired verbal learning as a result of alterations in the activity of the dopamine, a retransmitted involved in reward, motivation, experience of pleasure and motor function. Street names: Scabs, Ice, Meet, Crystal, Cristal, Absurd, Taws.
Other adverse effects of methamphetamine: Extreme weight loss Severe dental problems ("meet mouth") Anxiety Confusion Insomnia Mood disturbances Violent behavior Cannabis Static (Marijuana) Marijuana use impairs a person's ability to form new memories and to shift focus. Its active component, dehydrogenation's (TECH) also disrupts coordination and balance, posture, and reaction time (experience commonly referred to as "spacing out"). Thus, chronic marijuana use significantly educes a person's capacity to learn, carry-out complicated tasks, participate in sports, driving and operating other machineries.
Studies also show that marijuana use can lead to lung cancer and other problems in the respiratory and immune systems. Street names: Weed, Jutes, Pot, Grass, Adam, Choking. Health problems that come with the use of marijuana include: Problems with memory and learning Distorted perception(sights, sounds, time, touch) Trouble with thinking and problem solving Loss of motor coordination Increased heart rate and palpitations Inhalants The effects of inhalants are similar to that of alcohol, including slurred beech, lack of coordination, euphoria and dizziness.
Inhalant abusers may also experience lightheartedness, hallucinations, and delusions. Harmful irreversible effects of inhalants include: Hearing loss iamb spasms Central nervous system or brain damage Bone marrow damage (http://alcoholic. Com/drug-addiction/drug-addiction-in-the-Philippines/ ) Concerns for Shabby Abuse One of the most abused drugs in the Philippines is a local type of methamphetamine mixed with caffeine known as Shabby. This stimulant is believed to be the drug of choice for 90% of the Philippines illegal substance users.
This is a powerfully addictive drug that can cause people to have intense hallucinations and become extremely paranoid. Some users of this drug have even jumped off high rise buildings because they believed they could fly. Shabby didn't arrive in the Philippines until the mid-eighties, but it soon became hugely popular among drug users. Methamphetamine causes feelings of euphoria and the user feels full of energy. Problems Related to Drug Addiction Drug abuse leads to many problems such as: * The individual does not have to be abusing a substance like Shabby long before they become addicted.
Those individuals who become addicted can become obsessed with their habit. This means that everything else in their life will take second place. * The individual's behavior will change. They may become physically violent or engage in other types of bad behavior. * Those who abuse these drugs can struggle to keep down a job. They may become unemployable. * Young people who use these substances will be unable to perform well in school or college. This means that they will be limiting their future opportunities. * When drug users run out of money to feed their habit they will be tempted to turn to crime.
This may mean stealing from family and friends or from complete strangers. * Many addicts fall into a life Of crime and eventually end up in prison or worse. * If the drug addict is unable to escape this behavior it is highly likely to lead to their death. This individual will shorten their lifespan as a result of their behavior. * Illegal drug users run the risk of overdose. It can be difficult to assess the strength of illegal drugs, and it can be similar to playing a game of Russian roulette every time the addict uses these substances – it is even possible for people to die of an overdose after only trying illegal drugs one time.
Cost of Drug Addiction in the Philippines The cost of drug addiction is high for the Philippines and it involves: * A great deal Of domestic violence is associated with drug abuse. * A huge proportion of criminal acts are committed by individuals who are trying to satisfy their drug habit. * The economy suffers because drug users become less productive in their jobs or they become unable to work completely. * The government needs to spend large amounts of money on tackling drug problems. The resources used by law enforcement alone are a drain. Money hat could be spent to improve the life of a family is wasted because one member is a drug addict. It can lead to a situation where the rest of the family is living in poverty while one of them wastes thousands of pesos each week on drugs. * A criminal underworld had developed in order to take advantage of the desire for these illegal substances. The money made from selling drugs is used to finance other criminal acts as well as terrorism. * Drug addict can destroy communities. It can lead to a situation where people are afraid to leave their homes because of fear of crime. The individual who falls into rug addiction can lose everything – including their own self-respect. This miserable life is a waste of human potential. Treatment for Drug Addiction in the Philippines There are a number of treatment options available to people in the Philippines who need help including: * Narcotics Anonymous is a ;level step program that supports the individual to escape their addictions. This fellowship is not just focused on stopping the drug use but also on building a life worth living. *There are a number of drug rehabilitation facilities in the Philippines including Serenity at the Quarry. It is becoming more common or Filipinos to go abroad to seek the most effective treatment for their addictions. Drug and Alcohol Rehab Asia is based in Thailand and is considered to be one of the leading rehab in Asia. MANILA, Philippines-?The Philippines has the highest abuse rate for methamphetamine hydrochloride, or shabby, in East Asia, according to the latest United Nations World Drug Report. The UN report was cited by the US Department of State in its 2012 International Drug Control Strategy Report, which is posted on the website of the US Embassy in Manila.
The state department also disclosed that 2. 1 percent of Filipinos aged 1 6 to 64 were sing shabby, and "domestic consumption of methamphetamine and marijuana continued to be the main drug threats in the Philippines. " Citing Philippine Drug Enforcement Agency records, it reported that last year PEED "conducted 9,850 anti-illegal drug operations resulting in the arrest of 8,491 suspects and 9,995 cases being filed. " Philippine authorities "seized 250 kilos of methamphetamine valued at $68 million (about PA. 92 billion); 4. Million marijuana plants and seedlings and 81 8 kilos of marijuana with a total value of $17. 4 million (P 748 million); 17,222 grams of cocaine worth $2 million (POP lion); and 960 Ecstasy tablets valued at $26,790 (Pl . 15 million). " (http://newsiest. Inquirer. Net/1681 43/ UN-drug-report-Philippines-has-highest- rate-of-SSH ABA- use-in-east-Asia a#systematized H) SOME LAWS ABOUT DERELICTIONS ACT NO. 10586 Also known as "Anti -Drunk and Drugged Driving Act of 201 3" An act penalizing persons driving under the influence of alcohol, dangerous drugs, and similar substances, and for other purposes. Http:// www. Doc. Gob. PH/images/front/other_matters/deadhead. PDF) R. A. NO. 953, Narcotic Drugs Law An act to provide for the registration of, with the collector of internal revenue, ND the imposition of fixed and special taxes upon all persons who produce, import, manufacture, compound, deal in, dispense, sell, distribute, or give away opium, marijuana, opium poppies, or coca leaves, or any synthetic drugs which may hereafter be declared habit forming by the president of the Philippines, their salts, derivatives or preparations, and for other purposes. Http://www. Chancellor. Com/republicans/ R. A. 9165 also known as "Comprehensive Dangerous Drugs Act of 2002" An act instituting the Comprehensive Dangerous Drugs Act Of 2002, repealing Republic Act No. 6425, otherwise known as the Dangerous Drugs Act Of 1 972, s amended, providing funds therefore, and for Other purposes. (http:// www. Alpha. Net/statutes/repasts/arrear/RA_91 65_2002 . HTML) Most of the drug users in the Philippines are young people. Illicit drugs that are present include marijuana, LSI, opiates, and barbiturates.
While there are no hard fast statistics available, it is estimated that as many as 60,000 young people in the Philippines are dealing with drug addiction. Within a period of ten years, the incidence of drug addiction rose dramatically according to studies done in this tiny country. The majors¶/ of drug users are dents with marijuana being the drug of choice. Many people believe that this rise is attributable to simple curiosity, but more likely because Philippine youth are trying to emulate their Western counterparts here in the United States.
Because so much attention is focused on drug addiction in America, the information is readily available in the Philippines as are the drugs. This has increased the demand for drugs thus pushing drug dealers to grow their own cannabis plants, which is illegal in the Philippines. There have been recent reports as well of drugs being manufactured in illegal laboratories. Local argotic police have made several raids to try and curb this activity, but of course, to no avail. To meet the challenge of the drug abuse problem several measures, both private and governmental, are being taken.
Violators of narcotic laws who make known to the authorities the fact of their addiction and their desire to be cured are referred to the Addiction Institute of the National Bureau of Investigation so that they may undergo treatment and rehabilitation. On another front, a new organization-the Narcotic Foundation of the Philippines-has recently been formed. This is a private association not related o Government institutions and treatment centers; its aims are to raise funds for the treatment and reorientation of young addicts, and to educate the public against the dangers of drug addiction.
Research Paper on Marijuana
This is a research paper on the history of Marijuana.
Research Paper on Legalizing Marijuana
Legalizing Marijuana Research Paper


text:
Paulus ist ein deutscher Familienname.

Namensträger

A

 Alfons Paulus (1918–1987), deutscher Arzt und Politiker (SVP)
 Andreas Paulus (* 1968), deutscher Rechtswissenschaftler
 Anete Paulus (* 1991), estnische Fußballspielerin
 Annelie Paulus (* 1956), deutsche Politikerin
 Ariane Paulus (* 1980), deutsche Rechtsanwältin und Fernsehdarstellerin

B
 Barbara Paulus (* 1970), österreichische Tennisspielerin
 Beate Paulus (1778–1842), deutsche Pietistin
 Beate Paulus (Chemikerin), deutsche Chemikerin und Hochschullehrerin

C
 Charles Paulus (1866–1931), deutscher Kameramann
 Christof Paulus (* 1974), deutscher Historiker

E
 Eduard Paulus (1837–1907), deutscher Kunsthistoriker und Archäologe

F
 Frank Paulus (* 1978), deutscher Fußballspieler
 Franz Wilhelm Paulus (1896–1959), deutscher Verleger
 Friedrich Paulus (1890–1957), deutscher Generalfeldmarschall
 Fritz Paulus (1918–1982), deutscher Maler

G
 Gerd Paulus (* 1953), deutscher Fußballspieler
 Gerhard Paulus (1922–2002), deutscher Politiker (FDP)
 George Paulus (1948–2014), US-amerikanischer Musikproduzent
 Gotthard Paulus (1912–1977), deutscher Rechtswissenschaftler
 Gottlob Christoph Paulus (1727–1790), deutscher Theologe
 Günter Paulus (* 1927), deutscher Historiker
 Günther Paulus (1898–1976), deutscher Architekt
 Gustav Paulus (1842–1902), deutscher Generalleutnant und Präses

H
 Hannes F. Paulus (* 1943), deutscher Zoologe und Hochschullehrer
 Hans Paulus (1919–1985), deutscher Landwirt und Politiker
 Heidrun Paulus (* 1961), deutsche Flötistin, Komponistin und Musikpädagogin
 Heinrich Eberhard Gottlob Paulus (1761–1851), deutscher Theologe
 Helmut Paulus (1900–1975), deutscher Dichter und Schriftsteller
 Helmut-Eberhard Paulus (* 1951), deutscher Kunsthistoriker und Denkmalpfleger
 Herbert Paulus (1913–1993), deutscher Kunsthistoriker und Theologe
 Hermann Paulus (* 1963), deutscher Volksmusiker

J
 Jochen Paulus (* 1969), deutscher Politiker (FDP), MdL Hessen

 Jordan Paulus (* 1990), belgischer Eishockeyspieler
 Jorid Paulus (* 1998), US-amerikanische Sängerin

 Jutta Paulus (* 1967), deutsche Politikerin (Bündnis 90/Die Grünen)

K
 Karel Paulus (1933–2003), tschechoslowakischer Volleyballspieler

 Käthe Paulus (1868–1935), deutsche Luftschifferin

L
 Lieve Paulus (* 1966), belgische Triathletin

M
 Manfred Paulus (* 1943), deutscher Kriminalpolizist
 Marcel Paulus (1920–1987), luxemburgischer Fußballspieler
 Melchior Paulus (1669–1745), deutscher Bildhauer, Stuckateur und Elfenbeinschnitzer

N
 Nikolaus Paulus (1853–1930), deutscher Kirchenhistoriker
 Norma Paulus (1933–2019), US-amerikanische Juristin und Politikerin (Republikanische Partei)

O
 Otto Paulus (1891–nach 1948), deutscher Musikinstrumentenbauer und Unternehmensgründer

P
 Paul Paulus (1915–2013), deutscher Maler
 Peter Paulus (* 1948), deutscher Psychologe
 Philipp Paulus (1809–1878), deutscher Pädagoge und Politiker

R
 Rainer Paulus (1939–2011), deutscher Rechtswissenschaftler
 René Paulus (1896–??), französischer Schwimmer
 Richard Paulus (1883–1929), deutscher Kunsthistoriker und Kunsthändler
 Rolf Paulus (1942–2008), deutscher Literaturwissenschaftler
 Rudolf Paulus (1881–1960), deutscher Theologe und Pfarrer

S
 Stephen Paulus (1949–2014), US-amerikanischer Komponist

T
 Thomas Paulus (* 1982), deutscher Fußballspieler

U
 Uli Paulus (* 1974), deutscher Schriftsteller und Spielautor

V
 Volker Paulus (* 1947), deutscher Volleyballspieler und -trainer

W
 Walter Paulus (* 1953), deutscher Neurologe und Neurophysiologe
 Werner Paulus (* 1960), deutscher Neuropathologe
 Wilhelm Paulus (1843–1899), deutscher Musikinstrumentenbauer
 Wolfram Paulus (1957–2020), österreichischer Filmregisseur und Drehbuchautor

Familienname
Deutscher Personenname

redpajama_set_name: RedPajamaWikipedia


Tanzania is home to Africa's tallest mountain, Kilimanjaro. MGI operates trips on all three major routes up Kilimanjaro as well as safari packages.Come experience the beautiful landscapes of Tanzania and enjoy luxurious accommodations during your climb/safari.
Join us for an unforgettable adventure on Mt Kilimanjaro, 19,340' and the highest point in Africa. We climb Kilimanjaro via the Machame, Lemosho, and Rongai Routes. These are fantastic routes that provide good acclimatization schedules, incredible scenery and great African trekking experience.
The Ultimate African Experience! With several safari packages to choose from we have options for everyone. Go on safari as an add-on to your Kilimanjaro trek or as a standalone trip!
A Division of Alaska Mountain Guides and Climbing School Inc.


If you are out of a job for sometime now it will be because of something you are doing wrong or something you are not doing at all.
Check through the ten possible reasons why you don't have a job yet.
A lot of jobs are advertised online and in the papers; still so many jobs aren't announced publicly and only people who have insider access to information get invited for these positions.
This will involve expanding your network and building the right relationships with people who should know.
You should search and apply for jobs you are qualified for by all means. But what if I tell you that almost 50% of all jobs available in the country don't get advertised or listed. A good number is filled by head hunters/recruiters who look for suitable candidates. For instance on Ngcareers recruiters regularly search our talent database for experienced candidates that possess the skills and qualifications they want. Same goes for LinkedIn.
So a good way to take advantage is to create and have your career profile/resume available online.
3. You Don't Impress at Interviews.
There is a lot to be written about performing well at interviews that I can only point you to some successful job interview advice.
A lot of jobseekers overestimate their value to the employer. So if you just quote a too big figure during interviews you don't need to keep wondering why you don't get offered jobs.
You shoot from the hip in all directions with the same CV and expect good results? Come on. Applying to different jobs (each with varying requirements and expectations) with an untailored CV is a major reason you don't get called to interviews even.
I can't count how many times an employer gets job applications that completely ignore the outlined method of applications and instructions. For busy recruiters and employers your application may not see the light of day. That is the first sign that you don't listen and probably will not be good employee.
You go to interviews unprepared and chances are you fail to get considered for the job. Far too many graduates go in for interviews knowing next to nothing about the prospective employer, the job they are being interviewed for and the knowledge/skills required of them for the job.
Now you know what may be holding you back, go do something about it. Why not advertise your profile/resume to employers who search our talent Database every time for candidates that match their requirements.


text:
Exxon Is Finally Being Forced to Turn Over Docs Showing What It Knew About Climate Change
Filed to: exxon knewFiled to: exxon knew
exxon knew
climate lawsuits
massachusetts attorney general
Exxon has run out of places to hide whether or not it misled the public on climate change. On Monday, the Supreme Court refused to take up a case filed by the oil giant attempting to stop a probe by Massachusetts' attorney general. That means the company will have to turn over decades of documents that could provide damning evidence of how Exxon lied to the public and shareholders about climate change even as it learned more about the risks it posed to the planet and the company's bottom line.
The case has been ongoing since 2016. According to the state attorney general office, the "investigation seeks information regarding whether Exxon may have misled consumers and/or investors with respect to the impact of fossil fuels on climate change, and climate change-driven risks to Exxon's business." As part of the investigation, the state requested troves of documents tied to Exxon's climate research and how it was planning for climate change internally.
We're Finally Going to Learn How Much Exxon Knew About Climate Change
Exxon Mobile was ordered to turn over 40 years of documents on Wednesday showing the company's…
Not surprisingly, Exxon hasn't been too keen to release any of that information and has waged a nearly three year legal tug-of-war with Massachusetts. The company filed suit in state court in an effort to keep the documents under wraps. It lost at every turn in state courts so it took its case to the Supreme Court, arguing that it was a "nonresident corporation" and therefore didn't have to turn over documents. But on Monday, the conservative-leaning court refused to take up the case. That effectively leaves Exxon with no recourse but to fork over the receipts.
Those receipts are likely to be very damning, and could pave the way for more lawsuits as well as provide stronger footing for the slew of suits already filed by cities and counties against oil giants including Exxon. We already know Exxon knew quite a bit about climate change even as it continued to fund climate denial and downplay risks publicly, thanks to a bombshell investigation by InsideClimate News in 2015 that won a Pulitzer Prize. That series, in part, led to the state attorneys general lawsuits, which have continued to pile up (the latest was filed late last year by New York's attorney general).
Meanwhile, InsideClimate News has continued to flourish. On Sunday, the nonprofit journalism outfit received a $1 million grant from the Golden Globes to continue its awesome work expanding local and high school climate journalism. All of this goes to show that while Big Oil still has immense power and resources, having the full truth come out about what companies like Exxon and other oil majors matters to the public.
New York State Is Suing Exxon for Lying to Shareholders About Climate Change
Pacific Crabbers Are the First Big Industry to Sue Big Oil
How Big Oil Money Killed Green Ballot Measures
Exxon Is Trying to Play the Victim
Exxon Isn't the Only Oil Company That Knew About Climate Change in the 70s
Exxon Acknowledged Climate Change Internally But Still Spread Denialist Propaganda


O & C Plastic Co., Ltd.
O & I Industrial Co., Ltd.
O & M Fashion Co, . Ltd.
O E G Telecom Co., Ltd.
O G A International Co., Ltd.
O G C Real Estate Co., Ltd.
O S H Frame Industry Co., Ltd.
O-thai Metal (1991) Co., Ltd.
O. K. Pizza Co., Ltd.
O.a. Discount Mart Co., Ltd.
O.e.c. Motion Ad Design Co., Ltd.
O.g.c. Real Estate Co., Ltd.
O.k. Air Product Co., Ltd.
O.p.s. International Aquatics Co., Ltd.
O.s. & Associate (other Sky Group) Co., Ltd.
Oa Network Center Co., Ltd.
Oa Shop Nakhon Ltd., P.
Ocean Paint Hardware Ltd., P.
Office Of Account And Tax Consultant Co., Ltd.
Office Supplies & Telecommunication Co., Ltd.


Many firms have a tagline that is designed to support the firm's/brand's identity. A review of a tagline may help provide a clear indication of the product/brand's desired market positioning.
But you may need to care take with this approach as some firms use a slogan for a short-term marketing campaign. As an example, the firm might use "great deals over summer" or "now with an improved taste". These slogans do not indicate the full positioning of the brand/product, which means that interpreting the positioning intentions of the firm by simply reviewing their slogan can be difficult.
Regardless, the following table contains some famous taglines (still also referred to as slogans at times), which were designed to create a clear positioning in the minds of the target consumers.
This slogan clearly establishes the competitive advantage of this candy product. It highlights a single product attribute and communicates a single clear benefit to the consumer.
This seemingly simple slogan, encapsulates the ongoing connection between Coca-Cola and its marketplace. It is a product that has wide consumer appeal, strong loyalty, and is often treated like a 'friend' to the consumer. Hence the word 'always' reinforces this close consumer/product relationship.
This slogan clearly highlights the efficiency and reliability of the courier and delivery service. Again it is an example of a clear statement that efficiently communicates a distinct positioning.
This well-known slogan highlights that their competitive advantage is in the area of superior customer service and creates a clear positioning that the firm will do more to help their customers.
In the competitive fast food market, this simple two word slogan stands out by clearly differentiating their offering on the healthiness and the freshness of their menu offering.
This very effective positioning slogan makes a clear connection to younger people (or young-at-heart) that their product is the preferred cola product for today's modern, youthful and energetic consumers.


text:
Vol.XV No.XI Pg.8
Stuff About Things
When I was a student in Freed- Hardeman College, the President of that institution was wont to say (in jest I trust), "He that tooteth not his own horn, the same shall not be tooted!" It brought a laugh from the many "preacher boys" — albeit a nervous laugh, for we were a "heady" bunch.
Maybe one of those boys was the chief character in a recent happening. Someone asked this (unnamed) preacher if he was the greatest preacher in the brotherhood. He said, "No, but I would have to be numbered among the top two; and I'm more humble than the other fellow."
My informant did not tell me of a retort, if there was one; but that remark deserved something like one given a certain sportscaster. He is reported to have asked another how many truly great sportscasters there were for today's football games, and the man replied, "I don't know the number, but there is one less than you think." Wow! That smarts!
And so it goes. We are repulsed by the fellow who "thinks more highly of himself than he ought to think" (Rom. 12:3). It is barely possible that his attitude is obnoxious because it is an indirect attack upon our status — whittling us down by the unwarranted elevation of himself. And how many of us have tried to measure how highly "we ought to think" (v. 3b)? "Soberly" suggests an unexaggerated, objective look at ourselves, "according as God hath dealt to every man the measure of faith;" but it does not require nor promote a loss of self-respect. God has dealt each one "a measure of faith," and each saint should be sufficiently aware of his "measure" to recognize his responsibilities. Our various capacities pose corresponding obligations. Let no one excuse his failure to serve the Lord under the guise of false modesty.
The egoist leads a self-centered life. His philosophy makes self-interest the valid end of all action. He must "justify himself" (Lu. 10:29) at whatever the cost. The self-sacrificing love of Christianity negates such an attitude as this. Christ did not undersell himself, but gladly gave himself for others (Jn. 8:28, 12:32). We also have a purpose and a God-given function to perform. We can not serve well with either an over — or an under-inflated concept of self. But a true look at self will make us aware of our need for Christ, saying, "Be merciful to me, a sinner!"
<< ?You Know What?
Who Is Upside Down? >>


On February 20, 2017, The Métis Dance Club of the Métis Nation of Ontario (MNO) Historic Sault Ste. Marie Métis Council (HSSMC) performed to a packed audience at The Machine Shop in Sault Ste. Marie. The performance was part of the Bon Soo Festival, which coincided with Passport to Unity 2017. Passport to Unity is a yearly cultural event held in Sault Ste. Marie celebrating all ethnic groups calling Sault Ste. Marie their home.? In 2016, Bon Soo the Sault Ste. Marie Winter Carnival added Passport to Unity to their schedule events.
The Bon Soo Festival typically features food booths and displays along with cultural entertainment. Since its early days, the Sault Ste. Marie Métis community has participated in Bon Soo. The MNO HSSMC involvement started with Councillor Carla Labee serving bannock with strawberry jam, while the Métis Dance Club performed on stage.? More recently, the dance performance has expanded to include songs that encourage audience participation.
This year, some of the youth performed the Heel Toe Polka and the Seven Step while the youngest in attendance played the spoons.? They were joined by adult members singing Voyageur inspired songs.? The two songs selected were Vive La Compangie and Alouette.? Like the name of the winter carnival Bon Soo, Bon being the French word for "good� and Soo being the local colloquial term for Sault Ste. Marie; these songs reflect the mixed heritage of the Métis.? The lively tune and unchanging refrain in both familiar songs made it easy for audiences to participate.? It also gave the attendees an appreciation for the long days put in by Métis voyageurs and how they used songs to speed them towards their destinations.


text:
Roseburg VA Director Doug Paxton Resigns
KLCC | By Rachael McDonald
Published February 1, 2018 at 4:52 PM PST
roseburg.va.gov
The Director of the Veteran's Administration Hospital in Roseburg, Doug Paxton, has stepped down. He's the 2nd high profile resignation since a VA investigation of mismanagement at the facility.
In a statement, the VA says Paxton will be replaced by David Whitmer, who will serve as Interim Director.
The VA investigation was spurred by numerous complaints from doctors, nurses and other staff of mismanagement and poor patient care. Congressman Peter DeFazio pushed for the investigation after hearing about the problems at the Roseburg facility and at the Eugene clinic which it runs.
"I want to thank the hundreds of employees who came forward, at risk to their careers, to inform me about the problems at the VA. " DeFazio says, "I'm pleased that we're going to bring in a very senior, very experienced, manager, in the interim."
Earlier this week, the head of surgery at the Roseburg VA, Dinesh Ranjan stepped down. The VA says it is targeting several areas for improvement at the Roseburg hospital, including access to care, patient experience, and employee experience.
Military & Veterans Roseburg VA
Rachael McDonald
Rachael McDonald is KLCC's former News Director. Rachael has a BA in English from the University of Oregon. She started out in public radio as a newsroom volunteer at KLCC in 2000. After reporting for the Northwest News Network and KAZU, Rachael returned to KLCC in 2007 as Morning Edition host and a general assignment reporter covering politics, the environment, education, and the arts. She was hired as KLCC News Director in 2018. Rachael departed KLCC in June, 2022.
See stories by Rachael McDonald
After Whistleblower Complaint, V.A. Will Investigate Eugene and Roseburg Facilities
Investigators from Veterans Affairs in Washington D.C. will be in Oregon next week to visit the Eugene and Roseburg V.A. healthcare facilities.The…


text:
- The Maine Wire - https://www.themainewire.com -
LePage and House Republicans spare Mainers big tax hike
Posted By Liam Sigaud On July 11, 2018 @ 6:00 AM In Medicaid Expansion | No Comments
Earlier this week, Maine House Republicans sustained Governor LePage's veto of a bill to implement Medicaid expansion, preventing more than $31 million from being raided from the unappropriated surplus of the budget.
Vetoing efforts to massively expand the Medicaid program to able-bodied, childless adults has become a perennial occurrence for LePage, who has consistently emphasized the importance of stabilizing the DHHS budget by prioritizing care for the elderly, disabled, and children.
Since Medicaid expansion was approved by voters last year, the legislature has failed to offer a credible mechanism to finance this unprecedented expansion of the welfare state. Using budget surplus funds to support this initiative is an irresponsible attempt to postpone the tax increases that will ultimately be necessary to maintain fiscal solvency in the long-run. These gimmicks merely underline the lack of genuine concern progressive politicians have for Maine taxpayers who will eventually have to shoulder this burden.
Advocates of Medicaid expansion seem to have forgotten the disastrous consequences of Maine's previous experiment with giving free health care to able-bodied adults.
In 2002, then-Governor Angus King expanded Medicaid eligibility to childless adults earning up to 125 percent of the federal poverty line. As a result, spending and enrollment doubled from 2000 to 2011 and spending grew by more than $1 billion annually, driving up Maine's tax burden and drawing resources from other state priorities.
Oh yeah, and $750 million in hospital debt was left unpaid.
After more than seven years of responsible stewardship by the LePage administration, bills are paid on time and Maine's Medicaid program is no longer staring at a sea of red ink.
LePage's staunch opposition to Medicaid expansion has spared Maine taxpayers hundreds of millions of dollars in needless (and often counterproductive) government expenditures. As the Maine Heritage Policy Center reported last year, the promises of expansion supporters have consistently been debunked.
No, Medicaid expansion doesn't cause a surge of economic growth.
No, Medicaid expansion doesn't significantly affect the uninsured rate.
No, Medicaid expansion doesn't reduce uncompensated hospital care.
No, Medicaid expansion doesn't save lives.
No, the cost estimates offered by expansion proponents aren't realistic.
LePage understands the importance of not repeating the failure of the past. Lawmakers should continue to follow his example and stand staunchly against implementing this harmful policy.
Article printed from The Maine Wire: https://www.themainewire.com
URL to article: https://www.themainewire.com/2018/07/lepage-house-republicans-spare-mainers-big-tax-hike/
Copyright © 2014 The Maine Wire. All rights reserved.


text:
'Not out of the woods yet': Gov. Murphy says state seeing 'small spikes' in COVID-19 from travelers
Jul 06, 2020, 9:28amUpdated on Jul 06, 2020
Gov. Phil Murphy says New Jersey is beginning to see "small spikes" in COVID-19 infection from people returning from trips to places such as South Carolina and Florida.
PHOTOS: COVID-19 Impacts the World
The governor said Sunday on NBC's "Meet the Press" that the "most recent and most prevalent" example was a wedding in Myrtle Beach, from which New Jersey residents returned with the virus, but "we've got other cases that we're running down."
VIRUS TRACKER: New York, New Jersey, Connecticut coronavirus cases and deaths
MORE: LIVE BLOG - Coronavirus updates from the tri-state area and beyond
MORE: New Jersey Coronavirus Dashboard
FULL COVERAGE: Coronavirus Pandemic
"We're already seeing a little of that," says Gov. Murphy. "It's less because of folks being on the beach and looking at fireworks. We've begun to open up the state slowly, but surely, we knew there was some risk. It's partly that, its' coming back to New Jersey from hot spots, so we're not out of the woods yet without any question."
The governor said he believes a national strategy is needed, and wearing a mask should be "a national requirement" -- while some parts of the country do not require masks in public.
MORE: 10 ways to stay safe when dining at restaurants
MORE: 15 questions to ask yourself before venturing out during COVID-19
MORE: 10 ways to stay safe when returning to the gym/fitness center
MORE: 7 things to remember when going to a nail salon
The news also comes after Hoboken Mayor Ravi Bhalla said Saturday 13 people had tested positive for COVID-19 in the past two days - marking the city's highest two-day total since mid-May. He said the people who tested positive have recently traveled, and that 12 out of 13 had traveled to states on New Jersey's quarantine list.
Cases are rising in the U.S., with places like Houston fearing hospitals could be over-capacity. For New Jersey, the concern is keeping the numbers from going back up.
AP wire services helped contribute to this report.


text:
package org.kaazing.gateway.transport.http.acceptor.specification.rfc7234;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertTrue;

import java.util.concurrent.CountDownLatch;

import org.apache.mina.core.service.IoHandler;
import org.jmock.integration.junit4.JUnitRuleMockery;
import org.jmock.lib.concurrent.Synchroniser;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.DisableOnDebug;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
import org.kaazing.gateway.resource.address.ResourceAddress;
import org.kaazing.gateway.resource.address.ResourceAddressFactory;
import org.kaazing.gateway.transport.IoHandlerAdapter;
import org.kaazing.gateway.transport.http.HttpAcceptSession;
import org.kaazing.gateway.transport.http.HttpAcceptorRule;
import org.kaazing.gateway.transport.http.HttpHeaders;
import org.kaazing.gateway.transport.http.HttpStatus;
import org.kaazing.k3po.junit.annotation.Specification;
import org.kaazing.k3po.junit.rules.K3poRule;
import org.kaazing.test.util.ITUtil;
import org.kaazing.test.util.MethodExecutionTrace;

/**
 * Test to validate behavior as specified in RFC 7231 section 4:
 * Request Methods.
 */
public class PragmaIT {
    private static final ResourceAddress HTTP_ADDRESS = httpAddress();

    private final HttpAcceptorRule acceptor = new HttpAcceptorRule();

    private JUnitRuleMockery context = new JUnitRuleMockery() {
        {
            setThreadingPolicy(new Synchroniser());
        }
    };

    private TestRule contextRule = ITUtil.toTestRule(context);
    private final TestRule trace = new MethodExecutionTrace();
    private final K3poRule k3po = new K3poRule().setScriptRoot("org/kaazing/specification/http/rfc7234/pragma");
    private final TestRule timeoutRule = new DisableOnDebug(new Timeout(5, SECONDS));

    @Rule
    public TestRule chain = RuleChain.outerRule(trace).around(timeoutRule).around(contextRule).around(acceptor).around(k3po);

    @Test
    @Specification({"no-cache.conditional.request.304/request"})
    public void shouldReceiveNotModifiedWithNoCacheForConditionalRequest() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final IoHandler acceptHandler = new IoHandlerAdapter<HttpAcceptSession>() {
            @Override
            protected void doSessionOpened(HttpAcceptSession session) throws Exception {
                latch.countDown();
                if(session.getReadHeaders().containsKey(HttpHeaders.HEADER_IF_MODIFIED_SINCE)) {
                    session.setStatus(HttpStatus.REDIRECT_NOT_MODIFIED);
                } else {
                    session.setStatus(HttpStatus.SUCCESS_OK);
                }
                session.addWriteHeader(HttpHeaders.HEADER_LAST_MODIFIED, String.valueOf(System.currentTimeMillis()));
                session.addWriteHeader(HttpHeaders.HEADER_EXPIRES, String.valueOf(System.currentTimeMillis()));
                session.close(false);
            }
        };
        acceptor.bind(HTTP_ADDRESS, acceptHandler);

        k3po.finish();
        assertTrue(latch.await(4, SECONDS));
    }

    @Test
    @Specification({"no-cache.unconditional.request.200/request"})
    public void shouldReceiveOKWithNoCacheForUnconditionalRequest() throws Exception {
        testHttpLastModifiedExpires();
    }

    @Test
    @Specification({"no-cache.with.cache-control.no-cache/request"})
    public void shouldReceiveOKForNoCacheWithUnconditionalRequestWhenCachedResponseHasCacheControlNoCache() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);

        final IoHandler acceptHandler = new IoHandlerAdapter<HttpAcceptSession>() {

            @Override
            protected void doSessionOpened(HttpAcceptSession session) throws Exception {
                latch.countDown();
                session.addWriteHeader(HttpHeaders.HEADER_CACHE_CONTROL, String.valueOf("max-age=600"));
                session.close(false);
            }
        };
        acceptor.bind(HTTP_ADDRESS, acceptHandler);

        k3po.finish();
        assertTrue(latch.await(4, SECONDS));
    }

    private void testHttpLastModifiedExpires() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);

        final IoHandler acceptHandler = new IoHandlerAdapter<HttpAcceptSession>() {

            @Override
            protected void doSessionOpened(HttpAcceptSession session) throws Exception {
                latch.countDown();
                session.addWriteHeader(HttpHeaders.HEADER_LAST_MODIFIED, String.valueOf(System.currentTimeMillis()));
                session.addWriteHeader(HttpHeaders.HEADER_EXPIRES, String.valueOf(System.currentTimeMillis()));
                session.close(false);
            }
        };
        acceptor.bind(HTTP_ADDRESS, acceptHandler);

        k3po.finish();
        assertTrue(latch.await(4, SECONDS));
    }

    private static ResourceAddress httpAddress() {
        ResourceAddressFactory addressFactory = ResourceAddressFactory.newResourceAddressFactory();
        String address = "http://localhost:8000/index.html";
        return addressFactory.newResourceAddress(address);
    }
}

redpajama_set_name: RedPajamaGithub


Oct-20-03 Lawrence: Szily wasn't silly, Wloch was. After 8....Qxa1 there is not a single square for his black Queen to go to, and it is lost after 10.Nb3.
Black loses Bishop and Queen for Bishop and Rook.
Jausch46: A witty trap prepared by Szily! Very clever.
Oct-09-14 sleepyirv: Wloch ended up being putty in Szily's hands.
kevin86: The queen is a goner!
AvidChessMan: Took me a couple of seconds to realize the queen was trapped.
Oct-09-14 jankopod: I don't understand why Wloch resigned. What went through his mind? Could somebody enlighten me also who was Wloch.
White threatens 10.Nb3, so Black will lose his queen for a minor piece, leaving him down a queen for a rook.
Oct-09-14 newhampshireboy: Wloch was a sucker and Szily exploited his greed to good effect!
Oct-09-14 Castleinthesky: A nice trap to remember.
Oct-09-14 Moszkowski012273: Simply 7...Ba5 and black maintains a healthy advantage.
morfishine: This game does not qualify as "Game of the Day" on any reputable site.
perfidious: Black's ....Qa5 did not quite have the same effect as in the well known game Jansa vs Korchnoi, 1969.
Greed and a trapped queen!


This new bar and restaurant is the baby of 2015 Bartender of the Year and veteran of the Sydney scene, Lee Potter Cavanagh.
Rosenbaum & Fuller draws its name from two branches of Potter Cavanagh's family that emigrated to Australia in the 1800s, and, he told us, they'll be focusing on all things local.
That's not to say that the drinks aren't up to the highest standards, though, befitting of Potter Cavanagh's experience working behind the stick in top bars both here in Australia and abroad in the UK. He's brought on Toby Marshall (formerly of Charlie Parker's) to lead things behind the bar, and you can expect cocktails that push flavour to the forefront, all the while championing local ingredients and spirits. They're "offering fun flavour bombs at all price points and strengths," Potter Cavanagh says.
You can find Rosenbaum & Fuller at 13 O'Brien Street, Bondi Beach, and they're open from Wednesday to Sunday, 8am until late. Check them out online here and follow them on the ol' Instagram at @rosenbaumandfuller.


text:
Masbate is een provincie van de Filipijnen ten zuiden van Bicolschiereiland. De drie belangrijkste eilanden van de provincie zijn Masbate, Ticao en Burias. De provincie maakt deel uit van regio V (Bicol Region). De hoofdstad van de provincie is Masbate City. Bij de census van 2020 telde de provincie bijna 909 duizend inwoners.

Geschiedenis
De eilanden van de huidige provincie Masbate worden net als andere delen van de Filipijnse archipel al duizenden jaren door mensen bewoond. Op diverse plekken in de provincie zijn in verleden vondsten van overblijfselen uit het verre verleden gedaan.

In 1569 arriveerden de Spanjaarden in deze regio. Don Luis Enriquez De Guzman, een ridder uit Sevilla claimde in dat jaar de eilanden Masbate, Ticao en Burias voor de Spaanse kroon. Onder leiding van kapitein Andres de Ibarra werden de eilanden verder verkend en tijdens deze expeditie begon de Augustijner pater Alonso Jimenez ook met het bekeren van de lokale bewoners van Masbate tot het Rooms-Katholieke geloof. Een blijvend overblijfsel van deze activiteiten door Alonso Jimenez is de stenen kerk in San Pascual op Burias, een van de oudste kerken in de Filipijnen.

In het midden van de 17e eeuw, op het hoogtepunt van de handel met de Manillagaljoenen werd in Mobo een scheepswerf gebouwd. In die tijd behoorde de eilanden Masbate, Burias en Ticao tot de provincie Albay, toen nog Ibalon. De Spanjaarden lieten deze eilanden echter lange tijd grotendeels ongemoeid.

In 1846 werd Masbate aangewezen als een aparte politiek-militaire bestuurlijke eenheid en in 1864 werd het een aparte provincie, los van de provincie Albay waar het tot dan toe nog onder viel. Na een verwoestende tyfoon in 1908 werd Masbate weer geannexeerd, ditmaal door de provincie Sorsogon. Pas sinds 15 december 1920, in de Amerikaans-koloniale tijd, is Masbate opnieuw een eigen provincie.

Geografie

Topografie en landschap
De provincie Masbate ligt centraal in de Filipijnen tussen 11°43' en 21°36' noorderbreedte en 123°9' en 124°15' oosterlengte ten zuiden van Bicolschiereiland. de provincie maakt politiek gezien onderdeel uit van de Bicol Region en behoort daarmee tot de noordelijke Luzon-eilandengroep. Vanuit een biogeografisch en etnisch oogpunt behoort de provincie echter samen met onder meer Romblon, Marinduque, Sibuyan tot een groep eilanden in de Sibuyanzee. Deze andere eilanden behoren politiek gezien tot de centraal in de Filipijnen gelegen eilandengroep Visayas.

De provincie wordt gevormd door de eilanden Masbate, Ticao, Burias en diverse kleinere eilandjes. Het hoofdeiland Masbate heeft de vorm van een pijlpunt, met de punt naar het noorden toe. Burias en Ticao zijn beide langgerekte eilanden, uitstrekkend van het noordwesten naar het zuidoosten. De totale provincie heeft een landoppervlakte van 3975,55 km² en een totale oppervlakte van 4151.78 km2 en is daarmee qua grootte de dertigste provincie van het land. Daarvan vormt het grootste eiland Masbate met 3290 km² het grootste deel. De andere grotere eilanden van de provincie Maskate zijn Burias (424 km²) en Ticao (334 km²), respectievelijk ten noordwesten en noorden van Masbate gescheiden door de Masbate Pass. De totale kustlijn van Masbate bedraagt 968 kilometer. De grootste en enige stad van de provincie is de provinciehoofdstad Masbate City. Deze stad ligt aan de noordelijke kust van het hoofdeiland Masbate.

De provincie heeft geen landgrenzen met de andere Filipijnse provincies. In het noorden vormen de Burias-passage en de Ticao-passage de grens tussen Masbate en Sorsogon. In het oosten scheidt de Samarzee de provincie van Samar. Ten zuiden van Masbate bevindt zich de Visayanzee, met de provincies Cebu en Samar daar weer ten respectievelijk ten zuiden en zuidwesten van. Ten westen van Masbate ligt de Sibuyanzee. Het Jintotolo-kanaal ten zuidwesten van Masbate verbindt de Sibuyanzee en de Visayanzee en scheidt de provincie Masbate van het eiland Panay.

Masbate, Ticao en Burias hebben allemaal een glooiend tot heuvelachtig landschap. Het hoogste punt van de provincie is Conical Peak met een hoogte van 684 meter.

Bestuurlijke indeling
In de Spaans koloniale tijd behoorde tot de provincie Albay. In 1864 werd Masbate afgescheiden van Albay en uitgeroepen tot provincie tot het in de Amerikaanse koloniale tijd in 1908 weer werd toegevoegd aan de provincie Sorsogon. Sinds 15 december 1920 is Masbate middels Commonwealth Act 2934 echter een eigen provincie.

Masbate is bestuurlijk gezien opgedeeld in 1 stad en 20 gemeenten.

Stad

Masbate City is de enige stad van de provincie en is gelegen aan de noordkust van het eiland Masbate.

Gemeenten
De provincie Masbate kent 20 gemeenten: Twee gemeenten op het eiland Burias, vier op Ticao en de overige 14 gemeenten op het eiland Masbate.

Deze stad en gemeenten zijn weer verder onderverdeeld in 550 barangays.

Klimaat
Masbate kent is net als in de rest van de Filipijnen een tropisch klimaat. Dit deel van de archipel kent een kort droog seizoen en wordt geclassificeerd als Am in de klimaatclassificatie van Köppen. De gemiddelde temperatuur van het weerstation in Masbate over het jaar heen is 28,4°C met een gemiddeld maximum van 32,2°C en een gemiddeld minimum van 24,7°C. De warmste maanden maanden zijn april, mei en juni. De maand april is gemiddeld het droogst met 50,3mm neerslag. het weerstation kent een gemiddelde jaarlijkse neerslag van 2026,6mm per jaar.

Aardbevingen
De Filipijnen maken deel uit van de zogenaamde Ring of Fire. Op Masbate zijn geen actieve vulkanen te vinden zoals elders in het land. Wel wordt ook deze provincie met enige regelmaat getroffen door aardbevingen als gevolg van platentektoniek. De provincie ligt direct aan een breuk waardoor hevige aardbevingen met een kracht van 6 tot 7 gemiddeld eens in de tien jaar voorkomen.

Bestuur en politiek

Het bestuur van de provincie heeft een dualistisch karakter. De uitvoerende macht ligt bij de gouverneur. De gouverneur wordt sinds 1987 elke drie jaar rechtstreeks gekozen door de inwoners van de provincie. Hij is het hoofd van het dagelijks bestuur en benoemt alle directeur van uitvoerende organen. De gouverneur van de provincie Masbate is Antonio T. Kho. Hij werd bij de verkiezingen van 2022 voor de derde achtereenvolgende keer voor een termijn van drie jaar gekozen, nadat hij eerder van 1998 tot 2007 al drie termijnen diende als gouverneur. De wetgevende macht van de provincie ligt bij de Sangguniang Panlalawigan (provinciale raad). Deze bestaat in het geval van Masbate uit tien reguliere raadsleden en drie ex officio leden. De raad wordt voorgezeten door de vicegouverneur. De vicegouverneur wordt net als de gouverneur rechtstreeks door het volk gekozen en is de eerst aangewezen opvolger van de gouverneur wanneer deze bijvoorbeeld komt te overlijden. Ook de vicegouveneur is een ex-officio lid van de raad en stemt normaal gesproken niet mee in de raad, maar mag wel de beslissende stem uitbrengen bij een gelijk geëindigde stemming. De vicegouverneur van Mabate is Elisa T. Kho, de vrouw van gouverneur Antonio Kho. Zij werd in 2022 voor een termijn van drie jaar gekozen, nadat ze eerder van 2007 tot 2010 zelf ook al gouverneur was. De tien reguliere raadsleden van Masbate worden gekozen per kiesdistrict. De inwoners van het eerste kiesdistrict van Masbate kiezen twee raadsleden. De inwoners van het tweede en derde kiesdistrict kiezen elk vier raadsleden. De drie ex-officio leden zijn de lokale president van de Association of Barangay Captains (ABC), de lokale president van de Philippine Councilors League (PCL) en de lokale president van de Sangguniang Kabataan (jeugdraad).

Lijst van gouverneurs van Masbate sinds 1946

Demografie

Bevolkingsgroei
Masbate had bij de census van 2020 een inwoneraantal van 908.920 mensen. Dit waren 16.527 mensen (1,85%) meer dan bij de vorige census van 2015. Ten opzichte van de census van 2000 was het aantal inwoners gegroeid met 201.252 mensen (28,44%). De gemiddelde jaarlijkse groei in die periode kwam daarmee uit op 1,26%, hetgeen lager was dan het landelijk jaarlijks gemiddelde over deze periode (1,79%).

De bevolkingsdichtheid van Masbate was ten tijde van de laatste census, met 908.920 inwoners op 4151,78 km², 218,9 mensen per km².

Bevolkingssamenstelling
Masbate telt diverse etnische groepen, die zich van elkaar onderscheiden door hun taal en cultuur. Bijna tweederde van de inwoners van de provincie zijn Masbateño/Masbatenon. De overige 34% zijn Cebuano's (24,2%), Bisaya's (4,1%), Bicolano's (2,4%), Tagalog (0,3%), Waray (0,2%), Boholano (0,1%) en nog diverse andere nog minder voorkomende etnische groepen.

Talen
De provincie kent drie verschillende talen uit de Visayas en een uit Luzon. Ten tijde van de census in 2000 sprak ongeveer 60,6% van de mensen Masbateño of Minasbaté. Deze Visaya-taal wordt alleen wordt gesproken in deze provincie en dan met name in Masbate City en de naburige gemeenten. De taal lijkt veel op het Hiligaynon, dat door ongeveer een derde van de bevolking wordt gesproken in het zuidwestelijke deel van Masbate wordt gesproken in met name de gemeenten Balud, Mandaon en het zuidwestelijke deel van Milagros. De resterende inwoners van de provincie, voornamelijk inwoners van Esperanza, Pio V. Corpuz and Placer in het zuidelijke deel van de provincie spreken Cebuano,

Waray komt met name voor op Ticao, vanwege de nabijheid tot de provincie Sorsogon, waar deze taal ook wordt gesproken.

Religie

Als gevolg van de eeuwenlange koloniale overheersing door de Spanjaarden is het grootste deel van de inwoners van de Filipijnen katholiek: ruim 80 procent van de bevolking is volgeling van de Rooms-Katholieke Kerk in de Filipijnen en nog eens 3 procent behoort tot de hiervan afgesplitste Iglesia Filipina Independiente. In Masbate is het aandeel Rooms-Katholieken nog hoger. Bij de census van 2010 gaf 90,6 van de inwoners van de provincie Rooms-katholiek op als religie en nog eens 1,8 procent noemde de Iglesia Filipina Independiente. Andere religieuze affiliaties die in 2010 genoemd werden waren: Evangelisch christendom (Philippine Council of Evangelical Churches) met 1,1 procent, protestant en niet Rooms-Katholiek (National Council of Churches in the Philippines) met 1,1 procent en de Zevendedagsadventisten met 0,9 procent.

Tot 1968 behoorde de provincie Masbate voor de Rooms-Katholieke Kerk tot het Bisdom van Sorsogon. Op 23 maart 1968 werd het Bisdom van Masbate gecreëerd als suffragaan bisdom van het aartsbisdom van Caceres. De bisschop van Masbate is sinds 2011 José Bantolo.

Economie
Landbouw, veeteelt en visserij vormen de belangrijkste onderdelen van de economie van Masbate. De provincie is na de provincie Bukidnon de grootste in veeteelt. Ongeveer 70% van het vee wordt verkocht aan de regio Metro Manilla. Het belangrijkste landbouwproduct van de provincie is kopra. Ook maïs, rijst en wortelgewassen worden er veel verbouwd. Langs de vele kustgebieden is veel visserijactiviteit. In Masbate zijn veel mineralen in de bodem te vinden, zoals koper, zilver, ijzer, mangaan, chromiet en kalksteen. Veel van deze natuurlijke hulpbronnen zijn nog onontgonnen.

Masbate is een relatief arme provincie. Uit cijfers van de Philippine Statistical Authority (PSA) uit het jaar 2021 blijkt dat 27,7% (262.091) mensen) onder de armoedegrens leefde. In het jaar 2000 was dit nog 70,2%. Naar schatting 9,4% van het aantal inwoners van Masbate heeft zelfs niet voldoende inkomen om zich alleen maar van de minimale benodigde voeding te kunnen voorzien. Het percentage mensen dat in 2012 onder de armoedegrens leefde was hoger dan het gemiddelde cijfer voor de Filipijnen dat werd vastgesteld op 18,1% .

Flora en Fauna
De provincie kent sinds 2022 het beschermde natuurgebied Tugbo Natural Biotic Area voorheen bekend als Tugbo Watershed Forest Reserve. Dit gebied in barangay Tugbo, onderdeel van Masbate City en deels in de gemeente Mobo, werd in juni 2022 uitgeroepen tot beschermd natuurgebied middels Republic Act 11806. In dit 224 hectare grote gebied leven diverse Filipijns-endemische vogelsoorten zoals de Luzonboeboekuil, de roodborstbuulbuul, de Witbrauwshamalijster, de blauwkopwaaierstaart, de bruinborstfluiter en de oranjebuikhoningvogel

Toerisme
Het toerismesector in Masbate is niet erg ontwikkeld. De provincies kent wel vele hagelwitte stranden, zandbanken en diverse bijzondere kleine eilandjes. Voorbeelden zijn de Buntod Sandbar, Palani White Beach, Animasola Island, Tinalisayan Island, Sombrero Island, Porta Vega Beach, Pawa Mangrove Park, de Catandayagan Falls en Halea Nature Park

Geboren in Masbate
 Moises Espinosa (14 juni 1933), politicus (overleden 17 maart 1989);
 Leonardo Quisumbing (6 november 1939), rechter (20 januari 2019),

Externe link
 Officiële website van de provincie Masbate


?�A Pulaski Township man was charged Wednesday with simple assault and harassment after attacking another man, Rochester police said.
? A New Castle man has been charged with attempting to transfer ownership of a firearm using false information, state police reported.
According to police, Jason A. Lohr, 34, of 408 Old Route 19 went to John Brown�s Armory, 198 Brighton Ave, Rochester, around 6:15 p.m. Feb. 12 attempting to transfer ownership of a semiautomatic handgun. The transfer was denied because Lohr had been involuntarily committed to The Medical Center, Beaver, on July 16, 2006. Lohr said he had never been committed.


Youth | CDS Family & Behavioral Health Services, Inc.
CDS is here for YOU!
Most of the programs offered by CDS Family & Behavioral Health Services are for youth – children and teens and their families. The CDS mission is "Strengthening Communities by Building Strong Families" which means helping kids and their parents develop the skills they need to succeed in life!
IF YOU ARE HAVING PROBLEMS OF ANY SORT RIGHT NOW, CALL THE NEAREST INTERFACE YOUTH PROGRAM SHELTER! A Youth Care Worker or Counselor will be there to help you day or night, 24/7, even on holidays!