Skip to content

Instantly share code, notes, and snippets.

View eyedol's full-sized avatar
💾
WWWorking...

Henry Addo eyedol

💾
WWWorking...
View GitHub Profile
<manifest>
...
<application>
<!-- BroadcastReceiver that listens for incoming SMS messages -->
<receiver android:name=".SmsReceiver"
android:permission="android.permission.BROADCAST_SMS">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter>
</receiver>
<!-- Receiver for pre kitkat. This is disabled when it's kitkat and above -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiver" android:enabled="@bool/is_pre_kitkat" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<!-- Receiver for kitkat. This is disabled when it's pre-kitkat release -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiverKitKat"
android:enabled="@bool/is_kitkat" android:permission="android.permission.BROADCAST_SMS" >
{{#if tags}}
<select>
{{#each tags}}
<option value="{{tag}}">{{tag}}</option>
{{/each}}
</select>
{{/if}}
define(['App', 'marionette', 'handlebars','underscore', 'alertify', 'models/ApiExplorerModel',
'text!templates/api-explorer/ApiExplorerView.html'],
function( App, Marionette, Handlebars, _, alertify, ApiExplorerModel, template)
{
return Marionette.ItemView.extend(
{
template: Handlebars.compile(template),
apiUrl : App.config.baseurl + App.config.apiuri +'/',
initialize : function()
<?php defined('SYSPATH') or die('No direct script access allowed');
/**
* Api_Service
*
* This class runs the API service. It abstracts the details of handling of the API
* requests from the API controller. All task switching and routing is handled by
* this class.
*
* The API routing works through inversion of control (IoC). The name of the library
* that services the api request is inferred from the name of the task. Not all API
<?php defined('SYSPATH') or die('No direct script access allowed');
/**
* Api_Service
*
* This class runs the API service. It abstracts the details of handling of the API
* requests from the API controller. All task switching and routing is handled by
* this class.
*
* The API routing works through inversion of control (IoC). The name of the library
* that services the api request is inferred from the name of the task. Not all API
if (Kohana::find_file('libraries/api',
Kohana::config('config.extension_prefix').$library_file_name)) // Library file exists
{
include Kohana::find_file('libraries/api', Kohana::config('config.extension_prefix').$library_file_name);
print_r(die($library_file_name));
// Create instance of the implementing library/class
$api_object = new $library_file_name(&$this);
jsonObject = new JSONObject(response);
JSONObject payloadObject = jsonObject.getJSONObject("payload");
if (payloadObject != null) {
task = payloadObject.getString("task");
if (task.equals("sendsms")) {
jsonArray = payloadObject.getJSONArray("messages");
for (int index = 0; index < jsonArray.length(); ++index) {
jsonObject = jsonArray.getJSONObject(index);
<%
dim Conn
dim rs
dim rs2
dim cn
dim str
dim msg
dim from
dim message
dim stmt
CREATE TABLE IF NOT EXISTS `adsense_settings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ad_border` varchar(15) NOT NULL,
`ad_pub_id` varchar(25) NOT NULL,
`ad_channel` varchar(25) NOT NULL,
`ad_size` int(11) NOT NULL,
`ad_type` varchar(11) NOT NULL,
`ad_placement` int(11) NOT NULL,
`ad_border_color` varchar(15) NOT NULL DEFAULT 'FFFFFF',
`ad_text_color` varchar(15) NOT NULL DEFAULT '000000',