imagerotate (PHP 4 >= 4.3.0, PHP 5, PHP 7) imagerotate — 用给定角度旋转图像 说明 resource imagerotate ( resource $image , float $angle , int $bgd_color [, int $ignore_transparent = 0 ] ) 将 src_im 图像用给定的 angle 角度旋转。bgd_color 指定了旋转后没有覆盖到的部分的 颜色。 旋转的中心是图像的中心，旋转后的图像会按比例缩小以适合目标图像的大小——边缘不会 被剪去。 参数 image 由图象创建函数(例如imagecreatetruecolor())返回的图象资源。 angle Rotation angle, in degrees. The rotation angle is interpreted as the number of degrees to rotate the image anticlockwise. bgd_color Specifies the color of the uncovered zone after the rotation ignore_transparent 如果被设为非零值，则透明色会被忽略（否则会被保留）。 返回值 返回旋转后的图像资源，或者在失败时返回 FALSE。 更新日志 版本 说明 5.1.0 新增： ignore_transparent 。 范例 Example #1 将图像旋转 180 度 本例将把一幅图像旋转 180 度——上下颠倒。 以上例程的输出类似于： 例子的输出：将图像旋转 180 度 注释 Note: 此函数仅在与 GD 库捆绑编译的 PHP 版本中可用。 User Contributed Notes 43 notes =============================================================================== After some INet searches and personal try-and-failures I succeed to rotate PNG images with preserving alpha channel transparency (semi transparency). =============================================================================== An issue with imagerotate() is it might need more memory than what is available. It was failing in my script so I tried to increase it with ini_set ('memory_limit', '256M') and everything works fine now. =============================================================================== I've benchmarked three methods described here for rotating an image. I used a 1600 x 1200 jpeg picture that was duplicated ten times on the disk. I looped through them to apply a CW rotation using either method. First algorithm (the "imagesetpixel" algorithm): Second algorithm (the "imagecopy" algorithm): Third algorithm (the "imagerotate" algorithm): In each step of the loop, the image is loaded, rotated then a copy is written on the disk. Here are the results: imagesetpixel algorithm: the 10 pictures were processed in 29 seconds imagecopy algorithm: the 10 pictures were processed in 26 seconds imagerotate algorithm: the 10 pictures were processed in 2 seconds (no typo here) Writing the pictures on the disk allowed me to control the results. Every resulting picture was the same (tested with winmerge). Conclusion: imagerotate is way faster than other "home-made" algorithms. I ran the tests several times to see if the difference between imagesetpixel and imagecopy was introduced by my computer's independent activity, but I always got that 10% difference. Note: the picture I used was taken from a camera, so no transparency was involved. I ran the tests on Windows XP using PHP Version 5.3.0 =============================================================================== Keep in mind this function rotates counterclockwise. if you want to go 90 degrees clockwise, you have to tell imagerotate to go 270 degrees counter-clockwise. $angle = 360-$angle; =============================================================================== I was quite surprised to see that no one had done any working rotate function. And since I needed one for my web hotel, I whipped this one up. Someone might want to expand it so that it matches imagerotate. Also, does imagerotate really rotate things counter clockwise? Otherwise this should also be changed. = 0 && $srcX < $srcw && $srcY >= 0 && $srcY < $srch) { $color = imagecolorat($srcImg, $srcX, $srcY ); } else { $color = $bgcolor; } imagesetpixel($destimg, $x-$minX, $y-$minY, $color); } } return $destimg; } ?> =============================================================================== I modified cbl25's function to allow it to rotate an image either clock wise or counter clock wise. $height ? $width : $height; $imageSquare = imagecreatetruecolor($side, $side); imagecopy($imageSquare, $image, 0, 0, 0, 0, $width, $height); imagedestroy($image); $imageSquare = imagerotate($imageSquare, $degrees, 0, -1); $image = imagecreatetruecolor($height, $width); $x = $degrees == 90 ? 0 : ($height > $width ? 0 : ($side - $height)); $y = $degrees == 270 ? 0 : ($height < $width ? 0 : ($side - $width)); imagecopy($image, $imageSquare, 0, 0, $x, $y, $height, $width); imagedestroy($imageSquare); return $image; } //Usage $image = rotateImage($image, 'cw'); $image = rotateImage($image, 'ccw'); ?> =============================================================================== This function apparently contains a memory leak. Because of this, it was kept out of the GD library that comes with Ubuntu (and I assume other OS'es, too). So, If you are running Ubuntu and wonder why you get "Call to undefined function imagerotate()" even though you seemingly have the correct GD lib installed, this is why. Use the alternative supplied by beau at dragonflydevelopment dot com instead. It works flawlessly (for angles in steps of 90 degrees). On a side-note, some other GD image functions (unfortunately, the more interesting ones) suffer from the same problem and are kept out of the Ubuntu distribution as well. =============================================================================== As an alternative to the GD rotateImage() function, this is an easy way to rotate images by 90 degrees ccw *without* loosing transparency: =============================================================================== Note that the image resource returned from the imagerotate() function is an entirely different image resource from your original one. This will output: resource(2, gd) resource(3, gd) =============================================================================== I had a problem with a png image containing transparent colors, but found a solution that works for me. So i thought i might share it: =============================================================================== I believe the rotateImage function below is incorrect. The 180 rotation was actually doing a vertical mirror instead of rotating 180 degrees. The change was $i to $width - $i. you can call it this way: =============================================================================== I wanted to draw a transparent GIF-image and show it on a page, at an angle specified in the URL: I used the native imagerotate() but at angles of 90, 180, etc. the old background colour would become non-transparent. Apparently, there's a bug somewhere in GD, and has been for ages. My solution below: =============================================================================== Don't be tricked into thinking this function will rotate the image resource handle in-place. While the documentation currently doesn't specify and return values, I've found the following return values to be true: "Returns an image resource identifier on success, FALSE on errors. " Simply make sure you're doing something like... -Mike =============================================================================== Hi, I've rewrote function to class with static methods. Advantage of this solution is ability to be called several times during script execution. = 0 && $srcX < $srcw && $srcY >= 0 && $srcY < $srch) { $color = imagecolorat($srcImg, $srcX, $srcY ); } else { $color = $bgcolor; } imagesetpixel($destimg, $x-$minX, $y-$minY, $color); } } return $destimg; } } ?> =============================================================================== There is a slight mistake in the previous post by Kae Cyphet. When setting the pixels of the new image the co-ordinates have to occasionally use the width ($wid) and height ($hei). These values must be reduced by 1 as the co-ordinates start at 0 (Not 1) so they only go up to $wid - 1 and $hei - 1 (Not $wid and $hei). Here's an example of the first function to show this: Other than that very useful functions! =============================================================================== To solve that annoying problem of having to install a pre-compiled version of GD just to get imagerotate working. here is an open source solution. uses the standard stuff included in php when you uncomment 'extension= php_gd2.dll' in the php.ini file and there ya go! Useage: '================================= =============================================================================== About that rotating function by david at horizon-nigh not working, I found the bug. I noticed that the x1 and y1 where not used, so, in the loop through every pixel and transform it, change $x2 = $x * cos($theta) - $y * sin($theta); $y2 = $x * sin($theta) + $y * cos($theta); to: $x2 = $x1 * cos($theta) - $y1 * sin($theta); $y2 = $x1 * sin($theta) + $y1 * cos($theta); =============================================================================== =============================================================================== For those who are looking for the GD library for Ubuntu, I let a copy on my server: http://www.cartefoi.net/compl_compl_2.php It was pretty hard to find, somebody gaveme his. Thanks a lot to him (message up). =============================================================================== I'm now using david's code with these changes to get a transparent effect. I exec convert 2 times: and then use this after I rotated $output: =============================================================================== I couldn't get the replacements from 'the dot thawk' or 'pilot' to work for some reason, so here's my own replacement. It uses ImageMagick; binary must be installed, and you may need to modify the search path. (I didn't use PHP's ImageMagick support for my own reasons.) =============================================================================== Here is a simple function to rotate a non-square image 90 degrees clockwise. $height ? $width : $height; $squareImage = imagecreatetruecolor($side, $side); imagecopy($squareImage,$imageResource,0,0,0,0,$width,$height); $squareImage = imagerotate($squareImage,270,0,-1); $imageResource = imagecreatetruecolor($height, $width); $x = $height > $width ? 0 : $side - $height; imagecopy($imageResource,$squareImage,0,0,$x,0,$height,$width); return $imageResource; } ?> =============================================================================== In response to pilot at myupb dot com on 31-May-2008 02:23 --- I am not sure why you would be defining your own PI, instead of using the built-in constant, and why you do the degrees to radian conversion manually. There might be a speed issue, however here is the exact same code with that small difference. $maxx) $maxx = $x2; if($x2 < $minx) $minx = $x2; if($y2 > $maxy) $maxy = $y2; if($y2 < $miny) $miny = $y2; } } // Determine the new image size $dstw = $maxx - $minx + 1; $dsth = $maxy - $miny + 1; // Create our new image $dstImg = imagecreatetruecolor($dstw, $dsth); // Fill the background with our transparent color if($transparentColor == null) $transparentColor = imagecolorallocate( $dstImg, 1, 2, 3); imagecolortransparent($dstImg, $transparentColor); imagefilledrectangle($dstImg, 0, 0, $dstw + 1, $dsth + 1, $transparentColor); // Get the new origin $neworiginx = -$minx; $neworiginy = -$miny; // Fill in the pixels foreach($pixels as $data) { list($x, $y, $color) = $data; list($newx, $newy) = translateCoordinate($neworiginx, $neworiginy, $x, $y); imagesetpixel($dstImg, $newx, $newy, $color); } return $dstImg; } /** * Translates from mathematical coordinate system to computer coordinate system using * origin coordinates from the computer system or visa versa * * @param int $originx * @param int $originy * @param int $x * @param int $y * @param bool $toComp * @return array(int $x, int $y) */ function translateCoordinate($originx, $originy, $x, $y, $toComp=true) { if($toComp) { $newx = $originx + $x; $newy = $originy - $y; } else { $newx = $x - $originx; $newy = $originy - $y; } return array($newx, $newy); } } ?> =============================================================================== Shortly after posting I was informed about a very nice algorithm for calculating the new pixel position for a rotation and thought it would be a nice improvement. Hopes this helps anyone needing a full implementation. Note: I tested the function on a 3Mb photo and it seemed to work perfectly with no quality loss. $maxx) $maxx = $x2; if($x2 < $minx) $minx = $x2; if($y2 > $maxy) $maxy = $y2; if($y2 < $miny) $miny = $y2; } } // Determine the new image size $dstw = $maxx - $minx + 1; $dsth = $maxy - $miny + 1; // Create our new image $dstImg = imagecreatetruecolor($dstw, $dsth); // Fill the background with our transparent color if($transparentColor == null) $transparentColor = imagecolorallocate( $dstImg, 1, 2, 3); imagecolortransparent($dstImg, $transparentColor); imagefilledrectangle($dstImg, 0, 0, $dstw + 1, $dsth + 1, $transparentColor); // Get the new origin $neworiginx = -$minx; $neworiginy = -$miny; // Fill in the pixels foreach($pixels as $data) { list($x, $y, $color) = $data; list($newx, $newy) = translateCoordinate($neworiginx, $neworiginy, $x, $y); imagesetpixel($dstImg, $newx, $newy, $color); } return $dstImg; } /** * Translates from mathematical coordinate system to computer coordinate system using * origin coordinates from the computer system or visa versa * * @param int $originx * @param int $originy * @param int $x * @param int $y * @param bool $toComp * @return array(int $x, int $y) */ function translateCoordinate($originx, $originy, $x, $y, $toComp=true) { if($toComp) { $newx = $originx + $x; $newy = $originy - $y; } else { $newx = $x - $originx; $newy = $originy - $y; } return array($newx, $newy); } } ?> =============================================================================== Thanks to the people who contributed the code for the 90 180 and 270 rotations. I needed a full implementation however so I wrote one. By no mean do I think this is the best way of doing it, I just whipped this together for myself. Seems to work good for me. Note: I didn't want the image to be shrunk when rotating so this implementation will keep the size of the original image but just rotate it. 0 && $y1 > 0) { // Quadrant 1 $theta1 = atan($y1/$x1); } elseif($x1 < 0 && $y1 > 0) { // Quadrant 2 $theta1 = $pi - atan($y1/abs($x1)); } elseif($x1 < 0 && $y1 < 0) { // Quadrant 3 $theta1 = $pi + atan($y1/$x1); } elseif($x1 > 0 && $y1 < 0) { // Quadrant 4 $theta1 = 2 * $pi - atan(abs($y1)/$x1); } elseif($x1 == 0 && $y1 > 0) { $theta1 = $pi / 2; } elseif($x1 == 0 && $y1 < 0) { $theta1 = 3 * $pi / 2; } elseif($x1 > 0 && $y1 == 0) { $theta1 = 0; } elseif($x1 < 0 && $y1 == 0) { $theta1 = $pi; } else { // Only case left should be $x1 == 0 && $y1 == 0 $noTranslate = true; } // Translate the position if(!$noTranslate) { // Calculate the new angle $theta2 = $theta1 + $theta; // Make sure theta2 is in between 0 - 2pi while($theta2 < 0) $theta2 += 2 * $pi; while($theta2 > (2 * $pi)) $theta2 -= 2 * $pi; $radius = sqrt($x1*$x1 + $y1*$y1); $x2 = ($radius * cos($theta2)); $y2 = ($radius * sin($theta2)); } else { $x2 = $x1; $y2 = $y1; } // Store the pixel color $pixels[] = array($x2, $y2, imagecolorat($srcImg, $x, $y)); // Check our boundaries if($x2 > $maxx) $maxx = $x2; if($x2 < $minx) $minx = $x2; if($y2 > $maxy) $maxy = $y2; if($y2 < $miny) $miny = $y2; } } // Determine the new image size $dstw = $maxx - $minx + 1; $dsth = $maxy - $miny + 1; // Create our new image $dstImg = imagecreatetruecolor($dstw, $dsth); // Fill the background with our transparent color if($transparentColor == null) $transparentColor = imagecolorallocate( $dstImg, 1, 2, 3); imagecolortransparent($dstImg, $transparentColor); imagefilledrectangle($dstImg, 0, 0, $dstw + 1, $dsth + 1, $transparentColor); // Get the new origin $neworiginx = -$minx; $neworiginy = -$miny; // Fill in the pixels foreach($pixels as $data) { list($x, $y, $color) = $data; list($newx, $newy) = translateCoordinate($neworiginx, $neworiginy, $x, $y); imagesetpixel($dstImg, $newx, $newy, $color); } return $dstImg; } /** * Translates from mathematical coordinate system to computer coordinate system using * origin coordinates from the computer system or visa versa * * @param int $originx * @param int $originy * @param int $x * @param int $y * @param bool $toComp * @return array(int $x, int $y) */ function translateCoordinate($originx, $originy, $x, $y, $toComp=true) { if($toComp) { $newx = $originx + $x; $newy = $originy - $y; } else { $newx = $x - $originx; $newy = $originy - $y; } return array($newx, $newy); } } ?> =============================================================================== otimized integration from 23-Feb-2007 04:21 just put it anywhere you like to use imagerotate with 90, 180, 270 degrees. = $src_y) { $dest_x = $src_y; $dest_y = $src_x; } $rotate=imagecreatetruecolor($dest_x,$dest_y); imagealphablending($rotate, false); switch ($angle) { case 270: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $dest_x - $y - 1, $x, $color); }} break; case 90: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $y, $dest_y - $x - 1, $color); }} break; case 180: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $dest_x - $x - 1, $dest_y - $y - 1, $color); }} break; default: $rotate = $src_img; } return $rotate; }} ?> =============================================================================== imagerotate seems to be very fussy about handling transparency when copymerging onto another image. You can use the GD library's other transparency features to cover up the fact imagerotate gets it wrong HOWEVER it will only work if the top-left corner of the image is transparent at all rotations, so make the image a little bigger than it needs to be. This has been tested with png32 but does not work entirely for png8, as a phenomena creates noise around the rotated image. Note. $intHeading is in degrees clockwise :) =============================================================================== image = imagerotate($this->image, $degrees, 0); else { function imagerotate($src_img, $angle) { $src_x = imagesx($src_img); $src_y = imagesy($src_img); if ($angle == 180) { $dest_x = $src_x; $dest_y = $src_y; } elseif ($src_x <= $src_y) { $dest_x = $src_y; $dest_y = $src_x; } elseif ($src_x >= $src_y) { $dest_x = $src_y; $dest_y = $src_x; } $rotate=imagecreatetruecolor($dest_x,$dest_y); imagealphablending($rotate, false); switch ($angle) { case 270: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $dest_x - $y - 1, $x, $color); } } break; case 90: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $y, $dest_y - $x - 1, $color); } } break; case 180: for ($y = 0; $y < ($src_y); $y++) { for ($x = 0; $x < ($src_x); $x++) { $color = imagecolorat($src_img, $x, $y); imagesetpixel($rotate, $dest_x - $x - 1, $dest_y - $y - 1, $color); } } break; default: $rotate = $src_img; }; return $rotate; } $this->image = imagerotate($this->image, $degrees); } } ?> =============================================================================== with large file, where imagerotate is missing, you can use, when possible "convert" command from ImageMagick. Here is a sample script. =============================================================================== I liked the rotateImageBicubic function implemented by darren at lucidtone dot com. But it just snipped off the parts of the image that were outside the original image. I fixed this, even though I admit that my solution is a bit naive. But it might come in handy for somebody. Also his bicubic implementation was broken on my machine so I left it out, if you need it just copy and paste it from above. $value) { $value[0]-=$center_x; //Translate coords to center for rotation $value[1]-=$center_y; $temp=array(); $temp[0]=$value[0]*$cosangle+$value[1]*$sinangle; $temp[1]=$value[1]*$cosangle-$value[0]*$sinangle; $corners[$key]=$temp; } $min_x=1000000000000000; $max_x=-1000000000000000; $min_y=1000000000000000; $max_y=-1000000000000000; foreach($corners as $key => $value) { if($value[0]<$min_x) $min_x=$value[0]; if($value[0]>$max_x) $max_x=$value[0]; if($value[1]<$min_y) $min_y=$value[1]; if($value[1]>$max_y) $max_y=$value[1]; } $rotate_width=round($max_x-$min_x); $rotate_height=round($max_y-$min_y); $rotate=imagecreatetruecolor($rotate_width,$rotate_height); imagealphablending($rotate, false); imagesavealpha($rotate, true); //Reset center to center of our image $newcenter_x = ($rotate_width)/2; $newcenter_y = ($rotate_height)/2; for ($y = 0; $y < ($rotate_height); $y++) { for ($x = 0; $x < ($rotate_width); $x++) { // rotate... $old_x = round((($newcenter_x-$x) * $cosangle + ($newcenter_y-$y) * $sinangle)) + $center_x; $old_y = round((($newcenter_y-$y) * $cosangle - ($newcenter_x-$x) * $sinangle)) + $center_y; if ( $old_x >= 0 && $old_x < $src_x && $old_y >= 0 && $old_y < $src_y ) { $color = imagecolorat($src_img, $old_x, $old_y); } else { // this line sets the background colour $color = imagecolorallocatealpha($src_img, 255, 255, 255, 127); } imagesetpixel($rotate, $x, $y, $color); } } return($rotate); } ?> =============================================================================== Here's a function that implements right angle (multiplicity of 90 degs - 90, 180, 270) rotation if you need one but lacks native imagerotate() or you don't want non-square images to be scaled down as with imagerotate(). As you probably noticed it's not self contained function, as 180 rotation is handled by ImageFlip() function to gain the performance. The ImageFlip() function used is published here: http://php.net/imagecopy in the comment of mine placed on 05-Jan-2005 04:30 Please note: that in case of 0 degrees rotation handle to imgSrc is returned which may lead to problems if you imagedestroy() it undonditionaly. To solve that you shall add imagecopy($imgDest, $imgSrc, 0,0, 0,0,$srcX, $srcY) in proper place which I have intentionally ommited to save memory resources 90 degs, // 96->90 degs) // returns GD image handle of rotated image. function ImageRotateRightAngle( $imgSrc, $angle ) { // ensuring we got really RightAngle (if not we choose the closest one) $angle = min( ( (int)(($angle+45) / 90) * 90), 270 ); // no need to fight if( $angle == 0 ) return( $imgSrc ); // dimenstion of source image $srcX = imagesx( $imgSrc ); $srcY = imagesy( $imgSrc ); switch( $angle ) { case 90: $imgDest = imagecreatetruecolor( $srcY, $srcX ); for( $x=0; $x<$srcX; $x++ ) for( $y=0; $y<$srcY; $y++ ) imagecopy($imgDest, $imgSrc, $srcY-$y-1, $x, $x, $y, 1, 1); break; case 180: $imgDest = ImageFlip( $imgSrc, IMAGE_FLIP_BOTH ); break; case 270: $imgDest = imagecreatetruecolor( $srcY, $srcX ); for( $x=0; $x<$srcX; $x++ ) for( $y=0; $y<$srcY; $y++ ) imagecopy($imgDest, $imgSrc, $y, $srcX-$x-1, $x, $y, 1, 1); break; } return( $imgDest ); } ?> =============================================================================== Here's a neat function for those of us who don't have imagerotate() on our servers. It's based on a comment from ron at korving dot demon dot nl on the manual page for imagecopyresampled. I'm still not 100% on coping with transparency, but this function seems to cope okay. It doesn't resize to fit within bounds, it just rotates and you lose anything outside the image box. The bicubic mode is slooow. If you want to be able to change the background colour, pass in a colour and use it where indicated. The line I used just sets it transparent. = 0 && $old_x < $src_x && $old_y >= 0 && $old_y < $src_y ) { if ($bicubic == true) { $sY = $old_y + 1; $siY = $old_y; $siY2 = $old_y - 1; $sX = $old_x + 1; $siX = $old_x; $siX2 = $old_x - 1; $c1 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY2 )); $c2 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY )); $c3 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY2 )); $c4 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY )); $r = ($c1['red'] + $c2['red'] + $c3['red'] + $c4['red'] ) << 14; $g = ($c1['green'] + $c2['green'] + $c3['green'] + $c4['green']) << 6; $b = ($c1['blue'] + $c2['blue'] + $c3['blue'] + $c4['blue'] ) >> 2; $a = ($c1['alpha'] + $c2['alpha'] + $c3['alpha'] + $c4['alpha'] ) >> 2; $color = imagecolorallocatealpha($src_img, $r,$g,$b,$a); } else { $color = imagecolorat($src_img, $old_x, $old_y); } } else { // this line sets the background colour $color = imagecolorallocatealpha($src_img, 255, 255, 255, 127); } imagesetpixel($rotate, $x, $y, $color); } } return $rotate; } ?> =============================================================================== imagerotate does not preserve the alpha channel, so if you want to rotate a PNG you need to get creative. I don't see any command to retrieve the alpha information from an image (as far as I could see,) so you'll have to do a bit of manual labor before hand. In my case I created a second PNG file with the alpha saved as RGB data and manually "copied" the data from source to destination: > 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF; $rgb = imagecolorat($top_alpha,$theX,$theY); $a = $rgb & 0xFF; $a = 127-floor($a/2); $myColor = imagecolorallocatealpha($top,$r,$g,$b,$a); imagesetpixel($dst,($theX+$offsetX),($theY+$offsetY),$myColor); } } } ?> =============================================================================== The default direction of imageRotate() is counter clockwise. Heres a little function which solves the problem. =============================================================================== // angle in degrees, clockwise, allowed values from 0 to 360 degrees function rotateImage ($image, $angle) { if ( ($angle < 0) || ($angle > 360) ) { exit ("Error, angle passed out of range: [0,360]"); } $width = imagesx ($image); $height = imagesy ($image); $dstImage = imagecreatetruecolor ($width, $height); if ( ($angle == 0) || ($angle == 360) ) { // Just copy image to output: imagecopy ($dstImage, $image, 0, 0, 0, 0, $width, $height); } else { $centerX = floor ($width / 2); $centerY = floor ($height / 2); // Run on all pixels of the destination image and fill them: for ($dstImageX = 0; $dstImageX < $width; $dstImageX++) { for ($dstImageY = 0; $dstImageY < $height; $dstImageY++) { // Calculate pixel coordinate in coordinate system centered at the image center: $x = $dstImageX - $centerX; $y = $centerY - $dstImageY; if ( ($x == 0) && ($y == 0) ) { // We are in the image center, this pixel should be copied as is: $srcImageX = $x; $srcImageY = $y; } else { $r = sqrt ($x * $x + $y * $y); // radius - absolute distance of the current point from image center $curAngle = asin ($y / $r); // angle of the current point [rad] if ($x < 0) { $curAngle = pi () - $curAngle; } $newAngle = $curAngle + $angle * pi () / 180; // new angle [rad] // Calculate new point coordinates (after rotation) in coordinate system at image center $newXRel = floor ($r * cos ($newAngle)); $newYRel = floor ($r * sin ($newAngle)); // Convert to image absolute coordinates $srcImageX = $newXRel + $centerX; $srcImageY = $centerY - $newYRel; } $pixelColor = imagecolorat ($image, $srcImageX, $srcImageY); // get source pixel color imagesetpixel ($dstImage, $dstImageX, $dstImageY, $pixelColor); // write destination pixel } } } return $dstImage; } =============================================================================== Note, of the rotate functions below, only beau's worked for me. Not sure if it is because of my source image, but upon rotating, the background became blue. The code snippet below is what I used to prepare UPS shipping labels. The UPS xml api will return a base64 encoded gif, but it is sideways, so as to print on the top half of a 8.5x11 "letter" page. We are saving it in a database and sending it to a label printer, so needed it rotated... The other code further down didn't make the background blue, however it did make the image leave the canvas by about 50%. Additionally, the imagecolorallocate() function has an example describing how to set the background color. That didn't work for me. Even though the blue BG is #0000ff, using that code didn't work, I had to use the transparent trick below. The GD image functions may be in their infancy, however are a great reminder to me how powerful php is! Also, ubuntu apache users will need to apt-get install php5-gd to get the gd functions. shipmentLabelGraphicImage ); $image=$this->rotateImage($image, 90); // Note: rotateImage turns our background to blue! $blue = imagecolorallocate($image, 0, 0, 255); imagecolortransparent($image, $blue); // make blue transparent, so image isn't goofy imagepng($image,$this->shipmentTrackingNumber.".png"); echo '
'; imagedestroy($image); ?> =============================================================================== This function will rotate the image. The image will be resampled completely. you can call it this way: =============================================================================== And you can add a transparent background to you png image by change the to =============================================================================== If you're going to do a rotation by hand instead of using the imagerotate function, you can use the imagecopy function to copy a single pixel instead of determining the pixel color and setting the pixel. Not only is this shorter and cleaner, but it also works with images that are not truecolor (on my system, imagecolorat fails with an image that is not truecolor). =============================================================================== hi, if you have a image with transparent color in previous function "function rotateImage($img1, $rec)" just before "return $img2;" you have to do: imagecolortransparent($img2, imagecolorallocate($img2, 0, 0, 0)); Best regards =============================================================================== Sorry, the previous class contains an error, the original image after the rotation 1px move on and get the unwanted "border". After a careful reading of the local debate, I am using the tip from Dave Richards wrote a new function. With its images can be rotated only 90 ° (default), 180 ° and 270 °, but one rarely needs more ... The function returns False, or rotated image Petr =============================================================================== The following is potentially useful. It extracts the central largest circle of an image into a square of specified size, and optionally rotates it. The rest of the square is made transparent, so useful for drawing over other images. I've named it after binocular effect because on some old TV shows whenever they show someone looking through binoculars the screen shows a big circular image with black edges. =============================================================================== If you're having trouble rotating images through this function, please note that you can rotate images through CSS. As imagerotate() seems to remove image transparency, I resorted to CSS rotate. Here is an example of CSS code that should work across most browsers: img.rotated90 { /* CSS3 then proprietary code */ rotation: 90deg; -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); }


