Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 November 19

From Wikipedia, the free encyclopedia
Computing desk
< November 18 << Oct | November | Dec >> November 20 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 19

[edit]

TinyC for loop problem

[edit]

ie Tiny C Compiler - even this doesn't work:

#include <stdio.h>
int main (int argc, char **argv)
{
  for (int a=0;a<10;a++)
     printf("%d\n",a);
}

sorry forgot the error.. identifier expected in the line with the for statement. Works on LCC, what obvious error am I making, thanks in advance.83.100.237.223 (talk) 08:40, 19 November 2010 (UTC)[reply]

I think you're typing in what is like "Borland C". I remember Microsoft Visual C being aghast at my same attempt. Anyway, I run tinyc, all I did was change your code to:
#include <stdio.h>
int main (int argc, char **argv)
{
  int a;
  for (a=0;a<10;a++)
     printf("%d\n",a);
}

and it works fine... 84.153.193.81 (talk) 10:18, 19 November 2010 (UTC) And[reply]

It's only since C99 that the first expression of the for-statement may take the form of a declaration. According to our article, the Tiny C Compiler is a C89/90 compiler with some C99 features. decltype (talk) 10:28, 19 November 2010 (UTC)[reply]
Thanks, that's it.77.86.15.94 (talk) 17:40, 19 November 2010 (UTC)[reply]
Resolved

Cloud computing question

[edit]

tell me about cloud computing and software as a service(saas) model. —Preceding unsigned comment added by Pawantechdell (talkcontribs) 10:38, 19 November 2010 (UTC)[reply]

Cloud computing and Software as a service. Once you've read those, if you have any specific questions feel free to come and ask. --jjron (talk) 13:19, 19 November 2010 (UTC)[reply]
Welcome to Wikipedia! In addition Cloud computing and Software as a service, you may wish to read our articles on Cloud applications, Cloud clients and Cloud APIs. Rocketshiporion 13:35, 19 November 2010 (UTC)[reply]

BBC News website stats

[edit]

Hello all, I'm trying to find some reasonably accurate stats for visits and unique visitors to the BBC News website. I've had a look at Alexa, but it only offers figures for the entire BBC site (www.bbc.co.uk), and in any case, these figures appear to be listed in terms of percentage-reach rather than actual figures. I have a few free toolbar apps from SeoBook installed, but they also only offer stats for the entire site. I was wondering if any of you super-helpful Wikipedia Computer Helpdesk folk know of anywhere I could get some figures from.
To Summarise

  • I'm looking for the number of page views of the bbc.co.uk/news directory (A recent as possible, and doesn't have to be 100% accurate, but would be good if they were reasonably indicative)
  • And the number of unique visitors

Any help, or any direction to useful tools or apps is much appreciated. Thanks all, Darigan (talk) 11:07, 19 November 2010 (UTC)[reply]

Thanks Kateshortforbob, they're some quality links :) Darigan (talk) 09:06, 22 November 2010 (UTC)[reply]

Screen resolution with two dissimilar monitors changes on reboot

[edit]

My working environment at work consists of a Dell Optiplex 755, running Ubuntu 10.04, which drives two LCD screens through a DVI splitter cable. The primary screen is a Dell 24" monitor connected to #2 on the splitter cable, and the secondary screen is a Dell 17" monitor connected to #1 on the splitter cable. I use the big monitor for software development and the small monitor to display a virtual machine running Windows XP. I occasionally have to reboot (usually when required by a Ubuntu update) and that's where the trouble begins. After rebooting, both monitors display in 1024x768 resolution. The last few times, it has taken several reboots and much messing about with Ubuntu's monitors preference panel to get the big monitor to display in 1920x1200 (and have circular objects shown as circles instead of ellipses) and the small monitor to display in 1280x1024. Is there a way I can get Ubuntu to recognise my monitors' correct resolution after a reboot, or at least have it remember my preferences? Astronaut (talk) 12:35, 19 November 2010 (UTC)[reply]

