text:
<?php
/**
 * WordPress Image Editor
 *
 * @package WordPress
 * @subpackage Administration
 */

/**
 * Loads the WP image-editing interface.
 *
 * @param int         $post_id Post ID.
 * @param bool|object $msg     Optional. Message to display for image editor updates or errors.
 *                             Default false.
 */
function wp_image_editor($post_id, $msg = false) {
	$nonce = wp_create_nonce("image_editor-$post_id");
	$meta = wp_get_attachment_metadata($post_id);
	$thumb = image_get_intermediate_size($post_id, 'thumbnail');
	$sub_sizes = isset($meta['sizes']) && is_array($meta['sizes']);
	$note = '';

	if ( isset( $meta['width'], $meta['height'] ) )
		$big = max( $meta['width'], $meta['height'] );
	else
		die( __('Image data does not exist. Please re-upload the image.') );

	$sizer = $big > 400 ? 400 / $big : 1;

	$backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
	$can_restore = false;
	if ( ! empty( $backup_sizes ) && isset( $backup_sizes['full-orig'], $meta['file'] ) )
		$can_restore = $backup_sizes['full-orig']['file'] != basename( $meta['file'] );

	if ( $msg ) {
		if ( isset($msg->error) )
			$note = "

$msg->error

";
		elseif ( isset($msg->msg) )
			$note = "

$msg->msg

";
	}

	?>

	<div id="imgedit-panel-<?php echo $post_id; ?>">

<?php _e( 'Scale Image' ); ?>

<?php _e('You can proportionally scale the original image. For best results, scaling should be done before you crop, flip, or rotate. Images can only be scaled down, not up.'); ?>

		<?php if ( isset( $meta['width'], $meta['height'] ) ): ?>

<?php printf( __('Original dimensions %s'), $meta['width'] . ' × ' . $meta['height'] ); ?>

		<?php endif ?>

		<input type="text" id="imgedit-scale-width-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1)" style="width:4em;" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" /> × <input type="text" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0)" style="width:4em;" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
		<span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>">!
		<input type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" />

<?php if ( $can_restore ) { ?>

<?php _e('Restore Original Image'); ?>

<?php _e('Discard any changes and restore the original image.');

		if ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE )
			echo ' '.__('Previously edited copies of the image will not be deleted.');

		?>

		<input type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'restore')" class="button button-primary" value="<?php esc_attr_e( 'Restore image' ); ?>" <?php echo $can_restore; ?> />

<?php } ?>

<?php _e( 'Image Crop' ); ?>

<?php _e('To crop the image, click on it and drag to make your selection.'); ?>

<?php _e('Crop Aspect Ratio'); ?>

		<?php _e('The aspect ratio is the relationship between the width and height. You can preserve the aspect ratio by holding down the shift key while resizing your selection. Use the input box to specify the aspect ratio, e.g. 1:1 (square), 4:3, 16:9, etc.'); ?>

<?php _e('Crop Selection'); ?>

		<?php _e('Once you have made your selection, you can adjust it by entering the size in pixels. The minimum selection size is the thumbnail size as set in the Media settings.'); ?>

		<?php _e('Aspect ratio:'); ?>

		<input type="text" id="imgedit-crop-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 0, this)" style="width:3em;" />
		:
		<input type="text" id="imgedit-crop-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 1, this)" style="width:3em;" />

	<p id="imgedit-crop-sel-<?php echo $post_id; ?>">
		<?php _e('Selection:'); ?>

		<input type="text" id="imgedit-sel-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>)" style="width:4em;" />
		×
		<input type="text" id="imgedit-sel-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>)" style="width:4em;" />

	<?php if ( $thumb && $sub_sizes ) {
		$thumb_img = wp_constrain_dimensions( $thumb['width'], $thumb['height'], 160, 120 );
	?>

<?php _e( 'Thumbnail Settings' ); ?>

<?php _e('You can edit the image while preserving the thumbnail. For example, you may wish to have a square thumbnail that displays just a section of the image.'); ?>

		<img src="<?php echo $thumb['url']; ?>" width="<?php echo $thumb_img[0]; ?>" height="<?php echo $thumb_img[1]; ?>" class="imgedit-size-preview" alt="" draggable="false" />

<?php _e('Current thumbnail'); ?>

	<p id="imgedit-save-target-<?php echo $post_id; ?>">
		<?php _e('Apply changes to:'); ?>

		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="all" checked="checked" />
		<?php _e('All image sizes'); ?>

		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="thumbnail" />
		<?php _e('Thumbnail'); ?>

		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="nothumb" />
		<?php _e('All sizes except thumbnail'); ?>

	<?php } ?>

		<?php echo $note; ?>

			<div onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop disabled" title="<?php esc_attr_e( 'Crop' ); ?>">
<?php

		// On some setups GD library does not provide imagerotate() - Ticket #11536
		if ( wp_image_editor_supports( array( 'mime_type' => get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) { ?>
			<div class="imgedit-rleft"  onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate counter-clockwise' ); ?>">

			<div class="imgedit-rright" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>">

	<?php } else {
			$note_no_rotate = esc_attr__('Image rotation is not supported by your web host.');
	?>
		    <div class="imgedit-rleft disabled"  title="<?php echo $note_no_rotate; ?>">

		    <div class="imgedit-rright disabled" title="<?php echo $note_no_rotate; ?>">

	<?php } ?>

			<div onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-flipv" title="<?php esc_attr_e( 'Flip vertically' ); ?>">

			<div onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-fliph" title="<?php esc_attr_e( 'Flip horizontally' ); ?>">

			<div id="image-undo-<?php echo $post_id; ?>" onclick="imageEdit.undo(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-undo disabled" title="<?php esc_attr_e( 'Undo' ); ?>">

			<div id="image-redo-<?php echo $post_id; ?>" onclick="imageEdit.redo(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-redo disabled" title="<?php esc_attr_e( 'Redo' ); ?>">

		<input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
		<input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
		<input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
		<input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />
		<input type="hidden" id="imgedit-x-<?php echo $post_id; ?>" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" />
		<input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />

		<div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
		<img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&_ajax_nonce=<?php echo $nonce; ?>&postid=<?php echo $post_id; ?>&rand=<?php echo rand(1, 99999); ?>" alt="<?php esc_attr_e( 'Image preview' ); ?>" />

			<input type="button" onclick="imageEdit.close(<?php echo $post_id; ?>, 1)" class="button" value="<?php esc_attr_e( 'Cancel' ); ?>" />
			<input type="button" onclick="imageEdit.save(<?php echo "$post_id, '$nonce'"; ?>)" disabled="disabled" class="button button-primary imgedit-submit-btn" value="<?php esc_attr_e( 'Save' ); ?>" />

	<div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>">

	<div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e("There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor."); ?>

<?php
}

/**
 * Streams image in WP_Image_Editor to browser.
 * Provided for backcompat reasons
 *
 * @param WP_Image_Editor $image
 * @param string $mime_type
 * @param int $post_id
 * @return bool
 */
function wp_stream_image( $image, $mime_type, $post_id ) {
	if ( $image instanceof WP_Image_Editor ) {

		/**
		 * Filter the WP_Image_Editor instance for the image to be streamed to the browser.
		 *
		 * @since 3.5.0
		 *
		 * @param WP_Image_Editor $image   WP_Image_Editor instance.
		 * @param int             $post_id Post ID.
		 */
		$image = apply_filters( 'image_editor_save_pre', $image, $post_id );

		if ( is_wp_error( $image->stream( $mime_type ) ) )
			return false;

		return true;
	} else {
		_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );

		/**
		 * Filter the GD image resource to be streamed to the browser.
		 *
		 * @since 2.9.0
		 * @deprecated 3.5.0 Use image_editor_save_pre instead.
		 *
		 * @param resource $image   Image resource to be streamed.
		 * @param int      $post_id Post ID.
		 */
		$image = apply_filters( 'image_save_pre', $image, $post_id );

		switch ( $mime_type ) {
			case 'image/jpeg':
				header( 'Content-Type: image/jpeg' );
				return imagejpeg( $image, null, 90 );
			case 'image/png':
				header( 'Content-Type: image/png' );
				return imagepng( $image );
			case 'image/gif':
				header( 'Content-Type: image/gif' );
				return imagegif( $image );
			default:
				return false;
		}
	}
}

/**
 * Saves Image to File
 *
 * @param string $filename
 * @param WP_Image_Editor $image
 * @param string $mime_type
 * @param int $post_id
 * @return bool
 */
function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
	if ( $image instanceof WP_Image_Editor ) {

		/** This filter is documented in wp-admin/includes/image-edit.php */
		$image = apply_filters( 'image_editor_save_pre', $image, $post_id );

		/**
		 * Filter whether to skip saving the image file.
		 *
		 * Returning a non-null value will short-circuit the save method,
		 * returning that value instead.
		 *
		 * @since 3.5.0
		 *
		 * @param mixed           $override  Value to return instead of saving. Default null.
		 * @param string          $filename  Name of the file to be saved.
		 * @param WP_Image_Editor $image     WP_Image_Editor instance.
		 * @param string          $mime_type Image mime type.
		 * @param int             $post_id   Post ID.
		 */
		$saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id );

		if ( null !== $saved )
			return $saved;

		return $image->save( $filename, $mime_type );
	} else {
		_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );

		/** This filter is documented in wp-admin/includes/image-edit.php */
		$image = apply_filters( 'image_save_pre', $image, $post_id );

		/**
		 * Filter whether to skip saving the image file.
		 *
		 * Returning a non-null value will short-circuit the save method,
		 * returning that value instead.
		 *
		 * @since 2.9.0
		 * @deprecated 3.5.0 Use wp_save_image_editor_file instead.
		 *
		 * @param mixed           $override  Value to return instead of saving. Default null.
		 * @param string          $filename  Name of the file to be saved.
		 * @param WP_Image_Editor $image     WP_Image_Editor instance.
		 * @param string          $mime_type Image mime type.
		 * @param int             $post_id   Post ID.
		 */
		$saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id );

		if ( null !== $saved )
			return $saved;

		switch ( $mime_type ) {
			case 'image/jpeg':

				/** This filter is documented in wp-includes/class-wp-image-editor.php */
				return imagejpeg( $image, $filename, apply_filters( 'jpeg_quality', 90, 'edit_image' ) );
			case 'image/png':
				return imagepng( $image, $filename );
			case 'image/gif':
				return imagegif( $image, $filename );
			default:
				return false;
		}
	}
}