Council billed man 1p for his late mother's council tax
A ‘penny-pinching’ council billed a man for just 1p after his mother died.
David Egerton, 69, says he was stunned to get the council tax bill through his letterbox.
He criticised Isle of Wight Council for spending more than the value of the bill in delivery costs.
His mum Molly died aged 93 in July but had not lived in her Newport home on the island since February as she spent her final months in a care home.
Isle of Wight Council apologised for the ‘regrettable’ incident and claimed as a result of its calculations a ‘small amount’ was left owed.
Mr Egerton, from Freshwater on the Isle of Wight, said: ‘I thought they couldn’t be serious.
‘It is laughable, they are literally penny pinching. They have tried to get the last penny out of her.
Advertisement Advertisement
‘It must have cost them ten times the amount to send the letter to me.
‘It smacks of Scrooge being in charge. I really hope they get to meet their three spirits soon.’
An Isle of Wight Council spokesman said the payment is not being pursued.
The spokesman said: ‘We would like to express our sincere condolences to the family and apologise that this situation has arisen.
‘When closing an account, sometimes, due to the calculations, regrettably it can result in small amounts being left owing.
‘We would not pursue payment for such a small amount.
‘It would be our normal practice for the council tax bill to show that this is for information only, together with an explanation that the council is legally obliged to send a bill even for small amounts.
‘It is with regret this did not happen on this occasion and we are very sorry for any distress this may have caused.’
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