Edit xorg.conf. I don't know the details, but google is your friend. --85.77.53.134 (talk) 14:46, 19 November 2010 (UTC)[reply]
Does Ubuntu still use xorg.conf? -- kainaw 16:26, 19 November 2010 (UTC)[reply]
I was about to say yes, but it looks like its gone now. Paul (Stansifer) 20:42, 19 November 2010 (UTC)[reply]
Xinput has replaced xorg.conf for input device configuration a long time ago, but I think you can still use it for monitor settings. I'm not sure if the file exists out of the box. --85.76.179.108 (talk) 08:11, 20 November 2010 (UTC)[reply]
Is the problem that the preferences you set in Display Preferences aren't "sticking"? Take a look at the file ~/.config/monitors.xml. Is it correct now? When the displays go back to the wrong settings, check to see if it changed also. Paul (Stansifer) 20:42, 19 November 2010 (UTC)[reply]

TBH, I can't tell if the preferences are not sticking or if the computer is trying to "read" the first monitor it sees and guess the required resolution from that (the smaller monitor wakes up several seconds before the big monitor). Another weird thing is the big monitor is connected to #1 on the splitter cable; if I swap them around, the menu & icons end up on the small screen. I would have thought the "main" monitor would be on #1. Unfortunately, I'm away from my desk right now. I'll be able to check if I have xorg.conf, Xinput or ~/.config/monitors.xml on Monday. Astronaut (talk) 00:36, 21 November 2010 (UTC)[reply]

Saving all glipper (or clipboard) items

[edit]

I have Glipper installed (in Ubuntu), but do not know how to save all the items at the same time in it. Apparently the program doesn't have a function for that, only allowing picking individual items from a list.

Does someone know how can I save all glipper (or clipboard) items? Copy-and-pasted items must be in some file somewhere, but I don't know where...

I would also be happy about alternatives to save a series of copied items into a file (without going through the list one by one, of course). Mr.K. (talk) 17:25, 19 November 2010 (UTC)[reply]

Facebook apps that tell you who visited your profile?

[edit]

That's a rumor in my eyes. Would anyone please confirm or deny whether there is such an application that lets you see who has visited your profile? (An account, or an IP if someone was logged off while visiting it.)

If there is such an app, please link. Thanks. --129.130.252.148 (talk) 18:45, 19 November 2010 (UTC)[reply]

It can't possibly work. Facebook's privacy policy shields this sort of information. ╟─TreasuryTagAfrica, Asia and the UN─╢ 18:46, 19 November 2010 (UTC)[reply]
Someone said in one of the app games I play that the one player they were talking about could see me visit their profile. I asked, "You mean he has an app that logs visitors and tells him who viewed his profile?" Their response was, "Who doesn't?" How are you so sure that such apps can't possibly work? Why couldn't those apps circumvent the "privacy policy shields?" --129.130.252.148 (talk) 19:18, 19 November 2010 (UTC)[reply]
How are you so sure that such apps can't possibly work? You asked the question. I gave the answer. If you don't believe me, that's fine. If you think that Facebook would accept applications actively violating its terms of service, feel free. But you'd be wrong. ╟─TreasuryTagUK EYES ONLY─╢ 19:20, 19 November 2010 (UTC)[reply]
Just because it shouldn't be able to be done doesn't mean it can't be done. Over the years there have been loads of facebook hacks ranging from seeing private photos to updating peoples profile status without logging into their account. Facebook usually patches these fairly quickly, but no doubt there are more undiscovered hacks perhaps being exploited by people, privacy policy or not. 58.9.2.225 (talk) 19:28, 19 November 2010 (UTC)[reply]
It's true that Facebook has tended to be very 'leaky' and has had many flaws in their privacy and security code (I don't know if I'd call many of the things 'hacks' per se). However I can't find any evidence of any leak on who visited your profile. hubpages.com/hub/How-To-Get-A-Facebook-Tracker (blacklisted site) shows someone who looked over a year ago with no luck. [1] mentions there are many scam apps which claim to do so which may be the source of such rumours. Nil Einne (talk) 20:24, 19 November 2010 (UTC)[reply]
One such app I noticed about half a year ago was something like 'which friends are viewing your profile the most'. A few of my 'friends' activated this and I was, let's say, interested to see in my feed that I was listed in the top 20 out of about 400 for a friend whose profile I'd only viewed about once or twice previously, probably on the day she friended me about 8 months previously, and maybe a second time when she changed her profile pic. So either she's not getting many friends viewing her profile or it was simply randomising a top 20 list from all her friends. I'd never even commented on anything on her profile, so it wasn't even that sophisticated in generating the list. This randomising theory was confirmed when a second friend ran it twice within about an hour, producing two entirely different lists. --jjron (talk) 02:50, 20 November 2010 (UTC)[reply]

