<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NewSourceMedia Blog &#187; numbers</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/numbers/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Mon, 07 May 2012 01:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Get Total Number of Likes from Facebook Page</title>
		<link>http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/</link>
		<comments>http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 02:04:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[likes]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[Tracking]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/?p=775</guid>
		<description><![CDATA[<span class="image-rss"><a href="http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/"><img title="Get Total Number of Likes from Facebook Page" src="http://newsourcemedia.com/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-09-at-10.02.08-PM.png" alt="Get Total Number of Likes from Facebook Page" width="0" height="200" /></a></span><br/>You can always use a custom Facebook Like Button that displayes the number of likes from the FB Developer’s page. But if you’re looking to control the way that number is displayed (maybe a large font or in a funky &#8230; <a href="http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span class="image-rss"><a href="http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/"><img title="Get Total Number of Likes from Facebook Page" src="http://newsourcemedia.com/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-09-at-10.02.08-PM.png" alt="Get Total Number of Likes from Facebook Page" width="0" height="200" /></a></span><br/><a href="http://newsourcemedia.com/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-09-at-10.02.08-PM.png"><img class="alignnone size-full wp-image-776" title="Pepsi Facebook Page Numbers" src="http://newsourcemedia.com/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-09-at-10.02.08-PM.png" alt="" width="549" height="182" /></a>

<a href="http://newsourcemedia.com/blog/wp-content/uploads/2011/04/Screen-shot-2011-04-09-at-10.02.08-PM.png"></a>You can always use a custom Facebook Like Button that displayes the number of likes from the FB Developer’s page. But if you’re looking to control the way that number is displayed (maybe a large font or in a funky graphic), you can access this information using the<span id="more-775"></span> Facebook Graph API URL. It will return all the Page information in a JSON data format like so using Pepsi’s Page:

http://graph.facebook.com/56381779049

The number 56381779049 could be the Page or User ID you’re referring to on Facebook. Notice how it will return a array of information. You will find that total number on the line labeled “likes”.

&nbsp;]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/get-total-number-of-likes-from-facebook-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Leading Zero for Double Digit Numbers</title>
		<link>http://newsourcemedia.com/blog/php-leading-zero-for-double-digit-numbers/</link>
		<comments>http://newsourcemedia.com/blog/php-leading-zero-for-double-digit-numbers/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 06:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Math and Numbers]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[double digit]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[leading zero]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ten.]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-leading-zero-for-double-digit-numbers/</guid>
		<description><![CDATA[How to output a number with leading zero like dates and time. Question: In php, how do I format my numbers so that all numbers have a double digit. I am displaying the number of days in a month and &#8230; <a href="http://newsourcemedia.com/blog/php-leading-zero-for-double-digit-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[How to output a number with leading zero like dates and time.
<span id="more-171"></span>
Question:
In php, how do I format my numbers so that all numbers have a double digit. I am displaying   the number of days in a month and have to match the date formatted for day.

Answer:
Just check the number value during a loop in php to see if it's less then 10.
Php code is below:
If so then add the leading zero to your string.

<code>&lt;?
for ($num = 1; $num &lt;= 31; $num++) {
if($num&lt;10)
$day = "0$num"; // add the zero
else
$day = "$num"; // don't add the zero
echo "&lt;p&gt;$day&lt;/p&gt;";
?&gt;</code>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/php-leading-zero-for-double-digit-numbers/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP Validation Numbers Only From</title>
		<link>http://newsourcemedia.com/blog/php-validation-numbers-only-from/</link>
		<comments>http://newsourcemedia.com/blog/php-validation-numbers-only-from/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 06:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Forms]]></category>
		<category><![CDATA[Math and Numbers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[digit]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[phone number]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[zip code]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-validation-numbers-only-from/</guid>
		<description><![CDATA[How to check for number values only and block or convert letter strings to integers. Question: How to validate number values to and block all letters and symbol in a form. Answer: You can check the value or convert the &#8230; <a href="http://newsourcemedia.com/blog/php-validation-numbers-only-from/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[How to check for number values only and block or convert letter strings to integers.
<span id="more-170"></span>

<strong>Question:</strong> How to validate number values to and block all letters and symbol in a form.

<strong>Answer:</strong> You can check the value or convert the value to an integer (number).

1) Check a value using is_int() to finds whether the given variable is an integer

<code>&lt;?
if(is_int($variable))
echo "Pass test";
else
echo "Please use only numbers";
?&gt; </code>

2) Note: To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use is_numeric().

<code>&lt;?
if(is_numeric($variable))
echo "Pass test";
else
echo "Please use only numbers";
?&gt; </code>

3) Convert the value to an integer (number) using settype.

<code>&lt;?php
$foo = "5bar"; // string
$bar = true; // boolean</code>

settype($foo, "integer"); // $foo is now 5 (integer)
settype($bar, "string"); // $bar is now "1" (string)
?&gt;

or you can use int to do the trick.

<code>
&lt;?
$int=593; // $int is a integer
$int.=""; // $int is now a string
?&gt;
</code>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/php-validation-numbers-only-from/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Formatting Numbers in Flash for Commas</title>
		<link>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/</link>
		<comments>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[commas]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2007/09/14/formatting-numbers-in-flash-for-commas/</guid>
		<description><![CDATA[Here is how to use actionscript to format a number in Flash with commas per thousands. my_number = "12587654325"; // array in sections of 3 to separate with commas trace(my_number); var dollar_array:Array = new Array(); var start:Number; var end:Number = &#8230; <a href="http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Here is how to use actionscript to format a number in Flash with commas per thousands.
<span id="more-161"></span>

my_number = "12587654325";

// array in sections of 3 to separate with commas
trace(my_number);
var dollar_array:Array = new Array();
var start:Number;
var end:Number = my_number.length;
trace(my_number.length);
while (end &gt; 0) {
trace(end);
start = Math.max(end - 3, 0);
dollar_array.unshift(my_number.slice(start, end));
end = start;
}

// assign a comma delimited value from dollar_array
my_number = dollar_array.join(",");
trace(my_number);]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Non Alphanumeric Characters Regex</title>
		<link>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/</link>
		<comments>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascripts]]></category>
		<category><![CDATA[JS Forms]]></category>
		<category><![CDATA[alph]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[alphabetic]]></category>
		<category><![CDATA[alphanumeric]]></category>
		<category><![CDATA[alphnumeric]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[hyper]]></category>
		<category><![CDATA[hypertext]]></category>
		<category><![CDATA[javascript examples]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[letters]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[numeral]]></category>
		<category><![CDATA[numeric]]></category>
		<category><![CDATA[only]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2006/12/28/javascript-non-alphanumeric-characters-regex/</guid>
		<description><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces Say you want to stop users from entering non-aphanumeric characters or white spaces. Using regular expressions would be the easiest method: Here is my javascript code: &#8230; <a href="http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces
<span id="more-175"></span>

Say you want to stop users from entering non-aphanumeric characters or white   spaces.

Using regular expressions would be the easiest method:

Here is my javascript code:

<code>&lt;script language="Javascript"&gt;
function alphaNumericCheck(){
var regex=/^+$/; //^+$/
if(regex.test(document.add_data.password.value)){
alert("Good")
return true;
} else {
alert("Please fix: password")
return false;
}
}
&lt;/script&gt; </code>
For numbers only use /^+$/

For mixed text and numbers, with spaces /^+$/

Here are more useful regular expressions:

<code> any letter
d any number; same as 
D any NOT number; same as 
w any alphanumeric character; same as 
W any NON-alphanumeric character; same as 
s any whitespace (tab, space, newline, etc...)
S any NON-whitespace
n newline
t tab</code>

To view a full html sample of the above code click the links below using regular   expressions in JavaScript]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Actionscript Converting Negitive to Positive Numbers</title>
		<link>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/</link>
		<comments>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/#comments</comments>
		<pubDate>Sat, 11 Dec 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[absolut]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[mathematical]]></category>
		<category><![CDATA[negitive]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[positive]]></category>
		<category><![CDATA[positive number]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2004/12/10/actionscript-converting-negitive-to-positive-numbers/</guid>
		<description><![CDATA[Needed to know the simples way to convert a number from positive to negative or negative to positive in actionscripts. Here it is. This is a revise to the flash actionscript tutorial on converting negitive numbers to positive numbers. Now &#8230; <a href="http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Needed to know the simples way to convert a number from positive to negative or negative to positive in actionscripts. Here it is.
<span id="more-207"></span>

This is a revise to the flash actionscript tutorial on converting negitive numbers to positive numbers.

<strong>Now use Abs() function in flash actionscript</strong>
<h3>Math.abs()</h3>
The flash Math.abs() method is used to return the absolute value of x. This basically means it returns the distance between 0 and x in flash actionscript.

Although -5 is a negative number, it's absolute value is the same as 5. This is because -5 has a distance of 5 from x just as 5 has a distance of 5 from x.

Example:
<p class="code">Math.abs(-10); // Returns 10
Math.abs(10); // Returns 10
<h3>Old Tutorial on Converting Negatives to Positive and Positive to Negative numbers</h3>
I needed to know the simples way to convert a number from                        positive to negative or negative to positive in actionscripts.                        Here it is:


<p class="sourceCODE">// convert 100 to negative -100
n = 100;
n = - n;
trace(n);// will = -100
// convert -55 to positive 50
n = -50;
n = - n;
trace(n);// will = 50



This is how it work. Zero minus a positive number = a negative                        number. And Zero minus a negative number = a positive number.]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