They crammed that cruiser
by Jon ManchesterGenerous residents "Crammed the Cruiser" in Lake Country over the weekend.
The eighth annual Cram the Cruiser event on Saturday collected a total of 1,715 pounds of donated items, including non-perishable foods, and just over $7,460 in cash, cheques and Save On Foods gift cards in support of the Lake Country Food Bank.
“The generosity of the community never fails to amaze us,” says RCMP spokesman Cpl. Jesse O’Donaghey, founder of Cram the Cruiser in Lake Country. “We continue to see our donors returning year after year, to do something great for such an important cause.”
Since its inception, the event has collected more than 14,500 pounds of donated items and just over $42,636 for the food bank.
Lake Country Fire Department members and other first responders also took part, and Save-on Foods and Starbucks provided hot chili and coffee to the donors.


Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
Note: V8 compiles Javascript into machine code on the fly!
Node is FAST
Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution.
Asynchronous and Event Driven
All APIs of Node.js library are asynchronous that is, non-blocking. There is no sleep on Node.
The internals
The trick? The most important and critical parts are written in C/C++
Single Threaded but Highly Scalable
Node.js uses a single threaded model with event looping.
Oh.. and you know, universal (isomorphic) web applications.
Fast to learn, fast to code, fast to execute
It's perfect for an agile environment, you can quickly build an MVP and
keep iterating until you have all the features you need.
Misconceptions
Tooling is too cumbersome
Node !== Frontend
You don't need the same tooling on the backend than you need on the frontend.
Since Node v6 most of ES6 (96% at the time of this presentation) is supported, no need for transpiling.
No need for gulp/grunt, npm scripts can solve all your needs (start, test, build, etc).

