Monday 30 September 2013

Very Simple use to MATH function in javascript

// This one is very simple blog to understand littlebit about MATH function in appcelerator.

// This one is very to easy but i want to share it because today i waste my 3 hour in one simple line code

// I just want to do one simple this like if i get value
3.5 it would be 4 same as,
4.1 it would be 4 same as,
4.9 it would be 5 same as.

It means simple ROUND .

But i didnt think about MATH function at that time . I just try it my own way that one is successful but here one simple mathod ROUND in MATH with the use of this function i easily get may goal.

Example : 
  1. var ratingInfo = Math.round(2.5);
  2. var ratingInfo = Math.round(3.9);
  3. var ratingInfo = Math.round(4.1);
  4. var ratingInfo = Math.round(2.7);
Output :)
  1. 3
  2. 4
  3. 4
  4. 3
This one is very easy in Appcelerator i use this function for Rating Functionality in my Application.

There are lots of other part method is available in MATH .

Like

1 ) Math.random() :  It return a random number between 0 and 1.

2 ) Math.max(15,10) : It return the number with the highest value of two specified numbers.

3) Math.min(25,40) : It return the number with the lowest value of two specified numbers.

That one really helpful me its very easy but it help me a lot so i share it with you.

I hope it helps to all.



 

Monday 16 September 2013

Text To Speech Available in Appcelerator MarketPlace

// Text To Speech is very good thing and i already create blog on that and many people like it.

// One day i decide to share that product with Appcelerator. i just send that to appcelerator that accept that and that product is now in marketplace.

// That product is available in Open Marketplace and that created in alloy. 

// Best thing of that code is that work fine in both platform .

// Same code works for both (iOS , android)

// Most Important Point in Text TO Speech  :)

"Google now requires an API Key to use Google Translate on your website and charges $20 USD per million characters. Question: Where do you add the key within the above URL in order not to get a 404 message from Google"

Here, i share with you marketplace link with the help of this link you can directly download that sample code and i hope that it will help you a lot.

Download Link :)  https://marketplace.appcelerator.com/apps/6518?837327809

Slider widget In Appcelerator Marketplace

// The slider like facebook is now available in appcelerator Open Marketplace. 

// And the best thing is that product is accepeted by appcelerator i really happy about this.

// That product is available in Open Marketplace and that created in alloy. 

// Best thing of that widget is that work fine in both platform .

// There is not difference in that widget look and feel and also in their how is works.

// Same code works for both (iOS , android)

Here, i share with you marketplace link with the help of this link you can directly download that sample widget and i hope that it will help you a lot.

Download Link :)  https://marketplace.appcelerator.com/apps/6373?2033952617