<commit_before><?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * @author <NAME> <<EMAIL>>, 2015-2016
 * @license The MIT License, http://opensource.org/licenses/MIT
 */

// The image we play with, full URL.
$my_image = image_url('playground.jpg');

?>

    <style>
        .image-container {
            border: 1px solid blue;
            display:table-cell;
            vertical-align:middle;
            text-align: center;
        }
        .image-container-120x180 {
            width: 120px;
            height: 180px;
        }
        .image-container-180x120 {
            width: 180px;
            height: 120px;
        }
    </style>

        <section>

            <div class="container">

                <div class="page-header">
                    <h1><?php echo $template['page_title']; ?></h1>
                </div>

                <div class="col-md-6">

                    <h3>Fit an Image by Width</h3>

                    <p>
                        <img src="<?php echo thumbnail($my_image, 120); ?>" />
                        <br />
                        width = 120px
                    </p>

                    <p>
                        <img src="<?php echo thumbnail($my_image, 180); ?>" />
                        <br />
                        width = 180px
                    </p>

                </div>

                <div class="col-md-6">

                    <h3>Fit an Image by Height</h3>

                    <p>
                        <img src="<?php echo thumbnail($my_image, null, 120); ?>" />
                        <br />
                        height = 120px
                    </p>

                    <p>
                        <img src="<?php echo thumbnail($my_image, null, 180); ?>" />
                        <br />
                        height = 180px
                    </p>

                </div>

                <div class="col-md-6">

                    <h3>Fit an Image by Width and Height</h3>
                    <h4 style="margin-bottom: 10px;">(the image is cropped for ratio maintaining)</h4>

                    <p>
                        <img src="<?php echo thumbnail($my_image, 180, 120); ?>" />
                        <br />
                        width = 180px, height = 120px
                    </p>

                    <p>
                        <img src="<?php echo thumbnail($my_image, 120, 180); ?>" />
                        <br />
                        width = 120px, height = 180px
                    </p>

                </div>

                <div class="col-md-6">

                    <h3>Resize an Image Within Width and Height</h3>
                    <h4 style="margin-bottom: 10px;">(the image is not being cropped)</h4>

                    <p>
                        <div class="image-container image-container-180x120">
                            <img src="<?php echo thumbnail($my_image, 180, 120, true); ?>" />
                        </div>

                        width = 180px, height = 120px
                    </p>

                    <p>
                        <div class="image-container image-container-120x180">
                            <img src="<?php echo thumbnail($my_image, 120, 180, true); ?>" />
                        </div>
                        width = 120px, height = 180px
                    </p>

                </div>

                <div class="col-md-6">

                    <h3>Fit an Image Within a Canvas with Given Width and Height</h3>
                    <h4 style="margin-bottom: 10px;">(the image fits within a canvas with a given backgrond color)</h4>

                    <p>
                        <div class="image-container image-container-180x120">
                            <img src="<?php echo thumbnail($my_image, 180, 120, true, true); ?>" />
                        </div>

                        width = 180px, height = 120px
                    </p>

                    <p>
                        <div class="image-container image-container-120x180">
                            <img src="<?php echo thumbnail($my_image, 120, 180, true, true); ?>" />
                        </div>
                        width = 120px, height = 180px
                    </p>

                </div>

            </div>

        </section><commit_msg>The Playground: Updating "Image Manipulations Test".<commit_after><?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * @author <NAME> <<EMAIL>>, 2015-2016
 * @license The MIT License, http://opensource.org/licenses/MIT
 */

// The image we play with, full URL.
$my_image = image_url('playground.jpg');

