text:
static animationData* currentAnimation = NULL;

@implementation RBSplitSubview

// This class method returns YES if an animation is in progress.
+ (BOOL)animating {
	return currentAnimation!=NULL;
}

// This is the designated initializer for RBSplitSubview. It sets some reasonable defaults. However, you
// can't rely on anything working until you insert it into a RBSplitView.
- (id)initWithFrame:(NSRect)frame {
    self = [super initWithFrame:frame];
	if (self) {
		fraction = 0.0;
		canCollapse = NO;
		notInLimits = NO;
		minDimension = 1.0;
		maxDimension = WAYOUT;
		identifier = @"";
		previous = NSZeroRect;
		savedSize = frame.size;
		actDivider = NSNotFound;
		canDragWindow = NO;
	}
	return self;
}

// Just releases our stuff when going away.
- (void)dealloc {
	[identifier release];
	[super dealloc];
}

// These return nil since we're not a RBSplitView (they're overridden there).
- (RBSplitView*)asSplitView {
	return nil;
}

- (RBSplitView*)coupledSplitView {
	return nil;
}

// Sets and gets the coupling between a RBSplitView and its containing RBSplitView (if any).
// For convenience, these methods are also implemented here.
- (void)setCoupled:(BOOL)flag {
}

- (BOOL)isCoupled {
	return NO;
}

// RBSplitSubviews are never flipped, unless they're RBSplitViews.
- (BOOL)isFlipped {
	return NO;
}

// We copy the opacity of the owning split view.
- (BOOL)isOpaque {
	return [[self couplingSplitView] isOpaque];
}

// A hidden RBSplitSubview is not redrawn and is not considered for drawing dividers.
- (void)setHidden:(BOOL)flag {
	if ([self isHidden]!=flag) {
		RBSplitView* sv = [self splitView];
		[self RB___setHidden:flag];
		if (flag) {
			[sv adjustSubviews];
		} else {
			[sv adjustSubviewsExcepting:self];
		}
	}
}

// RBSplitSubviews can't be in the responder chain.
- (BOOL)acceptsFirstResponder {
	return NO;
}

// This returns the owning splitview. It's guaranteed to return a RBSplitView or nil.
// You should avoid having "orphan" RBSplitSubviews, or at least manipulating
// them while they're not inserted in a RBSplitView.
- (RBSplitView*)splitView {
	id result = [self superview];
	if ([result isKindOfClass:[RBSplitView class]]) {
		return (RBSplitView*)result;
	}
	return nil;
}

// This also returns the owning splitview. It's overridden for nested RBSplitViews.
- (RBSplitView*)couplingSplitView {
	id result = [self superview];
	if ([result isKindOfClass:[RBSplitView class]]) {
		return (RBSplitView*)result;
	}
	return nil;
}

// This returns the outermost directly containing RBSplitView, or nil.
- (RBSplitView*)outermostSplitView {
	id result = nil;
	id sv = self;
	while ((sv = [sv superview])&&[sv isKindOfClass:[RBSplitView class]]) {
		result = sv;
	}
	return result;
}

// This convenience method returns YES if the containing RBSplitView is horizontal.
- (BOOL)splitViewIsHorizontal {
	return [[self splitView] isHorizontal];
}

// You can use either tags (NSIntegers) or identifiers (NSStrings) to identify individual subviews.
// We take care not to have nil identifiers.
- (void)setTag:(NSInteger)theTag {
	tag = theTag;
}

- (NSInteger)tag {
	return tag;
}

- (void)setIdentifier:(NSString*)aString {
	[identifier autorelease];
	identifier = aString?[aString retain]:@"";
}

- (NSString*)identifier {
	return identifier;
}

// If we have an identifier, this will make debugging a little easier by appending it to the
// default description.
- (NSString*)description {
	return [identifier length]>0?[NSString stringWithFormat:@"%@(%@)",[super description],identifier]:[super description];
}

// This pair of methods allows you to get and change the position of a subview (within the split view);
// this counts from zero from the left or top of the split view.
- (NSUInteger)position {
	RBSplitView* sv = [self splitView];
	return sv?[[sv subviews] indexOfObjectIdenticalTo:self]:0;
}

- (void)setPosition:(NSUInteger)newPosition {
	RBSplitView* sv = [self splitView];
	if (sv) {
		[self retain];
		[self removeFromSuperviewWithoutNeedingDisplay];
		NSArray* subviews = [sv subviews];
		if (newPosition>=[subviews count]) {
			[sv addSubview:self positioned:NSWindowAbove relativeTo:nil];
		} else {
			[sv addSubview:self positioned:NSWindowBelow relativeTo:[subviews objectAtIndex:newPosition]];
		}
		[self release];
	}
}

// Tests whether the subview is collapsed.
- (BOOL)isCollapsed {
	return [self RB___visibleDimension]<=0.0;
}

// Tests whether the subview can shrink further.
- (BOOL)canShrink {
	return [self RB___visibleDimension]>([self canCollapse]?0.0:minDimension);
}

// Tests whether the subview can expand further.
- (BOOL)canExpand {
	return [self RB___visibleDimension]<maxDimension;
}

// Returns the subview's status.
- (RBSSubviewStatus)status {
	animationData* anim = [self RB___animationData:NO resize:NO];
	if (anim) {
		return anim->collapsing?RBSSubviewCollapsing:RBSSubviewExpanding;
	}
	return [self RB___visibleDimension]<=0.0?RBSSubviewCollapsed:RBSSubviewNormal;
}

// Tests whether the subview can be collapsed. The local instance variable will be overridden by the
// delegate method if it's implemented.
- (BOOL)canCollapse {
	BOOL result = canCollapse;
	RBSplitView* sv = [self splitView];
	if ([sv RB___numberOfSubviews]<2) {
		return NO;
	}
	id delegate = [sv delegate];
	if ([delegate respondsToSelector:@selector(splitView:canCollapse:)]) {
		result = [delegate splitView:sv canCollapse:self];
	}
	return result;
}

// This sets the subview's "canCollapse" flag. Ignored if the delegate's splitView:canCollapse:
// method is implemented.
- (void)setCanCollapse:(BOOL)flag {
	canCollapse = flag;
}

// This expands a collapsed subview and calls the delegate's splitView:didExpand: method, if it exists.
// This is not called internally by other methods; call this to expand a subview programmatically.
// As a convenience to other methods, it returns the subview's dimension after expanding (this may be
// off by 1 pixel due to rounding) or 0.0 if it couldn't be expanded.
// The delegate should not change the subview's frame.
- (CGFloat)expand {
	return [self RB___expandAndSetToMinimum:NO];
}

// This collapses an expanded subview and calls the delegate's splitView:didCollapse: method, if it exists.
// This is not called internally by other methods; call this to expand a subview programmatically.
// As a convenience to other methods, it returns the negative of the subview's dimension before
// collapsing (or 0.0 if it couldn't be collapsed).
// The delegate should not change the subview's frame.
- (CGFloat)collapse {
	return [self RB___collapse];
}

// This tries to collapse the subview with animation, and collapses it instantly if some other
// subview is animating. Returns YES if animation was started successfully.
- (BOOL)collapseWithAnimation {
	return [self collapseWithAnimation:YES withResize:YES];
}

// This tries to expand the subview with animation, and expands it instantly if some other
// subview is animating. Returns YES if animation was started successfully.
- (BOOL)expandWithAnimation {
	return [self expandWithAnimation:YES withResize:YES];
}

// These methods collapse and expand subviews with animation, depending on the parameters.
// They return YES if animation startup was successful. If resize is NO, the subview is
// collapsed/expanded without resizing it during animation.
- (BOOL)collapseWithAnimation:(BOOL)animate withResize:(BOOL)resize {
	if ([self status]==RBSSubviewNormal) {
		if ([self canCollapse]) {
			if (animate&&[self RB___animationData:YES resize:resize]) {
				[self RB___clearResponder];
				[self RB___stepAnimation];
				return YES;
			} else {
				[self RB___collapse];
			}
		}
	}
	return NO;
}

- (BOOL)expandWithAnimation:(BOOL)animate withResize:(BOOL)resize {
	if ([self status]==RBSSubviewCollapsed) {
		if (animate&&[self RB___animationData:YES resize:resize]) {
			[self RB___stepAnimation];
			return YES;
		} else {
			[self RB___expandAndSetToMinimum:NO];
		}
	}
	return NO;
}

// These 3 methods get and set the view's minimum and maximum dimensions.
// The minimum dimension ought to be an integer at least equal to 1.0 but we make sure.
// The maximum dimension ought to be an integer at least equal to the minimum. As a convenience,
// pass in zero to set it to some huge number.
- (CGFloat)minDimension {
	return minDimension;
}

- (CGFloat)maxDimension {
	return maxDimension;
}

- (void)setMinDimension:(CGFloat)newMinDimension andMaxDimension:(CGFloat)newMaxDimension {
	minDimension = MAX(1.0,floor(newMinDimension));
	if (newMaxDimension<1.0) {
		newMaxDimension = WAYOUT;
	}
	maxDimension = MAX(minDimension,floor(newMaxDimension));
	CGFloat dim = [self dimension];
	if ((dim<minDimension)||(dim>maxDimension)) {
		[[self splitView] setMustAdjust];
	}
}

// This returns the subview's dimension. If it's collapsed, it returns the dimension it would have
// after expanding.
- (CGFloat)dimension {
	CGFloat dim = [self RB___visibleDimension];
	if (dim<=0.0) {
		dim = [[self splitView] RB___dimensionWithoutDividers]*fraction;
		if (dim<minDimension) {
			dim = minDimension;
		} else if (dim>maxDimension) {
			dim = maxDimension;
		}
	}
	return dim;
}

// Sets the current dimension of the subview, subject to the current maximum and minimum.
// If the subview is collapsed, this will have an effect only after reexpanding.
- (void)setDimension:(CGFloat)value {
	if (value<minDimension) {
		value = minDimension;
	} else if (value>maxDimension) {
		value = maxDimension;
	}
	RBSplitView* sv = [self splitView];
	NSSize size = [self frame].size;
	BOOL ishor = [sv isHorizontal];
	if (DIM(size)>0.0) {
        // We're not collapsed, set the size and adjust other subviews.
		DIM(size) = value;
		[self setFrameSize:size];
		[sv adjustSubviewsExcepting:self];
	} else {
        // We're collapsed, adjust the fraction so that we'll have the (approximately) correct
        // dimension after expanding.
		fraction = value/[sv RB___dimensionWithoutDividers];
	}
}

// This just draws the background of a subview, then tells the delegate, if any.
// The delegate would usually draw a frame inside the subview.
- (void)drawRect:(NSRect)rect {
	RBSplitView* sv = [self splitView];
	NSColor* bg = [sv background];
	if (bg) {
		[bg set];
		NSRectFillUsingOperation(rect,NSCompositeSourceOver);
	}
	id del = [sv delegate];
	if ([del respondsToSelector:@selector(splitView:willDrawSubview:inRect:)]) {
		[del splitView:sv willDrawSubview:self inRect:rect];
	}
}

