Skip to content

Instantly share code, notes, and snippets.

</programlisting>
</example>
</para>
+
+ <sect2 xml:id="functions.scalar-type-declaration">
+ <title>Type Declaration</title>
+ <note>
+ <para>
+ Type declaration is also known as Type Hinting.
+ </para>
@pasindud
pasindud / Ideamart_Delivery_Report.php
Created May 3, 2015 15:15
Ideamart Delivery Report
<?php
header('Content-type: application/json');
echo json_encode(array("statusCode"=>"S1000","statusDetail"=>"Success"));
$payload = file_get_contents("php://input");
$data = json_decode($payload,true);
/*
echo $data['destinationAddress'];
echo $data['timeStamp'];
@pasindud
pasindud / subs.php
Created April 13, 2015 03:55
Ideamart Subcription Notification
<?php
$notification = json_decode(file_get_contents('php://input'), true);
error_log($notification['status'],$notification['subscriberId']);
{"url":"http:\/\/preview.php.net\/manual\/en\/phdoe-1425257537-function.json-decode.php","log":{"buildCmd":"cd '\/local\/web\/sites\/edit.php.net\/data\/phpdoc-all\/'; \/usr\/bin\/php doc-base\/configure.php --with-php='\/usr\/bin\/php' --generate='en\/reference\/json\/functions\/json-decode.xml'; \/local\/oldphp\/bin\/phd --package PHP --format php --memoryindex -d doc-base\/.manual.xml --output '\/local\/web\/sites\/edit.php.net\/data\/phpdoc-all-new\/output-830a8cb1741411744b00f13ee7c73a87\/'","buildLog":["configure.php: $Id: configure.php 335565 2015-01-02 18:12:51Z bjori $","PHP version: 5.3.10-1ubuntu3.14","","Checking for source directory... \/local\/web\/sites\/edit.php.net\/data\/phpdoc-all\/doc-base","Checking for output filename... \/local\/web\/sites\/edit.php.net\/data\/phpdoc-all\/doc-base\/.manual.xml","Checking whether to include CHM... no","Checking for PHP executable... \/usr\/bin\/php5","Checking for language to build... en","Checking whether the language is supported... yes","Checking for
{
"data":[
{
"prefix":[77,66],
"carrier":"dialog",
"area":"all"
}
]
@pasindud
pasindud / youtube.json
Last active August 29, 2015 14:14
termish-youtube-search-definition.json
{
"name": "youtube",
"endpoints": ["gdata.youtube.com"],
"scriptUrl": "https://rawgit.com/pasindud/0f9b8a815808b030328c/raw/b93988bee67fe37dd131f589b899b81f3a235eb8/youubesearch.js"
}
@pasindud
pasindud / youubesearch.js
Last active August 29, 2015 14:14
termish youtube search
'use strict';
jQuery.get("https://gdata.youtube.com/feeds/api/videos?vq=pasindudesilva&alt=json",function(d){
stdout(null, d);
return true;
});
<?php
ini_set('max_execution_time', 300);//increasing the code running time
$connect = mysql_connect('127.0.0.1', 'username', 'password');
$query1 = "SELECT id, word FROM `word_list_comments_stage2`";
mysql_select_db("irajw");
$result1=mysql_query($query1);
@pasindud
pasindud / ideamart-query-base.php
Created January 11, 2015 15:08
Ideamart PHP API Query Base
$url = "https://api.dialog.lk/subscription/query-base";
base($url,'APPID','password');
function base($url,$appid,$pw){
$arrayField = array("applicationId" => $appid,
"password" => $pw
);
@pasindud
pasindud / subscription.php
Created December 26, 2014 16:08
Ideamart Subscription Snippet
<?php
$url = "http://api.dialog.lk:8080/subscription/send";
subcribe('APP_005755','asda',$address);
function subcribe($url,$appid,$pw,$sub){
$arrayField = array("applicationId" => $appid,
"password" => $pw,