Skip to content

Instantly share code, notes, and snippets.

View phpdave's full-sized avatar

UseTheForceDave phpdave

View GitHub Profile
@phpdave
phpdave / Error clicking indexes in System nav.txt
Last active April 6, 2016 19:42
In the IBM i System navigator if you click on indexes of a Schema/Library I get this error:
---------------------------
System i Navigator
---------------------------
An error occurred while attempting to initialize the list.
[SQL0440] Routine INDEX_PARTITION_STATISTICS in *N not found with specified parameters. Cause . . . . . : A function or procedure with the specified name and compatible arguments was not found. Recovery . . . : Specify the correct number and type of parameters on the CALL statement or function invocation. Try the request again.
---------------------------
OK
---------------------------
@phpdave
phpdave / selenium-php-webdriver-cheatsheet.md
Created April 5, 2016 16:45 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

( SELECT SUM ( FIEL ) AS "SOMEE FIEL" , SUM ( FIELD1234567890 ) AS "SOMEE AliasT
hatisbroken" , SUM ( SOMEFIELD1234 ) AS "Some alias is here123" , AVERYLONGFIELD
NAME1 FROM MYLIB . SOMETABLE12345678901234 WHERE SOMEFIELD < SOMEPARAMETER12 GRO
Dcl-ds PARM1_Ds Extname('FILE') Qualified End-ds;
Incoming parameter definition
Dcl-pr Entry Extpgm('RPGNAME');
PARM1 Char(%Len(PARM1_Ds.FIELDOFPARM1));
End-pr;
* Incoming parameter definition
Dcl-pi Entry;
PARM1 Char(%Len(PARM1_Ds.PARM1));
Dcl-ds PARM1_Ds Extname('FILE') Qualified End-ds;
Incoming parameter definition
Dcl-pr Entry Extpgm('RPGNAME');
PARM1 Char(%Len(PARM1_Ds.FIELDOFPARM1));
End-pr;
* Incoming parameter definition
Dcl-pi Entry;
PARM1 Char(%Len(PARM1_Ds.PARM1));
// Declare the resultset
D rsTable1 S SQLTYPE(RESULT_SET_LOCATOR)
// Declare data structures for data from cursors
D rows DS Qualified Dim(500)
D KEY1 3I 0
D KEY2 4I 0
D TOTAL_FIELD3 31I 2
D TOTAL_FIELD4 31I 2
SELECT
a.KEY1,
a.KEY2,
SUM(COALESCE (TOTAL_FIELD3,0)) AS TOTAL_FIELD3,
SUM(COALESCE (TOTAL_FIELD4,0)) AS TOTAL_FIELD4
FROM
TABLE1 a
LEFT JOIN
(SELECT
SUM(FIELD3) AS TOTAL_FIELD3,
php -d error_reporting=E_ALL -d display_errors=on -d display_startup_errors=on -r "$foo = ini_get(\"error_reporting\"); var_dump($foo);$foo = ini_get(\"display_errors\"); var_dump($foo);$foo = ini_get(\"display_startup_errors\"); var_dump($foo);"
@phpdave
phpdave / index.php
Last active March 29, 2016 14:32
"C:\xampp\php\php.exe" "C:\MyProjects\WebDriverTests\index.php"
<?php
require_once('vendor/autoload.php');
$_SERVER['APPLICATION_ENV']='development';
$_SERVER['APPLICATION_URL_PREFIX']='development.';
StartSeleniumServer();
RunTests();
function RunTests()
{
$tries=100;
@phpdave
phpdave / Dynamic compound statements.sql
Last active March 28, 2016 01:34
Examples of how to run Stored Procedures or Dynamic compound statements in Netbeans IDE Database Service
DELIMITER //
BEGIN
CREATE TABLE QTEMP.TEST1 AS (SELECT * FROM MYLIB.MYTABLE)
WITH DATA;
CREATE TABLE QTEMP.TEST2 AS (SELECT * FROM MYLIB.MYTABLE)
WITH DATA;
END //
DELIMITER ;
SELECT * FROM QTEMP.TEST2;
SELECT * FROM QTEMP.TEST3;