/**
 * Image preview ratio. Internal use only.
 *
 * @since 2.9.0
 *
 * @ignore
 * @param int $w Image width in pixels.
 * @param int $h Image height in pixels.
 * @return float|int Image preview ratio.
 */
function _image_get_preview_ratio($w, $h) {
	$max = max($w, $h);
	return $max > 400 ? (400 / $max) : 1;
}

/**
 * Returns an image resource. Internal use only.
 *
 * @since 2.9.0
 *
 * @ignore
 * @param resource  $img   Image resource.
 * @param float|int $angle Image rotation angle, in degrees.
 * @return resource|false GD image resource, false otherwise.
 */
function _rotate_image_resource($img, $angle) {
	_deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::rotate' ) );
	if ( function_exists('imagerotate') ) {
		$rotated = imagerotate($img, $angle, 0);
		if ( is_resource($rotated) ) {
			imagedestroy($img);
			$img = $rotated;
		}
	}
	return $img;
}

/**
 * Flips an image resource. Internal use only.
 *
 * @since 2.9.0
 *
 * @ignore
 * @param resource $img  Image resource.
 * @param bool     $horz Whether to flip horizontally.
 * @param bool     $vert Whether to flip vertically.
 * @return resource (maybe) flipped image resource.
 */
function _flip_image_resource($img, $horz, $vert) {
	_deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::flip' ) );
	$w = imagesx($img);
	$h = imagesy($img);
	$dst = wp_imagecreatetruecolor($w, $h);
	if ( is_resource($dst) ) {
		$sx = $vert ? ($w - 1) : 0;
		$sy = $horz ? ($h - 1) : 0;
		$sw = $vert ? -$w : $w;
		$sh = $horz ? -$h : $h;

		if ( imagecopyresampled($dst, $img, 0, 0, $sx, $sy, $w, $h, $sw, $sh) ) {
			imagedestroy($img);
			$img = $dst;
		}
	}
	return $img;
}

/**
 * Crops an image resource. Internal use only.
 *
 * @since 2.9.0
 *
 * @ignore
 * @param resource $img Image resource.
 * @param float    $x   Source point x-coordinate.
 * @param float    $y   Source point y-cooredinate.
 * @param float    $w   Source width.
 * @param float    $h   Source height.
 * @return resource (maybe) cropped image resource.
 */
function _crop_image_resource($img, $x, $y, $w, $h) {
	$dst = wp_imagecreatetruecolor($w, $h);
	if ( is_resource($dst) ) {
		if ( imagecopy($dst, $img, 0, 0, $x, $y, $w, $h) ) {
			imagedestroy($img);
			$img = $dst;
		}
	}
	return $img;
}

/**
 * Performs group of changes on Editor specified.
 *
 * @since 2.9.0
 *
 * @param WP_Image_Editor $image   {@see WP_Image_Editor} instance.
 * @param array           $changes Array of change operations.
 * @return WP_Image_Editor {@see WP_Image_Editor} instance with changes applied.
 */
function image_edit_apply_changes( $image, $changes ) {
	if ( is_resource( $image ) )
		_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );

	if ( !is_array($changes) )
		return $image;

	// Expand change operations.
	foreach ( $changes as $key => $obj ) {
		if ( isset($obj->r) ) {
			$obj->type = 'rotate';
			$obj->angle = $obj->r;
			unset($obj->r);
		} elseif ( isset($obj->f) ) {
			$obj->type = 'flip';
			$obj->axis = $obj->f;
			unset($obj->f);
		} elseif ( isset($obj->c) ) {
			$obj->type = 'crop';
			$obj->sel = $obj->c;
			unset($obj->c);
		}
		$changes[$key] = $obj;
	}

	// Combine operations.
	if ( count($changes) > 1 ) {
		$filtered = array($changes[0]);
		for ( $i = 0, $j = 1, $c = count( $changes ); $j < $c; $j++ ) {
			$combined = false;
			if ( $filtered[$i]->type == $changes[$j]->type ) {
				switch ( $filtered[$i]->type ) {
					case 'rotate':
						$filtered[$i]->angle += $changes[$j]->angle;
						$combined = true;
						break;
					case 'flip':
						$filtered[$i]->axis ^= $changes[$j]->axis;
						$combined = true;
						break;
				}
			}
			if ( !$combined )
				$filtered[++$i] = $changes[$j];
		}
		$changes = $filtered;
		unset($filtered);
	}

	// Image resource before applying the changes.
	if ( $image instanceof WP_Image_Editor ) {

		/**
		 * Filter the WP_Image_Editor instance before applying changes to the image.
		 *
		 * @since 3.5.0
		 *
		 * @param WP_Image_Editor $image   WP_Image_Editor instance.
 		 * @param array           $changes Array of change operations.
		 */
		$image = apply_filters( 'wp_image_editor_before_change', $image, $changes );
	} elseif ( is_resource( $image ) ) {

		/**
		 * Filter the GD image resource before applying changes to the image.
		 *
		 * @since 2.9.0
		 * @deprecated 3.5.0 Use wp_image_editor_before_change instead.
		 *
		 * @param resource $image   GD image resource.
 		 * @param array    $changes Array of change operations.
		 */
		$image = apply_filters( 'image_edit_before_change', $image, $changes );
	}

	foreach ( $changes as $operation ) {
		switch ( $operation->type ) {
			case 'rotate':
				if ( $operation->angle != 0 ) {
					if ( $image instanceof WP_Image_Editor )
						$image->rotate( $operation->angle );
					else
						$image = _rotate_image_resource( $image, $operation->angle );
				}
				break;
			case 'flip':
				if ( $operation->axis != 0 )
					if ( $image instanceof WP_Image_Editor )
						$image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 );
					else
						$image = _flip_image_resource( $image, ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 );
				break;
			case 'crop':
				$sel = $operation->sel;

				if ( $image instanceof WP_Image_Editor ) {
					$size = $image->get_size();
					$w = $size['width'];
					$h = $size['height'];

					$scale = 1 / _image_get_preview_ratio( $w, $h ); // discard preview scaling
					$image->crop( $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale );
				} else {
					$scale = 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // discard preview scaling
					$image = _crop_image_resource( $image, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale );
				}
				break;
		}
	}

	return $image;
}

/**
 * Streams image in post to browser, along with enqueued changes
 * in $_REQUEST['history']
 *
 * @param int $post_id
 * @return bool
 */
function stream_preview_image( $post_id ) {
	$post = get_post( $post_id );

	/** This filter is documented in wp-admin/admin.php */
	@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );

	$img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) );

    if ( is_wp_error( $img ) )
        return false;

	$changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash($_REQUEST['history']) ) : null;
	if ( $changes )
		$img = image_edit_apply_changes( $img, $changes );

	// Scale the image.
	$size = $img->get_size();
	$w = $size['width'];
	$h = $size['height'];

	$ratio = _image_get_preview_ratio( $w, $h );
	$w2 = max ( 1, $w * $ratio );
	$h2 = max ( 1, $h * $ratio );

	if ( is_wp_error( $img->resize( $w2, $h2 ) ) )
		return false;

	return wp_stream_image( $img, $post->post_mime_type, $post_id );
}

/**
 * Restores the metadata for a given attachment.
 *
 * @since 2.9.0
 *
 * @param int $post_id Attachment post ID.
 * @return stdClass Image restoration message object.
 */
function wp_restore_image($post_id) {
	$meta = wp_get_attachment_metadata($post_id);
	$file = get_attached_file($post_id);
	$backup_sizes = $old_backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
	$restored = false;
	$msg = new stdClass;

	if ( !is_array($backup_sizes) ) {
		$msg->error = __('Cannot load image metadata.');
		return $msg;
	}

	$parts = pathinfo($file);
	$suffix = time() . rand(100, 999);
	$default_sizes = get_intermediate_image_sizes();

	if ( isset($backup_sizes['full-orig']) && is_array($backup_sizes['full-orig']) ) {
		$data = $backup_sizes['full-orig'];

		if ( $parts['basename'] != $data['file'] ) {
			if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {

				// Delete only if it's an edited image.
				if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) {
					wp_delete_file( $file );
				}
			} elseif ( isset( $meta['width'], $meta['height'] ) ) {
				$backup_sizes["full-$suffix"] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $parts['basename']);
			}
		}

		$restored_file = path_join($parts['dirname'], $data['file']);
		$restored = update_attached_file($post_id, $restored_file);

		$meta['file'] = _wp_relative_upload_path( $restored_file );
		$meta['width'] = $data['width'];
		$meta['height'] = $data['height'];
	}

	foreach ( $default_sizes as $default_size ) {
		if ( isset($backup_sizes["$default_size-orig"]) ) {
			$data = $backup_sizes["$default_size-orig"];
			if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) {
				if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {

					// Delete only if it's an edited image.
					if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) {
						$delete_file = path_join( $parts['dirname'], $meta['sizes'][$default_size]['file'] );
						wp_delete_file( $delete_file );
					}
				} else {
					$backup_sizes["$default_size-{$suffix}"] = $meta['sizes'][$default_size];
				}
			}

			$meta['sizes'][$default_size] = $data;
		} else {
			unset($meta['sizes'][$default_size]);
		}
	}

	if ( ! wp_update_attachment_metadata( $post_id, $meta ) ||
		( $old_backup_sizes !== $backup_sizes && ! update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes ) ) ) {

		$msg->error = __('Cannot save image metadata.');
		return $msg;
	}

	if ( !$restored )
		$msg->error = __('Image metadata is inconsistent.');
	else
		$msg->msg = __('Image restored successfully.');

	return $msg;
}

/**
 * Saves image to post along with enqueued changes
 * in $_REQUEST['history']
 *
 * @global array $_wp_additional_image_sizes
 *
 * @param int $post_id
 * @return \stdClass
 */
