Install the git-prompt script using curl:
curl https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
Load the git-prompt.sh
script in your ~/.bash_profile
Place these two lines in your bash_profile
-(void)request:(id)args | |
{ | |
ENSURE_UI_THREAD(request,args); | |
NSDictionary * params = [args objectAtIndex:0]; | |
NSString *urlString = [params objectForKey:@"url"]; | |
ENSURE_STRING(urlString); | |
NSDictionary * paramDict = [params objectForKey:@"params"]; | |
NSLog(@"[INFO] params is: %@",paramDict); |
requestButton.addEventListener('click',function(e){ | |
module.request({ | |
params: { | |
screen_name: 'marcelpociot', | |
count: 10 | |
}, | |
url: "http://api.twitter.com/1/statuses/user_timeline.json", | |
method: 'get', | |
success: function(e){ | |
alert(e); |
- (IBAction)btn_reg_onClick:(id)sender { | |
reg_animation_modus = !(reg_animation_modus); | |
int k; | |
if( reg_animation_modus ){ | |
k = 1; | |
[btn_einloggen setTitle:@"Registrieren" forState:UIControlStateNormal]; | |
} else { | |
k = -1; | |
[btn_einloggen setTitle:@"Einloggen" forState:UIControlStateNormal]; | |
} |
for( var key in req ){ | |
var value = req[key]; | |
$('input[type="text"][name="'+key+'"]').val(value); | |
$('input[type="checkbox"][name^="'+key+'"]').removeAttr('checked'); | |
$('input[type="checkbox"][name="'+key+'"][value="'+value+'"]').attr('checked','checked'); | |
if( typeof value === 'object' ){ | |
for(var i=0;i<value.length;i++){ | |
var check = value[i]; | |
$('input[type="checkbox"][name^="'+key+'"][value="'+check+'"]').attr('checked','checked'); | |
} |
// Private variable data | |
var data = {}; | |
function setValue(key,value){ | |
data[key] = value; | |
} | |
function getValue(key){ | |
return data[key]; | |
} |
<?php | |
/** | |
* HTTP Request | |
* Wrapper Class | |
* | |
* @author Marcel Pociot | |
* @copyright Marcel Pociot 2009-2013 | |
*/ | |
namespace CR; |
local composer = require( "composer" ) | |
local scene = composer.newScene() | |
local ads = require "ads" | |
local widget = require "widget" | |
local nextScene = function() | |
composer.gotoScene("ad2") | |
end | |
function scene:create( event ) |
var win = Ti.UI.createWindow(); | |
var webView = Ti.UI.createWebView({ | |
url: 'test.html' | |
}); | |
webView.addEventListener( "beforeload", function(e) | |
{ | |
Ti.API.info( e.url ); | |
}); | |
win.add( webView ); | |
win.open(); |
<!-- | |
This should use the "ListView" Alloy parser, to support Templates, but it should use the 'createCollectionView' method | |
instead of createListView, createListSection, etc... | |
Is this possible? | |
--> | |
<ListView id="listView" defaultItemTemplate="template" ns="require('de.marcelpociot.collectionview')"> | |
<Templates> | |
<ItemTemplate name="template"> | |
<ImageView bindId="pic" id="icon" /> |