This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A | |
ABA | |
ABCBA | |
ABCDCBA | |
ABCDEDCBA | |
ABCDEFEDCBA | |
ABCDEFGFEDCBA | |
ABCDEFGHGFEDCBA | |
ABCDEFGHIHGFEDCBA | |
ABCDEFGHIJIHGFEDCBA |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = 'foo'; | |
while(!empty($input)) { | |
fwrite(STDOUT, "Enter something: "); | |
$input = trim(fgets(STDIN)); | |
fwrite(STDOUT, "\nYou entered: $input\n"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$person = (object) array( | |
"name" => "Eric", | |
"location" => "SF", | |
"sayHello" => function () { | |
return "Hello!"; | |
} | |
); | |
// does not work with anonymous functions in PHP | |
var_dump($person->sayHello()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Bitmap Blur(Bitmap image, Rectangle rectangle, Int32 blurSize) | |
{ | |
Bitmap blurred = new Bitmap(image.Width, image.Height); | |
// make an exact copy of the bitmap provided | |
using(Graphics graphics = Graphics.FromImage(blurred)) | |
graphics.DrawImage(image, new Rectangle(0, 0, image.Width, image.Height), | |
new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); | |
// look at every pixel in the blur rectangle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Bitmap Pixelate(Bitmap image, Rectangle rectangle, Int32 pixelateSize) | |
{ | |
Bitmap pixelated = new System.Drawing.Bitmap(image.Width, image.Height); | |
// make an exact copy of the bitmap provided | |
using (Graphics graphics = System.Drawing.Graphics.FromImage(pixelated)) | |
graphics.DrawImage(image, new System.Drawing.Rectangle(0, 0, image.Width, image.Height), | |
new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); | |
// look at every pixel in the rectangle while making sure we're within the image bounds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Bitmap BlackAndWhite(Bitmap image, Rectangle rectangle) | |
{ | |
Bitmap blackAndWhite = new System.Drawing.Bitmap(image.Width, image.Height); | |
// make an exact copy of the bitmap provided | |
using(Graphics graphics = System.Drawing.Graphics.FromImage(blackAndWhite)) | |
graphics.DrawImage(image, new System.Drawing.Rectangle(0, 0, image.Width, image.Height), | |
new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); | |
// for every pixel in the rectangle region |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web.Mvc; | |
using System.Text; | |
namespace Web.Extensions | |
{ | |
public static class HtmlHelperExtensions | |
{ | |
#region Private Statics | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="test">just testing</div> |