Misconceptions
You need a lot of micro-dependencies
No need for frameworks and all their baggage.
To write a proper microservice you really only need 3 packages, the implementation is up to you.
A server (such as restify)
A logger (such as bunyan)
A db handler/model (such as mongoose)
Or a fetch library if your data lives somewhere else (such as node-fetch)
asyncStuff1()
.then( asyncStuff2 )
.then( asyncStuff3 )
.then( asyncStuff4 )
.then( asyncStuff5 )
.catch( error => {
//Write only one error handler
//All errors will come here
})
Misconceptions
Is not reliable
Node has grown a lot and fast lately, there was troubled times at the beginning, but
it now has a strong open source foundation behind it, and a robust community making it
more secure, fast and reliable every day.
My favorites
Isomorphic SSR
Websockets
JSON
ES6
Arrow functions x => x * 2
Promises
Short notations in general { prop }
Deconstruction { prop1, prop2 } = obj
End of part 1
Q&A
"Any application that can be written in JavaScript, will eventually be written in JavaScript"
When you see lots of nested if or/and lots of else statements:
Cut down the elses
One if deep
Functional programming
Principles
A set of patterns when we write our code:
Small single purpose functions
Pure functions
No side effects
Data should be immutable
Avoid non predictable values (i.e. Date)
Stateless
Composable
ROI
Testable
Portable (reusable)
Less prone to bugs
More readable
Language prerequisites
Functions are "first-class" objects
Functions can be assigned to a variable
Higher-order functions
Functions can be passed as a parameter to another function
Functions can return other functions
Intermission: Arrow functions
//Before
var a = function( arg1, arg2 ) {
//doStuff
return something;
};
//With ES6
const a = ( arg1, arg2 ) => {
//doStuff
return something;
};
//If your function has only one expression and its a return
const a = ( arg1, arg2 ) => expression;
//If your function has only one argument
const a = arg1 => expression;
Higher-order functions for Arrays
Map
const a = [ 1, 2, 3, 4 ];
/* Multiply all the elements by 2 */
a.map( x => x * 2 );
//[ 2, 4, 6, 8 ]
Higher-order functions for Arrays
forEach
const a = [ 1, 2, 3, 4 ];
/* Log every array element */
a.forEach( x => console.log(x) );
//1
//2
//3
//4
Higher-order functions for Arrays
filter
const a = [ 1, 2, 3, 4 ];
/* Return an array with pair numbers */
a.filter( x => x % 2 === 0 );
//[ 2, 4 ]
Higher-order functions for Arrays
reduce
const a = [ 1, 2, 3, 4 ];
/* Sum all elements of the array */
a.reduce( ( previous, current ) => previous + current, 0 );
//10
const b = [ 'John Smith', 'George Clooney' ];
/* Produce an object with arrays for all firstNames and lastNames */
b.reduce( ( previous, current ) => {
let parts = current.split(' ');
previous.firstNames.push( parts[0] );
previous.lastNames.push( parts[1] );
return previous;
}, {
firstNames: [],
lastNames: []
});
//{ firstNames: [ 'John', 'George' ],
// lastNames: [ 'Smith', 'Clooney' ] }
Initial code
const c = [
{ name: 'John', vote: 'leave', age: 60 },
{ name: 'Mary', vote: 'remain', age: 25 },
{ name: 'Dorothy', vote: 'leave', age: 75 },
{ name: 'Mark', vote: 'remain', age: 35 },
];
/* Calculate average age of remain and leave voters */
let leaveAgeSum = 0, leaveVoters = 0, remainAgeSum = 0, remainVoters = 0;
for ( let i in c ) {
let voter = c[i];
if ( voter.vote === 'leave' ) {
leaveAgeSum += voter.age;
leaveVoters++;
}
if ( voter.vote === 'remain' ) {
remainAgeSum += voter.age;
remainVoters++;
}
}
let leaveAvg = leaveAgeSum / leaveVoters;
//67.5
let remainAvg = remainAgeSum / remainVoters;
//30
Applying what we learned about higher-order functions for Arrays
const c = [
{ name: 'John', vote: 'leave', age: 60 },
{ name: 'Mary', vote: 'remain', age: 25 },
{ name: 'Dorothy', vote: 'leave', age: 75 },
{ name: 'Mark', vote: 'remain', age: 35 },
];
/* Calculate average age of remain and leave voters */
let leaveVoters = c.filter( x => x.vote === 'leave' );
let leaveAgeSum = leaveVoters.reduce( ( p, c ) => p + c.age, 0 );
let leaveAvg = leaveAgeSum / leaveVoters.length
//67.5
let remainVoters = c.filter( x => x.vote === 'remain' );
let remainAgeSum = remainVoters.reduce( ( p, c ) => p + c.age, 0 );
let remainAvg = remainAgeSum / remainVoters.length;
//30
Create pure functions
const filterVoters = ( c, type ) => c.filter( x => x.vote === type );
const sumAge = c => c.reduce( ( p, c ) => p + c.age, 0 );
const calcAvg = ( sum, total ) => sum / total;
Make them chainable
const filterVoters = ( c, type ) => c.filter( x => x.vote === type );
const sumAge = c => ({
sum : c.reduce( ( p, c ) => p + c.age, 0 ),
total: c.length
});
const calcAvg = ( params ) => params.sum / params.total;
calcAvg( sumAge( filterVoters( c, 'leave' ) ) );
//67.5
calcAvg( sumAge( filterVoters( c, 'remain' ) ) );
//30
Intermission: Promises
They're useful for async stuff
const doSomethingAsync = ( a ) => {
return new Promise(( resolve, reject) => {
asyncThing(( err, result) => {
if ( err ) return reject( err );
return resolve( result );
})
})
};
doSomethingAsync( a )
.then( x => console.log(x) )
.catch( err => console.error(err) )
Intermission: Promises
But they're also useful for non async stuff
const multiplyByTwo = ( a ) => {
if ( isNaN(a) ) return Promise.reject( 'Not a number' );
return Promise.resolve( a * 2 );
};
multiplyByTwo( a )
.then( x => console.log(x) )
.catch( err => console.error(err) )
Use Promise.resolve
const filterVoters = ( c, type ) => Promise.resolve(
c.filter( x => x.vote === type )
);
const sumAge = c => Promise.resolve({
sum : c.reduce( ( p, c ) => p + c.age, 0 ),
total: c.length
});
const calcAvg = ( params ) => Promise.resolve(
params.sum / params.total
);
filterVoters( c, 'leave' )
.then(sumAge)
.then(calcAvg)
.then( x => console.log(x) );
//67.5
filterVoters( c, 'remain' )
.then(sumAge)
.then(calcAvg)
.then( x => console.log(x) );
//30
Error handling: Promise.reject
const filterVoters = ( c, type ) => {
if ( !c.length ) return Promise.reject('Empty array');
return Promise.resolve( c.filter( x => x.vote === type ) )
};
const sumAge = c => Promise.resolve({
sum : c.reduce( ( p, c ) => p + c.age, 0 ),
total: c.length
});
const calcAvg = ( params ) => Promise.resolve(
params.sum / params.total
);
filterVoters( [], 'leave' )
.then(sumAge)
.then(calcAvg)
.then( x => console.log(x) )
.catch( error => console.log('Error!', error) );
//Error! Empty array
Recap
Use array higher-order functions
Create small pure functions
Make them reusable
Make them chainable
Test them
End of part 2
Q&A
"Developers proficient in functional programming are going to be
in large demand in the very near future."


First:
0
Select Operation:
Add +
Subtract -
Multiply *
Divide /
Mod %
Power ^
Second:
0
Equal:
0
Equal =
Copy to Clipboard
Clear X