function wp_save_image( $post_id ) {
	global $_wp_additional_image_sizes;

	$return = new stdClass;
	$success = $delete = $scaled = $nocrop = false;
	$post = get_post( $post_id );

	$img = wp_get_image_editor( _load_image_to_edit_path( $post_id, 'full' ) );
	if ( is_wp_error( $img ) ) {
		$return->error = esc_js( __('Unable to create new image.') );
		return $return;
	}

	$fwidth = !empty($_REQUEST['fwidth']) ? intval($_REQUEST['fwidth']) : 0;
	$fheight = !empty($_REQUEST['fheight']) ? intval($_REQUEST['fheight']) : 0;
	$target = !empty($_REQUEST['target']) ? preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['target']) : '';
	$scale = !empty($_REQUEST['do']) && 'scale' == $_REQUEST['do'];

	if ( $scale && $fwidth > 0 && $fheight > 0 ) {
		$size = $img->get_size();
		$sX = $size['width'];
		$sY = $size['height'];

		// Check if it has roughly the same w / h ratio.
		$diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
		if ( -0.1 < $diff && $diff < 0.1 ) {
			// Scale the full size image.
			if ( $img->resize( $fwidth, $fheight ) )
				$scaled = true;
		}

		if ( !$scaled ) {
			$return->error = esc_js( __('Error while saving the scaled image. Please reload the page and try again.') );
			return $return;
		}
	} elseif ( !empty($_REQUEST['history']) ) {
		$changes = json_decode( wp_unslash($_REQUEST['history']) );
		if ( $changes )
			$img = image_edit_apply_changes($img, $changes);
	} else {
		$return->error = esc_js( __('Nothing to save, the image has not changed.') );
		return $return;
	}

	$meta = wp_get_attachment_metadata($post_id);
	$backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true );

	if ( !is_array($meta) ) {
		$return->error = esc_js( __('Image data does not exist. Please re-upload the image.') );
		return $return;
	}

	if ( !is_array($backup_sizes) )
		$backup_sizes = array();

	// Generate new filename.
	$path = get_attached_file($post_id);
	$path_parts = pathinfo( $path );
	$filename = $path_parts['filename'];
	$suffix = time() . rand(100, 999);

	if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE &&
		isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) {

		if ( 'thumbnail' == $target )
			$new_path = "{$path_parts['dirname']}/{$filename}-temp.{$path_parts['extension']}";
		else
			$new_path = $path;
	} else {
		while( true ) {
			$filename = preg_replace( '/-e([0-9]+)$/', '', $filename );
			$filename .= "-e{$suffix}";
			$new_filename = "{$filename}.{$path_parts['extension']}";
			$new_path = "{$path_parts['dirname']}/$new_filename";
			if ( file_exists($new_path) )
				$suffix++;
			else
				break;
		}
	}

	// Save the full-size file, also needed to create sub-sizes.
	if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) {
		$return->error = esc_js( __('Unable to save the image.') );
		return $return;
	}

	if ( 'nothumb' == $target || 'all' == $target || 'full' == $target || $scaled ) {
		$tag = false;
		if ( isset($backup_sizes['full-orig']) ) {
			if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] )
				$tag = "full-$suffix";
		} else {
			$tag = 'full-orig';
		}

		if ( $tag )
			$backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $path_parts['basename']);

		$success = ( $path === $new_path ) || update_attached_file( $post_id, $new_path );

		$meta['file'] = _wp_relative_upload_path( $new_path );

		$size = $img->get_size();
		$meta['width'] = $size['width'];
		$meta['height'] = $size['height'];

		if ( $success && ('nothumb' == $target || 'all' == $target) ) {
			$sizes = get_intermediate_image_sizes();
			if ( 'nothumb' == $target )
				$sizes = array_diff( $sizes, array('thumbnail') );
		}

		$return->fw = $meta['width'];
		$return->fh = $meta['height'];
	} elseif ( 'thumbnail' == $target ) {
		$sizes = array( 'thumbnail' );
		$success = $delete = $nocrop = true;
	}

	if ( isset( $sizes ) ) {
		$_sizes = array();

		foreach ( $sizes as $size ) {
			$tag = false;
			if ( isset( $meta['sizes'][$size] ) ) {
				if ( isset($backup_sizes["$size-orig"]) ) {
					if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes["$size-orig"]['file'] != $meta['sizes'][$size]['file'] )
						$tag = "$size-$suffix";
				} else {
					$tag = "$size-orig";
				}

				if ( $tag )
					$backup_sizes[$tag] = $meta['sizes'][$size];
			}

			if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
				$width  = intval( $_wp_additional_image_sizes[ $size ]['width'] );
				$height = intval( $_wp_additional_image_sizes[ $size ]['height'] );
				$crop   = ( $nocrop ) ? false : $_wp_additional_image_sizes[ $size ]['crop'];
			} else {
				$height = get_option( "{$size}_size_h" );
				$width  = get_option( "{$size}_size_w" );
				$crop   = ( $nocrop ) ? false : get_option( "{$size}_crop" );
			}

			$_sizes[ $size ] = array( 'width' => $width, 'height' => $height, 'crop' => $crop );
		}

		$meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) );
	}

	unset( $img );

	if ( $success ) {
		wp_update_attachment_metadata( $post_id, $meta );
		update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes);

		if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
			// Check if it's an image edit from attachment edit screen
			if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) {
				$thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true );
				$return->thumbnail = $thumb_url[0];
			} else {
				$file_url = wp_get_attachment_url($post_id);
				if ( ! empty( $meta['sizes']['thumbnail'] ) && $thumb = $meta['sizes']['thumbnail'] ) {
					$return->thumbnail = path_join( dirname($file_url), $thumb['file'] );
				} else {
					$return->thumbnail = "$file_url?w=128&h=128";
				}
			}
		}
	} else {
		$delete = true;
	}

	if ( $delete ) {
		wp_delete_file( $new_path );
	}

	$return->msg = esc_js( __('Image saved') );
	return $return;
}

redpajama_set_name: RedPajamaGithub


The 2013 International Gymnastics Challenge took place on Saturday [Jan 12], with Bermuda topping the team scores and winning numerous individual events.
The participating teams were the Bermuda Gymnastics Association, Titans [Nova Scotia, Canada], Yellow Jackets [Massachusetts, USA], Gymnastics of York [Pennsylvania, USA], Flyers Gymnastics [New Jersey, USA], and Thompsons Gymnastics [Massachusetts, USA].
The morning session [Copper/Bronze/Silver levels] saw Bermuda top the tables with 109.20 points, the Titans second with 105.35, and the Yellow Jackets third with 104.30.
The afternoon session [Gold/Platinum levels] saw Bermuda win again with 105.05 points, Gymnastics of York place second with 103.95, the Titans were third with 98.85, in fourth were the Yellow Jackets with points 97.80 and the Flyers were fifth in 97.65.
Meet chairperson Georgina Francoeur said: "This year's International Gymnastics Challenge was a huge success. It wouldn't have been possible without the support of our sponsors, in particular the Department of Tourism.
"Also a huge thank you must go out to our Bermuda Gymnastics family who prepared the gym and donated hours of their time to help us put on a seamless event. The gymnasts were thrilled to perform in front of over 500 fans and dignitaries and all of our visiting teams are looking forward to returning in 2014″.
Bermuda's Head coach Duke Nelligan says "It's hard to believe that only ten months ago was our first International Challenge at the National Training Center in St. Davids. Once again athletes, parents, grandparents and dignitaries, came together for a common cause to build upon the success of last year's meet.
"Our athletes and program have grown so much; it's amazing to think how great this event will become in future years. If the gymnastics community continues on this path, we should see an Olympian in our future".
Complete results are available here, 35 minutes of video footage of the event is available here, and a photo gallery can be viewed here.


Awesome Blasting Game - Nail It or Fail It - Cool Target Games for Boys - BOOMco.
BOOMco. makes it easy for you to expand the battlefield: download and print these targets so you can test your blasting skills!
Design your own target with the Target Maker so you can customize the battlefield. Expand the battlefield even more with Printable targets. Play Nail It or Fail It and blast your way to victory!


I like to build businesses with passionate people, in areas that can impact people's lives positively. My experiences include digital TV, online video, mobile technology, healthcare, data platforms, video production and user experience. I'm interested in continuous learning, helping early stage companies move toward a growth path, and helping people arrive at their full potential. Also love to find hidden gems, in food, music, art and anything that is worth experiencing.


West Africa Correspondent for the Financial Times, Former East Africa reporter for Reuters and author of The Wizard of the Nile, Matthew Green talks about General Joseph Kony.
Captivated by the myths that surround General Kony, Green headed into the war zone to try and track him down. His investigation took him through a landscape littered with refugees and teenage war veterans, international peacemakers and government officials, witch doctors and missionaries. Slowly he moved closer and closer to unveiling the truth about this infamous and elusive general.


Succession planning is an important part of running a family business; however, only two out of three family-owned businesses have some type of succession plan in place, and only one in four have a plan that is sufficiently robust and documented, according to PricewaterhouseCoopers. Here are some important items to consider when developing your succession plan to ensure a successful and smooth transition.
Feeling it's too early to make a plan.
Not able to find advice and tools to start.
Having conflict with family or employees.
Building a common vision for the business.
Communication in the business and family.
Clear delineation of roles and responsibilities.
Processes for transitioning daily operations.
Strategic planning and developing marketing, and sales initiatives.
To address these issues and better plan for a smooth transition, Newport Board Group managing director Michael Evans recommends a five-step succession planning process.
1. Establish goals and objectives. With input from a professional team of advisors, this phase should include articulating collective visions and objectives for the business. It should address continued family ownership and leadership, and weigh the pros and cons of bringing in outside professional management. It should also consider the individual retirement goals and cash flow needs of retiring family members, as well as the personal and business goals of next-generation family members.
2. Establish a decision-making process. This should lay out the process that will govern the involvement of family members in decision making and establish procedures for dispute resolution. The processes and decisions you arrive at should be documented in writing and communicated to family members.
3. Create the succession plan itself. This should identify ownership and management successors, define active roles for family members, and define any support that successors will require from family members.
4. Create a business and owner estate plan. This should cover tax implications for the owner and business in the event of ownership transfer, death or divorce. It should also review owner estate planning strategies for minimizing taxes and delays in stock transfer. It should further develop a fair and tax strategic buy/sell agreement.
5. Create a transition plan. This should consider the options of purchasing versus gifts/bequests, and the possibility of combining these options. It should also consider outside financing versus self-financing options. Finally, it should establish a schedule for executing the plan.
To execute a succession plan successfully, Cypress Technologies owner Susan Ward recommends starting your planning at least five to 10 years before your anticipated transition. New entrepreneurs are encouraged to build succession planning into their initial business plan.
It's also important to involve family members in the planning discussion. At the same time, it's not necessary to give everyone an equal share in the business, and decisions should be made in the best interests of the business, as well as the individuals that comprise it. A successful transition also depends on training of successors. Finally, for best results, bring in professional consultants to assist with the planning process.