// We check if the RBSplitView must be adjusted before redisplaying programmatically.
// if so, we adjust and display the whole RBSplitView.
- (void)display {
	RBSplitView* sv = [self splitView];
	if (sv) {
		if ([sv mustAdjust]) {
			[sv display];
		} else {
			[super display];
		}
	}
}

// RBSplitSubviews will always resize their own subviews.
- (BOOL)autoresizesSubviews {
	return YES;
}

// ...and we don't want that to change under any circumstances.
- (void)setAutoresizesSubviews:(BOOL)flag {
}

// This is method is called automatically when the subview is resized; don't call it yourself.
- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
	RBSplitView* sv = [self splitView];
	if (sv) {
		BOOL ishor = [sv isHorizontal];
		NSRect frame = [self frame];
		CGFloat dim = DIM(frame.size);
		CGFloat other = OTHER(frame.size);
        // We resize subviews only when we're inside the subview's limits and the containing splitview's limits.
		animationData* anim = [self RB___animationData:NO resize:NO];
		if ((dim>=(anim&&!anim->resizing?anim->dimension:minDimension))&&(dim<=maxDimension)&&(other>=[sv minDimension])&&(other<=[sv maxDimension])) {
			if (notInLimits) {
                // The subviews can be resized, so we restore the saved size.
				oldBoundsSize = savedSize;
			}
            // We save the size every time the subview's subviews are resized within the limits.
			notInLimits = NO;
			savedSize = frame.size;
			[super resizeSubviewsWithOldSize:oldBoundsSize];
		} else {
			notInLimits = YES;
		}
	}
}

// This method is used internally when a divider is dragged. It tries to change the subview's dimension
// and returns the actual change, collapsing or expanding whenever possible. You usually won't need
// to call this directly.
- (CGFloat)changeDimensionBy:(CGFloat)increment mayCollapse:(BOOL)mayCollapse move:(BOOL)move {
	RBSplitView* sv = [self splitView];
	if (!sv||(fabs(increment)<1.0)) {
		return 0.0;
	}
	BOOL ishor = [sv isHorizontal];
	NSRect frame = [self frame];
	CGFloat olddim = DIM(frame.size);
	CGFloat newdim = MAX(0.0,olddim+increment);
	if (newdim<olddim) {
		if (newdim<minDimension) {
            // Collapse if needed
			if (mayCollapse&&[self canCollapse]&&(newdim<MAX(1.0,minDimension*(0.5-HYSTERESIS)))) {
				return [self RB___collapse];
			}
			newdim = minDimension;
		}
	} else if (newdim>olddim) {
		if (olddim<1.0) {
            // Expand if needed.
			if (newdim>(minDimension*(0.5+HYSTERESIS))) {
				newdim = MAX(newdim,[self RB___expandAndSetToMinimum:YES]);
			} else {
				return 0.0;
			}
		}
		if (newdim>maxDimension) {
			newdim = maxDimension;
		}
	}
	if ((int)newdim!=(int)olddim) {
        // The dimension has changed.
		increment = newdim-olddim;
		DIM(frame.size) = newdim;
		if (move) {
			DIM(frame.origin) -= increment;
		}
        // We call super instead of self here to postpone adjusting subviews for nested splitviews.
        //		[super setFrameSize:frame.size];
		[super setFrame:frame];
		[sv RB___setMustClearFractions];
		[sv setMustAdjust];
	}
	return newdim-olddim;
}

// This convenience method returns the number of subviews (surprise!)
- (NSUInteger)numberOfSubviews {
	return [[self subviews] count];
}

// We return the deepest subview that's hit by aPoint. We also check with the delegate if aPoint is
// within an alternate drag view.
- (NSView*)hitTest:(NSPoint)aPoint {
	if ([self mouse:aPoint inRect:[self frame]]) {
		RBSplitView* sv = [self splitView];
		id delegate = [sv delegate];
		if ([delegate respondsToSelector:@selector(splitView:dividerForPoint:inSubview:)]) {
			actDivider = [delegate splitView:sv dividerForPoint:aPoint inSubview:self];
			if ((actDivider+1)<[sv RB___numberOfSubviews]) {
				return self;
			}
		}
		actDivider = NSNotFound;
		NSView* result = [super hitTest:aPoint];
		canDragWindow = ![[result opaqueAncestor] isDescendantOf:[[result window] contentView]];
		return result;
	}
	return nil;
}

// This method handles clicking and dragging in an empty portion of the subview, or in an alternate
// drag view as designated by the delegate.
- (void)mouseDown:(NSEvent*)theEvent {
    if ([theEvent clickCount]<2) {
	NSWindow* window = [self window];
	NSPoint where = [theEvent locationInWindow];
	if (actDivider<NSNotFound) {
		// Cache divider# here for the loop
		NSUInteger thediv = actDivider;
        // The mouse down was inside an alternate drag view; actDivider was just set in hitTest.
		RBSplitView* sv = [self splitView];
		NSPoint point = [sv convertPoint:where fromView:nil];
		[[RBSplitView cursor:RBSVDragCursor] push];
		NSPoint base = NSZeroPoint;
        // Record the current divider coordinate.
		CGFloat divc = [sv RB___dividerOrigin:thediv];
		BOOL ishor = [sv isHorizontal];
		[sv RB___setDragging:YES];
        // Loop while the button is down.
		while ((theEvent = [NSApp nextEventMatchingMask:NSLeftMouseDownMask|NSLeftMouseDraggedMask|NSLeftMouseUpMask untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:YES])&&([theEvent type]!=NSLeftMouseUp)) {
            // Set up a local autorelease pool for the loop to prevent buildup of temporary objects.
			NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
			NSDisableScreenUpdates();
            // This does the actual movement.
			[sv RB___trackMouseEvent:theEvent from:point withBase:base inDivider:thediv];
			if ([sv mustAdjust]) {
                // If something changed, we clear fractions and redisplay.
				[sv RB___setMustClearFractions];
				[sv display];
			}
            // Change the drag point by the actual amount moved.
			CGFloat newc = [sv RB___dividerOrigin:thediv];
			DIM(point) += newc-divc;
			divc = newc;
			NSEnableScreenUpdates();
			[pool drain];
		}
		[sv RB___setDragging:NO];
		[NSCursor pop];
		actDivider = NSNotFound;
		return;
	}
	if (canDragWindow&&[window isMovableByWindowBackground]&&![[self couplingSplitView] background]) {
        // If we get here, it's a textured (metal) window, the mouse has gone down on an non-opaque portion
        // of the subview, and our RBSplitView has a transparent background. RBSplitView returns NO to
        // mouseDownCanMoveWindow, but the window should move here - after all, the window background
        // is visible right here! So we fake it and move the window as intended. Mwahahaha!
		where =  [window convertBaseToScreen:where];
		NSPoint origin = [window frame].origin;
        // Now we loop handling mouse events until we get a mouse up event.
		while ((theEvent = [NSApp nextEventMatchingMask:NSLeftMouseDownMask|NSLeftMouseDraggedMask|NSLeftMouseUpMask untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:YES])&&([theEvent type]!=NSLeftMouseUp)) {
            // Set up a local autorelease pool for the loop to prevent buildup of temporary objects.
			NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
			NSPoint now = [window convertBaseToScreen:[theEvent locationInWindow]];
			origin.x += now.x-where.x;
			origin.y += now.y-where.y;
            // Move the window by the mouse displacement since the last event.
			[window setFrameOrigin:origin];
			where = now;
			[pool drain];
            }
		}
	}
    [super mouseDown:theEvent];
}

// These two methods encode and decode subviews.
- (void)encodeWithCoder:(NSCoder*)coder {
	NSRect frame;
	BOOL coll = [self isCollapsed];
	if (coll) {
        // We can't encode a collapsed subview as-is, so we correct the frame size first and add WAYOUT
        // to the origin to signal it was collapsed.
		NSRect newf = frame = [self frame];
		newf.origin.x += WAYOUT;
		[super setFrameOrigin:newf.origin];
		newf.size = savedSize;
		[super setFrameSize:newf.size];
	}
	[super encodeWithCoder:coder];
	if (coll) {
		[super setFrame:frame];
	}
	if ([coder allowsKeyedCoding]) {
		[coder encodeObject:identifier forKey:@"identifier"];
		[coder encodeInteger:tag forKey:@"tag"];
		[coder encodeDouble:minDimension forKey:@"minDimension"];
		[coder encodeDouble:maxDimension forKey:@"maxDimension"];
		[coder encodeDouble:fraction forKey:@"fraction"];
		[coder encodeBool:canCollapse forKey:@"canCollapse"];
	} else {
		[coder encodeObject:identifier];
		[coder encodeValueOfObjCType:@encode(typeof(tag)) at:&tag];
		[coder encodeValueOfObjCType:@encode(typeof(minDimension)) at:&minDimension];
		[coder encodeValueOfObjCType:@encode(typeof(maxDimension)) at:&maxDimension];
		[coder encodeValueOfObjCType:@encode(typeof(fraction)) at:&fraction];
		[coder encodeValueOfObjCType:@encode(typeof(canCollapse)) at:&canCollapse];
	}
}

- (id)initWithCoder:(NSCoder*)coder {
    if ((self = [super initWithCoder:coder])) {
		fraction = 0.0;
		canCollapse = NO;
		notInLimits = NO;
		minDimension = 1.0;
		maxDimension = WAYOUT;
		identifier = @"";
		actDivider = NSNotFound;
		canDragWindow = NO;
		previous = [self frame];
		savedSize = previous.size;
		if (previous.origin.x>=WAYOUT) {
            // The subview was collapsed when encoded, so we correct the origin and collapse it.
			BOOL ishor = [self splitViewIsHorizontal];
			previous.origin.x -= WAYOUT;
			DIM(previous.size) = 0.0;
			[self setFrameOrigin:previous.origin];
			[self setFrameSize:previous.size];
		}
		previous = NSZeroRect;
		if ([coder allowsKeyedCoding]) {
			[self setIdentifier:[coder decodeObjectForKey:@"identifier"]];
			tag = [coder decodeIntegerForKey:@"tag"];
			minDimension = [coder decodeDoubleForKey:@"minDimension"];
			maxDimension = [coder decodeDoubleForKey:@"maxDimension"];
			fraction = [coder decodeDoubleForKey:@"fraction"];
			canCollapse = [coder decodeBoolForKey:@"canCollapse"];
		} else {
			[self setIdentifier:[coder decodeObject]];
			[coder decodeValueOfObjCType:@encode(typeof(tag)) at:&tag];
			[coder decodeValueOfObjCType:@encode(typeof(minDimension)) at:&minDimension];
			[coder decodeValueOfObjCType:@encode(typeof(maxDimension)) at:&maxDimension];
			[coder decodeValueOfObjCType:@encode(typeof(fraction)) at:&fraction];
			[coder decodeValueOfObjCType:@encode(typeof(canCollapse)) at:&canCollapse];
		}
	}
    return self;
}

@end

@implementation RBSplitSubview (RB___SubviewAdditions)

// This hides/shows the subview without calling adjustSubviews.
- (void)RB___setHidden:(BOOL)flag {
	[super setHidden:flag];
}