math::interpolate - Interpolation routines
This package implements several interpolation algorithms:
Interpolation into a table (one or two independent variables), this is useful for example, if the data are static, like with tables of statistical functions.
Linear interpolation into a given set of data (organised as (x,y) pairs).
Lagrange interpolation. This is mainly of theoretical interest, because there is no guarantee about error bounds. One possible use: if you need a line or a parabola through given points (it will calculate the values, but not return the coefficients).
A variation is Neville's method which has better behaviour and error bounds.
Spatial interpolation using a straightforward distance-weight method. This procedure allows any number of spatial dimensions and any number of dependent variables.
Interpolation in one dimension using cubic splines.
This document describes the procedures and explains their usage.
The interpretation of the tables in the ::math::interpolate::interpolate-1d-table command has been changed to be compatible with the interpretation for 2D interpolation in the ::math::interpolate::interpolate-table command. As a consequence this version is incompatible with the previous versions of the command (1.0.x).
The interpolation package defines the following public procedures:
Define a table with one or two independent variables (the distinction is implicit in the data). The procedure returns the name of the table - this name is used whenever you want to interpolate the values. Note: this procedure is a convenient wrapper for the struct::matrix procedure. Therefore you can access the data at any location in your program.
Name of the table to be created
List of column names
List of values (the number of elements should be a multiple of the number of columns. See EXAMPLES for more information on the interpretation of the data.
The values must be sorted with respect to the independent variable(s).
Interpolate into the one-dimensional table "name" and return a list of values, one for each dependent column.
Name of an existing table
Value of the independent row variable
Interpolate into the two-dimensional table "name" and return the interpolated value.
Name of an existing table
Value of the independent row variable
Value of the independent column variable
Interpolate linearly into the list of x,y pairs and return the interpolated value.
List of pairs of (x,y) values, sorted to increasing x. They are used as the breakpoints of a piecewise linear function.
Value of the independent variable for which the value of y must be computed.
Use the list of x,y pairs to construct the unique polynomial of lowest degree that passes through all points and return the interpolated value.
List of pairs of (x,y) values
Value of the independent variable for which the value of y must be computed.
Returns a list of coefficients for the second routine interp-cubic-splines to actually interpolate.
List of x-coordinates for the value of the function to be interpolated is known. The coordinates must be strictly ascending. At least three points are required.
List of y-coordinates (the values of the function at the given x-coordinates).
Returns the interpolated value at coordinate x. The coefficients are computed by the procedure prepare-cubic-splines.
List of coefficients as returned by prepare-cubic-splines
x-coordinate at which to estimate the function. Must be between the first and last x-coordinate for which values were given.
Use a straightforward interpolation method with weights as function of the inverse distance to interpolate in 2D and N-dimensional space
The list xyvalues is a list of lists:
{ {x1 y1 z1 {v11 v12 v13 v14}} {x2 y2 z2 {v21 v22 v23 v24}} ... }
The last element of each inner list is either a single number or a list in itself. In the latter case the return value is a list with the same number of elements.
The method is influenced by the search radius and the power of the inverse distance
List of lists, each sublist being a list of coordinates and of dependent values.
List of coordinates for which the values must be calculated
Set the parameters for spatial interpolation
Search radius (data points further than this are ignored)
Power for the distance (either 1 or 2; defaults to 2)
Interpolates between the tabulated values of a function whose abscissae are xlist and whose ordinates are ylist to produce an estimate for the value of the function at x. The result is a two-element list; the first element is the function's estimated value, and the second is an estimate of the absolute error of the result. Neville's algorithm for polynomial interpolation is used. Note that a large table of values will use an interpolating polynomial of high degree, which is likely to result in numerical instabilities; one is better off using only a few tabulated values near the desired abscissa.
Example of using one-dimensional tables:
Suppose you have several tabulated functions of one variable:
x y1 y2 0.0 0.0 0.0 1.0 1.0 1.0 2.0 4.0 8.0 3.0 9.0 27.0 4.0 16.0 64.0
Then to estimate the values at 0.5, 1.5, 2.5 and 3.5, you can use:
set table [::math::interpolate::defineTable table1 {x y1 y2} { - 1 2 0.0 0.0 0.0 1.0 1.0 1.0 2.0 4.0 8.0 3.0 9.0 27.0 4.0 16.0 64.0}] foreach x {0.5 1.5 2.5 3.5} { puts "$x: [::math::interpolate::interp-1d-table $table $x]" }
For one-dimensional tables the first row is not used. For two-dimensional tables, the first row represents the values for the second independent variable.
Example of using the cubic splines:
Suppose the following values are given:
x y 0.1 1.0 0.3 2.1 0.4 2.2 0.8 4.11 1.0 4.12
Then to estimate the values at 0.1, 0.2, 0.3, ... 1.0, you can use:
set coeffs [::math::interpolate::prepare-cubic-splines {0.1 0.3 0.4 0.8 1.0} {1.0 2.1 2.2 4.11 4.12}] foreach x {0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} { puts "$x: [::math::interpolate::interp-cubic-splines $coeffs $x]" }
to get the following output:
0.1: 1.0 0.2: 1.68044117647 0.3: 2.1 0.4: 2.2 0.5: 3.11221507353 0.6: 4.25242647059 0.7: 5.41804227941 0.8: 4.11 0.9: 3.95675857843 1.0: 4.12
As you can see, the values at the abscissae are reproduced perfectly.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: interpolate of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
Mathematics
Copyright © 2004 Arjen Markus<EMAIL_ADDRESS>Copyright © 2004 Kevn B. Kenny <kennykb@users.sourceforge.net>


Download And Install Atheros Atheros Ar9285 Wireless Network Adapter Driver Id 1449831
Qualcomm Atheros Ar9285 Wireless Network Adapter Driver Download
Amazon Com Qualcomm Atheros Ar9285 Ar5b95 Half Mini Pci Express Pcie Wireless Wlan Wifi Card For Hp<PHONE_NUMBER>36<PHONE_NUMBER>60 001 002 003 004 005 Computers Accessories
Download And Install Qualcomm Atheros Communications Inc Qualcomm Atheros Ar9285 Wireless Network Adapter Driver Id 235332
Qualcomm Atheros Ar9285 Wireless Network Adapter Driver Windows 10 Peatix
Atheros Ar9285 Driver Windows 10 Wi Fi Wireless Network Adapater
Reinstall Qualcomm Atheros Ar9285 Wireless Network Adapter Driver
Atheros Ar9285 Wireless Driver Download Lasopasan
Download Wireless Driver Software For Windows 10 8 1 8 7 Qualcomm Atheros Ar9285 Wireless Download Direct
Qualcomm Atheros Ar9485wb Eg Wireless Network Adapter Driver Windows 8 1 Lasopasurvey
Qualcomm Atheros Network Adapter Driver Qca9565 V 10 0 3 456 V 10 0 0 345 V 10 0 0 336 V 10 0 0 274 Download For Windows Deviceinbox Com
Asus Atheros Ar9285 Wireless Network Adapter Driver Windows Xp
Atheros Ar9285 Wireless Network Adapter Drivers Download
Install Qualcomm Atheros Wireless Network Adapter Driver Update
Hp Atheros Ar9285 Driver Windows 7 2019
Atheros Ar9285 Wireless Network Adapter Windows 8 1 Download Free Download Wallpaper
Tp Link Tl Wn781 V 180118 Download For Windows Deviceinbox Com
Does Atheros Ar9285 Wireless Network Adapter Support 5ghz Adapter View
Qualcomm Atheros Ar9285 Driver Free Download Windows 7 Over Blog Com
Atheros Ar9285 Wireless Network Adapter Wifi Hotspot Wavebud
Promblem With Atheros Ar9285 Wireless Network Adapter Disconnecting Windows 7 Help Forums
Bsod While Agent Is Running Worry Free Business Security Services
How To Download Install Atheros Ar5008 Wireless Network Adapter Driver Youtube
Qualcomm Atheros Driver Windows 8 1
Station Drivers Qualcomm Atheros Bluetooth Wireless Version 10 0 0 288 8 0 1 322
Fix Atheros Ar9285 Wifi In Windows 8 1 Preview Youtube
Atheros Wireless Driver Win8
Download Driver Qualcomm Atheros Ar5b125 Wireless Network Adapter
Unable To Connect To A Wireless Router Configured For The 5 Ghz Frequency Sony Usa


Dear %user%,
Your activation key is: %request%.
You can activate your account by going in to your account setting and press 'Account Activation' then select the third option, 'I got an activation key', after entering the key your account will be activated and you will receive your reward.
Feel free to ask one of our staff members for help when you experience a problem.
Enjoy playing %server_name%.
Yours faithfully,
%server_name%


Promo Bar
Capture leads, communicate discount coupons, make store-wide announcement or specific page announcement with the help of dynamic bars.
My Promo Bars
| Name | Type | Status | Date | Action |
|---|---|---|---|---|
| Email Capture Bar | Email Capture | 2021-01-04 02:46 PM | ||
| Text Bar | Informational | 2021-02-07 01:23 PM |
Settings
Enable this button if you want your customer to be able to close the Bar while navigating your store.


Run the following in the debugger window to test MicropedeAsync:
m = new MicropedeAsync('sample-app')
m.getSubscriptions('message-logger').then((d)=>console.log(d))


Refugee Freed After 6 Years in Australian Prison Camp
by AGENCE FRANCE-PRESSEWELLINGTON, New Zealand (AFP) — An Iranian asylum seeker and award-winning author held in an offshore Australian detention camp for more than six years said Thursday he had arrived in New Zealand, and was celebrating freedom.
Behrouz Boochani was sent to Manus Island in Papua New Guinea after fleeing Iran in 2013. He was picked up on a vessel packed with asylum-seekers trying to reach Australia from Indonesia.
The 36-year-old journalist later won the Victorian Prize for Literature for a book detailing his life under Australia’s harsh offshore detention policy.
“I just arrived in New Zealand. So exciting to get freedom after more than six years,” Boochani tweeted on Thursday. “Thank you to all the friends who made this happen.”
Under a policy to deter asylum-seekers from reaching Australia by boat, Canberra has for years sent arrivals to remote Pacific camps on Nauru and Papua New Guinea’s Manus Island for processing, barring them from ever resettling in Australia.
The United Nations, human rights groups and leading health professionals have slammed Canberra for its treatment of detainees, as stories of violent riots, self harm, dire living conditions and even murder have emerged from the camps over the years.
© Agence France-Presse
Copyright © 2019 courthousenews.com


This website and other CEDA sites use cookies.
By continuing to use this website you are agreeing to our use of cookies.
Form
- 1 Step 1
- 2 Step 2
- 3 Step 3
- 4 Step 4


Installing Newt on Windows¶
You can develop and build Mynewt OS applications for your target boards on the Windows platform. This guide shows you how to install the latest release version of newt from binary or from source. The tool is written in Go (golang).
In Windows, we use MinGW as the development environment to build and run Mynewt OS applications for target boards. MinGW runs the bash shell and provides a Unix-like environment. This provides a uniform way to build Mynewt OS applications. The Mynewt documentation and tutorials use Unix commands and you can use the same Unix commands on MinGW to follow the tutorials. The documentation will note any commands or behaviors that are specific to Windows.
This guide shows you how to perform the following:
- Install MSYS2/MinGW.
- Install Git.
- Install latest release (1.6.0) of newt from binary.
- Install latest release of newt from source.
See Installing Previous Releases of Newt to install an earlier version of newt. You still need to set up your MinGW development environment.
Note: If you would like to contribute to the newt tool, see Contributing to Newt or Newtmgr Tools.
Installing MSYS2/MinGW¶
MSYS2/MinGW provides a bash shell and tools to build applications that run on Windows. It includes three subsystems:
- MSYS2 toolchain to build POSIX applications that run on Windows.
- MinGW32 toolchains to build 32 bit native Windows applications.
- MinGW64 toolchains to build 64 bit native Windows applications.
The subsystems run the bash shell and provide a Unix-like environment. You can also run Windows applications from the shell. We will use the MinGW subsystem.
Note: You can skip this installation step if you already have MinGW installed (from an earlier MSYS2/MinGW or Git Bash installation), but you must list the bin path for your installation in your Windows Path. For example: if you installed MSYS2/MinGW in the C:\msys64 directory, add C:\msys64\usr\bin to your Windows Path. If you are using Windows 10 WSL, ensure that you use the C:\msys64\usr\bin\base.exe and not the Windows 10 WSL bash.
To install and setup MSYS2 and MinGW:
Download and run the MSYS2 installer. Select the 64 bit version if you are running on a 64 bit platform. Follow the prompts and check the
Run MSYS2 now
checkbox on theInstallation Complete
dialog.In the MSYS2 terminal, run the
pacman -Syuu
command. If you get a message to run the update again, close the terminal and run thepacman -Syuu
command in a new terminal.To start a new MSYS2 terminal, select the “MSYS2 MSYS” application from the Windows start menu.
Add a new user variable named MSYS2_PATH_TYPE and set the value to inherit in your Windows environment. This enables the MSYS2 and MinGW bash to inherit your Windows user Path values.
To add the variable, select properties for your computer > Advanced system settings > Environment Variables > New
Add the MinGW bin path to your Windows Path. For example: if you install MSYS2/MinGW in the C:\msys64 directory, add C:\msys64\usr\bin to your Windows Path.
Note: If you are using Windows 10 WSL, ensure that you use the C:\msys64\usr\bin\base.exe and not the Windows 10 WSL bash.
Run the
pacman -Su vim
command to install the vim editor.Note:You can also use a Windows editor. You can access your files from the C:<msys-install-folder>\home\<username> folder, where msys-install-folder is the folder you installed MSYS2 in. For example, if you installed MSYS2 in the msys64 folder, your files are stored in C:\msys64\home\<username>
Run the
pacman -Su tar
command to install the tar tool.
You will need to start a MinGW terminal to run the commands specified in the Mynewt documentation and tutorials. To start a MinGW terminal, select the “MSYS2 Mingw” application from the start Menu (you can use either MinGW32 or MinGW64). In Windows, we use the MinGW subsystem to build Mynewt tools and applications.
Installing Git for Windows¶
Download and install Git for Windows if it is not already installed.
Installing the Latest Release of the Newt Tool from Binary¶
You can install the latest release of newt from binary. It has been tested on Windows 10 64 bit platform.
Start a MinGW terminal.
Download the newt binary tar file. The link suggested below should direct you to the nearest mirror automatically. If it does not, go to http://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.6.0/ and manually choose the specific mirror site suggested for you.
$ wget -P /tmp http://www.apache.org/dyn/closer.lua/mynewt/apache-mynewt-1.6.0/apache-mynewt-newt-bin-windows-1.6.0.tgz
Extract the file:
If you previously built newt from the master branch, you can extract the file into your $GOPATH/bin directory. Note: This overwrites the current newt.exe in the directory and assumes that you are using $GOPATH/bin for your Go applications.
tar -xzf /tmp/apache-mynewt-newt-bin-windows-1.6.0.tgz -C $GOPATH/bin
If you are installing newt for the first time and do not have a Go workspace setup, you can extract into /usr/bin directory:
tar -xzf /tmp/apache-mynewt-newt-bin-windows-1.6.0.tgz -C /usr/bin
Verify the installed version of newt. See Checking the Installed Version.
Installing the Latest Release of Newt From Source¶
If you have an older version of Windows or a 32 bit platform, you can build and install the latest release version of newt from source.
If you do not have Go installed, download and install the latest version of Go. Newt requires Go version 1.7.6 or higher.
Start a MinGw terminal.
Download and unpack the newt source:
$ wget -P /tmp https://github.com/apache/mynewt-newt/archive/mynewt_1_6_0_tag.tar.gz $ tar -xzf /tmp/mynewt_1_6_0_tag.tar.gz
Run the build.sh to build the newt tool.
$ cd mynewt-newt-mynewt_1_6_0_tag $ ./build.sh $ rm /tmp/mynewt_1_6_0_tag.tar.gz
You should see the
newt/newt.exe
executable. Move the executable to a bin directory in your PATH:If you previously built newt from the master branch, you can move the executable to the $GOPATH/bin directory.
$ mv newt/newt.exe $GOPATH/bin
If you are installing newt for the first time and do not have a Go workspace set up, you can move the executable to /usr/bin or a directory in your PATH:
$ mv newt/newt.exe /usr/bin
Checking the Installed Version¶
Check the version of newt:
$ newt version Apache Newt version: 1.6.0
Get information about newt:
Newt allows you to create your own embedded application based on the Mynewt operating system. Newt provides both build and package management in a single tool, which allows you to compose an embedded application, and set of projects, and then build the necessary artifacts from those projects. For more information on the Mynewt operating system, please visit https://mynewt.apache.org/. Please use the newt help command, and specify the name of the command you want help for, for help on how to use a specific command Usage: newt [flags] newt [command] Examples: newt newt help [<command-name>] For help on <command-name>. If not specified, print this message. Available Commands: build Build one or more targets clean Delete build artifacts for one or more targets create-image Add image header to target binary debug Open debugger session to target info Show project info install Install project dependencies load Load built target to board mfg Manufacturing flash image commands new Create a new project pkg Create and manage packages in the current workspace resign-image Re-sign an image. run build/create-image/download/debug <target> size Size of target components sync Synchronize project dependencies target Commands to create, delete, configure, and query targets test Executes unit tests for one or more packages upgrade Upgrade project dependencies vals Display valid values for the specified element type(s) version Display the Newt version number Flags: -h, --help Help for newt commands -j, --jobs int Number of concurrent build jobs (default 8) -l, --loglevel string Log level (default "WARN") -o, --outfile string Filename to tee output to -q, --quiet Be quiet; only display error output -s, --silent Be silent; don't output anything -v, --verbose Enable verbose output when executing commands Use "newt [command] --help" for more information about a command.


Tools for handling 'NetCDF' metadata in data frames. The metadata is provided as relations in tabular form, to avoid having to scan printed header output or to navigate nested lists of raw metadata.
| Version: | 0.0.3 |
| Imports: | dplyr, ncdf4 |
| Suggests: | testthat, knitr, rmarkdown, covr |
| Published: | 2017-05-02 |
| Author: | Michael D. Sumner [aut, cre] |
| Maintainer: | Michael D. Sumner <mdsumner at gmail.com> |
| BugReports: | https://github.com/r-gris/ncdump/issues |
| License: | GPL-3 |
| URL: | https://github.com/r-gris/ncdump |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | ncdump results |
| Reference manual: | ncdump.pdf |
| Package source: | ncdump_0.0.3.tar.gz |
| Windows binaries: | r-devel: ncdump_0.0.3.zip, r-release: ncdump_0.0.3.zip, r-oldrel: ncdump_0.0.3.zip |
| OS X binaries: | r-release: ncdump_0.0.3.tgz, r-oldrel: ncdump_0.0.3.tgz |
Please use the canonical form https://CRAN.R-project.org/package=ncdump to link to this page.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ansca.corona.storage.UniqueFileNameBuilder
public class UniqueFileNameBuilder
Generates a unique file name in a given directory. The file name format and its extension is configurable.
Example usage:
// Create a unique JPEG file name in the "Pictures" directory. UniqueFileNameBuilder builder = new UniqueFileNameBuilder(); builder.setDirectory(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)); builder.setFileNameFormat("Picture %d"); builder.setFileExtension("jpg"); java.io.File imageFile = builder.build(); if (imageFile != null) { // Unique file name was generated. Create the file here. }
| Constructor Summary | |
|---|---|
UniqueFileNameBuilder()
Create a new file name builder object. |
| Method Summary | |
|---|---|
java.io.File |
build()
Generates a unique file name for the directory that you provided to the setDirectory() method. |
java.io.File |
getDirectory()
Gets the directory this builder will generate a unique file name in. |
java.lang.String |
getFileExtension()
Gets the file extension to be appended to the file name. |
java.lang.String |
getFileNameFormat()
Gets the file name format string that this builder will use to generate a unique file name. |
void |
setDirectory(java.io.File directory)
Sets the directory to generate a unique file name in. |
void |
setFileExtension(java.lang.String extension)
Sets the file extension to be appended to the file name. |
void |
setFileNameFormat(java.lang.String format)
Sets the file name format string to be used to genearte a unique file name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniqueFileNameBuilder()
| Method Detail |
|---|
public void setDirectory(java.io.File directory)
directory
- The directory's path. This directory is expected to exist
or else this object will fail to build a unique file name.public java.io.File getDirectory()
Returns null if the directory has not been set yet.
public void setFileNameFormat(java.lang.String format)
format
- The format string to be used, such as "File %d". This string is expected to have
a "%d" in it so that this builder can generate a unique number for the file name.
This string is not expected to provide a file extension.public java.lang.String getFileNameFormat()
public void setFileExtension(java.lang.String extension)
extension
- The extension to be appended to the file name.
Set to null or empty string to not append an extension to the file name.
public java.lang.String getFileExtension()
Returns an empty string if an extension will not be appended.
public java.io.File build()
Note that this method does not actually create a file in the set directory. This method only generates a unique file name that you can use to create a new file with.

Returns null if the directory does not exist.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


April 2015 Hacker News Hiring Trends
It's no joke, April shattered the record for most postings, with, as of this analysis, 729 first level comments. It didn't hurt that this was the first non-weekend, non-holiday for whorishiring since December.
Tracking the most popular programming languages, databases and software development tools in whoishiring discussion threads.
It's no joke, April shattered the record for most postings, with, as of this analysis, 729 first level comments. It didn't hurt that this was the first non-weekend, non-holiday for whorishiring since December.
HN Hiring Trends is back after a brief hiatus and now getting caught up with March and April's trends. In looking at March's results, the thing that stands out the most is clearly that a non-tech term, "remote" was the most used term in the postings. The ability to join a company remotely is becoming a quick filtering function for many positions as it's used both to indicate remote applicants are ok or they are not consdidered.
With a fresh year, the opportunity to refine the chart arose with the assistance of reader Alejandro, who helped add a 3 month moving average as the charted metric giving a much smoother charting experience.
The big story this month is seeing AngularJS reach the top 5. To see it reach that in about 2 years is a stunning rise, even in in today's fast-moving tech industry.
JavaScript racks up its third win in a row with another strong showing, leaving Python to come in second again. Rails, Ruby and iOS round out the top 5. Elsewhere in the top 10, a little shakeup had node.js and AWS (amazon web services, i.e. "the cloud") coming up and Java taking a big tumble out of the Top 10.
JavaScript, JavaScript, JavaScript. For the sixth month in 2014, JavaScript takes the top spot. Python is still hanging around in its usual #2 spot. In terms of big movers this month, Rails picked up a big gain to take #3 which, I believe is the highest its ever risen. Also, Java made a big jump to #4 after falling out of the top 10 last month.
These charts show what's popular and trending in programming languagues, frameworks and technologies used to develop modern software applications as indicated by Hacker News activity. Using the HN Search API and a dictionary of software terms, all of the the comments (job postings) in the "whoishiring" submissions from April 2011 to March 2014 were processed to count the number of times each software term was mentioned.


Data
Product
Automation
Expose API's, reports
Analytics / BI
Descriptive and exploratory analysis
Data infrastructure / Modeling
Data cleaning, storrage and enrichment
Infrastructure
Client, security access, servers, network
Business value
Required for
systems to work


User working hours changes saved successfully
Error: Work hour changes could not be saved.
Non-availability hours changes saved successfully
Error: Non-availability hours could not be saved


Some of the places I have worked.
Some interesting facts
Thank you for visiting my page and playing my game! Now you know a bit about me and my weirdness. If anything does work on my site please contact me at<EMAIL_ADDRESS>Also let me know what I can improve on, I know this page isn't the best.


The Tin Woodman of Oz
by L. Frank Baum
Chapter 3: “Roundabout”
Additional Information
- Year Published: 1918
- Language: English
- Country of Origin: United States of America
- Source: Baum, L. F. (1918). The Tin Woodman of Oz. J. R. Neill (Ed.).
-
Readability:
- Flesch–Kincaid Level: 6.4
- Word Count: 1,904
- Genre: Fantasy
- Keywords: 20th century literature, american literature, books of oz, children's literature, fantasy, l. frank baum
- ✎ Cite This
Downloads
Woot the Wanderer slept that night in the tin castle of the Emperor of the Winkies and found his tin bed quite comfortable. Early the next morning he rose and took a walk through the gardens, where there were tin fountains and beds of curious tin flowers, and where tin birds perched upon the branches of tin trees and sang songs that sounded like the notes of tin whistles. All these wonders had been made by the clever Winkie tinsmiths, who wound the birds up every morning so that they would move about and sing.
After breakfast the boy went into the throne room, where the Emperor was having his tin joints carefully oiled by a servant, while other servants were stuffing sweet, fresh straw into the body of the Scarecrow.
Woot watched this operation with much interest, for the Scarecrow’s body was only a suit of clothes filled with straw. The coat was buttoned tight to keep the packed straw from falling out and a rope was tied around the waist to hold it in shape and prevent the straw from sagging down.  His hands were white cotton gloves stuffed with fine straw. Woot noticed that even when carefully stuffed and patted into shape, the straw man was awkward in his movements and decidedly wobbly on his feet, so the boy wondered if the Scarecrow would be able to travel with them all the way to the forests of the Munchkin Country of Oz.
The preparations made for this important journey were very simple. A knapsack was filled with food and given Woot the Wanderer to carry upon his back, for the food was for his use alone. The Tin Woodman shouldered an axe which was sharp and brightly polished, and the Scarecrow put the Emperor’s oil-can in his pocket, that he might oil his friend’s joints should they need it.
“Who will govern the Winkie Country during your absence?” asked the boy.
“Why, the Country will run itself,” answered the Emperor. “As a matter of fact, my people do not need an Emperor, for Ozma of Oz watches over the welfare of all her subjects, including the Winkies. Like a good many kings and emperors, I have a grand title, but very little real power, which allows me time to amuse myself in my own way. The people of Oz have but one law to obey, which is: ‘Behave Yourself,’ so it is easy for them to abide by this Law, and you’ll notice they behave very well. But it is time for us to be off, and I am eager to start because I suppose that that poor Munchkin girl is anxiously awaiting my coming.”
“She’s waited a long time already, seems to me,” remarked the Scarecrow, as they left the grounds of the castle and followed a path that led eastward.
“True,” replied the Tin Woodman; “but I’ve noticed that the last end of a wait, however long it has been, is the hardest to endure; so I must try to make Nimmie Amee happy as soon as possible.”
“Ah; that proves you have a Kind heart,” remarked the Scarecrow, approvingly.
“It’s too bad he hasn’t a Loving Heart,” said Woot. “This Tin Man is going to marry a nice girl through kindness, and not because he loves her, and somehow that doesn’t seem quite right.”
“Even so, I am not sure it isn’t best for the girl,” said the Scarecrow, who seemed very intelligent for a straw man, “for a loving husband is not always kind, while a kind husband is sure to make any girl content.”
“Nimmie Amee will become an Empress!” announced the Tin Woodman, proudly. “I shall have a tin gown made for her, with tin ruffles and tucks on it, and she shall have tin slippers, and tin earrings and bracelets, and wear a tin crown on her head. I am sure that will delight Nimmie Amee, for all girls are fond of finery.”
“Are we going to the Munchkin Country by way of the Emerald City?” inquired the Scarecrow, who looked upon the Tin Woodman as the leader of the party.
“I think not,” was the reply. “We are engaged upon a rather delicate adventure, for we are seeking a girl who fears her former lover has forgotten her. It will be rather hard for me, you must admit, when I confess to Nimmie Amee that I have come to marry her because it is my duty to do so, and therefore the fewer witnesses there are to our meeting the better for both of us. After I have found Nimmie Amee and she has managed to control her joy at our reunion, I shall take her to the Emerald City and introduce her to Ozma and Dorothy, and to Betsy Bobbin and Tiny Trot, and all our other friends; but, if I remember rightly, poor Nimmie Amee has a sharp tongue when angry, and she may be a trifle angry with me, at first, because I have been so long in coming to her.”
“I can understand that,” said Woot gravely. “But how can we get to that part of the Munchkin Country where you once lived without passing through the Emerald City?”
“Why, that is easy,” the Tin Man assured him.
“I have a map of Oz in my pocket,” persisted the boy, “and it shows that the Winkie Country, where we now are, is at the west of Oz, and the Munchkin Country at the east, while directly between them lies the Emerald City.”
“True enough; but we shall go toward the north, first of all, into the Gillikin Country, and so pass around the Emerald City,” explained the Tin Woodman.
“That may prove a dangerous journey,” replied the boy. “I used to live in one of the top corners of the Gillikin Country, near to Oogaboo, and I have been told that in this northland country are many people whom it is not pleasant to meet. I was very careful to avoid them during my journey south.”
“A Wanderer should have no fear,” observed the Scarecrow, who was wobbling along in a funny, haphazard manner, but keeping pace with his friends.
“Fear does not make one a coward,” returned Woot, growing a little red in the face, “but I believe it is more easy to avoid danger than to overcome it. The safest way is the best way, even for one who is brave and determined.”
“Do not worry, for we shall not go far to the north,” said the Emperor. “My one idea is to avoid the Emerald City without going out of our way more than is necessary. Once around the Emerald City we will turn south into the Munchkin Country, where the Scarecrow and I are well acquainted and have many friends.”
“I have traveled some in the Gillikin Country,” remarked the Scarecrow, “and while I must say I have met some strange people there at times, I have never yet been harmed by them.”
“Well, it’s all the same to me,” said Woot, with assumed carelessness. “Dangers, when they cannot be avoided, are often quite interesting, and I am willing to go wherever you two venture to go.”
So they left the path they had been following and began to travel toward the northeast, and all that day they were in the pleasant Winkie Country, and all the people they met saluted the Emperor with great respect and wished him good luck on his journey. At night they stopped at a house where they were well entertained and where Woot was given a comfortable bed to sleep in.
“Were the Scarecrow and I alone,” said the Tin Woodman, “we would travel by night as well as by day; but with a meat person in our party, we must halt at night to permit him to rest.”
“Meat tires, after a day’s travel,” added the Scarecrow, “while straw and tin never tire at all. Which proves,” said he, “that we are somewhat superior to people made in the common way.”
Woot could not deny that he was tired, and he slept soundly until morning, when he was given a good breakfast, smoking hot.
“You two miss a great deal by not eating,” he said to his companions.
“It is true,” responded the Scarecrow. “We miss suffering from hunger, when food cannot be had, and we miss a stomachache, now and then.”
As he said this, the Scarecrow glanced at the Tin Woodman, who nodded his assent.
All that second day they traveled steadily, entertaining one another the while with stories of adventures they had formerly met and listening to the Scarecrow recite poetry. He had learned a great many poems from Professor Wogglebug and loved to repeat them whenever anybody would listen to him. Of course Woot and the Tin Woodman now listened, because they could not do otherwise—unless they rudely ran away from their stuffed comrade. One of the Scarecrow’s recitations was like this:
“What sound is so sweet
As the straw from the wheat
When it crunkles so tender and low?
It is yellow and bright,
So it gives me delight
To crunkle wherever I go.
“Sweet, fresh, golden Straw!
There is surely no flaw
In a stuffing so clean and compact.
It creaks when I walk,
And it thrills when I talk,
And its fragrance is fine, for a fact.

“I know it is said
That my beautiful head
Has brains of mixed wheat-straw and bran,
But my thoughts are so good
I’d not change, if I could,
For the brains of a common meat man.
“Content with my lot,
I’m glad that I’m not
Like others I meet day by day;
If my insides get musty,
Or mussed-up, or dusty,
I get newly stuffed right away.”


Problem Landscape
N
(dimensions):
K
(interdependence):
Adoption Quality
Absorption capacity
Copying error
Network Structure
Watts-Strogatz small world graphparameters
N
(nodes):
K
(degree):
b
(rewiring probability):
Simulation Parameters
Simulation name:
Timesteps:
Landscapes:
Completed Runs
Current simulation:
t=0
t=0
t=
end
Average value over time:


|
Little Heroes
|
ErrorCode defines the default codes associated with Photon client/server communication. More...
Public Attributes | |
| const int | Ok = 0 |
| (0) is always "OK", anything else an error or specific situation. More... | |
| const int | OperationNotAllowedInCurrentState = -3 |
| (-3) Operation can't be executed yet (e.g. More... | |
| const int | InvalidOperationCode = -2 |
| (-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications. More... | |
| const int | InternalServerError = -1 |
| (-1) Something went wrong in the server. Try to reproduce and contact Exit Games. More... | |
| const int | InvalidAuthentication = 0x7FFF |
| (32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service). More... | |
| const int | GameIdAlreadyExists = 0x7FFF - 1 |
| (32766) GameId (name) already in use (can't create another). Change name. More... | |
| const int | GameFull = 0x7FFF - 2 |
| (32765) Game is full. This rarely happens when some player joined the room before your join completed. More... | |
| const int | GameClosed = 0x7FFF - 3 |
| (32764) Game is closed and can't be joined. Join another game. More... | |
| const int | ServerFull = 0x7FFF - 5 |
| (32762) Not in use currently. More... | |
| const int | UserBlocked = 0x7FFF - 6 |
| (32761) Not in use currently. More... | |
| const int | NoRandomMatchFound = 0x7FFF - 7 |
| (32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room. More... | |
| const int | GameDoesNotExist = 0x7FFF - 9 |
| (32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join. More... | |
| const int | MaxCcuReached = 0x7FFF - 10 |
| (32757) Authorization on the Photon Cloud failed becaus the concurrent users (CCU) limit of the app's subscription is reached. More... | |
| const int | InvalidRegion = 0x7FFF - 11 |
| (32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server. More... | |
| const int | CustomAuthenticationFailed = 0x7FFF - 12 |
| (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). More... | |
| const int ExitGames.Client.Photon.Chat.ErrorCode.CustomAuthenticationFailed = 0x7FFF - 12 |
(32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token).
Check error message for details.
| const int ExitGames.Client.Photon.Chat.ErrorCode.GameClosed = 0x7FFF - 3 |
(32764) Game is closed and can't be joined. Join another game.
| const int ExitGames.Client.Photon.Chat.ErrorCode.GameDoesNotExist = 0x7FFF - 9 |
(32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join.
| const int ExitGames.Client.Photon.Chat.ErrorCode.GameFull = 0x7FFF - 2 |
(32765) Game is full. This rarely happens when some player joined the room before your join completed.
| const int ExitGames.Client.Photon.Chat.ErrorCode.GameIdAlreadyExists = 0x7FFF - 1 |
(32766) GameId (name) already in use (can't create another). Change name.
| const int ExitGames.Client.Photon.Chat.ErrorCode.InternalServerError = -1 |
(-1) Something went wrong in the server. Try to reproduce and contact Exit Games.
| const int ExitGames.Client.Photon.Chat.ErrorCode.InvalidAuthentication = 0x7FFF |
(32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service).
| const int ExitGames.Client.Photon.Chat.ErrorCode.InvalidOperationCode = -2 |
(-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications.
| const int ExitGames.Client.Photon.Chat.ErrorCode.InvalidRegion = 0x7FFF - 11 |
(32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server.
Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then. Check your master server address and compare it with your Photon Cloud Dashboard's info. https://cloud.exitgames.com/dashboard
OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
| const int ExitGames.Client.Photon.Chat.ErrorCode.MaxCcuReached = 0x7FFF - 10 |
(32757) Authorization on the Photon Cloud failed becaus the concurrent users (CCU) limit of the app's subscription is reached.
Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect. Affected client are unable to call operations. Please note that players who end a game and return to the master server will disconnect and re-connect, which means that they just played and are rejected in the next minute / re-connect. This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again.
OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
| const int ExitGames.Client.Photon.Chat.ErrorCode.NoRandomMatchFound = 0x7FFF - 7 |
(32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room.
| const int ExitGames.Client.Photon.Chat.ErrorCode.Ok = 0 |
(0) is always "OK", anything else an error or specific situation.
| const int ExitGames.Client.Photon.Chat.ErrorCode.OperationNotAllowedInCurrentState = -3 |
(-3) Operation can't be executed yet (e.g.
OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room).
Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization. In PUN, wait until State is: JoinedLobby (with AutoJoinLobby = true) or ConnectedToMaster (AutoJoinLobby = false)
| const int ExitGames.Client.Photon.Chat.ErrorCode.ServerFull = 0x7FFF - 5 |
(32762) Not in use currently.
| const int ExitGames.Client.Photon.Chat.ErrorCode.UserBlocked = 0x7FFF - 6 |
(32761) Not in use currently.


Using the MEI files created through Verovio, I created a piano roll and histogram for the four tracks using Python and music21. The resulting images are as follows:
| Song | Histogram | Piano Roll |
|---|---|---|
| Hello | ||
| When We Were Young | ||
| Set Fire To The Rain | ||
| Rolling In The Deep |


404 Not Found
The requested URL {{ $_SERVER['REQUEST_URI'] }}
is not found on this server.
If you entered the URL manually please check your spelling and try again.
@view('header', [ 'title' => 'Not Found' ])
The requested URL {{ $_SERVER['REQUEST_URI'] }}
is not found on this server.
If you entered the URL manually please check your spelling and try again.


--- layout: post status: publish published: true title: WCF and Duplex Channels author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 243 wordpress_url: http://winterdom.com/2006/10/wcfandduplexchannels date: '2006-10-29 06:21:06 +0000' date_gmt: '2006-10-29 06:21:06 +0000' categories: - Architecture - WCF - WinFX - Web Services tags: [] comments: - id: 180 author: Klaus Aschenbrenner author_email<EMAIL_ADDRESS>author_url: http://www.csharp.at date: '2006-12-08 11:12:56 +0000' date_gmt: '2006-12-08 11:12:56 +0000' content: | Hi Thomas! One remark to Service Broker: with the external activation mechanism in Service Broker you are also able to execute external applications when a new Service Broker message arrives. So your business logic stuff isn't directly bound to the database - you can do whatever you want when a new message arrives. Klaus Aschenbrenner www.csharp.at http://www.sqljunkies.com/weblog/klaus.aschenbrenner Upcoming book: "Pro SQL 2005 Service Broker" ---
Lot's of discussions on the support in Windows Communication Foundation for duplex channels and long running tasks:
Lots of good content to think about and explore!
Technorati: Windows Communication Foundation, WCF, Web Services. Architecture


MPV: Data Sets from Montgomery, Peck and Vining
Most of this package consists of data sets from the
textbook Introduction
to Linear Regression Analysis (3rd ed), by Montgomery, Peck
and Vining.
Some additional data sets and functions are included.
| Version: |
1.53 |
| Depends: |
R (≥ 2.0.1) |
| Published: |
2018-06-07 |
| Author: |
W.J. Braun |
| Maintainer: |
W.J. Braun <john.braun at ubc.ca> |
| License: |
Unlimited |
| NeedsCompilation: |
no |
| CRAN checks: |
MPV results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=MPV
to link to this page.


B. Hints for Better Localization
Paying attention to the details when using tags for localization can make a big difference for the quality of the results!
Camera and Lighting
Some important points when selecting a camera:
- Lighting: illuminate the tags as brightly as possible. The more light, the shorter the shutter times, the less motion blur. Avoid backlight when possible.
- Check that your camera is focused correctly for the distance you need. When in doubt, set focus to a distances a little longer than you expect (focus is most important for far away tags)
- Use a camera with global shutter, not rolling shutter. Most consumer cameras (webcams, GoPros etc) have rolling shutters that can distort objects that are in motion.
- Short shutter times are crucial for avoiding motion blur. To this end, you want:
- a large sensor with high quantum efficiency. The FLIR machine vision website (formerly PointGrey) has excellent sensor comparisons.
- a large aperture lens (but beware of focus!)
- Auto focus cameras are to be avoided because their calibration could change while recording.
- If using multiple cameras, they must be synchronized (use hardware sync!), because TagSLAM cannot handle unsynchronized camera streams!
- Higher resolution is better. If the resolution is too low, you may not be able to detect any tags.
- Generally wide-angle lenses (up to 120deg) are preferred, but they must be used in combination with a high resolution sensor.
Tag placement
Here some tips on tag placement:
- always have multiple tags in view. Localizing from a single tag is very fragile.
- make sure tags are visible (unoccluded) from all points on the camera path.
- avoid placing tags where there is a lot of backlight
- space tags as far from each other as possible, but in such a way that always multiple tags are still visible.
- resist the temptation to arrange your tags in a linear fashion, for example leaning them against the wall on the floor. TagSLAM uses a triangulation based approach, which works best with … triangles. The following video shows that better results can be obtained with 3 tags in a triangular arrangement than from 5 tags that are collinear.


OH Lottery
by The Associated PressCLEVELAND (AP) _ These Ohio lotteries were drawn Sunday:
Estimated jackpot: $226 million
1-6-7
(one, six, seven)
9-6-8-9
(nine, six, eight, nine)
3-8-2-2-2
(three, eight, two, two, two)
Estimated jackpot: $100 million
Mega Millions
Pick 3 Midday
Pick 4 Midday
Pick 5 Midday
Powerball


Estimated: {{story.points || 'N/A'}}
CURRENT
{{game.estimate.notes}}
Select your estimate
{{result.user.fullname}}
{{game.description}}
Copy the address in your browser and share with team members.


Computer Networks
Introduction
Network is the interconnection of a set of devices capable of communication.
There may be 2 kinds of devices in the network
1. Host:- also called end system. (desktop, laptop, cell phone)
2. Connecting Devices:- connects to other devices(modem, router, switch) Network Criteria
1. Performance(evaluated by throughput and delay)
2. Reliability(evaluated by frequency of failure)
3. Scalability(Adding processing capacity)
4. Security(protecting data from unauthorized access)
Application of Computer Networks
1. Business Application
a) Resource Sharing
b) High Reliability
c) Saving Money
2. Home Application
a) Access to Remote Information(WWW)
b) Person to Person communication
c) Interactive Entertainment(Live TV, Games)
Merits
• Allows File Sharing/ Resource Sharing
• Inexpensive System
• Flexible to be Used
• Increase in Storage Capacity of the Software
Demerits
• Security Difficulties(Hacking)
• Presence of Computer Viruses and Other Malwares
Network Models
• There are several classification for networks
• Classification based on Scale(size)
• Classification based on Topology
• Classification based on Architecture
Network Models : Based on Scale
• According to the scale(size) of the networks is classified into following
1. PAN (Personal Area Network)
2. LAN (Local Area Network)
3. CAN (Campus Area Network)
4. MAN (Metropolitan Area Network)
5. DAN (Desert Area Network)
6. CAN* (Country Area Network)
7. WAN (Wide Area Network)
8. GAN (Global Area Network)
Personal Area Network(PAN)
• Used for data transmission among devices such as computers, mobile phones, PDA etc.
• Within few meters like 10 meters only
• Medium : Bluetooth, Infrared
• Only very few connections will be available
Local Area Network(LAN)
• It is a computer network that spans a relatively small area
• Most LANs are confined to a single building or group of buildings
• One LAN can be connected to other LANs over any distance via telephone lines and radio waves (WAN)
• Medium: optical fibers, coaxial cables, twisted pair, wireless.
• Low latency (except in high traffic periods).
• High speed networks (0.2 Mb/sec to 1Gb/sec).
• Speeds adequate for most distributed systems
Campus Area Network(CAN)
• Computer network that links the buildings and consists of two or more local area networks (LANs) within the limited geographical area
• It can be the college campus, enterprise campus, office buildings, military base, industrial complex
• CAN is one of the type of MAN (Metropolitan Area Network) on the area smaller than MAN
• The Campus networks usually use the LAN technologies, such as Ethernet, Token Ring, Fibber Distributed Data Interface (FDDI), Fast Ethernet, Gigabit Ethernet, Asynchronous Transfer Mode (ATM)
Metropolitan Area Network(MAN)
• Metropolitan Area Network, are data networks designed for a town In terms of geographic breadth
• MANs are larger than local area networks (LANs), but smaller than wide-area networks s)
• MANs are usually characterized by very high-speed connections using fiber optical cable or other digital media
Features:
• Generally covers towns and cities (50 kms)
• Medium: optical fibers, cables.
• Data rates adequate for distributed computing applications.


It is now
Bernice Chua's Website
This website will always be improved and updated as my skills improve and update. ^_^
More coming soon!
It is now
This website will always be improved and updated as my skills improve and update. ^_^
More coming soon!