eg:
|
1 2 3 4 5 6 7 8 9 10 11 |
function wrap(event) if (object.x<20)then object.x=20; --define position of the object to wrap end end Runtime:addEventListener("enterFrame",wrap) |
let us make technology work for you
eg:
|
1 2 3 4 5 6 7 8 9 10 11 |
function wrap(event) if (object.x<20)then object.x=20; --define position of the object to wrap end end Runtime:addEventListener("enterFrame",wrap) |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?php function byVal($arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } function byRef(&$arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } $arg = 'bar'; byVal($arg); byRef($arg); ?> |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<?php $file = 'monkey.gif'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit; } ?> |
You can use three different attributes to customize the appearance of your text shadow:
android:shadowColor Shadow color in the same format as textColor.
android:shadowRadius Radius of the shadow specified as a floating point number.
android:shadowDx The shadow’s horizontal offset specified as a floating point number.
android:shadowDy The shadow’s vertical offset specified as a floating point number.
The floating point numbers don’t have a specific unit – they are merely arbitrary factors.
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”A light blue shadow.”
android:shadowColor=”#00ccff”
android:shadowRadius=”1.5″
android:shadowDx=”1″
android:shadowDy=”1″
/>
Sencha Touch is the latest and most powerful of web app frameworks. Web apps are mobile applications that run on a web browser (just browse the URL) but, with the look, feel and functionality of a native app
There are many examples out there for Sencha Touch but, I couldn’t find one that explains the absolute basic outline of a Sencha Touch project. Here I will explain what the basic outline of a Sencha Touch project looks like:
index.html
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<!DOCTYPE html> <html> <head> <title>Learn Sencha</title> <script src="lib/touch/sencha-touch.js" type="text/javascript"></script> <link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" /> <script> Ext.setup({ onReady: function() { // This is the absolute skeleton of a Sencha Touch file. // When the DOM is ready for you to play with, this function will be called. // All your Sencha Touch code should go in here. } }); </script> </head> <body></body> </html> |
It is always recommended not to embedded Javascript inline like this. Preferably, create a file called app.js and put the Javascript code in it. Include the js file in your HTML. So, finally you will end up with 2 files like this:
index.html
|
1 2 3 4 5 6 7 8 9 10 |
<!DOCTYPE html> <html> <head> <title>Learn Sencha</title> <script src="lib/touch/sencha-touch.js" type="text/javascript"></script> <link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" /> <script src="app.js" type="text/javascript"></script> </head> <body></body> </html> |
|
1 2 3 4 5 6 7 |
Ext.setup({ onReady: function() { // This is the absolute skeleton of a Sencha Touch file. // When the DOM is ready for you to play with, this function will be called. // All your Sencha Touch code should go in here. } }); |
Assuming you know how to create a custom module, consider a case where you need to create a URL for your module. Follow these steps:
In your module’s config.xml file:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<modules> ..... </modules> <global> .... </global> <frontend> <routers> <schurl> <span style="background-color: yellow">--> name that will used in the URL</span> <use>standard</use> <span style="background-color: yellow">---> <em>standard</em> means its a frontend url; <em>admin</em> will mean it is a backend url</span> <args> <module>Mage_Schogini</module> <span style="background-color: yellow">---> which is the module to be used</span> <frontName>schurl</frontName> <span style="background-color: yellow">---> name that will used in the URL</span> </args> </schurl> </routers> </frontend> <default> ..... </default> |
Create a controller file TestController.php in your module’s controller folder like this (as you may have guessed, my modules name is Schogini):
|
1 2 3 4 5 6 7 |
class Mage_Schogini_TestController extends Mage_Core_Controller_Front_Action { public function showmsgAction() { echo 'Here'; } } |
This is what happens when you browse this URL
http://mymagentostore.com/schurl/test/showmsg/
Hence, it will look for the method showmsg() inside the Mage_Schogini_TestController class
|
1 2 3 4 5 6 7 8 |
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="false" android:lines="5" android:layout_marginLeft="10dip" android:layout_marginRight="10dip" android:gravity="top|left" /> |
Here the android:lines attribute is used to set the no. of lines visible. The android:gravity attribute sets the cursor to top left corner.
|
1 2 3 4 5 6 7 8 9 |
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)strin{ //Check that response is should be maximum 5 characters if ([strin length] > 0) { return [textField.text length] < 5; } |
return YES;
}
Beginning with API Level 8, we can allow your application to be installed on the external storage
To allow the system to install your application on the external storage, modify your manifest file to include the android:installLocation attribute in the <manifest> element, with a value of either “preferExternal” or “auto“. For example:
|
1 2 3 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" ... > |