// This internal method returns the current animationData. It will always return nil if
// the receiver isn't the current owner and some other subview is already being animated.
// Otherwise, if the parameter is YES, a new animation will be started (or the current
// one will be restarted).
- (animationData*)RB___animationData:(BOOL)start resize:(BOOL)resize {
	if (currentAnimation&&(currentAnimation->owner!=self)) {
        // There already is an animation in progress on some other subview.
		return nil;
	}
	if (start) {
        // We want to start (or restart) an animation.
		RBSplitView* sv = [self splitView];
		if (sv) {
			CGFloat dim = [self dimension];
            // First assume the default time, then ask the delegate.
			NSTimeInterval total = dim*(0.2/150.0);
			id delegate = [sv delegate];
			if ([delegate respondsToSelector:@selector(splitView:willAnimateSubview:withDimension:)]) {
				total = [delegate splitView:sv willAnimateSubview:self withDimension:dim];
			}
            // No use animating anything shorter than the frametime.
			if (total>FRAMETIME) {
				if (!currentAnimation) {
					currentAnimation = (animationData*)malloc(sizeof(animationData));
				}
				if (currentAnimation) {
					currentAnimation->owner = self;
					currentAnimation->stepsDone = 0;
					currentAnimation->elapsedTime = 0.0;
					currentAnimation->dimension = dim;
					currentAnimation->collapsing = ![self isCollapsed];
					currentAnimation->totalTime = total;
					currentAnimation->finishTime = [NSDate timeIntervalSinceReferenceDate]+total;
					currentAnimation->resizing = resize;
					[sv RB___setDragging:YES];
				}
			} else if (currentAnimation) {
				free(currentAnimation);
				currentAnimation = NULL;
			}
		}
	}
	return currentAnimation;
}

// This internal method steps the animation to the next frame.
- (void)RB___stepAnimation {
	NSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];
	animationData* anim = [self RB___animationData:NO resize:NO];
	if (anim) {
		RBSplitView* sv = [self splitView];
		NSTimeInterval remain = anim->finishTime-now;
		NSRect frame = [self frame];
		BOOL ishor = [sv isHorizontal];
        // Continuing animation only makes sense if we still have at least FRAMETIME available.
		if (remain>=FRAMETIME) {
			CGFloat avg = anim->elapsedTime;
            // We try to keep a record of how long it takes, on the average, to resize and adjust
            // one animation frame.
			if (anim->stepsDone) {
				avg /= anim->stepsDone;
			}
			NSTimeInterval delay = MIN(0.0,FRAMETIME-avg);
            // We adjust the new dimension proportionally to how much of the designated time has passed.
			CGFloat dim = floor(anim->dimension*(remain-avg)/anim->totalTime);
			if (dim>4.0) {
				if (!anim->collapsing) {
					dim = anim->dimension-dim;
				}
				DIM(frame.size) = dim;
				[self RB___setFrame:frame withFraction:0.0 notify:NO];
				[sv adjustSubviews];
				[self display];
				anim->elapsedTime += [NSDate timeIntervalSinceReferenceDate]-now;
				++anim->stepsDone;
                // Schedule a timer to do the next animation step.
				[self performSelector:@selector(RB___stepAnimation) withObject:nil afterDelay:delay inModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode,NSModalPanelRunLoopMode,
                                                                                NSEventTrackingRunLoopMode,nil]];
				return;
			}
		}
        // We're finished, either collapse or expand entirely now.
		if (anim->collapsing) {
            id delegate = [sv delegate];
            if ([delegate respondsToSelector:@selector(splitView:willCollapse:)]) {
                [delegate splitView:sv willCollapse:self];
            }
			DIM(frame.size) = 0.0;
			[self RB___finishCollapse:frame withFraction:anim->dimension/[sv RB___dimensionWithoutDividers]];
		} else {
			CGFloat savemin,savemax;
			CGFloat dim = [self RB___setMinAndMaxTo:anim->dimension savingMin:&savemin andMax:&savemax];
			DIM(frame.size) = dim;
			[self RB___finishExpand:frame withFraction:0.0];
			minDimension = savemin;
			maxDimension = savemax;
		}
	}
}

// This internal method stops the animation, if the receiver is being animated. It will
// return YES if the animation was stopped.
- (BOOL)RB___stopAnimation {
	if (currentAnimation&&(currentAnimation->owner==self)) {
		[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(RB___stepAnimation) object:nil];
		free(currentAnimation);
		currentAnimation = NULL;
		[[self splitView] RB___setDragging:NO];
		return YES;
	}
	return NO;
}

// This internal method returns the actual visible dimension of the subview. Differs from -dimension in
// that it returns 0.0 if the subview is collapsed.
- (CGFloat)RB___visibleDimension {
	BOOL ishor = [self splitViewIsHorizontal];
	NSRect frame = [self frame];
	return MAX(0.0,DIM(frame.size));
}

// This pair of internal methods is used only inside -[RBSplitView adjustSubviews] to copy subview data
// from and to that method's internal cache.
- (void)RB___copyIntoCache:(subviewCache*)cache {
	cache->sub = self;
	cache->rect = [self frame];
	cache->size = [self RB___visibleDimension];
	cache->fraction = fraction;
	cache->constrain = NO;
}

- (void)RB___updateFromCache:(subviewCache*)cache withTotalDimension:(CGFloat)value {
	CGFloat dim = [self RB___visibleDimension];
	if (cache->size>=1.0) {
        // New state is not collapsed.
		if (dim>=1.0) {
            // Old state was not collapsed, so we just change the frame.
			[self RB___setFrame:cache->rect withFraction:cache->fraction notify:YES];
		} else {
            // Old state was collapsed, so we expand it.
			[self RB___finishExpand:cache->rect withFraction:cache->fraction];
		}
	} else {
        // New state is collapsed.
		if (dim>=1.0) {
            // Old state was not collapsed, so we clear first responder and change the frame.
			[self RB___clearResponder];
            id delegate = [[self splitView] delegate];
            if ([delegate respondsToSelector:@selector(splitView:willCollapse:)]) {
                [delegate splitView:[self splitView] willCollapse:self];
            }
			[self RB___finishCollapse:cache->rect withFraction:dim/value];
		} else {
            // It was collapsed already, but the frame may have changed, so we set it.
			[self RB___setFrame:cache->rect withFraction:cache->fraction notify:YES];
		}
	}
}

// This internal method sets minimum and maximum values to the same value, saves the old values,
// and returns the new value (which will be limited to the old values).
- (CGFloat)RB___setMinAndMaxTo:(CGFloat)value savingMin:(CGFloat*)oldmin andMax:(CGFloat*)oldmax {
	*oldmin = [self minDimension];
	*oldmax = [self maxDimension];
	if (value<*oldmin) {
		value = *oldmin;
	}
	if (value>*oldmax) {
		value = *oldmax;
	}
	minDimension = maxDimension = value;
	return value;
}

// This internal method tries to clear the first responder, if the current responder is a descendant of
// the receiving subview. If so, it will set first responder to nil, redisplay the former responder and
// return YES. Returns NO otherwise.
- (BOOL)RB___clearResponder {
	NSWindow* window = [self window];
	if (window) {
		NSView* responder = (NSView*)[window firstResponder];
		if (responder&&[responder respondsToSelector:@selector(isDescendantOf:)]) {
			if ([responder isDescendantOf:self]) {
				if ([window makeFirstResponder:nil]) {
					[responder display];
					return YES;
				}
			}
		}
	}
	return NO;
}

// This internal method collapses a subview.
// It returns the negative of the size of the subview before collapsing, or 0.0 if it wasn't collapsed.
- (CGFloat)RB___collapse {
	CGFloat result = 0.0;
	if (![self isCollapsed]) {
		RBSplitView* sv = [self splitView];
		if (sv&&[self canCollapse]) {
            id delegate = [sv delegate];
            if ([delegate respondsToSelector:@selector(splitView:willCollapse:)]) {
                [delegate splitView:sv willCollapse:self];
            }
			[self RB___clearResponder];
			NSRect frame = [self frame];
			BOOL ishor = [sv isHorizontal];
			result = DIM(frame.size);
            // For collapsed views, fraction will contain the fraction of the dimension previously occupied
			DIM(frame.size) = 0.0;
			[self RB___finishCollapse:frame withFraction:result/[sv RB___dimensionWithoutDividers]];
		}
	}
	return -result;
}

// This internal method finishes the collapse of a subview, stopping the animation if
// there is one, and calling the delegate method if there is one.
- (void)RB___finishCollapse:(NSRect)rect withFraction:(double)value {
	RBSplitView* sv = [self splitView];
	BOOL finish = [self RB___stopAnimation];
	[self RB___setFrame:rect withFraction:value notify:YES];
	[sv RB___setMustClearFractions];
	if (finish) {
		[self display];
	}
	id delegate = [sv delegate];
	if ([delegate respondsToSelector:@selector(splitView:didCollapse:)]) {
		[delegate splitView:sv didCollapse:self];
	}
}

// This internal method expands a subview. setToMinimum will usually be YES during a divider drag.
// It returns the size of the subview after expanding, or 0.0 if it wasn't expanded.
- (CGFloat)RB___expandAndSetToMinimum:(BOOL)setToMinimum {
	CGFloat result = 0.0;
	RBSplitView* sv = [self splitView];
	if (sv&&[self isCollapsed]) {
		NSRect frame = [super frame];
		double frac = fraction;
		BOOL ishor = [sv isHorizontal];
		if (setToMinimum) {
			result = DIM(frame.size) = minDimension;
		} else {
			result = [sv RB___dimensionWithoutDividers]*frac;
            // We need to apply a compensation factor for proportional resizing in adjustSubviews.
			CGFloat newdim = floor((frac>=1.0)?result:result/(1.0-frac));
			DIM(frame.size) = newdim;
			result = floor(result);
		}
		[self RB___finishExpand:frame withFraction:0.0];
	}
	return result;
}

// This internal method finishes the the expansion of a subview, stopping the animation if
// there is one, and calling the delegate method if there is one.
- (void)RB___finishExpand:(NSRect)rect withFraction:(double)value {
	RBSplitView* sv = [self splitView];
    id delegate = [sv delegate];
    if ([delegate respondsToSelector:@selector(splitView:willExpand:)]) {
        [delegate splitView:sv willExpand:self];
    }
	BOOL finish = [self RB___stopAnimation];
	[self RB___setFrame:rect withFraction:value notify:YES];
	[sv RB___setMustClearFractions];
	if (finish) {
		[self display];
	}
	if ([delegate respondsToSelector:@selector(splitView:didExpand:)]) {
		[delegate splitView:sv didExpand:self];
	}
}

// These internal methods set the subview's frame or size, and also store a fraction value
// which is used to ensure repeatability when the whole split view is resized.
- (void)RB___setFrame:(NSRect)rect withFraction:(double)value notify:(BOOL)notify {
	RBSplitView* sv = [self splitView];
	id delegate = nil;
	if (notify) {
		delegate = [sv delegate];
        // If the delegate method isn't implemented, we ignore the delegate altogether.
		if ([delegate respondsToSelector:@selector(splitView:changedFrameOfSubview:from:to:)]) {
            // If the rects are equal, the delegate isn't called.
			if (NSEqualRects(previous,rect)) {
				delegate = nil;
			}
		} else {
			delegate = nil;
		}
	}
	[sv setMustAdjust];
	[self setFrame:rect];
	fraction = value;
	[delegate splitView:sv changedFrameOfSubview:self from:previous to:rect];
	previous = delegate?rect:NSZeroRect;
}

