<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Renatto Machado]]></title><description><![CDATA[Deus, tecnologia e ideias.]]></description><link>http://renattomachado.azurewebsites.net/</link><generator>Ghost 0.7</generator><lastBuildDate>Fri, 03 Apr 2026 18:00:24 GMT</lastBuildDate><atom:link href="http://renattomachado.azurewebsites.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Bind Class from Form in PHP]]></title><description><![CDATA[<p>Recently I had my first experience with PHP. <br>
Until then, I had only seen how PHP systems works.</p>

<p>The problem is the following, I needed to implement the CRUD, It's was about ten class and I did not want to implement for all the same code that get request values</p>]]></description><link>http://renattomachado.azurewebsites.net/2016/02/02/bind-class-from-form-in-php/</link><guid isPermaLink="false">44a32d00-1d87-4042-987b-c3ec2a2de07c</guid><category><![CDATA[PHP]]></category><category><![CDATA[DEV]]></category><dc:creator><![CDATA[Renatto Machado]]></dc:creator><pubDate>Tue, 02 Feb 2016 14:48:35 GMT</pubDate><content:encoded><![CDATA[<p>Recently I had my first experience with PHP. <br>
Until then, I had only seen how PHP systems works.</p>

<p>The problem is the following, I needed to implement the CRUD, It's was about ten class and I did not want to implement for all the same code that get request values and set in each property. <br>
So, I remembered the Bind Class from Form. After of some searchs, I did find this method:</p>

<pre><code class="language-php line-numbers">    function PopulateWithRequest($obj = NULL) {
        if (!is_object($obj)) {
            $obj = new StdClass ();
        }

        foreach ($_REQUEST as $var =&gt; $value) {
            //Set Value
            $obj-&gt;$var = trim($value); //here you can add a filter, like htmlentities ...
        }

        return $obj;
    }
</code></pre>

<p><br> <br>
I put this method in base class and after I used like this:</p>

<pre><code class="language-php line-numbers">    $entity = new Entity();
    $entity = $entity-&gt;PopulateWithRequest($entity);
</code></pre>

<p><br> <br>
I know that today exists <strong><em>Zend Framework</em></strong>, <strong><em>CodeIgniter</em></strong>, <strong><em>Laravel</em></strong>, <strong><em>CakePHP</em></strong> and several others, but the system that I was working was old and does not compensate reimplement everythink.</p>]]></content:encoded></item><item><title><![CDATA[How to change PasswordValidation in MVC 6]]></title><description><![CDATA[<p>In the Asp.Net MVC 5 using Identity, was possible to do the following:</p>

<pre><code class="language-csharp line-numbers">  manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength = 6,
                RequireLowercase = true,
                RequireDigit = false,
                RequireUppercase = false
            };  
</code></pre>

<p>How to change the same configuration in MVC 6?</p>

<p><strong>Simple!</strong></p>

<p><strong>The Solution Beta6</strong></p>

<p>In the Startup.cs write the code:  </p>

<pre><code class="language-csharp line-numbers">services.ConfigureIdentity(options =&gt;</code></pre>]]></description><link>http://renattomachado.azurewebsites.net/2016/01/26/how-to-change-passwordvalidation-in-mvc-6/</link><guid isPermaLink="false">8389f0c3-7c43-44c3-889f-9e300e5dfcc1</guid><category><![CDATA[C#]]></category><category><![CDATA[Asp.Net 5]]></category><category><![CDATA[MVC 6]]></category><category><![CDATA[Identity]]></category><category><![CDATA[DEV]]></category><dc:creator><![CDATA[Renatto Machado]]></dc:creator><pubDate>Tue, 26 Jan 2016 14:59:17 GMT</pubDate><content:encoded><![CDATA[<p>In the Asp.Net MVC 5 using Identity, was possible to do the following:</p>

<pre><code class="language-csharp line-numbers">  manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength = 6,
                RequireLowercase = true,
                RequireDigit = false,
                RequireUppercase = false
            };  
</code></pre>

<p>How to change the same configuration in MVC 6?</p>

<p><strong>Simple!</strong></p>

<p><strong>The Solution Beta6</strong></p>

<p>In the Startup.cs write the code:  </p>

<pre><code class="language-csharp line-numbers">services.ConfigureIdentity(options =&gt;  
{
    options.Password.RequireDigit = false;
    options.Password.RequiredLength = 6;
    options.Password.RequireLowercase = false;
    options.Password.RequireNonLetterOrDigit = false;
    options.Password.RequireUppercase = false;
});
</code></pre>

<p><strong>The Solution after Beta8</strong></p>

<pre><code class="language-csharp line-numbers">// Add Identity services to the services container.
services.AddIdentity&lt;ApplicationUser, IdentityRole&gt;(options =&gt;  
{
    options.Password.RequireDigit = false;
    options.Password.RequiredLength = 6;
    options.Password.RequireLowercase = false;
    options.Password.RequireNonLetterOrDigit = false;
    options.Password.RequireUppercase = false;
})
.AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
.AddDefaultTokenProviders();
</code></pre>]]></content:encoded></item><item><title><![CDATA[Solve "Java heap space" at Pentaho]]></title><description><![CDATA[<p>I was processing a big data with Pentaho in last week and I did get the follwing message: "Failed to execute runnable (java.lang.OutOfMemoryError: Java heap space)".</p>

<p>Well, thank God that the "heap space" in Java is configurable. But, how to do this only in the Pentaho?</p>

<p>Simple!!! <br>
The</p>]]></description><link>http://renattomachado.azurewebsites.net/2016/01/19/solve-java-heap-space-at-pentaho/</link><guid isPermaLink="false">8389f0c3-7c43-44c3-889f-9e300e5dfcc1</guid><category><![CDATA[Pentaho]]></category><category><![CDATA[Java]]></category><category><![CDATA[Settings]]></category><dc:creator><![CDATA[Renatto Machado]]></dc:creator><pubDate>Tue, 19 Jan 2016 15:02:02 GMT</pubDate><content:encoded><![CDATA[<p>I was processing a big data with Pentaho in last week and I did get the follwing message: "Failed to execute runnable (java.lang.OutOfMemoryError: Java heap space)".</p>

<p>Well, thank God that the "heap space" in Java is configurable. But, how to do this only in the Pentaho?</p>

<p>Simple!!! <br>
The solution is: edit the sponn (.bat or .sh) and change the variable PENTAHO<em>DI</em>JAVA_OPTIONS. <br>
By default, this variable have the value "-Xmx512m" means 512Mb of space. So just you set "-Xmx2g" to change the heap space for 2Gb.</p>]]></content:encoded></item></channel></rss>