Yahoo! Chat changed years ago. Why?

[edit]

Sometime in 2005 or so, I could no longer access chat the way I used to. Why did they change it so substantially? What can you tell me about the history and circumstances behind the change of Yahoo! Chat? --129.130.252.148 (talk) 18:45, 19 November 2010 (UTC)[reply]

In 2005, Yahoo started making a lot of changes so it could work with other services and be accessed through a web interface. The main idea was interoperability. While AOL was making it difficult for others to work with their chat, Yahoo decided to invite interoperability. -- kainaw 19:12, 19 November 2010 (UTC)[reply]
<personal rant> IMO Yahoo! have progressively worsened their service over the years, whether by design or accident I don't know. For example for ten years I was able to have the apostrophe in my surname in my profile, a couple of years ago they 'updated' their service, and the apostrophe now displays as an ASCII code markup instead, meaning I have to spell my name incorrectly (sans apostrophe) in order to keep using their service. This is pretty unacceptable in this day and age. When I complained they made some rumblings about looking into it, but never did anything - surely this should be a simple fix? Then about a year ago when trying to introduce their social networking feature, they basically said they were going to make email address books public, listing all your contacts, unless users opted out (talk about aping Facebook). I of course opted out, and I've attempted to basically shut down all 'social networking' features on Yahoo! related to their email, including Chat, as I'm not at all comfortable with their security any more. Maybe this drop off in personal security is related to the interoperability Kainaw talks about, but if anyone from Yahoo! is reading this, please lift your game - you used to be a lot better. --jjron (talk) 03:06, 20 November 2010 (UTC) </personal rant>[reply]
I don't work at at Yahoo! and never have... but interestingly, the company I am currently working for moved into the building Yahoo! vacated, during the massive Yahoo restructuring after the dot-com bubble-burst (around 2003- or 2005, when their software also started suffering badly). We still have Yahoo!-colored purple walls and break-rooms. The decor and furniture is all purple and yellow and green. I have also worked in one of the original Fairchild Semiconductor buildings - (not the Shockley Semiconductor Laboratory, but the one they moved to a few years afterward). If there's a point here, I guess, its that these vacated buildings are artifacts of companies that have passed their prime, and been replaced. It happens to the best... Nimur (talk) 05:48, 20 November 2010 (UTC) [reply]

forget SQL language - what IS, mathematically, a relational database?

[edit]

Forget sql. Could you briefly SHOW me what a relational database actually IS, mathematically, by writing pseudocode implementing any part of it. It can be very high-level pseudocode, English if you want, and you can refer to any mathematical concept and I will go look it up and learn it if I don't know it already. Thank you SO much. (this is not homework). 92.230.70.89 (talk) 20:07, 19 November 2010 (UTC)[reply]

