text
stringlengths
1
330k
I still thought Opera had advertising in the interface, and had actively avoided using it. After your comment, I read their 1Q report -- apparently they're working on back ends to compress web data to send to their Opera mobile browsers (less bandwidth), along with a Google partnership for the desktop search (and other...
I wondered how long it would take for streaming movies to get ads embedded within, or around the display frame. Combine this innovation with the picture recognition advertising technology, and preference targeting, and I'm afraid the synergy of the underlying revenue stream would be insurmountable.
Would Dish Network or DirecTV have prior art on some aspect of this? They both currently have integrated ads within the program guide. Or the TVGuide channel, with the incessant video ad at the top? Did someone think to include an ad frame on the new TVs that connect to the internet and show videos and web pages? How a...
Comment: Re:One of the most un-American things I've ever re (Score 1) 618
by ps_inkling (#32579630) Attached to: The Real Science Gap
We've set up a system in which the priority is short term quarterly gains, and that's what we get. If you want a viable society in the long term, you have to invest in basic research.
For now, quarterly results are great, because we're still coasting on all the innovation of previous years. There has been no disruptive technology to dislodge this mindset.
However, if one or two companies have a mindset of finding a competitive advantage by doing research for a couple of years, they could leapfrog existing companies with their newer processes. But, no guarantee of finding an advantage. It takes visionaries to look farther than the quarterly cash flow sheets.
Most companies will not do long-term research until necessary. The advantage of waiting for a new innovation to appear (from someone else's research) is that it's not near as expensive to clone the advantage for yourself.
So, our current model is that small companies spend lots of money looking for competitive advantages against larger companies, find one, and promptly get bought out or cloned.
Comment: Re:PvP could be different - current designs are ba (Score 3, Informative) 178
by ps_inkling (#32017464) Attached to: ArenaNet's MMO Design Manifesto
Or perhaps having every guard in every town on the continent kill you on sight? You think people would randomly attack strangers? Ganking would vanish in a heartbeat. You'd probably end up with a feudal system very quickly, where everyone was in one of a few massive guilds that would issue kill on sight orders for anyo...
What you are describing was implemented in Ultima Online. Kill a player, all the guards in cities mark you KoS (kill on sight). The solution was to not go to cities anymore. No banking, but there's plenty of killed player corpses to loot.
So, roving gangs of PKers hang out at the load points between areas, and kill your character while your computer is loading the next area's graphics. The solution for a while was the formation of anti PKers, who would descend in mass and swarm a PK group. But, now their characters were also flagged as PKers.
So yes, it ended up as a feudal system. Unfortunately, it was a world where the PK eventually won.
Comment: Old Knowledge vs. New (Score 1) 599
by ps_inkling (#31178374) Attached to: "Logan's Run" Syndrome In Programming
At least I'm not the only one watching these programs -- Holmes on Homes may be the one you are referencing.
Ideally, an older contractor (or programmer) has to have a young mindset. Continuing to do what has worked in the past makes it harder for your work to interface with current methodologies. Writing database software using ODBC.DLL calls or not using Ditra under your new bathroom tile floors -- it means that your work w...
I would expect a specialist in their field to remain mostly up-to-date on their knowledge, or let me know they specialize in a particular older technology. Or, one would hope, they can do both.
Comment: Re:MySQL & LDAP? (Score 2, Interesting) 345
by ps_inkling (#26791583) Attached to: The Incredible Shrinking Operating System
We are talking about making the distro as lite as possible. Putting the entire games suite takes up another big chunk. I never understood the reasoning behind the "games suite" to begin with. Wouldn't it be better if people chose their own games?
For most Windows users, there are only four games -- Solitaire, Spider Solitaire, Minesweeper, and (for some) the pinball game. When they see all of the games available from the live Ubuntu CD, they are interested in finding out more. As a selling point, seeing the list of games already installed has impact on end user...
(Yes, XP has the Internet-enabled games as well. Meh.)
Reuse Code Or Code It Yourself? 429
Posted by kdawson
from the good-or-great dept.
eldavojohn writes "I began coding for a project that had simple requirements for my employer — Web services and a test application for them. But requirements have been creeping, as they always do. Initially I had decided to use the Spring Framework with Hibernate. And I re-used a lot of libraries that made things simpl...
Comment: Re:Dialog boxes shut off critical thinking (Score 2, Interesting) 568
by ps_inkling (#25129195) Attached to: Popup Study Confirms Most Users Are Idiots
I think the solution is to make the buttons themselves say what they do, rather than clicking Ok or Cancel, have the button say "Exit crashed program", or "Install new program" or what have you. Always being OK or Cancel conditions people to just blindly click.
The Apple user interface guidelines have always stated that verbs should be used on command buttons. Inserting a blank disk under Mac OS pops up the "Format" or "Eject" dialog box. On Windows, the text says "To format the disk, click OK. To quit, click CANCEL" with "OK" or "Cancel" buttons.
Of course, if you put something other than OK or CANCEL in the dialog box, most Windows users freeze up. They don't know what to click.
Making users read the dialog box text helps. Just make sure the text is actually useful for making a decision.
The Courts
RIAA's $222k Verdict Is Likely To Be Set Aside 224
Posted by ScuttleMonkey
from the one-step-forward-two-steps-back dept.
The Courts
+ - SPAM: Identity theft nets fraudster 16 years in prison
Submitted by
coondoggie writes "A United States District sentenced Isaac Allen this week to a 16 ½ years in the slammer for identity theft and bank fraud. According to court documents, Allen and Pasco, along with other members of their ring, defrauded a series of banks in Florida, including Fifth Third Bank, BB&T, Bank of America a...
Link to Original Source
Question: I bought a 2004 Chevy Silverado Z71 Quad Cab. I can hardly turn the steering wheel unless the truck is moving. But it seems to be normal while I'm moving.
Answer: We're assuming there's still some kind of steering assist, seeing that steering feels normal while moving. But just in case, open the hood and take a careful look at your power-steering system. Be sure the power-steering fluid reservoir is full and the drive belt is indeed spinning the power-steering pump while...
How To Reach Alex
Take the 2-minute tour ×
hello I'm on the finishline of writing a chat script. The only thing left is to compare how many messeges had the user seen with the total number in the database. Now the following line doesn't seem to work and I've been staring at it for an hour and can't find the cause.
$count = mysql_query('SELECT COUNT(id) as total FROM konsultaciq WHERE cat = "'.$_SESSION['key'].'" ');
echo count(total);
The echo gives me a value of "1", when there are 8 entries in the database under that "cat"
share|improve this question
Have you fetched the result? –  Yogesh Suthar Jul 29 '13 at 4:18
First, total should either be defined as a constant or it should be $total. In either case, you aren't assigning a value to it. Secondly, the MySQL extension is deprecated. Stop using it right now and use PDO or MySQLi instead –  Phil Jul 29 '13 at 4:18
Shouldn't that be echo $count(total); or echo $total;, or echo $count;? Try one of those. You have $count as your variable but not echoing it correctly. –  Fred -ii- Jul 29 '13 at 4:19
You need to fetch the array $result = mysql_fetch_assoc($count); and then echo the value echo $result['total']; –  Sean Jul 29 '13 at 4:23
@Fred None of those will do anything with the above code. In fact, $count(total) is a syntax error –  Phil Jul 29 '13 at 4:24
show 1 more comment
3 Answers
up vote 4 down vote accepted
Change your code as below.
echo $res[0]; // it gives actual value of total
share|improve this answer
add comment
$arr = mysql_fetch_array($count);
echo $arr['total'];
Use above code. As you have not fetch the data by using mysql_fetch_* and if you will use the count function then it will show the 1 because of it is fetching one row.
count function is used to count the number of elements in array in PHP and there will be only one element.
so use $arr['total'] to get the value of total count of the query.
NOTE: mysql_* has been deprecated in the PHP's latest version. So use the mysqli_* or PDO.
share|improve this answer
It's better to use mysqli() or pdo, since this extension is deprecated. –  mattosmat Jul 29 '13 at 4:29
@mattosmat yes I know it. I used the PDO. but OP is asking in mysql that's why give the answer in mysql_*. and why downvote. –  Broken Heart ღ Jul 29 '13 at 4:31
@BrokenHeartღ I agree with you and have a point about the OP's question being MySQL related, as the OP did not ask for MySQLi alternative. –  Fred -ii- Jul 29 '13 at 4:35
@Fred Ok, I will addedd a note in the answer to use the mysqli or PDO. –  Broken Heart ღ Jul 29 '13 at 4:36
@BrokenHeartღ You're quite welcome, cheers. I'm in the learning process (DB), and will not be using MySQL, but MySQLi or PDO as strongly suggested from the answers I see here on SO. –  Fred -ii- Jul 29 '13 at 4:40
show 2 more comments
You should not be using the MySQL extension. Here's an example using PDO instead
$pdo = new PDO('mysql:host=localhost;dbname=your_db_name;charset=utf8', 'username', 'password');
$stmt = $pdo->prepare('SELECT COUNT(1) FROM konsultaciq WHERE cat = ?');
$stmt->bindParam(1, $_SESSION['key']);
echo $stmt->fetchColumn();
share|improve this answer
add comment
Your Answer
Take the 2-minute tour ×
Will the full speed advantages of the future USB 3.0 be negated by the fact the most HD being mass produced are SATA 3? If so, what would you suggest a person do? For performance reasons, I go with eSATA or 1394 for external hard drives.
share|improve this question
I think you mean SATA 2, not SATA 3. SATA 2 operates at 3Gb/s and SATA 3 will operate at 6Gbp/s –  MDMarra Sep 28 '09 at 22:15
Wikipedia describes it as SATA 3 Gbit/s (Second generation) and SATA 6 Gbit/s (Third generation) respectively. –  Robert Nickens Sep 28 '09 at 22:38
The 3 is tied to the Gb/s. Saying SATA 3 without the units after it is confusing and not right. SATA 2 (the second generation spec) operated at 3Gb/s, this is not the same as saying simply SATA 3 –  MDMarra Oct 2 '09 at 4:06
@MarkM it's normally written "SATA II" instead of "SATA 2", so "SATA 3" can be assumed to mean "SATA 3Gb/s". –  quack quixote Oct 3 '09 at 21:00
This is the first time I've heard "SATA II" be referred to as "SATA 3". –  Travis Dec 7 '09 at 16:34
show 3 more comments
closed as not constructive by Sathya May 20 '11 at 3:30
9 Answers
I don't think this is a fair comparision talking about the standards in general as USB 3 is intended to support many devices and not just hard drives. SATA is only a hard drive standard.
If we are just talking hard drives, we will see how well USB 3 does with the overhead of multiple devices on the bus. None the less, regular hard drives have not even saturated sata2 theoretical throughput, let alone the future standards (single mechanical drives, not raid). So the same drive today on sata2 is going to...