- (void)RB___setFrameSize:(NSSize)size withFraction:(double)value {
	[[self splitView] setMustAdjust];
	[self setFrameSize:size];
	fraction = value;
}

// This internal method gets the fraction value.
- (double)RB___fraction {
	return fraction;
}

@end


text:
Quindecim Recordings
Alberto Cruzprieto, piano
1 Nocturne No. 5 Fa# majeur, Op. 15, No. 2 4.05 a
2 Nocturne No. 11 Sol mineur, Op. 37, No. 1 6.39 a
3 Nocturne No. 3 Si majeur, Op. 9, No. 3 6.58 a
4 Nocturne No. 8 Re b majeur, Op. 27, No. 2 6.29 a
5 Larghetto, Concerto No. 2 Op. 21 9.58 a
6 Nocturne No. 20 Ut# mineur, KK IVa No. 16 4.06 a
7 Nocturne No. 17 Si majeur, Op. 62, No. 1 7.19 a
8 Nocturne No. 18 Mi majeur Op. 62 No. 2 6.07 a
9 Nocturne No. 1 Si b mineur, Op. 9, No. 1 6.13 a
10 Nocturne No. 9 Si majeur, Op. 32, No. 1 5.01 a
Quindecim Recordings, 2013
Nocturnos
CD & Streaming

redpajama_set_name: RedPajamaCommonCrawl


Image Title: Mid Century Modern Sofas All You Need To Know About Them With Regard Couch Inspirations 15. Filename: mid-century-modern-sofas-all-you-need-to-know-about-them-with-regard-couch-inspirations-15.jpg. Image Dimension: 600 x 351 pixels. Images Format: jpg/jpeg. Publisher/Author: Cleveland Rippin. Uploaded Date: Tuesday - February 05th. 2019 07:21:20 AM. Category: Architecture. Image Source: interior.com.
Tap The Thumbnail Bellow to See Related Gallery of "Mid Century Modern Sofas All You Need To Know About Them With Regard Couch Inspirations 15"


text:
#include "addict.h"

extern unsigned int alayers[4];
int texturenum(tTexture *t);
void TextureGeneratorGUI(byte mode);

#endif

redpajama_set_name: RedPajamaGithub


This was an unforgettable little moment in my life. I had not sung anything – not a single note – for at least 30 years. Plus, I was not feeling very well. But, as sick as I was, I wanted to sing this song for him. I may never truly know the reason why, but it felt like the right thing to do. A very moving moment in my life that gave me a lot to think about….


text:
namespace AccountSystem.Web.Controllers
{
    using System;
    using System.Linq;
    using System.Web.Mvc;
    using System.Data.Entity;

    using AccountSystem.Web.Models;
    using AccountSystem.Models;
    using AccountSystem.Common;

    public class WorksController : BaseController
    {
        //
        // GET: /Works/
        public ActionResult Index()
        {
            var works = this.context.Works
                .Where(w => w.IsActive == true)
                .OrderByDescending(w => w.StartTime)
                .Select(w => new WorkViewModel()
                {
                    Id = w.Id,
                    Name = w.Name,
                    StartTime = w.StartTime,
                    Price = w.Price,
                    OtherDetails = w.OtherDetails,
                    Customer = w.Customer
                }).ToList();

            return View(works);
        }

        //
        // GET: /Works/Create
        public ActionResult Create()
        {
            ViewBag.Customers = this.context.Customers
                .Select(c => new SelectListItem()
                {
                    Text = c.Name,
                    Value = "" + c.Id
                }).ToList();

            return View();
        }

        //
        // POST: /Works/Create
        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Create(WorkViewModel model)
        {
            if (ModelState.IsValid)
            {
                var newWork = new Work()
                {
                    StartTime = model.StartTime,
                    Name = model.Name,
                    Price = model.Price,
                    OtherDetails = model.OtherDetails,
                    CustomerId = model.Customer.Id,
                    IsActive = true
                };

                this.context.Works.Add(newWork);
                this.context.SaveChanges();

                return RedirectToAction("Index");
            }

            ViewBag.Customers = this.context.Customers
                .Select(c => new SelectListItem()
                {
                    Text = c.Name,
                    Value = "" + c.Id
                }).ToList();

            return View(model);
        }

        //
        // GET: /Works/Update/id
        public ActionResult Update(int id)
        {
            var matchedWork = this.context.Works
                .Where(w => w.Id == id)
                .Select(w => new WorkViewModel()
                {
                    Id = id,
                    Name = w.Name,
                    Customer = w.Customer,
                    StartTime = w.StartTime,
                    Price = w.Price,
                    OtherDetails = w.OtherDetails
                }).FirstOrDefault();

            ViewBag.Customers = this.context.Customers
               .Select(c => new SelectListItem()
               {
                   Text = c.Name,
                   Value = "" + c.Id,
               }).ToList();

            return View(matchedWork);
        }

        //
        // POST: /Works/Update
        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Update(WorkViewModel work)
        {
            if (ModelState.IsValid)
            {
                var matchedWork = this.context.Works
                    .Find(work.Id);

                matchedWork.CustomerId = work.Customer.Id;
                matchedWork.Name = work.Name;
                matchedWork.Price = work.Price;
                matchedWork.StartTime = work.StartTime;
                matchedWork.OtherDetails = work.OtherDetails;

                this.context.Entry(matchedWork).State = EntityState.Modified;
                this.context.SaveChanges();

                return RedirectToAction("Index");
            }

            return View(work);
        }

        //
        // GET: /Works/Restore/id
        public ActionResult Restore(int id)
        {
            var matchedWork = this.context.Works
                    .Find(id);

            matchedWork.IsActive = true;

            this.context.Entry(matchedWork).State = EntityState.Modified;
            this.context.SaveChanges();

            return RedirectToAction("Index");
        }

        //
        // GET: /Works/Delete/id
        public ActionResult Delete(int id)
        {
            var matchedWork = this.context.Works
                    .Find(id);

            matchedWork.IsActive = false;

            this.context.Entry(matchedWork).State = EntityState.Modified;
            this.context.SaveChanges();

            return RedirectToAction("Index");
        }

        //
        // GET: /Works/ShowDeleted
        public ActionResult ShowDeleted()
        {
            var works = this.context.Works
                .Where(w => w.IsActive == false)
                .OrderByDescending(w => w.StartTime)
                .Select(w => new WorkViewModel()
                {
                    Id = w.Id,
                    Name = w.Name,
                    StartTime = w.StartTime,
                    Price = w.Price,
                    OtherDetails = w.OtherDetails,
                    Customer = w.Customer
                }).ToList();

            return View(works);
        }

        //
        // AJAX GET: /Works/Work/id
        public JsonResult Work(int id)
        {
            var work = this.context.Works
                .Find(id);

            var customer = this.context.Customers
                .Find(work.CustomerId);

            var workInfo = new
            {
                WorkName = work.Name,
                CustomerName = customer.Name,
                Price = work.Price,
                StartTime = work.StartTime.Month + "/" + work.StartTime.Day + "/" + work.StartTime.Year,
                Details = work.OtherDetails
            };

            return Json(workInfo, JsonRequestBehavior.AllowGet);
        }
	}
}


White Stocking Estates is a residential neighborhood in Burgaw, North Carolina. It features a variety of floor plans ranging from custom single-family homes to more affordable manufactured homes. The community's location keeps it away from the noise of the city, but its proximity to the highway makes it an easy drive. Click on the listings below to see pictures, features, amenities, school information, and more. Interested in viewing a home or have questions? Please don't hesitate to contact us. We can help you with this community or any other in the Greater Wilmington real estate market.


Tampa. Provides services for weddings, school events and dance recitals.
Breeders of fullblood Romagnola cattle, Paint horses, and Australian Shepherds. Located in Lakeview, Oregon and Reno, Nevada.
Builder of custom log homes. Includes photo gallery.
JIT provider of prime, certified, cold-rolled , hot-rolled and electrical steels.
Photos, descriptions, company profile and contact information for builder of custom log homes.
Offers a standard line of pneumatic tube expanders with and without heated jaws, tube end heaters, pneumatic tube cutters, pneumatic presses, and a new solvent dispenser that eliminates dipping and blotting.
Homemade french fry salt from The Lakeview Drive Inn. Great on french fries, chicken, popcorn, steak and onion rings.
Offers a collection of patterns, kits, and wool to make penny rugs.
Work by Wisconsin artists, Ann and Mark Milligan. Site provides a gallery, art fair schedule, and information about the production process.
Located in Lakeview. This 1/8 mile, asphalt, drag strip features NHRA Sanctioned ET Bracket racing. Includes race results, schedule and point standings.
Pictures and descriptions of several animals.
Lakeview. RV & tent sites.
Provides information on course layout, rules, leagues and events.
Hotel, banquet center, and 36 hole golf course facility.
Presents location details, events calendar, stories, and photographs.
Breeding champion dogs for over twenty years. Contains photographs and pedigrees.
Breeding champion dogs for over twenty years. Contains photographs and pedigrees. Located in Dawson Springs.
Lewiston lake RV park and campground guide to guest amenities, sites, reservations, and activities.
Small breeding farm located in Bellingham, Washington. Includes photos and pedigrees of pinto saddlebred mares and foals.
Preserve offering pheasant, chukar, quail, duck, Canadian goose, turkey and dove hunting. Located in Lincoln, California.
Doctors and specialist information, services, news, community information, and job opportunities.
Breeding and training dogs for use in the field. News, pictures, and breeding philosophy. Lakeview.
Located in San Diego. This site includes information about the rabbits that reside there and show information.
Offers camping, fishing, lodging, boating, and a kids corner.
Doctors and specialist information, services, news, and community information, and job opportunities.
Lakeview, Ohio stock car team races at Eldora Speedway. Includes driver and car profile, history, results, schedule, sponsors, links and awards.
Treatment center dealing with drug addiction, alcoholism, and associated disorders. Admission requirements, program schedule, and a quiz for people unsure whether they need help.
Hunt whitetail, quail and turkey in Fairfax, SC, includes rates, details on facilities, and photos. Also offers horse camping and trail rides.
Staff profiles, pictures of pets in need of homes, case studies, and clinic policies.
Staff profiles, pictures of pets in need of homes, case studies, and clinic policies. Montgomery.
American Saddlebred horse breeder. Includes photos and pedigrees of pinto saddlebred mares and foals.
Standing sorrel stallion at stud. Includes sales list, photos, and profiles of horses. Located in Lakeview.
Standing black tobiano stallion at stud. Includes sales list, photos, and profiles of horses. Offers boarding and lessons. Located in Lakeview.
Located on Lewiston Lake in Trinity County and offers 35 RV sites with full hookups, boat rentals, a heated pool and housekeeping cabins.
Offers hunting for deer, quail, and turkey, trail riding and horse camping, and lodging on this Allendale County plantation.
Located in Lakeview, New York. Featuring individual troop pages, upcoming events, information on ceremonies, photos, and related scouting links.
Standing sorrel overo stallion at stud. Includes sales list, photos, and profiles of horses. Located in Lampe.
Offering quality Arabian and half-Arab horses. Host site for Lakeview MIHA Equestrian Team and MIHA Showbill. In Howard City.
Standing black tobiano stallion at stud. Includes sales list, photos, and profiles of horses. Contains history of the breed. Offers training. Located in Lakeview, Oregon, United States.
Located in the downtown area of Random Lake, Wisconsin. This school offers education and motivation to become a professional esthetician. Minimum class sizes maintained.
Rates and information about this resort. Includes fishing supply rental information.
Rv hookups and cabins on Panguitch Lake in the Dixie National Forest. Rent a fishing boat or mountain bike. General store and restaurant on site. View photos and contact information online.
Specialising in Curly Haired foxtrotters. Services, photographs, and sales, also Jersey cows, and Fastrack Probiotics products.
System mirroring and high availability software (Mimix).
Illinois based supplier of AS/400 hardware, software and services.
Information Availability Institute provides both generic and DB2-specific availability skills training.
MIMIX replicate1s replication for real-time data integration includes support for DB2 in z/OS.
The developers resource for computer interfacing, ethernet and internet communications for embedded systems, USB, mass storage, parallel port, RS-232 and RS-485 serial communications, info about 8052 microcontrollers and making printed-circuit boards.
88 Lakeview Gospel Assembly Verona, Ontario.
Chicago. Features an overview of the beliefs, educational programs, fellowship, and mission of this church.
Real Audio sermons, transcripts, MP3s of its artists, online classes, and resources for other church leaders.
Features an overview of the beliefs, educational programs, fellowship, and mission of this Uptown community area church.
Real Audio sermons, transcripts, MP3s of its artists, online classes, and resources for other church leaders. Located in Saskatoon, Saskatchewan.
SiteBook Lakeview City Portrait of Lakeview in California. This Topic site Lakeview got a rating of 4 SiteBook.org Points according to the views of this profile site.


