Skip to main content

Posts

Showing posts from January, 2014

Masa Brooding Ayam

Propel 1.6 filtering by DATE TIME stackOverFlow

I would like to filter results as in $searchDate = "2013-03-01"; $query->usePublicationQuery() ->filterByPublishedAt($searchDate) ->endUse(); However, the problem is, that the values in this column contain also the time, i.e. they're actually timestamps (e.g. "2013-03-01 08:27:12") and I'm not allowed to change that in the schema. So how can I possibly match the pure date ignoring the time? The above query only matches entries with the time 2013-03-01 00:00:00. But I want all entries with 2013-03-01 as date, regardless of the time. I've figured out this solution and it works: ->filterByPublishedAt(array("min" => $searchDate." 00:00:00", "max" => $searchDate." 23:59:59")) http://stackoverflow.com/questions/15337355/how-can-i-filter-date-time-columns-by-dates-in-propel-1-6

Tutorial rendering form symfony di silex

Kali ini saya akan membuat tutorial tentang silex rendering form dan penangannya tanpa basa basi kita mulai saja tutorial kali ini .. Persiapan . kita ubah file composer.json yang ada di polder root silex anda, tambahkan "require": { "symfony/form": "~2.3", "symfony/validator": "~2.3", "symfony/config": "~2.3", "symfony/translation": "~2.3", "symfony/locale": "~2.3", "symfony/twig-bridge": "~2.3" } Buka terminal . masuk ke directory silex anda dan lakukan perintah "require": { # composer update Registering . buka file index.php dan tambahkan sintax di bawah ini use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\Debug\Debug; use Silex\Provider\FormServiceProvider; use Silex\Provider\TwigServiceP...

Syntax Higlight

<!-- Include required JS files --> <script src="js/shCore.js" type="text/javascript"></script> <!--     At least one brush, here we choose JS. You need to include a brush for every     language you want to highlight --> <script src="css/shBrushJScript.js" type="text/javascript"></script> <!-- Include *at least* the core style and default theme --> <link href="css/shCore.css" rel="stylesheet" type="text/css"></link> <link href="css/shThemeDefault.css" rel="stylesheet" type="text/css"></link> <!-- You also need to add some content to highlight, but that is covered elsewhere. --> <br /> <pre class="brush: js">function foo() { } </pre> <!-- Finally, to actually run the highlighter, you need to include this JS on your page --> <script type="text/javascript...