First some links Relational database gives an overview, but Relational model is the better article for a more mathematical or abstract description.
To get a feel for it I recommend looking briefly at other database model types - eg Hierarchical database model and Network model (database), after which it should be clear (if it wasn't already) what the 'relational' part of 'relational database' refers to.
To a attempt a brief description - a relational database is a computer implementation of a table (not necessarily 2 dimensional - could be a single column, or have more dimensions) - to cap it and make it a database the idea of a key is added ie an ID (such as an account number or National identification number) which is used to link items between sets of tables. (typically a relational database will consist or more than one table)
In computer science terms each table is basically some sort of array.77.86.15.94 (talk) 20:48, 19 November 2010 (UTC)[reply]
The article Database model also looks helpful - the images look as if they will be self explanatory.77.86.15.94 (talk) 20:59, 19 November 2010 (UTC)[reply]
Personally I think a mathematical understanding is not really the best way to understand what a relational database is. It's not an equation or a function. It's a means of organizing and cross-referencing information. If you're interested, I'd be happy to elaborate. I find the best way to explain them is through analogies to "real life" datasets. For example, if your Rolodex was cross-referenced with the list of people who you call every day, and that was cross-referenced with a description of all of the subjects you like to talk about. The relational database lets you hold all of that information in the same place and have it operate together seamlessly. It's really just about as simple as that — multiple tables of data that have defined relationships for how the data co-exists. Math or even code are not the best way to understand the database structure itself; the code just lets you manipulate the data or ask questions of the database, but it doesn't really define the structure of the database, which is more of an abstract entity that sits above the code you actually use to access it most of the time. --Mr.98 (talk) 22:43, 19 November 2010 (UTC)[reply]
Are you familiar with C/Java-like programming languages? A table is similar to a C struct type (or a class with public data members), and each row is similar to an object of that type (except that tables know their own rows, while classes don't usually keep track of their instances). A key is essentially a pointer, a foreign key is a field of one struct that points to another struct, and referential integrity means that there are no dangling pointers.
The programming language Prolog works a lot like a relational database, and you might find it easier to learn and experiment with than your typical RDBMS. -- BenRG (talk) 23:29, 19 November 2010 (UTC)[reply]

...and forgetting relational databases, what is screaming fast?

[edit]

If we move away from relational databases. What kind of database, then, has a reputation for being screaming fast? 92.230.70.89 (talk) 20:27, 19 November 2010 (UTC)[reply]

I'm assuming you didn't mean what brand, or what type of hardware implementation.. Although I can't answer this properly it's worth pointing out that most non-trivial database querys will involve iterations to find matches - and this is improved by additional indexing (as a first resort, other stuff helps) - the indexing includes such things as storing entry points into tables of data as sorted by various values (eg in a table of people by name, address, town, fav. color etc index points for entry to the table sorted by each field can help, along with linked-list type data structures that connect similar fields - eg a linked list for each fav. color that connects each sub-set of people)
The overall effect of such optimisations is to overlay on top of the original relational database additional supplimentary database structures that are conceptionally pretty much the same as hierarchical or network based databases.. similarily you can probably think of examples were adding an indexing overlay of a relational type could help searches within a hierarchically organised database
So the best type is a mix - what I've described above are simple optimisations - I see that I haven't really answered your question at all, but seeing as you asked above about implementations of databases I though this might be useful (There's a brief introduction to when to index here [2]. There's always more ways to optimise.
In case you didn't know a good search term for this (the equivalent of Mips Flops or Mhz in processors) is "Database transactions per second" like Ghz the figures are not necessarily meaningful in the real world. Apologies if all of that was irrelevant to your needs.77.86.15.94 (talk) 21:45, 19 November 2010 (UTC)[reply]
It kind of depends on what you want to do with it, is not a very helpful but a somewhat more optimal answer. If you are really concerned about database performance, the trick is to figure out how to divide up the data in clever ways that optimizes for the kind of usage you're going to use. That will vary depending on the data in question. This is a separate issue from hardware and software performance, which are largely separate from the question of structure. --Mr.98 (talk) 22:45, 19 November 2010 (UTC)[reply]
Screaming fast is the kind if fast that makes you scream and would cause instant death should it stop suddenly... like a reaaaalllly fast rollercoaster or a sportscar driven in a manner likely to get you an instant driving ban, or that plummet towards the ground attached to a bungee rope. However, in terms of databases it is really just marketing speak for "we have made some effort to make our database seem faster than some of our competitors". Ignore such hyperbole unless you are in the business of selling databse products. Astronaut (talk) 01:09, 21 November 2010 (UTC)[reply]
Generally, this is very much dependent on the task. If we go with searching (as there are a number of factors the affect speed of updating and inserting data), the primary question is what you will be searching on. If your intent is to search on a single index, and you need a lot of data, then flat file databases are extremely good. The search algorithm for an ordered list is quite fast, and a flat file database doesn't need to make the joins that would be required in a relational database. However, if searching for a non-indexed term in a large flat file database, the format can become very slow. The smaller data sets in a table in a relational database can have the advantage here, especially if you don't need to make a join. Optimising relational databases for speed involves, amongst other tasks, the reduction of the number of joins required for common queries (noting that this can increase the size of the database as a side effect), so if you search doesn't involve joins you can expect a nice speed increase. - Bilby (talk) 01:24, 21 November 2010 (UTC)[reply]