Community Speed Watch is run by local communities and funded by the Police and Crime Commissioner for Wiltshire and Swindon, supported by Wiltshire Police, Wiltshire Council and Swindon Borough Council. It gives residents a chance to help combat speeding in their local area.
Community Speed Watch is a scheme that relies on volunteers to help deliver the purpose of 'driving down speed, driving up safety' in local communities.
CSW teams will always be in pairs and will be highly visible in hi-vis jackets.
Volunteers carry out roadside checks on the speed of vehicles using a speed detection device and record the vehicle registration number of those exceeding the speed limit. This information is submitted; Wiltshire Police staff then access the Police National Computer to check the information provided.
The owners of the vehicles are then sent warning letters by Wiltshire Police drawing attention to the offence and advise the drivers of the consequences of excessive speed. Repeat offenders and those caught excessively speeding by fifty per cent or more are visited by their Community Policing Team.


The Danish Design Luxe Range of dog beds offers a touch of luxury with a velvet feel.
Lynx fake animal fur print.
Deluxe slumber beds are circular shaped featuring deep filled and quilted fibre shoulders for extra comfort with a matching fibre filled removable mattress. Access is easy via the deep front opening.
The complete bed is fully washable.
Foam filling is fire retardant.
Extra large dog bed in sizes: 35" or 40" (width of base).


text:
The Organizational Engagement Program of the Vanderbilt Kennedy Treatment and Research Institute for Autism Spectrum Disorders (TRIAD) is an innovative partnership with community cultural and civic organizations that works to promote full inclusion of children and adults with autism and other intellectual and developmental disabilities and their families.
Founded in 2013 under the leadership of Lauren Weaver, M.S., BCBA, TRIAD outreach coordinator, the initial idea for the program came from families attending TRIAD's monthly Families First workshops. There, parents shared some of the challenges they experienced when attempting to take their children with autism into the community. TRIAD staff and faculty quickly resolved to provide training and resources for community organizations to promote welcome.
"We've learned that the community organizations we're working with are really enthusiastic about this work," said Weaver. "They have a real commitment to making sure their programs and events are welcoming of all individuals, but many have expressed that they were not always sure how to get started. That's where a partnership with TRIAD made sense. Organizations welcomed the support from us to make them feel comfortable in moving forward with modifications and materials that were going to be of value to individuals with autism and their families."
TRIAD community partners include: Cheekwood Art & Gardens, Country Music Hall of Fame, Frist Center for the Visual Arts, Nashville Ballet, Nashville Children's Theatre, Nashville Opera, Nashville Predators, Nashville Public Library, Nashville Symphony, Nashville Zoo, Tennessee Performing Arts Center, Tennessee State Fair, YMCA of Middle Tennessee, Vanderbilt Athletics; as well as Metro Nashville Police Department and Tennessee Department of Children's Services.
TRIAD education specialists have created supports that families and staff can download or check out whenever families visit these organizations. Supports include visual schedules, modified maps, first-then boards, tip sheets for parents, and sensory modifications on live performances.
From 2013 to 2016, TRIAD provided 23 staff trainings, reaching 527 people, and collaborated to support 39 events, with 42,410 persons attending.
TRIAD also provides training for government organizations. They created an online training module for all Tennessee Department of Children's Services staff. They trained the Crisis Negotiator Team of Metro's Police Department and the Comprehensive Regional Pediatric Center Outreach Team, which in turn provides education to hospital ERs and EMS in Middle Tennessee.
TRIAD's work with some partners has led to national impact. The Nashville Zoo's staff found the partnership so valuable that they invited Weaver to present zoo-related supports and modifications at the Annual Mid-Year Meeting of the Association for Zoos and Aquariums. The partnership with Nashville Children's Opera led to the creation of a toolkit for Opera America to disseminate information about autism spectrum disorder and steps for creating inclusive performances at other opera associations. (http://vkc.mc.vanderbilt.edu/vkc/triad/ceiresources/opera/)
TRIAD Community Engagement team members, with Lauren Weaver, coordinator, 2nd from left.
"It's fantastic to see the impact of our partnerships growing and benefitting organizations and families all around the country," said Weaver. "In Tennessee, we will hold ten events with our local partners this year from January 28-May 6 (http://vkc.mc.vanderbilt.edu/vkc/triad/ceievents/). The Nashville Ballet and Nashville Symphony will hold their very first sensory-friendly events, and we are excited to introduce a new event passport that families can have stamped when they attend. Collect them all!"
Weaver has led the program from a good idea to a community-wide reality. Her achievements will be recognized at the Annual Meeting of the American Association on Intellectual and Developmental Disabilities when she is presented with the 2017 Full Community Inclusion Award. The award recognizes culturally responsive programs that have succeeded in full community inclusion and participation.
Lead Photo Caption: Nashville Zoo at Grassmere is a TRIAD Community Engagement Partner.
Courtney Taylor is VKC associate director of Communications and Dissemination.


text:
<?php

namespace Api\Model\Scriptureforge\Sfchecks\Dto;

class UsxHelper
{
    public function __construct($usx, $isVerseOnNewLine = false)
    {
        $this->_usx = $usx;
        $this->isVerseOnNewLine = $isVerseOnNewLine;
        $this->_parser = xml_parser_create('UTF-8');
        xml_set_object($this->_parser, $this);
        xml_set_element_handler($this->_parser, "onTagOpen", "onTagClose");
        xml_set_character_data_handler($this->_parser, "onCData");
        $this->_info = array(
            'startChapter' => null,
            'startVerse' => null,
            'endChapter' => null,
            'endVerse' => null,
            'bookCode' => null
        );
        $this->_footnotes = array();
        $this->_tagStack = array();
    }

    private $_parser;

    private $_usx;

    private $_out;

    private $_capturedOutput;

    private $_tagStack;

    private $_footnoteNumber;
    private $_footnoteCaller;
    private $_footnoteStyle;
    private $_footnotes;

    private $isVerseOnNewLine;

    /** @var array */
    private $_info;

    // States
    private $_stateCData;
    private $_stateCapturing;

    public function toHtml()
    {
        $this->_out = '';
        $this->_capturedOutput = '';
        $this->_tagStack = array();
        $this->_stateCData = false;
        $this->_stateCapturing = false;
        $this->_footnoteNumber = 0;
        $this->_footnoteCaller = '';
        $this->_footnotes = array();
        xml_parse($this->_parser, $this->_usx);
        //echo $this->_out;
        // If we can't parse *anything at all*, assume this wasn't actually USX and return it unchanged.
        if ($this->_out === '')
            $this->_out = $this->_usx;
        return $this->_out;
    }

    public function getMetadata()
    {
        if (is_null($this->_info['startChapter'])) {
            // parse the USX if we haven't already
            $this->toHtml();
        }

        return $this->_info;
    }

    private function onTagOpen($parser, $tag, $attributes)
    {
        array_push($this->_tagStack, $tag);
        switch ($tag) {
            case 'PARA':
                $this->onParagraphOpen($attributes['STYLE']);
                break;
            case 'VERSE':
                $this->onVerse($attributes['NUMBER'], $attributes['STYLE']);
                break;
            case 'CHAPTER':
                $this->onChapter($attributes['NUMBER'], $attributes['STYLE']);
                break;
            case 'CHAR':
                $this->onChar($attributes['STYLE']);
                break;
            case 'BOOK':
                $this->onBook($attributes['CODE']);
                break;
            case 'NOTE':
                $this->onNote($attributes['CALLER'], $attributes['STYLE']);
                break;
            default:
//                 echo 'to:';
//                 var_dump($tag, $attributes);

        }
    }

    private function onTagClose($parser, $tag)
    {
        switch ($tag) {
            case 'PARA':
                $this->onParagraphClose();
                break;
            case 'NOTE':
                $this->onNoteClose();
                break;
            case 'CHAPTER':
            case 'VERSE':
                break;
            case 'CHAR':
                $this->onCharClose();
                break;
            case 'USX':
                $this->onUsxClose();
                break;
            default:
//                 echo 'tc:';
//                 var_dump($tag);

        }
        array_pop($this->_tagStack);
    }

    private function outputText($text)
    {
        if ($this->_stateCapturing) {
            $this->_capturedOutput .= $text;
        } else {
            $this->_out .= $text;
        }
    }

    private function startCapturing()
    {
        $this->_capturedOutput = '';
        $this->_stateCapturing = true;
    }

    private function stopCapturing()
    {
        $this->_stateCapturing = false;

        return $this->_capturedOutput;
    }

    private function onCData($parser, $cdata)
    {
//         echo 'cd:';
//         var_dump($cdata);
        if ($this->_stateCData) {
            $this->outputText($cdata);
        }
    }

