Android emulator delete an android virtual device
Filed Under (Others) by admin on 10-08-2011
Tagged Under : android
Delete an android virtual device a.k.a AVD
Type this on the terminal
android delete avd -n name_of_device
Delete an android virtual device a.k.a AVD
Type this on the terminal
android delete avd -n name_of_device
Hide the android window title bar on Titanium mobile
var win_home = Titanium.UI.createWindow({navBarHidden:true});
Possible cause you did not use the reverse domain name for the “–id” flag (i.e com.itlivewire.MyProject)
In creating your titanium mobile project “–id” should be in reverse domain format
e.g.
python titanium.py create --platform=android --android=/path/to/android-sdk --id=com.itlivewire.MyProject --name=MyProject
Create a titanium mobile android project using command line
titanium create --platform=android --android=/path/to/android-sdk --id=com.itlivewire.MyProject --name=MyProject
or
python titanium.py create --platform=android --android=/path/to/android-sdk --id=com.itlivewire.Myproject --name=MyProject
Problem: Setting manually the top and height of Titanium UI elements individually, just to arrange the Views to make it fluid or stack accordingly,
Solution:
On your main view add layout:’vertical’
var view = Titanium.UI.createView({layout:'vertical'});
Then on the UI you will add to the view add height:’auto’
var label = Titanium.UI.createLabel({text:'Test 1',height:'auto'});
var label = Titanium.UI.createLabel({text:'Test 2',height:'auto'});
To know what is the DNS server on your PC just type this in your terminal
cat /etc/resolv.conf
This is on hostgator and may apply also to other webhosting
When you access your codeigniter website like this
http://mywebhosting/~myweb
and you have mod re write enabled in your .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|public|tmp|images|captcha|js|css|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
SetEnv mod_rewrite_enabled 1
</IfModule>
But somehow it does not remove the index.php, so it is not working
To resolve this you have to add your webshosting username to the rewrite base
Instead of this RewriteBase / change it to this RewriteBase /~seodev
Original solution is found on codeigniter forums http://codeigniter.com/forums/viewthread/82091/
Automate the deploy of your project on svn commit, this require you have access to your svn server
On your server got to your repo folder
/usr/local/svn/my_repo
———————————————————————–
then go to hooks folder
/usr/local/svn/my_repo/hooks
———————————————————————–
then copy the post-commit.tpl to post-commit
cp post-commit.tpl post-commit
the post-commit file is a file called by subversion after every commit, basically its a bash script
———————————————————————–
chmod the post-commit file
chmod +x post-commit
———————————————————————–
Now lets edit the post-commit file.
Lets say your project dev directory resides on the same server, the post-commit file has content so we erase them all and add this
#!bin/usr/bash
cd /home/dev_website
svn up .
what the bash does is change directory to the /home/dev_website then execute the svn update command
———————————————————————————————————————————————–
and were done, next time there is no need to log in to the server just to svn update of your dev website.
The hypenated function helps you make a hypenated string.
It replaces the spaces with a hypen (-), good for SEO and clean url string.
Example: “Room nr IT Park and Country Mall”
Becomes: “Room-nr-IT-Park-and-Country Mall”
function hypenate($url){
$patterns[0]= "/,/";
$replacements[0]="";
$patterns[1]="/\s\s+/";
$replacements[1]="-";
$url = preg_replace($patterns,$replacements,$url);
return $url;
}
Usage in PHP
hypenate("The quick brown fox");
output: The-quick-brown-fox
It can also remove out specific string you don’t want to show up on your url e.g. a comma “,” just specify it on the patterns[0] array in regular expression form
$patterns[0]= "/,/";
This function will get the client’s IP adress
function getClientIP(){
if (!$_SERVER['HTTP_CLIENT_IP'])
$ip = $_SERVER['REMOTE_ADDR']
else
$ip =$_SERVER['HTTP_CLIENT_IP'];
return $ip;
}
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |
Source: Jobs at Lexmark |