text:
Mortal Remains
November 12, 2018 • Ty Andreaco
When I decided to turn my passion for horror into a semi-professional endeavor the idea of perks or fringe benefits never occurred to this humble columnist. Ideas such as these were foreign to even my wild, blue sky imagination. That being said, you can imagine my astonishment when, after a brief correspondence, Cryptic Pictures extended a personal invitation to Cult Classic Horror. Our host, Christian Stavrakis, had arranged for a "private screening" of their hit docu-horror film Mortal Remains, a movie that had recently been screened at our local horror con. Upon my arrival it took a moment for Stavrakis to recognize me, our last meeting having been three months ago. Once he did, though, a filmmaker's energy lept into his eyes. This was a man whose passion for the art of horror is obvious. The location of the screening was Allegheny Smokeworks, a classy cigar shop which is Christian's home away from home. Before starting the film we selected a cigar from the humidor. Admittedly, I am not a connoisseur, but Stavrakis was more than happy to give me an "ash" course. After lighting our cigars, Christian started the film on the large TV in the smoking lounge.
Mortal Remains is the story of two young men (co-directors Stavrakis and Mark Ricche) in search of the truth about suspected snuff-film director Karl Atticus. Our subject and his mysterious disappearance slowly drive the main characters into a fanatical state. Filmed in a documentary style, Mortal Remains boasts a robust back story that most found-footage films typically lack. By choosing not to be ambiguous with their subject matter, Cryptic Pictures was able to outshine the lion's share of movies using this format. Excellent performances from the "interviewees" forces viewers to buy into the mystique of the source material. An unexpected appearance by Nick Tallo (Dawn of the Dead 1978) would surprise any hardcore horror fan. Noted moments in the film include grainy movie-within-a-movie footage and a cemetery scene that caused at least one jaded viewer to jump. The films of Karl Atticus, parts of which are shown within the "doc," are disturbingly believable, but more importantly they are a testament to the talent of the film makers. When making found footage films, there is a tendency to be lazy with cinematic elements. Cryptic Pictures was able to create fictional films that look and feel real, adding a layer of authenticity to the finished product. While Mortal Remains is superficially reminiscent of The Blair Witch Project - it also takes place in Maryland - it stands apart from the earlier work. This is a polished piece which creates a world so convincing that I found myself searching the internet for more info on Karl Atticus.
If Christian's last name is familiar to you, that is because he is the younger brother of the legendary Taso Stavrakis (Friday the 13th, Day of the Dead). I was uncomfortable asking about this, but Christian assured me he grew up with Taso and Tom Savini as his heroes. He does not dismiss his older brother's influence, but rather revels in it. Ultimately, we were all introduced to horror by someone; in Christian's case that someone just happens to be a giant of the genre. After the movie, Christian and I talked briefly about his work on the set of the Night of the Living Dead remake. He laughed recalling that he had just returned to Pittsburgh from Maryland and essentially walked onto the production as a special effects assistant. What a lucky guy.
Mortal Remains is scheduled for DVD release on October 13th, 2017. Get your copy at mortalremainsmovie.com. Thank you to Christian for welcoming CCH and for all of your hospitality. We look forward to your next project.
http://www.mortalremainsmovie.com/

redpajama_set_name: RedPajamaCommonCrawl


text:
Alexa, Play KICK-AM
Jim West
Linda Flores
John St. John
Chuck Leary
Dee Lewis
KICK-AM VIP
Linda FloresLinda Flores
Backroad Anthem Singer Craig Strickland Found Dead
Craig Strickland has been found dead. The Backroad Anthem singer's body was recovered in Kaw Lake in Oklahoma, where he and friend Chase Morland had gone duck hunting on Dec. 27.
Morland was found dead last Monday.
Oklahoma Highway Patrol officials say 29-year-old's Strickland's body was discovered north of where his boat capsized. KHBS-TV reports that his family has been notified.
Strickland's wife of one year, Helen, responded on Twitter, saying, "#CraigStrickland was found today. He is safe with his Father in Heaven. Thank you Lord for leading us to him today. I will praise you, Amen."
Later, she added more detail on Instagram. Before thanking rescuers, Helen revealed that her husband "fought his way out of the water and up a hill before the stages of hypothermia set in. He experienced no pain in his final moments and simply felt like he was falling asleep. They found him lying in the shape of a cross looking up to his Father."
Until Monday, all who knew Craig Strickland were clinging to hope that he would be found alive. The singer's black labrador, Sam, survived the harsh temperatures — the dog was said to have been guarding Morland's body when it was discovered. Morland's cause of death has been ruled drowning and exposure to freezing temperatures, but it will take four to eight weeks for a full autopsy report to be returned.
Strickland and Morland were reported missing nearly one day after taking an early morning hunting trip in bad weather. "In case we don't come back, @BackroadCRAIG and I are going right through Winter Storm Goliath to kill ducks in Oklahoma. #IntoTheStorm," Morland tweeted before they left.
Backroad Anthem are a country rock band out of Fayetteville, Ark. that looked to be making inroads to larger stages. They've opened for several major headliners and counted artists like Justin Moore as friends. They kept fans up to date on their Facebook page, regularly sharing remarks made by Strickland's father.
See Pictures of Craig Strickland
See Stars Who've Suffered Unthinkable Tragedies
Next: Justin Moore Sends Prayers to Craig Strickland
Source: Backroad Anthem Singer Craig Strickland Found Dead
Categories: Articles, Music
2019 KICK AM 1530, Townsquare Media, Inc. All rights reserved.


The « Jouer Chopin » Project has just been completed! This tutorial site was created for the École préparatoire de musique Anna-Marie-Globenski affiliated to the Université Laval Music Faculty. As an original idea of concert pianiste Arturo Nieto-Dorantes it offers a variety of ressources to understand and use Frederic Chopin's works at the preparatory level.
In this project, Arturo introduces biographical, technique and editorial aspects. He also gives a brief description of the genres selected in the répertoire by the École préparatoire. It is also possible to listen online to excerpts of every piece by Chopin included in the repertoire.


text:
Q: mysql logical ranking based on score I have a table like this that keeps a total score of a history exam for students.
+----+---------------+-------+---------+-
| id | name          | history |  rank  |
+----+---------------+-------+---------+-
|  1 | yngiid        |    97   |        |
|  2 | viyrp         |   217   |        |
|  3 | pae           |   599   |        |
|  4 | spohl         |   284   |        |
|  5 | shl           |   295   |        |
|  6 | okeer         |    73   |        |
|  7 | jmaany        |   657   |        |
|  8 | hxt           |    80   |        |
|  9 | yanier        |   599   |        |
+----+---------------+-------+----------+-

The history field as you can see contains the total score the student . Now, I would like to rank the students by their scores as in, the higher the points the lower the rank.
Expected output.
+----+---------------+-------+----------+-
| id | name          | history |  rank  |
+----+---------------+-------+----------+-
|  7 | jmaany        |   657   |   1    |
|  3 | pae           |   599   |   2    |
|  9 | yanier        |   599   |   2    |
|  5 | shl           |   295   |   3    |
|  4 | spohl         |   284   |   4    |
|  2 | viyrp         |   217   |   5    |
|  1 | yngiid        |    97   |   6    |
|  8 | hxt           |    80   |   7    |
|  6 | okeer         |    73   |   8    |
+----+---------------+---------+--------+-

I have looked at answers in stackoverflow  but the answers have some issues like:
In the below example, methods will increment the rank when users have the same score, as in the example of pae and yanier
|  7 | jmaany        |   657   |   1    |
|  3 | pae           |   599   |   2    |
|  9 | yanier        |   599   |   3    | # shold be 2 bc pae&yanier have equal points
|  5 | shl           |   295   |   4    |

Other solution will fix the above problem but skip the the next rank number if scores are the same example:
|  7 | jmaany        |   657   |   1    |
|  3 | pae           |   599   |   2    |
|  9 | yanier        |   599   |   2    |
|  5 | shl           |   295   |   4    | # should be 3 b/c .. logic

