This file contains 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
SELECT a.*, b.NumberOfRows | |
FROM MYTABLE a | |
CROSS JOIN (SELECT COUNT(*) AS NumberOfRows FROM MYTABLE) b |
This file contains 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 | |
namespace Sabel; | |
class MyController | |
{ | |
public function myMethod($data) | |
{ | |
SysemReferenceNumberValue::fromString($data['systemReferenceNumber']); | |
// Use SystemReferenceNumber value object from here on out |
This file contains 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
function saveNewCustomer(customerData){ | |
return $.ajax({ | |
type:'POST', | |
url:'myUrl', | |
data:customerData, | |
dataType:'json' | |
}); | |
} | |
saveNewCustomer.done(function(response){ |
This file contains 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 | |
// Simulate connections to production applications | |
$db = connectToProduction('ADAM','MYPASS'); | |
$db = connectToProduction('AS400','MYPASS'); | |
$db = connectToProduction('CHIP','MYPASS'); | |
$db = connectToProduction('WEBUSER','WEBUSER'); | |
$i = 0; | |
while($i <= 5) { |
This file contains 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 | |
// config/application.config.php | |
$env = getenv('APPLICATION_ENV'); | |
return [ | |
'appVersion' => '1.2.9', | |
'modules' => [ | |
'Application', | |
'Scrap' | |
], | |
'module_listener_options' => [ |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<phpunit bootstrap="../Doctrine/Tests/TestInit.php" colors="true"> | |
<php> | |
<var name="db_type" value="ibm_db2"/> | |
<var name="db_host" value="myDbName" /> | |
<var name="db_username" value="WEBTEST" /> | |
<var name="db_password" value="WEBTEST" /> | |
<var name="db_name" value="DCTRNTST" /> | |
<var name="db_port" value="3306"/> |
This file contains 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
LoadModule ibm_ssl_module /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM | |
# Enable compression | |
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM | |
# Specify content types to compress | |
AddOutputFilterByType DEFLATE application/x-httpd-php application/json text/css application/x-javascript application/javascript text/html | |
# Browser caching rules | |
ExpiresActive On |
This file contains 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 | |
class CustomerId | |
{ | |
private $name; | |
private $address; | |
public function __construct($name, $address) | |
{ | |
$this->name = (string) $name; |
This file contains 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 | |
class PostMapper | |
{ | |
public function objectToDb(Post $post) | |
{ | |
return [ | |
'title' => $post->getTitle(), | |
'content' => $post->getContent() | |
]; | |
} |
This file contains 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 | |
// /Module/IbmiToolkit/src/IbmiToolkit/Factory/ToolkitFactory.php | |
namespace IbmiToolkit\Factory; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
/** | |
* Class ToolkitFactory |