    // Handlers
    private function onParagraphOpen($style)
    {
        if ($style == 'ide') {
            $this->_stateCData = false;

            return;
        }
        $this->_stateCData = true;
        if ($style != 'p') {
            $this->outputText("
");
        } else {
            $this->outputText("
");
        }
    }

    private function onParagraphClose()
    {
        $this->outputText("
");
        $this->_stateCData = false;
    }

    private function onChapter($number, $style)
    {
        if (is_null($this->_info['startChapter'])) {
            $this->_info['startChapter'] = $number;
        }
        $this->_info['endChapter'] = $number;
        if ($this->isVerseOnNewLine) {
            $this->outputText("
Chapter $number
");
        } else {
            $this->outputText("
Chapter $number
");
        }
    }

    private function onVerse($number, $style)
    {
        if (is_null($this->_info['startVerse'])) {
            $this->_info['startVerse'] = $number;
        }
        $this->_info['endVerse'] = $number;
        if ($this->isVerseOnNewLine) {
            $this->outputText("

");
        }
        $this->outputText("$number");
    }

    private function onChar($style)
    {
        $this->outputText("");
    }

    private function onCharClose()
    {
        $this->outputText("");
    }

    private function nextFootnoteNumber()
    {
        $this->_footnoteNumber++;

        return $this->_footnoteNumber;
    }
    private function num2alpha($n)
    {
        // Based on http://stackoverflow.com/a/5554413/2314532 but without bugs
        for ($result = ""; $n > 0; $n = intval(($n-1) / 26)) {
            $result = chr(($n-1) % 26 + 0x61) . $result;
        }

        return $result;
    }
    // NOTE: That works great for Latin-based scripts. What about other scripts,
    // where footnote markers based on their own alphabet would be more appropriate?
    // For now, we're going with simple. If that feature is requested, we can add it later.

    private function onNote($caller, $style)
    {
        if ($caller == "-") {
            // USFM spec says this "indicates that no caller should be generated, and is not used." We will ignore these notes.
            $fnChar = "";
        } elseif ($style == "x") {
            // We will not process cross-reference footnotes either
            $fnChar = "";
        } elseif ($caller == "+") {
            // USFM spec says this "indicates that the caller should be generated automatically"
            $fnNum = $this->nextFootnoteNumber();
            $fnChar = $this->num2alpha($fnNum);
        } else {
            $fnChar = $caller;
        }
        $this->startCapturing();
        $this->_footnoteCaller = $fnChar;
        $this->_footnoteStyle = $style;
    }

    private function onNoteClose()
    {
        $fnText = $this->stopCapturing();
        if ($this->_footnoteCaller == "") {
            // Notes with no caller should be ignored
            return;
        }
        $fnText = str_replace('"', """, $fnText);
        $this->outputText("$this->_footnoteCaller");
        $footnote = array("fnCaller" => $this->_footnoteCaller, "fnText" => $fnText);
        $this->_footnotes[] = $footnote;
    }

    private function onUsxClose()
    {
        if (!empty($this->_footnotes)) {
            $this->outputText("

");
            foreach ($this->_footnotes as $footnote) {
                $fnText = $footnote["fnText"];
                $fnCaller = $footnote["fnCaller"];
                $this->outputText("$fnCaller. " . $fnText . "
");
                }
            $this->outputText("

");
            }
        }

    private function onBook($code)
    {
        $this->_info['bookCode'] = $code;
    }
}


text:
eXo Tribe
Cartoon of the Week: Twitter is hiding bad tweets for a better user experience
Software Tour
Stay tuned and get our latest articles directly to your inbox. Enter your email address below:
Must be valid email.
example@yourdomain.com
I have read and accept terms of the privacy Policy. Learn More
Nouha Blagui
Written by Nouha Blagui On 18 May 2018 -
Are you the type of person who annoys, frustrates or offends people on Twitter without technically violating any of Twitter's policies? Well, I've got some bad news for you: even if your bad tweets aren't removed, they'll be hidden so you won't ruin conversations any more.
Jack Dorsey & Co. announced this week that it's rolling out a feature that will minimize negativity on the bleu bird platform and enable a more pleasant user experience.
Using a set of signals, Twitter will be able to recognize whether an account is using "behaviors that distort and detract from the public conversation". In such a case, the account's tweets will be harder to find in conversations and search results but will only be available if you click on "Show more replies".
Vice president of trust and safety, Del Harvey said that this change will affect less than 1 per cent of users. The company's blog explained:
"Less than 1% of accounts make up the majority of accounts reported for abuse, but a lot of what's reported does not violate our rules. While still a small overall number, these accounts have a disproportionately large – and negative – impact on people's experience on Twitter. The challenge for us has been: how can we proactively address these disruptive behaviors that do not violate our policies but negatively impact the health of the conversation?"
To determine whether a user is detracting from the conversation, the company will use its software by examining the types of interactions.
If the content is blocked and muted rather than liked and retweeted, then Twitter will assume that this account is negatively affecting the conversation without even looking at the content.
As Harvey explains: "If you send the same message to four people, and two of them blocked you, and one reported you, we could assume, without ever seeing what the content of the message was, that was generally a negative interaction".
Will cleaning up the twitter thread really help improve the navigation on Twitter, or is it just another form of restriction from Dorsey & Co?
Follow eXo Platform's board Cartoon of the Week on Pinterest.
Cartoon of the Week: PSG used cryptocurrency to se...
Cartoon of the Week: Google, Microsoft and Apple e...
Cartoon of the week: Is Elon Musk the new economy ...
Tags: eXo, Fun
Brand & Communication Manager
I am a marketer and social media junkie. I work to optimise eXo's online brand with content, social media technologies and digital marketing. I mainly write cartoons but I am also a big fan of topics related to internal communications in the digital workplace. I would love to connect with you, so get in touch and join our LinkedIn group 'Intranet & Digital Workplace'.
Where Digital Transformation Meets Collaboration
eXo Blog and News


Below you can view all the homes for sale in the Canyon Ridge subdivision located in Las Vegas Nevada. Listings in Canyon Ridge are updated daily from data we receive from the Las Vegas multiple listing service.
To learn more about any of these homes or to receive custom notifications when a new property is listed for sale in Canyon Ridge, give us a call at 702-930-8014.
Canyon Ridge gated community, single-story 2-bedroom + den home with open floor plan and vaulted ceilings, fireplace, wet-bar and stamped concrete flooring in living room, upgraded bathrooms, granite counter-tops in kitchen, separate ice maker, breakfast nook, custom wood countertops in bathrooms, built in BBQ, outdoor shower, covered patio, beautiful pool, Ring security and Nest thermostat all included. MLS#2060117. Windermere Excellence.
PRICED TO SELL and MOVE IN READY! ! MLS#2053604. Platinum R.E. Professionals.
The office can be converted to a 3rd bedroom if the new owner desires. MLS#2028143. BHHS Nevada Properties.


text:
on Thursday 13 January, 2022
Shabwah Governor: Unity of Ranks Behind Governorate's Liberation
by : Yemen Details
A few days after announcing the official liberation of the three districts of Yemen's Shabwah governorate from the hold of Houthi militias, Governor Awadh al-Awlaqi pledged to bring about a development revolution in the newly freed county.
In an exclusive interview with Asharq Al-Awsat, al-Awlaqi confirmed that unifying ranks and raising Shabwah's interests above the interests of political parties and organizations played a significant role in defeating the common enemy, the Iran-backed Houthis.
The governor stressed that aerial support from the Saudi-led Arab Coalition was "decisive" in freeing Bayhan district and achieving victories against coup militias in a short period. Al-Awlaqi also commended the prominent role of the Yemeni Army's Giants Brigades and predicted military units making a push for liberating nearby governorates.
Freeing Bayhan:
Close follow up from the country's political leadership and Arab Coalition active countries, especially the UAE, played an integral part in freeing all three regions of Bayhan, noted al-Awlaqi, adding that the Giants Brigades had a major role in regaining control of the district.
"Shabwah governorate has been completely cleansed of Houthi militias, and engineering teams are still working in full swing in the three liberated districts," al-Awlaqi told Asharq Al-Awsat.
"Things are fine, and we hope to see a development revolution, and that the three districts will receive a generous gesture from the authorities and leadership," he added.
The governor thanked Yemen's political leadership represented by President Abdrabbuh Mansur Hadi, Arab Coalition countries, especially Saudi Arabia and the UAE, and the Giants Brigades.
He wished injured soldiers from the Giants Brigades a quick recovery.
Responding to a question about the continuation of military operations beyond Shabwah, al-Awlaqi said: "It seems that some units will advance to other governorates, but for us, matters have been resolved in Shabwah."
Keys to a Speedy Liberation:
Shabwah's liberation from Houthi hold was achieved at a remarkable speed. For al-Awlaqi, this can be attributed to two key factors: the unification of ranks and military action conducted by the Arab Coalition from the air and the Giants Brigades on the ground.
"Unity shown by the political parties in Shabwah and prioritizing the interests of the governorate is important to maintaining the governorate's stability and liberation," said al-Awlaqi.
"We sat with all parties, and there was an understanding on the governorate's best interest superseding all political trends," he added, noting that such an agreement is the product of logic and sophistication upheld by Shabwah's residents.
When describing the contribution of the Arab Coalition to freeing Shabwah, al-Awlaqi said: "Without the Saudi-led Coalition, things would not have been resolved so quickly."
"The role of the Coalition's aviation was effective and key. Had it not been for the aviation and the airstrikes, matters would not have been decided so quickly."
On the ground, the Giants Brigades had the key role in freeing Shabwah.
"We thank and appreciate their efforts," said al-Awlaqi, adding that he hoped the support would be extended to Shabwah's development.
Al-Awlaqi stated that the process of normalizing the situation in the districts liberated from the Houthi group is taking place at a good pace with the follow-up of the local authorities and the assistance of the army forces.
"Local authorities in the liberated districts are following the process of normalizing the situation, and the presence of the army helps in this aspect," he said.
The governor pointed out that some humanitarian assistance was delivered to the freed governorate by the King Salman Humanitarian Aid and Relief Center but added that more aid is needed in Shabwah.
Saudi-led coalition launch airstrikes on Yemen's Hodeidah to 'neutralise Houthis'
Calls grow to restore Houthis to US list of terrorist groups - Coalition launches airstrikes on military sites in Yemen's Hodeidah, Sanaa
Iran-backed Houthis target fuel station in Yemen's Shabwa, civilian casualties reported


text:
Science Makes Its First Acquisition: Pinpuff, A Klout For Pinterest That Measures 'Pinfluence'
Ingrid Lunden	@ingridlunden / 8 years
Science, the eight-month-old LA-based technology incubator / studio that brought us the Dollar Shave Club and most recently e-commerce site Uncovet, is making its first acquisition: it is buying Pinpuff, a fast-growing "Klout for Pinterest" that measures and tracks the influence of Pinterest users — "Pinfluence" in Pinpuff parlance — that was launched only in February of this year. The deal is yet another a sign of how the ability to curate and mine social media information can be considered as important as the social media platforms themselves.
The financial terms of the deal were not disclosed, but Mike Jones, the CEO of Science, says that the acquisition will be used to help build out other businesses in Science's portfolio, using Pinpuff's social know-how to extend growth virally. It will work in conjunction with its existing in-house agency HelloSociety. "Part of our strategy here at Science is to build services and tools that assist influencers in building their audiences, and eventually themselves as actual businesses," he writes. "We believe Pinpuff will…provide additional intelligence and distribution strategy to upcoming Science launches," writes Jones in a blog post.
He notes that Gaurav Sharma, the company's founder and CEO is relocating from India to LA as part of the acquisition — something that appears to have already taken place.
Since launching in 2010, Pinterest has captured the attention of a particularly proactive consumer base. ComScore noted earlier this month that Pinterest grew 4,000 percent in the last year, and its users were found to spend more, buy more items and conduct more transactions online than other social media buyers.
That user base is the same one being targeted by Science: Jones notes that Pinterest is the second-highest referral network for sales within its companies, all of which are being built with a social twist at their heart (recommendations and so on). "Pinterest influencers are critical now to nearly any launch in the consumer product space," he writes.
There have been a number of companies coming out to measure and harness how the social media world is operating, not least Klout itself, but also some focused specifically on Pinterest, such as Curalate. That is not too much of a surprise, given the influx of data and relatively few tools provided by the platform itself to track it (although that is likely to change, if you look at Pinterest's own job board, which might eventually have implications for companies like Pinpuff).
Jones says that Pinpuff was one of the early movers to spot the trend of making sense of the noise:
"Pinpuff was one of the first technologies to identify Pinterest's potential as not only a great place to share, but to motivate users to follow each other," Jones says, pointing out why it is that Pinterest itself has been so critical in the world of commerce. "The more people unearth great finds, the more likely Pinterest is to drive them beyond the platform to seek out more information or even, ultimately, purchase what they discovered."
The most recent figures we have on the company note that it has signed deals with some 100 brands to track influence on Pinterest. In March it noted that it was picking up 10,000 users/day among people looking to measure their Pinfluence, with a total user based of 100,000 only two weeks out of the gates.
The company has also more recently launched PinPerks, a reward program similar to Kred's Rewards or Klout Perks giving out gifts, invites or other rewards based on influence.
What's interesting is that we may see Pinpuff extend its services on to other social networks that also compete with Pinterest. Jones, an ex president of MySpace and former SVP at AOL, notes that the "Fancy and Svpply are rising through the ranks, and we can tap into the technology that Pinpuff has built to create a true gauge of reach – one that goes beyond clicks, page views, and static traffic numbers, one that measures the power of influence."


text:
Libyan revolutionaries speak out: 'The West's war machine won't help us win'
March 7, 2011 - 0:0
"We are against any foreign intervention or military intervention in our internal affairs," said Abdel-Hafidh Ghoga in Libya's second city Benghazi last Sunday.
"This revolution will be completed by our people with the liberation of the rest of Libyanterritory."
He was speaking at a press conference to explain how the national revolutionary council is attempting to co-ordinate the rebel cities and administrate daily life.
The revolution looks close to defeating a dictatorship that had until recently appeared unstoppable. Colonel Gaddafi's 41-year old regime now only controls the area around the capital Tripoli.
Gaddafi's response has been brutal. The regime has opened fire on unarmed demonstrations with machine guns and rockets.
It has used fighter jets against protests. Thousands may have died in the attempted crackdown.
Western intervention would be a disaster. The rebels still have the initiative, and they need to keep it.
All the major cities and towns, apart from the capital, are run by revolutionary councils—from Benghazi in the east, to Misrata, in the industrial heartlands of western Libya. These councils are growing in strength—on one day last week alone some eight towns set up these councils and declared for the revolution.
All observers speak of the efficiency and energy of the councils and the relaxed air of "freedom" in the areas under their control.
In Benghazi, despite food shortages, the poor speak of how they are eating better now than before the revolution. Food and other services are organized on the basis of need.
Strategy: Many factories and key installations are under the control of their workforces. Others are controlled by employers who are sympathetic to the revolution, or even actively supporting it.
The revolutionaries' military strategy has not been to call for Western airpower, but to convince the soldiers sent to crush them to change sides.
Time and again lightly armed or unarmed rebels have won over conscripts.
This happened most recently when regime forces attempted to retake the key city of Zawiya, 30 miles west of the capital on Monday.
The soldiers sent in to attack switched sides or surrendered, handing over their weapons to the revolutionaries.
Elsewhere military forces have declared for the revolution after receiving delegations of students and youth groups.
Western intervention never delivers what it promises.
Even last week, as the United Nations (UN) debated the Libyan situation, U.S. diplomats unsuccessfully tried to add a call to use "all means necessary to protect civilians and installations". In UN resolution terminology, this generally serves as a code for military action.
By "installations" they mean oil facilities. But revolutionary forces currently control 80 percent of the country's oil fields—they are not under threat.
The U.S. is using "humanitarian" fears to try and grab these key facilities.
Many people can see what a disaster British or U.S. troops on the streets of Tripoli would be—but still call for the imposition of a no fly zone or sanctions.
This will reawaken memories for people across the globe. These were both used against Iraq before the 2003 invasion. The no fly zone entrenched the idea that only external military force could liberate the Iraqi people. And more than half a million Iraqi children and many more adults died under ten years of the sanctions regime before the invasion.
The governments that want to intervene now are the same ones who have been happy to sell Gaddafi the weapons he's been using to attack the resistance.
Western intervention of any form would not help—in fact it would be devastating.
It would give Gaddafi a chance to regain support in Libya by posing as an anti-imperialist.
We have to let the Libyan people make their own revolution.
(Source: Socialist Worker online


When will be Unga Mammor next episode air date? Is Unga Mammor renewed or cancelled? Where to countdown Unga Mammor air dates? Is Unga Mammor worth watching?
We follow young mothers in parenthood and share joy and difficulties in their daily lives.The girls are forced to take their first steps into adulthood earlier than their peers - while having to find a balance between being a mom and teenager. Everybody struggles with and against society's expectations and prejudices of how a mom will be and look.
Unga Mammor next episode air date provides TVMaze for you.
EpisoDate.com is your TV show guide to Countdown Unga Mammor Episode Air Dates and to stay in touch with Unga Mammor next episode Air Date and your others favorite TV Shows. Add the shows you like to a "Watchlist" and let the site take it from there.


There was a question at our recent Town Hall meeting that we didn't have time to answer but I thought it would be worth addressing now.
The question was: Is New York Insight a Buddhist Center, a Meditation Center or a Mindfulness Center? To which my answer would be "yes".
The beauty of New York Insight is that we provide many doorways to enter the dharma. When someone crosses the threshold into NY Insight (or any Dharma center) for the first time it is usually due to a realization that something in his or her life needs to change. This could be brought on by some life crisis, or a general sense of un-satisfactoriness—a.k.a. Dukkha. Some kind of wound is present and healing and freedom is sought.
People may find their way first to a Tuesday night intro to meditation class, sometimes a person takes the plunge into a six-week Insight 101 class, or an eight-week Mindfulness Based Stress Reduction (MBSR) class. If they come to the Tuesday night intro class, more often than not, after the first hour, they will join the rest of the sangha that night and hear a dharma talk or inquiry rooted in the dharma and this may be their first exposure to it. If they take an Insight 101 class the key teachings of the Buddha are incorporated throughout the six weeks. In an MBSR class, though the curriculum is not taught as Buddhist Dharma, the teachings all arise from the Satipathana Sutta one of the key teachings of the Buddha.
Whatever brings one past the threshold into NY Insight the opportunity for transformation is available. The Dharma comes in many forms.
Meditation is a technique to cultivate mindfulness and with mindfulness arises the possibility of Insight. Sometimes, a person may only come to a single event and hear just one kernel of the Dharma. That one kernel has the potential to change someone's life. We never know.
So at NYI we offer Mindfulness teaching in many forms, we offer the opportunity to deepen ones understanding of the Buddhadharma, and meditation training is part of the package.
This is not a matter of being all things to all people, but rather having a broad view of how the Dharma can be approached and it is one of the strengths of our Center.


text:
CREATE SCHEMA IF NOT EXISTS atomic;

CREATE TABLE IF NOT EXISTS atomic.com_mailgun_message_clicked_1 (
    "schema_vendor"  VARCHAR(128)  ENCODE RUNLENGTH NOT NULL,
    "schema_name"    VARCHAR(128)  ENCODE RUNLENGTH NOT NULL,
    "schema_format"  VARCHAR(128)  ENCODE RUNLENGTH NOT NULL,
    "schema_version" VARCHAR(128)  ENCODE RUNLENGTH NOT NULL,
    "root_id"        CHAR(36)      ENCODE RAW       NOT NULL,
    "root_tstamp"    TIMESTAMP     ENCODE LZO       NOT NULL,
    "ref_root"       VARCHAR(255)  ENCODE RUNLENGTH NOT NULL,
    "ref_tree"       VARCHAR(1500) ENCODE RUNLENGTH NOT NULL,
    "ref_parent"     VARCHAR(255)  ENCODE RUNLENGTH NOT NULL,
    "campaign_id"    VARCHAR(4096) ENCODE LZO,
    "campaign_name"  VARCHAR(4096) ENCODE LZO,
    "city"           VARCHAR(64)   ENCODE LZO,
    "client_name"    VARCHAR(64)   ENCODE LZO,
    "client_os"      VARCHAR(64)   ENCODE LZO,
    "client_type"    VARCHAR(64)   ENCODE LZO,
    "country"        VARCHAR(2)    ENCODE LZO,
    "device_type"    VARCHAR(64)   ENCODE LZO,
    "domain"         VARCHAR(256)  ENCODE LZO,
    "ip"             VARCHAR(15)   ENCODE LZO,
    "mailing_list"   VARCHAR(4096) ENCODE LZO,
    "message_id"     VARCHAR(1024) ENCODE LZO,
    "recipient"      VARCHAR(256)  ENCODE LZO,
    "region"         VARCHAR(8)    ENCODE LZO,
    "signature"      VARCHAR(128)  ENCODE LZO,
    "tag"            VARCHAR(4096) ENCODE LZO,
    "token"          VARCHAR(64)   ENCODE LZO,
    "url"            VARCHAR(8192) ENCODE LZO,
    "user_agent"     VARCHAR(1024) ENCODE LZO,
    FOREIGN KEY (root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
DISTKEY (root_id)
SORTKEY (root_tstamp);

COMMENT ON TABLE atomic.com_mailgun_message_clicked_1 IS 'iglu:com.mailgun/message_clicked/jsonschema/1-0-0';


text:
Q: How to create a view that display value from foreign key? I hope all is well,
I have a database table that contains multiple foreign keys from different tables.
*What I want: *
I would like to create a view that contains some column values from the tables that are related through foreign keys.
*What I did (a small example): *
I used this query to get 1 column value
CREATE VIEW list_name AS select lists.list_name as list_name from Lists,simulation_candidate
where lists.list_id = simulation_candidate.sim_can_id

my initial table before creating a view for one column
The created view after executing the query above
I want to create a view that contains all the needed values from other tables instead of foreign keys, in one view. In other words, I want to replace the foreign keys with values from the related tables using one query.
How can I achieve the needed result?
Any help would be highly appreciated,
Thank you.

redpajama_set_name: RedPajamaStackExchange


You or your parents experiencing problems related to hair growth ? If you want to use one of best hair growth pills, you should prioritize best hair growth pills that already recommended by the doctor. Be careful when deciding what is appropriate to cope with hair loss. This is done to avoid the negative effects of materials that are still try.
We may not realize that hair loss can be as much as it is. This includes reasonable considering the amount of hair on the head can reach 100,000 strands. It's just, some people could experience hair loss more.
Every hair on individuals generally survived in 3.5 years. While the phase of growth commonly lasts between 2-3 years. In that time, the hair will grow about 1.2 cm each month. After the growth phase called anagen at the top, the hair will experience a resting phase or telogen (generally around 2 to 4 months). Most of the hair loss in the fourth year then a replacement will appear in 6 months.
In some people, the reduced hair may have been influenced by some of the underlying disease. If this is the case, that should be done is to treat the disease the main first. However if a certain medicine makes hair fall out, stop wearing it might be done. Only, you should consult with your doctor. In addition to stopping the use, a doctor can give you a substitute medication.
To grow your hair, the best hair growth pills under this is already proven medically. Let's know more detailed !
This drug can be in the form of liquid or foam and can be bought without a doctor's prescription. To grow hair, rub it on the scalp 2 times a day. Minoxidil is also useful in preventing the loss sustainable. This drug is safe to be used by both men and women and the effect will be seen after 16 weeks of usage.
To maintain the positive impact, you should still continue use. As for the side effects of minoxidil that may occur is irritation on the scalp. Hair growth in other regions, such as the face and hands, and the heartbeat faster than usual may also occur.
Drugs the second is finasteride, which is devoted to men. It is in the form of pills and must be taken every day. This drug is proven to be beneficial for slowing down the hair loss and trigger new hair growth. Its use in a sustainable manner may be necessary in order to maintain the benefits. Taking this drug should be by prescription, given some of the side effects are quite serious.
Although rare, decreased sexual desire and increased risk of prostate cancer include side effects that could appear. While pregnant women should avoid direct contact with the powder pills finasteride broken or crushed.
There are several how to lengthen hair naturally and minimally invasive that you could try. You can even do it yourself at home with relatively inexpensive cost.
Keep the content of vitamins and nutrients on the hair not solely from the give a supplement, hair grower. This step is supposedly not effective to accelerate the addition of length to the hair. If you want to have hair that long and healthy, you need adequate intake of vitamins and nutrients for the entire body.
Nutritional balance the body is very influential on the growth and health of your hair. Apply a healthy diet and balanced. You can do this by increasing fruit and vegetable consumption.
ambahan supplements can also be done if necessary. For example, the supplement of omega-3, omega-6, zinc, vitamin B5, vitamin C, Vitamin D, biotin, and iron. Some experts claim that the consumption of the supplement thought to be able to support the growth of healthy hair.
Smear your hair with pumpkin seed oil is believed to help hair growth becomes faster. A study showed this oil is also able to reduce hair loss by up to 40 percent. However, avoid application directly to the hair or scalp.
You simply mix a few drops of pumpkin seed oil to the regular shampoo that you used. Mix it with other essential oils, such as jojoba oil, coconut, sunflower seeds, rosemary, or peppermint, whatever you can try. The content of nutrients in the essential oil will help prevention of hair damage.
In general, ointments are used by people who experience hair loss excessively. However a study showed that some topical ointments are also effective in supporting the growth of the hair faster. But not all types of ointments are suitable. A number of ointments that are recommended is a topical melantonin, topical minoxidil, and ketoconazole. These drugs are not sold freely, so it requires a prescription from a doctor to get it.
It's not a lot of research on the effects of the protein, keratin, and vitamins on the health of the hair. It takes more research to determine its accuracy. Even so, there are studies that reveal that a product that contains 500 mg keratin, vitamins, and other minerals is able to reduce hair loss up to 12.5 percent. Hair strength also will be increased up to 5.9 percent and the brightness and luster of the hair will be increased.
Protein can help hair growth and protect it from damage caused by chemicals and environmental influences. If your hair is often exposed to heat and sunlight, the use of protein supplements is able to protect your hair.
You can use protein supplements hair that are sold freely. If you want a more natural, try using pure coconut oil. This oil can help to reduce protein is lost the moment before or after shampooing.


text:
Boris Pozdnjakov – ex calciatore sovietico
 Stanislav Pozdnjakov – schermidore russo
 Vjačeslav Pozdnjakov – schermidore russo

redpajama_set_name: RedPajamaWikipedia


text:
Q: Append data to specific lines to a file Lets say i have a file called text.txt with the data
    Name
    Age
    City

And i have a list in python lets call it myList
myList = ['Carl','25','Washingtn']

How do i append the first item of the list besides the Name in the txt.
I tried doing
try = open('text.txt', 'a')
for i in myList:
 myList.write(i)

But by doing this, every value of i gets on the last line in the txt file, and i have no idea how to do it so just the index[0] gets on first and so on.
Would appreciate some help here!

A: You can do that, if you get each line, you can append whatever you like at the end of it and rewrite it to a file.
# We could keep a counter in mind for getting new elem each time.
count = 0
myList = ['Carl', '25', 'Washington']
with open('text.txt', 'r') as src:
    with open('dest.txt', 'w') as dest:
       for line in src:
           dest.write('%s%s\n' % (myList[count], line.rstrip('\n')))
           count+=1

In addition, you should check if the number of line match the number of element in your list, etc. to make it safer.

A: this code isn't right.
try = open('text.txt', 'a')
for i in myList:
 myList.write(i)

get items from MyList and write MyList again?
MyList is list() not file.
so try this code
myList = ['Carl','25','Washingtn']
result = list()

with open(filepath, "r") as f: # read file
    for line, item in zip(f, myList):
        result.append(line.strip() + " " + str(item) + "\n")

with open(filepath, "w") as f: # write
    f.writelines(''.join(result))

'a' mode will always be at the end of the file.
more information found https://docs.python.org/3/library/functions.html#open


text:
Researchers Identify Two mRNA Biomarkers for Parkinson's Disease
Through a meta-analysis of four microarray studies, a pair of researchers from the Rosalind Franklin University of Medicine and Science identified two mRNAs that appear to act as biomarkers for Parkinson's disease.
The expression level of HNF4A and PTBP1 mRNAs differed in the blood of Parkinson's disease patients as compared to controls, the researchers reported today in the Proceedings of the National Academy of Sciences. The level of HNF4A mRNA correlated with worsening disease stage, suggesting that it could gauge disease severity. Both of these genes have been associated previously with diabetes, tightening the link between the two diseases.
"Biomarker discovery and validation is a crucial step toward the improvement of clinical management of PD," Franklin's Jose Santiago and Judith Potashkin wrote in their paper. "Specifically, biomarkers that are useful in tracking the clinical course of PD are essential to the development of effective therapeutics."
To search for a molecular signature for Parkinson's disease, the duo determined that a transcriptomic and network-based meta-analysis could uncover important regulators and biomarkers of disease.
Santiago and Potashkin pulled together data from four different microarray-based studies of Parkinson's disease, totaling 83 patients and 46 healthy controls. Using the Integrative Meta-Analysis of Expression Data interface, the duo uncovered 2,781 genes that were consistently differentially expressed across the four studies. Of these, 680 were up-regulated, while 2,101 were down-regulated.
Based on a gene pathway analysis, the researchers noted that many of these differentially expressed genes were involved in pathways and processes related to protein processing in the endoplasmic reticulum, T-cell receptor signaling, type 2 diabetes, and more.
Additionally, network analysis using NetworkAnalyst found that HNF4A was a key hub gene, while PTBP1 was the most significantly down-regulated gene among Parkinson's disease patients.
HNF4A is a master metabolic regulatory factor that's involved in activating gluconeogenesis in the liver and has been linked to diabetes, inflammation, and lipid metabolism. PTBP1, meanwhile, is thought to promote the stabilization and translation of insulin mRNAs in pancreatic β-cells.
Based on their network analysis, Santiago and Potashkin measured the levels of HNF4A and PTBP1 mRNA in the blood of 101 Parkinson's disease patients and 91 healthy controls. A qPCR-based assay revealed that HNF4A and PTBP1 were significantly up-regulated or down-regulated, respectively, in patients as compared to controls.
Indeed, they found that the expression levels of these two genes could classify patients with 90 percent sensitivity and 80 percent specificity, and that the HNF4A and PTBP1 mRNA levels were independent of other variables such as age and sex.
They also found a negative correlation between HNF4A mRNA levels and PTBP1 mRNA levels, and a correlation between HNF4A mRNA levels and disease stage, suggesting that HNF4A mRNA levels could be useful in identifying Parkinson's disease patients at early stages of the disease as well as in monitoring disease severity.
The levels of the two putative biomarkers also varied over time. In a cohort of 50 Parkinson's disease patients and 46 healthy controls samples, the researchers found that HNF4A mRNA levels decreased over time in Parkinson's disease patients, as compared to controls, while PTBP1 mRNA levels increased as compared to controls in the three-year follow-up period.
"The longitudinally dynamic biomarkers identified in this study may be useful for monitoring disease-modifying therapies for PD," Santiago and Potashkin said.
Monday February 02, 2015, GenomeWeb
Author: Theresa Samworth
Make a difference... Please support the work of The Cure Parkinson's Trust
Please support the work of The Cure Parkinson's Trust. By donating today you can help us with our ground-breaking research and move us closer to finding a cure for Parkinson's.
Location: ,,
Target amount: £500,000.00
Amount raised: £247,540.62
Tom Isaacs Featured in The Sunday Times - 'Top Artists Square Up To Parkinson's'
CPT's President Tom Isaacs has used his networking powers to help engage a stellar list of renowned contemporary artists to create individual pieces of work to raise funds for The Cure Parkinson's Trust.
Naga Munchetty - Golf Day Auctioneer Extraordinaire!
Naga Munchetty and James Haggar hosted the Batchworth Golf Club Foxes Invitation Meeting. James is presiding over his year of captaincy at the club and The Cure Parkinson's Trust is delighted to be his chosen beneficiary charity.
Blocking a Key Enzyme Stops Parkinson's Symptoms in Mice Models
Researchers at Johns Hopkins have two important new clues in the fight against Parkinson's: blocking an enzyme prevents the disease in mice and a chemical tag on a second protein may signal the disorder's presence.
Our 2016 Annual Review is here! We reflect on another full and productive year. Whilst there is more we can do, and indeed must do, we are proud of our achievements over the past year.
The October Club announces The Cure Parkinson's Trust as its 2016 Charity
The City-based philanthropy group, The October Club has chosen The Cure Parkinson's Trust as the beneficiary charity for their annual fundraising dinner.
Parkinson's Cell Transplants Show Good Reinnervation After 24 Years
A postmortem examination of a patient with Parkinson's who underwent dopaminergic cell transplantation 24 years ago has shown that the transplanted neurons had reinnervated the brain for all that time.
The 28th Gulls' Eggs Luncheon at Merchant Taylors' Hall
The 28th Gulls' Eggs Luncheon, held on Tuesday 10th May 2016, at Merchant Taylors' Hall, attracted over 550 guests, who helped raise over £55,000 (net) for The Cure Parkinson's Trust.
Are Stem Cell-Based Therapies for Parkinson's Disease Ready for the Clinic?
A research paper published in the Journal of Parkinson's Disease (Spring 2016) discusses an impending clinical trial in Parkinson's disease (PD) using parthenogenetic stem cells.
The Virgin Money London Marathon Heroes!
On Sunday 24th April, CPT's team of dedicated runners hit the streets of London in support of our research. We can't thank them enough for their mammoth efforts over these past months and, of course, that huge feat yesterday!
Sophie Raworth Runs the Virgin Money London Marathon for CPT!
BBC News Anchor, Sophie Raworth, chose to run the Virgin Money London Marathon in support of the work of The Cure Parkinson's Trust following her father's Parkinson's diagnosis.