These are just some of the problems, so I am wandering if there is a solution to output the expected result.
Here is a sample table dump if it helps.
create table `test` (
    `id` int (11),
    `name` varchar (765),
    `history` int (11),
    `rank` int (11)
);
insert into `test` (`id`, `name`, `history`, `rank`) values('1','yngiid','97',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('2','viyrp','217',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('3','pae','599',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('4','spohl','284',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('5','shl','295',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('6','okeer','73',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('7','jmaany','657',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('8','hxt','80',NULL);
insert into `test` (`id`, `name`, `history`, `rank`) values('9','yanier','599',NULL);

A: SELECT
    T1.id,
    T1.`name`,
    T1.history,
    T2.rank
FROM
    test T1
LEFT JOIN (
    SELECT
        history,
        (@v_id := @v_Id + 1) AS rank
    FROM
        (
            SELECT DISTINCT
                history
            FROM
                test
            ORDER BY
                history DESC
        ) t,
        (SELECT @v_id := 0) r
) T2 ON T1.history = T2.history
ORDER BY
    history DESC

with result as:
7   jmaany  657 1
3   pae     599 2
9   yanier  599 2
5   shl     295 3
4   spohl   284 4
2   viyrp   217 5
1   yngiid  97  6
8   hxt     80  7
6   okeer   73  8

redpajama_set_name: RedPajamaStackExchange


text:
Student Editors
PUBLIC INTEREST LITIGATION: A TOOL FOR PROTECTION OF HUMAN RIGHTS IN INDIA: ABHIJAY CHAKRABORTY
Posted on January 17, 2020 January 20, 2020 by ILSIJLM
Public Interest Litigation: A tool for the protection of Human Rights in India
Author: Abhijay Chakraborty
S.S. Jain Subodh Law College, Jaipur.
It is evident by reading Article 32 of the Indian Constitution that the traditional rule –locus standi is that the right to move the Supreme Court is available to those people whose Fundamental rights have been violated. The power vested in the Supreme Court can only be exercised for the enforcement and protection of fundamental rights. The writ under which the remedy is asked under Article 32 must be correlated to one of the fundamental rights sought to be enforced. The remedy must be sought through appropriate proceedings. the courts have played their role in a constructive manner with a view to promote the welfare of the people and strengthen the democratic fabric of the country. At the same time, the increase of the inflow of public interest litigation and the abuse thereof has prompted the Supreme Court to sound a precautionary note.
Keywords: PIL, Locus standi, Article 32, Fundamental Rights.
It is evident by reading the Article 32 of the Indian Constitution that the traditional rule –locus standi is that the right to move the Supreme Court is available to those people whose Fundamental rights have been violated. The power vested in the Supreme Court can only be exercised for the enforcement and protection of fundamental rights. The writ under which the remedy is asked under Article 32 must be correlated to one of the fundamental rights sought to be enforced. The remedy must be sought through appropriate proceedings. If we elaborate the traditional rule of locus standi which came to established since 1880[1], judicial remedy could be available to a person who actually suffered legal injury by reason of his violation of his legal right or legally protected interest by the impugned action of the state or public authority or any other person or who was likely to suffer a legal injury by reason of threatened violation of his legal right or legally protected interest by any such action. Thus the basis of judicial redress under the traditional rule of locus standi was injury to property, body, mind or reputation arising from an actual or threatened violation of his legal right or legally protected interest of the person seeking redress from the court. To meet the ends of justice exception of this rule were recognized from time to time. For example, a taxpayer to local authority was accorded standing to challenge the illegal action of the local authority or misuse of its funds.[2]Section 133 of the criminal procedure code empowers a Magistrate on receiving a report of a police officer or other information to make an order for remedying a public nuisance. Besides all this, exception is also recognized in cases of persons who are not able to reach the court for remedies, such as minor, a prisoner or a person who has been illegally arrested. To meet this requirement the concept of Public Interest Litigation came into existence.
Definition of Public Interest Litigation
The concept of public interest litigation requires that where a legal wrong or legal injury is caused to a person or a determinate class of persons by reason of violation of any constitutional or legal right or any burden is imposed in contravention of any constitutional or legal provision or without authority of law or where any such legal injury or illegal burden is threatened and such person or determinate class of persons is by reason of poverty, helplessness or disability or socially or economically disadvantaged position unable to approach the court, any member of public may maintain an application for appropriate action, direction or writ in the High Court under Article 226. Where the fundamental right is violated he can approach the Supreme Court under Article 32 or the High Court under Article 226. It may, however, be emphasized that a PIL, writ petition can be filed in the Supreme Court under Article 32 only if a question concerning the enforcement of a Fundamental Right is involved. Under Article 226, a writ petition can be filed in a High Court whether or not a Fundamental Right is involved.
A striking factor of PIL in India is that it is primarily a judicially constructed phenomenon, and related to the active assertion of judicial power. Although there was an explosive assertion of judicial power following the declaration of political emergency in India (between 1975 and1977), such power had become pronounced even before. The constitutional tension between the court and Parliament had been pronounced over land reform.[3] The concept of Public Interest Litigation owes its origin to American Jurisprudence. In India, for the first time, Krishna Iyer J. Initiated public interest litigation in 1976 in Mumbai Kamgar Sabha v. Abdulbhai.[4] His Lordship observed "test litigations, representative actions, pro bono publico and like broadened forms of legal proceedings are in keeping with the current accent on justice to the common man and a necessary disincentive to those who wish to bypass the real issues on the merits by suspect reliance on peripheral, procedural shortcomings… Public interest is promoted by a spacious construction of locus standi in our socio-economic circumstances and conceptual latitudinarianism permits taking liberties with individualization of the right to invoke the higher courts where the remedy is shared by a considerable number, particularly when they are weaker. Less litigation consistent with the fair process is the aim of the adjective law." In that case, standing was granted to an association of workers as such. The concept of public interest litigation was further developed in the case of Fertilizer Corporation Kamgar Union v. Union of India.[5] Thereafter judges like Bhagwati J. Jurist like Dr. Upendra Baxi and some social action groups took a special interest in promoting public interest litigation. In Sunil Batra v. Delhi Administration [6] the Apex Court accepted the writ of Habeas Corpus petition of a prisoner complaining of a brutal assault by Jail Warden on another prisoner. In Dr. Upendra Baxi v. State of U.P.[7] inmates of protective home at Agra were living in inhuman and degrading conditions in violation of Article 21 and because of their socially and economically and economically disadvantaged position they were not able to court. Therefore two Law Professors of Delhi University addressed a letter to the Supreme Court. The court treated the letter as a writ petition. Similarly, a letter written by a journalist for relief against the demolition of hutments of pavement dwellers by the Bombay Municipal Corporation was treated as a writ petition.[8] The principle of public interest litigation was well established in India after the decision of the Constitution Bench of 7 judges of the Supreme Court in S.P. Gupta v. Union of India[9], The Court held that any member of the public having "sufficient interest" can approach the court for enforcing constitutional or legal rights of other persons and redressal of a common grievance. In People Union for Democratic Rights v. Union of India[10]the supreme court held that where a person provides his labour or services to another for a remuneration which is less than minimum wage, his labour falls within the words ' forced labour'. He can claim a remedy under Article 32 and 226 for violation of his right under Article 23 and ask the court to direct the payment of minimum wage to him. This case came before the Apex Court by means of a letter written by the People Union for Democratic Rights to Justice Bhagwati regarding conditions under which workmen engaged in various Asiad projects were working. It was contended that the petitioner has no locus standi but the supreme court rejected this contention.
Abuse of PIL not be allowed: Guidelines: In Judges Transfer Case, while expanding the scope of the locus standi rules his lordship Bhagwati J. expressed a note of caution also. He observed:
" But we must be careful to see that the member of the public, who approaches the court in case of this kind, is acting bona fide and not for personal gain or private profit or political motivation or other oblique consideration. The court must not allow its process to be abused by politicians and others……."
This observation makes it clear that His Lordship was aware that this liberal rule of locus standi might be misused by vested interests. He, therefore, made it clear that in that case,, the court will not allow the remedy to be abused.
In Simranjit Singh Mann v. Union of India[11] The court held that the petitioners had no ' locus standi' to file petition being a total stranger to the prosecution and more than that they were not even authorized by the convicts. In Guruvayur Devasawom Managing Committee v. C.K. Ranjan [12] The Supreme Court held that public interest litigation cannot be used in solving disputes of private nature. Public Interest Litigation was evolved with a view to render justice to the poor, deprived, the illiterate and downtrodden that have either no access to justice or had been denied justice. It can't be used for removing corruption in the temple.
Advantages of PIL
The preamble to our constitution and Article 38 emphasizes social, economic and political justice. However, under the present judicial procedure, which is costly and complicated, poor and, ignorant people cannot get justice. PIL has done a praiseworthy job in helping this segment of the population to get their due.
Because of their ignorance, people cannot get the advantages that the law provides for them. Public Interest Litigation has raised their problems in courts.
It helped to activise the administration by building pressure through media and litigation in courts.
The courts have also been sympathetic in such cases and did away with the technical procedures. In many cases, even a letter was treated as the petition.
Many public grievances that affect many people or people at large remain unredressed because no one dares or cares to come forward. Public Interest Litigation has done appreciable work in such areas.
Criticism of Public Interest Litigation
PIL is a weapon which has to be used with great care and circumspection. The judiciary has to be extremely careful to see that behind the beautiful veil of public interest ugly private malice, vested interest or publicity-seeking is not lurking. When there is material to show that a petition styled as public interest litigation is really intended to foster a private personal interest the writ petition is to be thrown out.
Sometimes public interest litigation is also resorted to for the sake of publicity. Such misuse is to be checked. Public Interest Litigation should not be misunderstood as public interest litigation or political interest litigation.
In Bandhua Mukti Morcha v. Union of India[13] Pathak and A.N.Sen J. Criticized exercise of court's jurisdiction on the basis of letter written to any judge of the court on the ground that some persons and organizations used PIL for their publicity and some judges also like cheap popularity, which is against the dignity of the court. According to the letter should be addressed to the Chief Justice and not to the particular judge.
In the case mentioned above, it was also said that the Court has no power to appoint a commission for investigation.[14]
Sometimes decisions given in PIL case land the general public in trouble because alternative arrangement involves money and time.
Public Interest Litigation can also be misused for the benefit of a particular section of the public.
Anonymous letters should not be entertained.[15]
Public Interest Litigation has flourished in India mainly because of the lack of any sense of accountability and responsibility on the part of the government. Had the Administration discharged its role faithfully and effectively, there would be no need for people to knock at the doors of the courts to assert their book without the Administration taking any steps to implement the same. On the other hand, the courts have played their role in a constructive manner with a view to promote the welfare of the people and strengthen the democratic fabric of the country. At the same time, the increase of the inflow of public interest litigation and the abuse thereof has prompted the Supreme Court to sound a precautionary note.
Constitution of India.
Jain M.P. Indian Constitutional Law, 7th Edition, Lexis Nexis.
Pandey Dr.J.N. Constitutional Law of India , 53rd Edition, Central Law Agency.
Pande J.S. Constitutional Law of India, 15th Edition, University Book House Pvt.Ltd.
Sen Sarbani. Public Interest Litigation in India: Implications for Law and Development. Manirban Calcutta Research Group.
[1] Ex Parte Sidebotham (1880) 14ch D. 458
[2] K.R. Shenoy v. Udipi Municipality AIR 1974 SC 2177
[3] Jagat Narain, "Judges and distributive justice," in Rajeev Dhavan & R. Sudarshan, eds., Judges and the
judicial powers [London: Sweet and Maxwell, 1985]
[4] AIR 1976SC1455,1458
[5] AIR 1981SC344
[6] AIR 1980 SC1579
[7] (1981)3 Scale 1137 (SC)
[8] Olga Tellis v. Bombay Municipal Corporations
[9] AIR 1982 SC149
[10] AIR 1982 SC149
[11] (1992)4 SCC 653
[12] AIR 2004 SC 561
[13] AIR1984SC802
[14] Ibid
[15] Divine Retreat Centre v. State of Kerala AIR 2008 SC 1614
This entry was posted in Volume 1 Issue 3 and tagged a tool for protection of human rights in india, pil, public interest litigation. Bookmark the permalink.
← ACID ATTACKS IN THE JUDICIAL PERSPECTIVE: SANKALP KUMAR
LENIENCY TOWARDS FEMALE CRIMINALITY IN CRIMINAL JUSTICE ADMINISTRATION – IS IT JUSTIFIABLE?: DR. MITHILESH VISHWAKARMA & SHREYA SHARMA →
We Teach you How to Research
RECOGNIZED BY STARTUPINDIA, MCI, GOVERNMENT OF INDIA. [DPIIT35711]
https://indianlegalsolution.com/ Rajawal Road, Central Hope Town, Selaquie, Dehradun. Pin code: 248197


text:
Q: AJAX call not sending I am trying to create my first AJAX call. All I am trying to do is send a message to my database that will hold a user_id, message, and date.
As of now nothing is even happening when I hit the submit button. Why is this not submitting and I'm not sure if I am creating the ajax call correctly.
What am I doing wrong?
My ajax call
$(document).ready(function () {
    $("#submit_announcement").on("click", function () {
        $user = this.value;
        $.ajax({
            url: "insert_announcements.php",
            type: "POST",
            data: "username=" + $user,
            success: function (text) {
                if (text == "Error!") {
                    alert("Unable to get user info!");
                    $(".announcement_success").fadeIn();
                    $(".announcement_success").show();
                    $('.announcement_success').html('Payment Status Changed!');
                    $('.announcement_success').delay(5000).fadeOut(400);
                    alert(data);
                } else {
                    var txtArr = text.split('|');
                }
            },
            error: function (xhr, textStatus, errorThrown) {
                alert(textStatus + "|" + errorThrown);
            }
        });
    });
});

The Form

Add New Announcement

<form action="" method="POST" id="insert_announcements">
    <textarea rows="4" cols="50" id="announcement_message " name="message" class="inputbarmessage" placeholder="Message" required></textarea>

        <input type="button" class="contactButton" value="Add Announcement" id="submit">

</form>

PHP file insert_announcements.php
$con = mysqli_connect("localhost", "", "", "");
$stmt2 = $con->prepare("INSERT INTO announcements (user_id, message, date) VALUES (?, ?, NOW())");
    if ( !$stmt2 || $con->error ) {
        // Check Errors for prepare
         die('Announcement INSERT prepare() failed: ' . htmlspecialchars($con->error));
    }
    if(!$stmt2->bind_param('isi', $announcement_user_id, $announcement_message)) {
        // Check errors for binding parameters
        die('Announcement INSERT bind_param() failed: ' . htmlspecialchars($stmt2->error));
    }
    if(!$stmt2->execute()) {
        die('Announcement INSERT execute() failed: ' . htmlspecialchars($stmt2->error));
    }
        echo "Announcement was added successfully!";
    else
    {
         echo "Announcement Failed!";
    }

A: You have the jquery selector for your button wrong, change it to:
$("#submit").on("click", function(){

A: You are triggering the click for an element with id  #submit_announcement which is different from the id of your form submit button. Change  $("#submit_announcement").on("click", function(){
to
 $("#submit").on("click", function(){

A: In your PHP you cannot echo between } and else
 }
        echo "Announcement was added successfully!";
    else

A: Use one of below event bind method :
$(document).ready(function(){
    $("#submit").on("click", function(){ console.log('reached'); /* code here */ });

    $('#insert_announcements').on('submit',function(){ /* code here */ })

 })

One of above approach should work . Your ajax code looks fine . just use one of above event bind wrapper and let the magic happen .
Update
check working fiddle here : https://jsfiddle.net/hfddcop0/
Mistakes you were making
1) specifying wrong submit button id . it is submit_announcement instead of #submit
2) Unknown variable defined called usermessage . I have replaced it with string value in fiddle .
payload should be like
data : {'message':message,'anothermessgae':another}  , You were mentioning like     data : {'message':message;} which is a syntax error .

A: Because you're not creating the function when the submit button is clicked. The button id is submit
So try:
$(document).ready(function(){
        $("#submit").on("click", function(){
            $user = this.value;
            $.ajax({
                url: "insert_announcements.php",
                type: "POST",
                data: "username="+$user,
                success: function(text){
                    if(text == "Error!"){
                        alert("Unable to get user info!");
                        $(".announcement_success").fadeIn();
                        $(".announcement_success").show();
                        $('.announcement_success').html('Payment Status Changed!');
                        $('.announcement_success').delay(5000).fadeOut(400);
                        alert(data);
                    } else {
                        var txtArr = text.split('|');
                    }
                },
                error: function(xhr, textStatus, errorThrown){
                    alert(textStatus + "|" + errorThrown);
                }
            });
        });
    });

A: You are not sending user_id, message, and date to server to get the response.
first get inputted values and then send.Like below:
var announcement_message = $("#announcement_message).val();

and instead of type,it should be method.Type in ajax is to define data type.
In html, remove method="post",define method only once.

A:  $("#submit").on("click", function(){

var usermessage = $("#announcement_message).val();
var username = "ralph"; // let say you get the username value;
var date_now = Date.now();

$.ajax({
url:"insert_announcements.php",
method:"POST",
data:{
    "user_id":username,
    "message":usermessage,
    "date":date_now

}
success:function(data){
  console.log(data); // data object will return the response when status code is 200
},
error:function(){
console.log("error");//otherwise error if status code is other than 200.
}

});

});


text:
HomeTechnologyThis devious attack could be the next evolution of ransomware
This devious attack could be the next evolution of ransomware
January 3, 2023 admin Technology 0
A ransomware operator has created a fake website of one of its victims and used it to publish sensitive content stolen in a ransomware (opens in new tab) attack.
The approach is a novelty that some security researchers believe to be a way of weaponization of the victim's clients.
Threat actors known as ALPHV (also known as BlackCat), recently successfully launch a ransomware attack against a financial services company, making off with 3.5GB of sensitive documents, including staff memos, payment forms, employee data, assets and expenses, financial data for partners, passport scans, and similar.
Typosquatted domains
The threats of leaking the data to the public obviously didn't work with the victim company, which evidently decided not to pay the ransom demand.
However, ransomware operators usually leak stolen data on the dark web, where it's available mostly to other criminals and security researchers. This time around, ALPHV created a website on a typosquatted domain, which looks and feels almost identical to the legitimate website of the victim.
Speaking to BleepingComputer, threat analyst at Emsisoft, Brett Callow, said leaking the data via a typosquatted domain could be a more damaging approach: "I wouldn't be at all surprised if Alphv had attempted to weaponize the firm's clients by pointing them to that website" Brett Callow said.
We will have to wait and see what the results of this approach would be, but it's safe to assume that if it's successful, we'll be seeing a lot more typosquatted websites leaking sensitive corporate data.
Ransomware is an ever-evolving threat. At first, the attackers would simply encrypt all of the files on target endpoints and demand payment in bitcoin.
When businesses started deploying backups, the criminals started stealing sensitive data and threatening to leak it online. In some cases, this attack is also followed by a Distributed Denial of Service (DDoS) attack that disrupts the front-end, as well as intimidation and persuasion via telephone and email.
Via: BleepingComputer (opens in new tab)
Microsoft confirms Xbox Game Pass loses five games, including Danganronpa, in January
Replacing the battery on your old iPhone or iPad will cost more, thanks to Apple
seven − five =


BSE: 500209| NSE: INFY| ISIN: INE009A01021| SECTOR: I.T.
Technically on the daily charts EquitPandit's analyst see minor support on the downside for INFY at 745- 740 levels, whereas minor resistance on the upside is capped around 765- 770 levels.
EquityPandit predicts INFY range for the week is seen from 790- 800 on upside & 720- 725 on downside.


text:
Home/US/Man convicted in the murder of Michael Jordan's father is denied parole
Man convicted in the murder of Michael Jordan's father is denied parole
Daniel Green and his co-defendant, Larry Demery, were convicted of first-degree murder and sentenced to life in prison in the July 1993 murder of James Jordan.
Green's parole was denied Friday, Thomas said. Thomas did not go into detail as to why the parole was denied.
Green's parole will be reviewed again in 2024, Thomas said.
"Daniel Green hasn't received justice since the day he was arrested, so I didn't have much hope that it would start with the parole process," said Christine Mumma, Green's attorney and executive director for the North Carolina Center on Actual Innocence.
"It's interesting how some people can be so blind to what others can clearly see. It's a bureaucracy. … They don't have to give a reason. It's easier to just say, 'Come back in three years,'" Mumma said.
In 2020, Demery was granted parole via the Mutual Agreement Parole Program, a scholastic and vocational program, according to a news release from the North Carolina Post-Release Supervision and Parole Commission. His parole date was set for August 6, 2023.
In the 2020 ESPN documentary "The Last Dance," Jordan opened up about his relationship with his father.
"He was my rock, we were very close. He constantly gave advice," Jordan said in the 10-part documentary, adding that his father gave him direction when he started to stray from sports in ninth grade.
James Jordan was killed July 23, 1993, while sleeping in his car on a highway in Lumberton, North Carolina.
Demery said he and Green had been preparing to rob a motel when the expensive car caught their eye and they changed their target. Jordan awoke and asked what was happening as he was shot, Demery said during the trial.
Demery said they had no idea who their victim was until they rifled through his possessions.
"I believe we've killed Michael Jordan's daddy," Demery said Green told him.
They took his body to a swamp near Bennettsville, South Carolina, Demery said. Witnesses at the time said the young men drove Jordan's car to pick up dates after killing him.
CNN's Madeline Holcombe contributed to this report.
convicted in the murder of Michael Jordan's father Daniel Green is denied parole - CNN us
Football Accumulators - Accumulator Tips And Bets
New Lethbridge city council officially sworn in: 'We're going to have respect for one another' - Lethbridge | Globalnews.ca
US approves transfer of American weapons from allies to Ukraine
Masks and Omicron Q&A: What kind of mask should you wear and for how long? An expert explains
Unauthorized Affiliate – error page
'Think about more than just yourself': B.C. Indigenous family with loved ones in ICU urges vaccination | Globalnews.ca
DeRozan powers Bulls past Raptors 111-108 | Globalnews.ca
Emmy Awards 2021: 7 things to know ahead of the ceremony
MetaboFix
Bowl projections 2021: What bowl game is Arkansas playing in?
Bikini Buns – New At-home Butt Shaping System
COVID-19: Western University update shows 98% of students, 97% of faculty are vaccinated – London | Globalnews.ca
CHANGE YOUR LIFE DIET | Your PERMANENT Weight Loss Solution
11-month-old girl in critical condition after she was shot in face, caught in crossfire in the Bronx
Ex-Pro Skater Sentenced To 8 Years For Selling Meth!!
Howard Stern Says Hospitals Should Turn Away Anti-Vaxxers
Bobby Shmurda Details His First Day Out Of Prison: I F*cked 10 B*tches That Day!!
YG Attends Slim 400's Funeral As Pall Bearer


Just out of curiosity, might you have an ETA for the Monolith?
Yes, the Monoliths are shipping this week. The Monolivia will be a few more weeks yet; I sent updates to everyone affected directly.
Just received mine (Europe). It's even more beautiful in real life than in photos. Also didn't have to pay import tax on it which is a big win. So super happy, can't wait to get home and build it. Might pretend to be a bit sick and head home actually.
Just got this today and I immediately built it! The powder coat of the Aperture case is absolutely amazing, it has exceeded my expectations! Thank you so much Ryan!
P.S. Also thanks for accommodating my several customer requests through email, you rock!
I may have missed it, but has anyone posted a decent video of fitting the Heavy-6 yet? Couldn't find one here or on r/mk. I wouldn't mind seeing a walkthrough before embarking on the journey myself.
Man thanks a lot for the picture. Now I feel super sad opting out Aperture and went for Tactical.
Just assembled it… I'm beyond stoked!! Thank you Ryan, you did an amazing job with this beast.
Awesome! Do you have final sales numbers, including the Monolith and Monolivia?
tactical black, so he won the lottery.
Had to join Keebtalk just to post this. This case is drop-dead GORGEOUS. The retro refrigerator color turned out to be better than even Norbauer's photos.
Please pardon my crappy cell phone camera which doesn't do this board justice. It is far more vibrant than the uploaded image.
The only single criticism that I can think of is that I could really use some thicker feet to angle the keyboard a bit more towards my fingers. Some hi-rise feet would make this go from 99.99% to 100%.
Wow. Thanks so much for the awesome feedback.
For those folks who prefer an extreme typing angle, some have reported that simply applying rubber bumpers to the rear of the housing (of the sort that can usually readily be found at hardware shops) worked well for them.
That is coincidentally what I did. Unfortunately it still didn't angle it as high as I was used to with the original FC660C housing. It is a bit better than nothing though. Might have to find higher ones. You can kinda see the angle delta between the FC660C in my pic with my Leopold FC210TP.
But seriously though. I've seen the Norbatouch before, and I gotta say that this Heavy-6 is well beyond that in quality, and the Norbatouch case is pure quality to begin with.
Absolutely awesome. I love my Norbatouch but the Heavy-6 is perfection. I'm going to say two naughty words, but I think Mr. Norbauer has defined my end game.
Wow. You like a pretty serious angle on your boards.
I like the FC660c much better with the feet out. I'll be putting bumpers on the Monolith for sure. I'm kind of tacky that way. If anyone has a suggestion for something more substantial, preferably made out of depleted uranium, I'm all ears.
Got all my Heavy-6s, they are simply stunning and I don't think I need to buy another board! Thank you!!
Added a thick Sorbothane sheet on the bottom plate.


text:
ATLAS: a Cassegrain spectrograph based on volume phase holographic gratings
Author(s): J. Gordon Robertson; Keith Taylor; Ivan K. Baldry; Peter R. Gillingham; Samuel Charles Barden
We are proposing a new spectrograph (ATLAS) which would revolutionize intermediate-dispersion observations at the AAT. Based on the new technology of volume phase holographic gratings, and using transmission optics, ATLAS offers high throughput and a wide field. It will be ideally situated to extensive surveys of faint objects. It has been designed with a collimated beam diameter of 150 mm, giving resolution (lambda) /(delta) (lambda) up to nearly 10,000 with a 1.5 arcsecond slit and good efficiency. It will be a dual-beam instrument, to maximize observing speed and allow optimized optical coatings to be used. The project is working towards its concept design review which will occur during 2000.
Proc. SPIE 4008, Optical and IR Telescope Instrumentation and Detectors, (27 March 2000); doi: 10.1117/12.395472
J. Gordon Robertson, Anglo-Australian Observatory and Univ. of Sydney (Australia)
Keith Taylor, Anglo-Australian Observatory (United States)
Ivan K. Baldry, Anglo-Australian Observatory (Australia)
Peter R. Gillingham, Anglo-Australian Observatory (Australia)
Samuel Charles Barden, National Optical Astronomy Observatories (United States)
Optical and IR Telescope Instrumentation and Detectors
Masanori Iye; Alan F. M. Moorwood, Editor(s)


Spanning more than 40,000 square kilometers (15,400 square miles), the Serengeti-Mara ecosystem in East Africa is one of the largest protected areas in the world.
A new study shows that human activities at the edges of the ecosystem are affecting wildlife migrations and pushing the animals deeper into the core of the protected area.
The displaced wildlife have less available land, triggering a cascade of events impacting soils and vegetation, putting the whole ecosystem at risk.
The study authors are calling for broader conservation strategies that address not only protected areas, but also their surroundings and local communities.
Every year, millions of wildebeests, gazelles and zebras migrate between Serengeti National Park in Tanzania and Maasai Mara National Reserve in Kenya, in one of the most iconic wildlife shows on the planet. Preserving this great migration was one of the reasons why almost 40,000 square kilometers (15,400 square miles) in East Africa were designated as protected areas in the 1950s. Communities such as the Maasai, who had lived in the region for hundreds of years, were evicted and forced to relocate. The impact of that controversial move is still felt today.
Now, new research suggests that simply creating protected areas and keeping humans away from them might not be enough to preserve biodiversity.
A study published in March in Science shows that the presence of livestock at the edges of the Serengeti-Mara ecosystem is pushing wildlife away from the margins. As a result, wild species are becoming "squeezed" into the core of the protected areas. In one of the regions analyzed, for instance, wildlife numbers within 15 kilometers (9 miles) of the boundary dropped by 50 to 75 percent between the 1970s and the 2000s.
Human activities are already having an impact on the great migration. GPS data collected over the past 20 years indicate that wildebeests now avoid the margins of protected areas. Instead, they've started to graze in more internal areas, with dire consequences for the ecosystem.
Lions in Tanzania. Image by Sue Palminteri/Mongabay.
Vegetation, dry and wet seasons, fire, and the migration of grazing animals are some of the interconnected pieces of the Serengeti-Mara ecosystem. Changes in one can potentially affect others. For example, natural fires at the end of the dry season consume the old pasture and enrich the soil, making room for lush new grass that attracts the migrating herbivores.
But now, the presence of livestock at the edges is causing intensive grazing in these areas and displacing the wildebeests. With less available land, the wild herds are also overgrazing areas at the core of the protected areas. As a consequence, the area that is annually burned by natural fires has diminished, the grass isn't as green, and the soil is becoming impoverished and less efficient at sequestering carbon dioxide.
"This is an important example of how humans can alter and potentially reduce animal movements, which can then impact ecosystem functioning," said Robert Fletcher, a researcher at the University of Florida's Department of Wildlife Ecology and Conservation, who was not involved in the study. Fletcher said these "edge effects" at the boundaries were pervasive across the world.
"Recent work suggests that 70 percent of the world's remaining forest is within 1 kilometer [0.6 miles] of a forest edge," he said.
One of the conclusions of the study is that conservation strategies have to go beyond the boundaries of protected areas.
In their paper, the authors argue that mutual agreements between local populations and governments are the way forward.
Banner image: The savannah and grasslands of the Mara conservancies are home to a spectacular abundance of wildlife, lying at the northern end of the greater Serengeti ecosystem. Photo Credit: Maasai Mara Wildlife Conservancies Association..
Ignacio Amigo is environmental journalist and editor based in Brazil with a PhD in molecular biology from the University of Sao Paulo. He is a multimedia specialist at Climate Tracker. Follow him on Twitter at @IgnacioAmigoH.


Parking had become a little more interesting with construction moving down Churchill Ave. Churchill is now one way from Carling going North to Byron.
Here are some parking suggestions.
1. There are 2 spots behind our building marked Montgomery Massage Therapy.
2. Looking at the map.. Look at Churchill and Byron…just north east you will see a dead end road called Lincoln. That is a good spot.
4. Highcroft could be a good option. It is also one way north.
Take a look at the map and have a plan before you drive down. There is plenty of parking if you don't mind walking a bit further. I will keep you updated on any changes.


HomeSoftware Testing Services Software Testing Compatibility Testing How do Independent Testing Services Increase Effectiveness of Development Process?
How do Independent Testing Services Increase Effectiveness of Development Process?
Though it is believed that programmers play the main role in software development, project profitability and time-to-market of an application depend significantly on test engineers as well. This is especially true for traditional development models such as Waterfall model.
Efficiency of game testing, web site testing, e-commerce testing, etc. affect the project budget and time spent on error fixing.
Correction of a defect requires much effort and causes many troubles when the defect is detected during final development stages. And it can be removed in no time when it is found at the stage of project planning, before writing the code.
So, test engineers bring a lot of benefits if they are involved in a project at the beginning.
Sometimes other project members treat testers like enemies when they find critical software bugs just before the release. Hostility in such a situation is groundless. Anytime something can go wrong during correction defects, updating functionality or user interface, etc.
Experts in independent testing services claim that about half of all the defects can be detected only during system testing. But the other half can be found and corrected earlier. That means that half of program errors can be removed at early stages of the development.
pay due attention to static testing, that is to thoroughly execute reviews, walkthroughs, inspections of the code.


Submit either electronic or written comments on the guidance starting March 28, 2019.
Submit electronic comments to https://www.regulations.gov in docket folder FDA-2019-D-1266.
This guidance represents the current thinking of the Food and Drug Administration (FDA, the Agency, or we) on this topic. It does not establish any rights for any person and is not binding on FDA or the public. You can use an alternative approach if it satisfies the requirements of the applicable statutes and regulations. To discuss an alternative approach, contact the FDA staff responsible for this guidance as listed on the title page.
The purpose of this document is to state the intent of the Food and Drug Administration (FDA, we, or the Agency) not to enforce the requirements of the Standards for the Growing, Harvesting, Packing, and Holding of Produce for Human Consumption regulation (21 CFR Part 112) as they apply to entities growing, harvesting, packing and holding certain commodities.
We are issuing this guidance consistent with our good guidance practices (GGP) regulation (21 CFR 10.115). This guidance is immediately effective because FDA has determined that prior public participation is not feasible or appropriate (21 CFR 10.115(g)(2)).
In this guidance, pronouns such as "you" refer to entities that are covered by this guidance.


In watching Kenneth Branagh's 2015 live-action adaptation of the 1950 animated Disney film and its 1697 source material by Charles Perrault, I found myself marveling at some of the climactic moments of romance and magic. I had imagined that there would be no surprises in the viewing experience, which was a faulty assumption despite the fact that the greatest surprise was how easily I was swept up in the grand visual spectacle of the romance. Perhaps it says something about the power of nostalgia that the moments which affected me most were those that reminded me of the animated classic, but I am still simply impressed that a curtsy could be so magnificently executed that it caused me to rewind and re-watch. Unnecessary as this film may have been, Cinderella stands as the best in Disney's slew of cash-grab live-action adaptations, free from cynical updates or feminist revisionism.
With Branagh handling the material with the same reverence and respect that he has often given to his Shakespeare adaptations, Cinderella's strength comes from its sincerity. The performances are grounded in reality while even the most magnificent visual spectacle feels restrained and elegant, with costumes by three-time Oscar winner Sandy Powell elevating the romance to heights that feel absolutely magical. These costumes would be nothing without the actors wearing them, however, and Lily James is excellent as the kind and courageous title princess, shining brightest while dressed in that iconic blue dress. Just as marvelous is Cate Blanchett's stylish portrayal of the evil stepmother, embodying the poise of Joan Crawford rather than turning the villain into a one-dimensional caricature. My only complaints about the costuming came in the form of the prince's impossibly tight-fitting pants, which caused all sorts of problems for production and actor Richard Madden. It made me uncomfortable just to watch.
There are plenty of other actors who shine in supporting roles, though the extra padding to the narrative adds in enough unnecessary scenes of these characters to feel slightly bloated. The inclusion of a hammy performance by Rob Brydon as the palace painter within a scene of dry exposition felt forced and out of place, leaving me longing for more sequences of the silent CGI mice, or a quicker path to the ballroom. Even Helena Bonham Carter was a bit too cartoonish as the fairy godmother, mistakenly giving the type of over-the-top performance she typically reserves for a Tim Burton film. Whereas Branagh was able to capture the romance and magic with elegance and poise, the strained attempt to cram childish humor into the narrative causes the filmmaker to stumble.
There was no need to make this film, beyond Disney's need to bleed their audience of as much money as possible, but that doesn't make the end product worthless. While this version is unlikely to replace the animated film for many nostalgic viewers, it does provide the best live action adaptation of the material yet. And even if I am justified in complaining about the greedy corporation that is Disney, this is unlikely to affect the appreciation of the film from young audience members seeing this tale on the big screen for the first time. And part of me is just relieved that Ella was not turned into a sword-wielding princess or forced to embody a feminist agenda with a dismissal of romantic love. The message of kindness and courage may seem passive to some, but I never found the heroine to appear weak in her willingness to be forgiving and compassionate.
The Blu-ray release seems almost a must for a film so visually stunning, if only to catch the many nuances of that spectacular blue ballroom dress. Along with a DVD and Digital HD copy of the film, the Blu-ray package comes with a handful of extras that include 12 minutes of additional scenes and the theatrical short released with the film, "Frozen Fever." Among the additional scenes are more moments from the childhood sequence for Cinderella, though this was the portion of the film which already felt too heavily padded. There are also several featurettes showing the tricks of the filmmaking process, as well as interviews with key cast and crew members about the nostalgia of the narrative and difficulties within the adaptation. One of the featurettes focuses on the creation of Ella's computer generated animal companions while another is about the construction of the crucial ballroom sequence.


With the success the gaming industry enjoys today, it's hard to believe there was almost a point where it all went bankrupt. Ahoy released a new video giving a brief and visually entertaining breakdown of what all went down in case you weren't around to witness it back then.
If you enjoy this short video I highly suggest you check out Atari: Game Over on Netflix! It covers this subject in depth, and has some really interesting interviews from people who were on the inside at the time.
Engineer Ben Heck Makes Giant Working Gameboy!


text:
In 3D printing, its common to get big news weekly. At least, that's been the trend the past eight years (as long as I have been in this industry). Probably the biggest recent news in 3D printing was the latest funding round closed by Carbon, in which $260M was pledged by various big-name groups, bringing the company's total fundraising since its inception to a reported $680M+.
This poses several questions which perhaps could be best summarized by a broader one –is Carbon really a startup anymore? Should it now be considered one of 3D printing's heavyweights, alongside much larger, more historied competitors such as 3D Systems, HP, Stratasys, and the like?
Why the Money?
In order to put some context behind Carbon's excellent fundraising performance, it's important to understand the reasons that this business might attract big money.
As a company, Carbon has crafted a catchy, compelling brand and message all the way from its beginning. It's very easy to see how big investors might be wowed. Carbon seems to inherently know the things to say, and what to highlight, in order to secure the dollars.
Beyond talk and branding, SmarTech believes that Carbon is sitting on something special. Carbon's value proposition is often conveyed in a way that is meant to be cool, catchy, an in tropes that are becoming a bit tiresome in the industry (10x faster speeds!). But the reality is that Carbon's technology platform and its business model really are setting Carbon apart from the rest of the industry.
In particular, we think that investors aren't getting a full picture of Carbon if they don't understand the role that Digital Light Synthesis (Carbon's slickly named printing process) might play in the broader world of polymeric 3D printing, and even broader plastics manufacturing.
Such "high speed" or "layerless" photopolymerization technologies are perhaps the most interesting thing to happen to plastic 3D printing since, well, the invention of the traditional photopolymerization printing technologies, which were the first true 3D printing technologies.
Carbon isn't the only firm to offer this type of technology for a 3D printing platform – at some level, 3D Systems and EnvisionTEC also offer a similar process being leveraged in different ways and with relatively minor mechanical differences. Newcomers like Nexa3D and Origin also have relatively similar printing capabilities but aren't as far along in establishing a serious 3D printing business as the other firms mentioned above.
At their core, these processes utilize a projector and some form of curing inhibitor mechanics to eliminate the layer-by-layer printing dynamic. What sets Carbon apart today, however, is its control of the printing mechanics combined with a mastery of the chemistry required to create optimized printing materials for big-time applications.
Layerless photopolymerization does appear to be positioned to be potentially competitive with injection molding to a serious degree, especially if it is supported by material development, competent software to manage the complexities of a digital production process, and sufficient customer support. Through this lens, Carbon is probably the most advanced of its peers, but it still has some ways to go.
So, it makes sense for investors to put money into this technology. There are a huge number of players in plastic 3D printing attempt to advance the technology into the territory of injection molding, but Carbon is one of the furthest ahead in terms of taking business from molding technologies.
Carbon: A 3D Printing Heavyweight?
Carbon isn't yet a 3D printing heavyweight, and this should not come as a shock to anyone, especially its investors:
Compared to 3D Systems, Carbon doesn't have near the product portfolio (to say nothing of its global network of resellers and parts printing service partners), or the expertise in high impact markets like healthcare. However, here I would champion Carbon's abilities in the consumer goods market, an area in which it has leapfrogged much of its competition. In 2018 3D Systems held a 16% share of the market.
Compared to HP, which is closer to Carbon in terms of breadth of technology portfolio, it goes without saying that Carbon doesn't have the global manufacturing resources or sales channels of a $50 billion company. Little to compare there. However, Carbon's recently raised funds are expected to go largely towards an international expansion. HP is pushing its technology into familiar markets for powder based plastic printing, while Carbon is mainly charting new territory for photopolymer-based printing (if you exclude the more recently launched dental business). In 2018 HP owned 4% of the market.
There aren't many good comparisons between Carbon and Stratasys. Carbon appears to be growing very rapidly after reporting significant increases in printer utilization metrics from its customers over the last year and has told SmarTech to be adding new dental lab customers almost weekly. Stratasys hasn't been profitable in nearly six years, has been searching for a CEO for over a year, its revenues have been stagnant for four years, and six years ago probably made one of the most grossly over-valued acquisitions in recent tech industry. Still, the company owned a 14% share of the market.
Comparing the company's revenues in its targeted segment vs the major players shows Carbon to be a very minor player. In 2018 it garnered .6% of a $1.744 billion (USD) market. However, roughly 2/3 of the market exists outside of 3D Systems, Stratasys and HP and each company has their own vulnerabilities.
Heavyweight or not, Carbon has successfully convinced investors that it compares favorably to the AM industry giants in various ways, at least sufficiently for those investors to open wide their checkbooks.
by Scott Dunham
Vice President of Research
SmarTech Analysis
scott@smartechpublishing.com
PrevPreviousFive Thoughts on the State of Metal Additive Manufacturing by Scott Dunham
Nickel Superalloys Demonstrate What the Future of Metal AM Materials Looks Like


POUGHKEEPSIE, N.Y., April 10, 2019 /PRNewswire/ -- What if ancient civilizations reached three or four times farther back in human history than you think? What if there was evidence that they existed 5,000 or even 10,000 years earlier than has previously been postulated?
Well, that's exactly what the nonprofit Organization for the Research of Ancient Cultures (ORACUL) has in mind, as it joins with film-maker Jim Fields (End of the Century: The Story of the Ramones; Time Online) to produce a groundbreaking documentary based on geological and archaeological discoveries stretching from the feet of the Great Sphinx in Egypt to the crumbling ruins of Göbekli Tepe in Turkey.
In May, Fields is scheduled to travel to Egypt with ORACUL to gather preliminary footage for the Kickstarter-funded film, but ORACUL Executive Director Brett Miller says the Sphinx is only the first scheduled stop. "Geologist and Boston University faculty member Robert Schoch, an ORACUL founder, has already established an evidenced-based theory that the Sphinx is probably 7,500 years older than it's currently dated. The project is slated to delve not just into that phenomenon, but also into underwater structures, ice core samples, ancient petroglyphs, plasma events and astronomical evidence ─ compelling, worldwide pieces of the puzzle that come together for the first time on film."
"As more and more evidence surfaces," says Miller, "so do intriguing questions about the probability of global cataclysmic events at the end of the last ice age, and the fate of technologically sophisticated cultures from a much earlier cycle of civilization. ORACUL," he says, "is poised to produce the definitive, serious documentary about humanity's remote and forgotten past."