Website owners of Twtter.com and Wikapedia.com were fined $156,000. These resources duplicated web design and content from original valid sources and used as their own while charging users for use as well as misdirecting online users into winning a free Apple iPad.
This fine isn't big enough to affect the market or actual owners of valid websites but these copies fooled users into giving away money.
Given the factor that websites look alike, online users were fooled by being notified of winning a large prize (in this case Apple iPad) after which the user was requested to fill out a form sent through SMS. Each response sent by the user resulted in $2.3 charge on their bill.
A female consumer has filed a complained indicating that approximately $98 has been charged to her account. After a number of complaints special operations unit looked into the issue and closed down both websites and their domain names. As for the owners of these websites, they were fined and forced to return all money spent by users online.
PC Technology
Monday, February 20, 2012
Wednesday, February 1, 2012
PHP PDO Count Results - MySQL
Many PHP developers are seeking a solution in counting number of returning rows from a result set using SELECT statement. The PDOStatement::rowCount( void ) function only works for DELETE, INSERT and/or UPDATE statements by counting affected rows. So that's out.
To help you out there are two solutions I found to be most efficient (if you found other ones please post them so we can all learn from each other and continue developing efficient applications).
Method #1:
Create a database handle:
After some research I read that method 1 may break when working with large data sets, I personally haven't had a problem yet.
Method #2:
This method to count number of rows in a result set also works but this method requires two database requests. First (the example below) request is used to see if any results are returned and second time you run the same request to database without the use of COUNT() function.
Create database handle:
To help you out there are two solutions I found to be most efficient (if you found other ones please post them so we can all learn from each other and continue developing efficient applications).
Method #1:
Create a database handle:
$dbh = new PDO("mysql:host=localhost;dbname=yourdb', 'username', 'password');
Create SQL query to retrieve records from your database:$query = "SELECT * FROM table1";Prepare your query for execution:
$stm = $dbh->prepare($query);Execute the statement:
$stm->execute();Get all records into one variable (fetchAll() returns an array):
$result = $stm->fetchAll();$result variable is an array which holds other data arrays for each row, so just count them:
$number_of_rows = count($result);Print result or whatever you want to do with it:
echo 'Number of rows: ' . $number_of_rows;
After some research I read that method 1 may break when working with large data sets, I personally haven't had a problem yet.
Method #2:
This method to count number of rows in a result set also works but this method requires two database requests. First (the example below) request is used to see if any results are returned and second time you run the same request to database without the use of COUNT() function.
Create database handle:
$dbh = new PDO("mysql:host=localhost;dbname=yourdb', 'username', 'password');
Create SQL query to retrieve records from your database but now use COUNT() function only:$query = "SELECT COUNT(*) AS totalRows FROM table1";Prepare your query for execution:
$stm = $dbh->prepare($query);Execute the statement:
$stm->execute();Save result into a variable:
$result = $stm->fetchColumn();Display the value:
echo 'Number of rows: ' . $result;
Labels:
pdo,
pdo count rows,
php,
php pdo count results,
php pdo count rows
Monday, January 16, 2012
Microsoft beats Yahoo in search engine competition
During previous ComScore statistics Bing was breathing down Yahoo's neck in search engine competition within United States. Now, finally, Microsoft's search engine (Bing - a.k.a Bing Is Not Google) has become more popular than Yahoo. According to company's analytic data in December of 2011, Microsoft Bing received 2.75 billion search requests within United States while Yahoo received 2.65 billion search requests.
In result, according to ComScore, Bing owns 15.1% of American search engine market and Yahoo 14.5%. Even now Microsoft is still far away from Google which processed 12 billion search requests in month of December, 2011 and is currently leading with 65.9% of search engine market in U.S.
The remainder of search engine market is owned by Ask Network with 2.9% (531 million search requests) and AOL with 1.6% (287 million search requests).
In result, according to ComScore, Bing owns 15.1% of American search engine market and Yahoo 14.5%. Even now Microsoft is still far away from Google which processed 12 billion search requests in month of December, 2011 and is currently leading with 65.9% of search engine market in U.S.
The remainder of search engine market is owned by Ask Network with 2.9% (531 million search requests) and AOL with 1.6% (287 million search requests).
Sunday, September 4, 2011
Desktop PC - Windows 7 Disable Hibernate
If you have Windows 7 on your desktop computer then it's a little difficult to find how to disable your computer from hibernating or going to sleep after a period of time.
The steps are quite simply actually, here they are:
1. Open Control Panel
2. Change "View by" from Category to Small icons
3. Locate and click on Power Options
4. By default Balanced radio button is selected - so click Change plan settings on the right
5. Change settings to your desired selection and press Save changes button.
That's all now you don't have to worry about your desktop computer going to sleep or hibernating while you're away from the keyboard.
The steps are quite simply actually, here they are:
1. Open Control Panel
2. Change "View by" from Category to Small icons
3. Locate and click on Power Options
4. By default Balanced radio button is selected - so click Change plan settings on the right
5. Change settings to your desired selection and press Save changes button.
That's all now you don't have to worry about your desktop computer going to sleep or hibernating while you're away from the keyboard.
Start Real rain using a laser
Pick a cloud in the sky. Aim and shoot at it with a laser. Result, pouring rain. Sounds unreal, doesn't it? But researchers of the University Zheneva found proof that this is possible. This technology is not the first attempt to initiate artificial rain but possibly the most ecologically safe method of doing it.
Technology to create rain has been around for quite a while now. Actually, you can fly up in the sky or launch a rocket which will distribute small particles of special silver to create rain. This method has been used before and nations still do it today. In 2008, China used this method to control weather during Olympic games. Chinese researches say they were able to create artificial snow too.
The problem in using this special silver chemical is because of it's toxic characteristics. Toxic levels of this method have not been proved yet. Therefore, there is a need to develop an alternative technology which has been presented by researchers from Zheneva. Even though, the results of their work is far from actual rain and potentially more dangerous than special silver chemical. With the help of Teramobile mobile laser lab (which develops the laser) researchers were able to reach a density in the sky of few rain drops. This project is far from finished but it's definitely a piece of technology customers like farmers and other nations could benefit from if it's not toxic.
Technology to create rain has been around for quite a while now. Actually, you can fly up in the sky or launch a rocket which will distribute small particles of special silver to create rain. This method has been used before and nations still do it today. In 2008, China used this method to control weather during Olympic games. Chinese researches say they were able to create artificial snow too.
Subscribe to:
Posts (Atom)