?>

    <style>
        .image-container {
            border: 1px solid blue;
            display:table-cell;
            vertical-align:middle;
            text-align: center;
        }
        .image-container-120x180 {
            width: 120px;
            height: 180px;
        }
        .image-container-180x120 {
            width: 180px;
            height: 120px;
        }
    </style>

        <section>

            <div class="container">

                <div class="page-header">
                    <h1><?php echo $template['page_title']; ?></h1>
                </div>

                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">

                                <thead>

                                    <tr>
                                        <th>Static Thumbnails</th>
                                        <th>Dynamic Thumbnails</th>
                                    </tr>

                                </thead>

                                <tfoot>

                                    <tr>
                                        <th>Static Thumbnails</th>
                                        <th>Dynamic Thumbnails</th>
                                    </tr>

                                </tfoot>

                                <tbody>

                                    <tr class="info">
                                        <td colspan="2">
                                            <h4 class="text-center">Fit an Image by Width</h4>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 120); ?>" />
                                                <br />
                                                width = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 180); ?>" />
                                                <br />
                                                width = 180px
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 120, null, null, null, true); ?>" />
                                                <br />
                                                width = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 180, null, null, null, true); ?>" />
                                                <br />
                                                width = 180px
                                            </p>
                                        </td>
                                    </tr>

                                    <tr class="info">
                                        <td colspan="2">
                                            <h4 class="text-center">Fit an Image by Height</h4>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, null, 120); ?>" />
                                                <br />
                                                height = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, null, 180); ?>" />
                                                <br />
                                                height = 180px
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, null, 120, null, null, true); ?>" />
                                                <br />
                                                height = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, null, 180, null, null, true); ?>" />
                                                <br />
                                                height = 180px
                                            </p>
                                        </td>
                                    </tr>

                                    <tr class="info">
                                        <td colspan="2">
                                            <h4 class="text-center">Fit an Image by Width and Height<br /><small>(the image is cropped for ratio maintaining)</small></h4>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 180, 120); ?>" />
                                                <br />
                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 120, 180); ?>" />
                                                <br />
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 180, 120, null, null, true); ?>" />
                                                <br />
                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <img src="<?php echo thumbnail($my_image, 120, 180, null, null, true); ?>" />
                                                <br />
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                    </tr>

                                    <tr class="info">
                                        <td colspan="2">
                                            <h4 class="text-center">Resize an Image Within Width and Height<br /><small>(the image is not being cropped)</small></h4>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <p>
                                                <div class="image-container image-container-180x120">
                                                    <img src="<?php echo thumbnail($my_image, 180, 120, true); ?>" />
                                                </div>

                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <div class="image-container image-container-120x180">
                                                    <img src="<?php echo thumbnail($my_image, 120, 180, true); ?>" />
                                                </div>
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <div class="image-container image-container-180x120">
                                                    <img src="<?php echo thumbnail($my_image, 180, 120, true, null, true); ?>" />
                                                </div>

                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <div class="image-container image-container-120x180">
                                                    <img src="<?php echo thumbnail($my_image, 120, 180, true, null, true); ?>" />
                                                </div>
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                    </tr>

                                    <tr class="info">
                                        <td colspan="2">
                                            <h4 class="text-center">Fit an Image Within a Canvas with Given Width and Height<br /><small>(the image fits within a canvas with a given backgrond color)</small></h4>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <p>
                                                <div class="image-container image-container-180x120">
                                                    <img src="<?php echo thumbnail($my_image, 180, 120, true, true); ?>" />
                                                </div>

                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <div class="image-container image-container-120x180">
                                                    <img src="<?php echo thumbnail($my_image, 120, 180, true, true); ?>" />
                                                </div>
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                        <td>
                                            <p>
                                                <div class="image-container image-container-180x120">
                                                    <img src="<?php echo thumbnail($my_image, 180, 120, true, true, true); ?>" />
                                                </div>

                                                width = 180px, height = 120px
                                            </p>

                                            <p>
                                                <div class="image-container image-container-120x180">
                                                    <img src="<?php echo thumbnail($my_image, 120, 180, true, true, true); ?>" />
                                                </div>
                                                width = 120px, height = 180px
                                            </p>
                                        </td>
                                    </tr>

                                </tbody>

                            </table>
                        </div>

            </div>

        </section>
{'fraction_non_alphanumeric': 0.09338750515221103, 'fraction_numerical': 0.027792498380733676, 'mean_word_length': 0.5258287665079507, 'pattern_counts': {'":': 0, '<': 312, '<?xml version=': 0, '>': 312, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 289, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '16921', 'n_tokens_mistral': 3525, 'n_tokens_neox': 2947, 'n_words': 792}