Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 433: Line 433:
:::You could try [http://www.chsoftware.net/en/mowes/mowesportable/mowes.htm MoWeS]; it sets up everything you need for MediaWiki automatically, just make sure to select MediaWiki in the packages selection download page <small><span class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Kv7sW9bIr8|Kv7sW9bIr8]] ([[User talk:Kv7sW9bIr8|talk]] • [[Special:Contributions/Kv7sW9bIr8|contribs]]) 12:37, 8 February 2010 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
:::You could try [http://www.chsoftware.net/en/mowes/mowesportable/mowes.htm MoWeS]; it sets up everything you need for MediaWiki automatically, just make sure to select MediaWiki in the packages selection download page <small><span class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Kv7sW9bIr8|Kv7sW9bIr8]] ([[User talk:Kv7sW9bIr8|talk]] • [[Special:Contributions/Kv7sW9bIr8|contribs]]) 12:37, 8 February 2010 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
:::::Would I be able to use that (once installed) without being connected to the internet? [[User:DuncanHill|DuncanHill]] ([[User talk:DuncanHill|talk]]) 21:34, 8 February 2010 (UTC)
:::::Would I be able to use that (once installed) without being connected to the internet? [[User:DuncanHill|DuncanHill]] ([[User talk:DuncanHill|talk]]) 21:34, 8 February 2010 (UTC)
::::::Yes, you could use it offline. Thanks, '''[[User:Genius101|<span style="color:Green;background:Black">gENIUS</span>]][[User talk:Genius101|<span style="color:Green;background:Black">101</span>]]''' 21:55, 8 February 2010 (UTC)
::::Alternatively, find a webhost (there are free ones available on google, I use x10hosting.com) with an automated mediawiki installer. The one I've encountered is softaculus. Simply load it up through the cpanel/other admin interface, tell it to install mediawiki, and follow the prompts. It'll sort all the complex stuff for you, and the default options are usually ok. [[user:RoadieRich|Rich]]<sup>([[special:contributions/RoadieRich|Contribs]])</sup>/<sub>([[user_talk:RoadieRich|Talk to me!]])</sub> I can haz [[Wikipedia:Editor review/RoadieRich|review]] plz? 16:00, 8 February 2010 (UTC)
::::Alternatively, find a webhost (there are free ones available on google, I use x10hosting.com) with an automated mediawiki installer. The one I've encountered is softaculus. Simply load it up through the cpanel/other admin interface, tell it to install mediawiki, and follow the prompts. It'll sort all the complex stuff for you, and the default options are usually ok. [[user:RoadieRich|Rich]]<sup>([[special:contributions/RoadieRich|Contribs]])</sup>/<sub>([[user_talk:RoadieRich|Talk to me!]])</sub> I can haz [[Wikipedia:Editor review/RoadieRich|review]] plz? 16:00, 8 February 2010 (UTC)
:::::I'm really looking for something that doesn't need me to be connected to the internet - it's just for personal use as an aid to research and writing, not for something I want published online (and anyway, it costs money to be online!) [[User:DuncanHill|DuncanHill]] ([[User talk:DuncanHill|talk]]) 21:34, 8 February 2010 (UTC)
:::::I'm really looking for something that doesn't need me to be connected to the internet - it's just for personal use as an aid to research and writing, not for something I want published online (and anyway, it costs money to be online!) [[User:DuncanHill|DuncanHill]] ([[User talk:DuncanHill|talk]]) 21:34, 8 February 2010 (UTC)

Revision as of 21:56, 8 February 2010

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


February 3

I was once saw this image of a computer generated Tux holding a gun up to the Windows logo. Does anybody know where on the internet I can find it? --Melab±1 02:33, 3 February 2010 (UTC)[reply]

Like this? Strangely, I found many (MANY) pics of Tux pissing on the Windows logo. -- kainaw 05:50, 3 February 2010 (UTC)[reply]
No it had a Windows Vista logo with hands and legs, hands up in the air with a pistol (not pissing) being pointed at it by Tux. -Melab±1 22:32, 6 February 2010 (UTC)[reply]

http://images.google.com/images?q=linux%20vista
http://www.crystalxp.net/galerie/img/img-wallpapers-linux-vs-vista-rastakouere-11774.jpg
¦ Reisio (talk) 06:05, 8 February 2010 (UTC)[reply]

Automatic Logoff at Login in Vista

On one of my administrative accounts, every time I log in the account, I get immediately logged off. A temporary workaround was to log in in safe mode and create another administrative account (because I can't use the web and anti-virus in safe mode). So I scanned the other user account and there are no viruses, this seems to be a configuration error. This problem started right after I installed php environment and restarted the computer. I have a vista64 os, anyone here know what could be causing this.

72.188.46.220 (talk) 02:51, 3 February 2010 (UTC)PHPNoob[reply]

In my experience (twice now, unfortunately) that would be one of the signature "features" of Vundo. Try another virus scanner, and soon. DaHorsesMouth (talk) 04:26, 3 February 2010 (UTC)[reply]
It is not a virus, I scanned the hard drive already. Anyone know how to find the start up scripts for the broken account from the working account?

72.188.44.11 (talk) 13:20, 3 February 2010 (UTC)PHPNoob[reply]

How about uninstalling the PHP tools? It seems pretty bizarre that any software, in the course of normal operation, would force an auto log-off of the admin user. Checking the event viewer for any additional clues is a good place to start. Also, check the startup folder of the affected user. Finally, it might be worth checking the computer with a virus scanning boot CD, such as the one available from BitDefender, since this will even detect viruses that have protection mechanisms. --Jmeden2000 (talk) 14:00, 3 February 2010 (UTC)[reply]
"Also, check the startup folder of the affected user" - I can't seem to find this folder. Also mscofig does not show the other account's start up configuration.

72.188.44.11 (talk) 14:23, 3 February 2010 (UTC)PHPNoob[reply]

In the user folder, look in the start menu for the Startup folder. The PHP tool kit may have stuck something in there that is causing an unintended error and leading to the log off. --Jmeden2000 (talk) 15:30, 3 February 2010 (UTC)[reply]
And some viruses interfere with known virus scanners, so use more than one virus scanner. Comet Tuttle (talk) 15:38, 3 February 2010 (UTC)[reply]
If you have a spare blank CD-R, make an ISO image of the BitDefender rescue disk, it is an absolute wonder. It boots a completely separate OS (linux), applies current virus definitions, and scans any attached drive. Many viruses can hide from or otherwise inhibit the operation of any virus scanner out there, if given the chance. Running the scan off-line is the only way to be sure. --Jmeden2000 (talk) 17:56, 3 February 2010 (UTC)[reply]

How to use HD video in flash, or put flash animation over HD

(I've moved this question from the Miscellanous desk. There were no answers there yet. --Anonymous, 06:50 UTC, February 3, 2010.)

I use flash and have begun shooting HD video, using primarily imovie to edit. How do I use my flash animation IN or OVER my video without importing it to flash and totally losing the quality? —Preceding unsigned comment added by 66.175.86.29 (talk) 05:25, 3 February 2010 (UTC)[reply]

For IN: Export the Flash to something that you can import into iMovie, e.g. MOV. There is an option to do this under the File menu, I believe. For OVER: Hmm, much trickier, I assume you mean as some sort of transparent overlay. I'm not sure you can do that with iMovie unless you import the iMovie segment into Flash (you can adjust the quality settings when you do so, of course), and then re-export the whole thing as MOV. You will lose some quality in the transcoding, though. --Mr.98 (talk) 13:33, 3 February 2010 (UTC)[reply]

Morning,

I know there's likely an easy fix to this, but I looked for it and couldn't find it. I didn't want to bother our IT guys if I didn't have to.

I am running IE7 on Vista, on a Dell 630. Whenever I choose anything from the "Favorites" menu, rather than just going to that website, the browser opens the favorite in a new window. I have tried unchecking the "Reuse windows for launching shortcuts (when tabbed browsing is off)" checkbox in the advanced tab of the properties, but that's not what I need. Anyway. Thanks for your help. Sorry if this was resolved elsewhere. Kingsfold (talk) 15:08, 3 February 2010 (UTC)[reply]

IE does this for me if my Shift key is held down while I click the Favorite. Hammer on your Shift keys a few times to make sure they are not stuck? Comet Tuttle (talk) 15:37, 3 February 2010 (UTC)[reply]
Good thought (I thought the same thing), but I'm typing just fine.... Kingsfold (talk) 16:07, 3 February 2010 (UTC)[reply]

Quad core Q

I replaced my really slow 500 MHz computer with a much faster 2800 MHz quad core, but it doesn't seem any faster. I'm running Windows XP SP3. Is it possible it's only using one of the 4 cores ? If so, is there any way to get it to use them all under XP, or do I need to go to another O/S ? StuRat (talk) 16:03, 3 February 2010 (UTC)[reply]

As you probably know, the major performance issue of a computer is the HDD. When you load a program, for instance, the CPU is probably just waiting for the HDD to give it some data to process. If you want to see the increase of performance, you need to do something CPU intensive, such as ray-tracing, or some other mathematical computation. --Andreas Rejbrand (talk) 16:18, 3 February 2010 (UTC)[reply]
And: a quad-core CPU @ 2.8 GHz is not equivalent to a single-core CPU of 11.2 GHz. A single thread (such as simple-threaded process) will only be able to utilize one of the cores. The true benefit of a multi-core CPU is that you can do may things at the same time, such as one ray-tracing operation, one TV recording, one download, one music streaming process, and one prime factorisation, at the same time that you run an intensive 3D game. But some programs (not too many though), such as Blender, will automaticaly create many threads to really use all four cores, which should be rather close to (but not quite) an effective 11.2 GHz core, I guess. --Andreas Rejbrand (talk) 16:22, 3 February 2010 (UTC)[reply]
I didn't think it had four 2.8Ghz cores, I thought it had four 0.7GHz cores. StuRat (talk) 19:23, 3 February 2010 (UTC)[reply]
Sun microsystems used to measure GHz like that on their sparc machines - but for a AMD or Intel processor 2.8 GHz quad core means 2.8 each, not total.87.102.67.84 (talk) 13:17, 4 February 2010 (UTC)[reply]
Additionally, putting more RAM in a machine will often give more of a performance boost than a new CPU or hard drive ever will. Since you're using Windows XP, chances are that 4GB of RAM is the maximum the OS can use. I recently "fixed" a computer that was having problems by upgrading the RAM from 512MB to 2GB. This was more than enough to avoid swapping out to virtual memory during normal daily tasks which in my own experience is one of the biggest causes of people complaining about slow computers. Caltsar (talk) 16:37, 3 February 2010 (UTC)[reply]
Quibble: The 4GB number is a theoretical maximum on 32-bit XP, but the actual maximum is always less. A 32-bit XP machine with 4GB of RAM installed will show less than 4GB, depending on the I/O devices. Here is a good discussion of same. My 4GB XP machine, which has a 512MB video card, correspondingly only shows 3582MB of physical RAM available. Comet Tuttle (talk) 17:32, 3 February 2010 (UTC)[reply]
Very true, I left that out to avoid complicating things further as 4GB of RAM (as in physical sticks of the stuff) is the maximum a 32-bit OS can address before taking into account other overhead in addressing space. And to add to my previous comment before anyone points this out, I was referring to RAM speeding up a system most significantly in the way a user perceives the speed and not the actual benchmarks. RAM tends to be the bottleneck in this sort of scenerio. Of course, if StuRat (edited, put the wrong name here!) already has plenty of RAM, the Hard drive or general OS bloat could also be culprits. Caltsar (talk) 17:51, 3 February 2010 (UTC)[reply]
I agree with the remarks above (and my 64-bit Windows 7 machine has 6 GB of RAM). --Andreas Rejbrand (talk) 17:56, 3 February 2010 (UTC)[reply]
It's not the OS; it's the applications you run. To view your four cores' workload, hit ctrl-alt-del to bring up the Windows Task Manager, and then click the "Performance" tab to look at the pretty graphs. Depending on what applications you use, it's likely that only one core will be highly tasked, but, as Andreas Rejbrand notes, some applications do use them all — when Adobe Premiere renders video, for example. Comet Tuttle (talk) 17:23, 3 February 2010 (UTC)[reply]
Oh, since this is of interest to you: In the Task manager, click the "Processes" tab and then you can right-click on any process and choose "Set Affinity" to force a given process to run its threads on particular cores. You shouldn't ever feel that this is necessary to optimize your system, but it's an interesting toy. (I have been told that using this technique to restrict Microsoft Outlook 2007 to a single core does stop Outlook from locking up your machine periodically.) Comet Tuttle (talk) 17:26, 3 February 2010 (UTC)[reply]
XP can utilise all the cores (with the disclaimer above that a single threaded application may be bound to one core) - but what is not faster? You can speed up start up times by adding the program to the startup folder at the expense of memory. Otherwise - the hardisk may slow you down, or possibly graphics is now your bottleneck.87.102.67.84 (talk) 19:22, 3 February 2010 (UTC)[reply]
That sounds like exactly what I want, but I suspect it only works for the current session. Is there any way to have Explorer always use a specific core and have my PowerDVD use another, etc. ? Then maybe the DVD I'm playing wouldn't hiccup when Windows decides to go check for updates or something. StuRat (talk) 19:23, 3 February 2010 (UTC)[reply]
The relevant command seems to be 'start' eg at the command prompt something like "start /affinity 4 C:/powerdvd.exe" to start powerdvd on processor 4 (you can put the command line arguments in a shortcut or batch file for ease of use), priority is also set using start. I'm not sure if using affinity prevents other processes from using a core, setting priority higher might also work for your needs.87.102.67.84 (talk) 19:43, 3 February 2010 (UTC)[reply]
I'd like to try that. What's the syntax for setting a higher priority ? StuRat (talk) 20:09, 3 February 2010 (UTC)[reply]
In task manager you can right click on a process and reset the priority - I believe this is temporary, to set priority using start it's
[1]> start /<priority> <application>, e.g. start /high winword.exe
To do the same thing from a shortcut just use: cmd /c start /<priority> <application> copied from link and modified
Note <priority> uses words (possibly you can use numbers too), in cmd.exe type "start /?" for a list of commands and accepted words - I believe that using 'realtime' priority can be problematic. So you'd type something like start /high dvdplayer.exe (or whatever the exe file is called - full path also needed I think). I've no experience of using this myself, but the info is so often repeated I assume it is accurate.
That said I echo what is said below - on XP with a many times less speedy processor I don't experience such problems - though I don't really multitask more than 2 or 3 things at once in general...87.102.67.84 (talk) 21:56, 3 February 2010 (UTC)[reply]
Oh almost forgot, many programs let you choose their priority - from memory: SMplayer VLC player (also FFmpeg) either via the command line or deep within the settings.. One issue is that changing the priority for 'dvdplayer' using start might not affect the settings of programs that it itself initiates (anyone got the answer to this)? I think it's likely that your personal dvd player also will have such a setting (probably well hidden) - in the programs folders try looking at installation notes, or other readmes - I'd bet there's a way for your program too (without messing with the start command)87.102.67.84 (talk) 22:30, 3 February 2010 (UTC)[reply]
That should definitely not happen. I usually record TV and perform a very, very lengthy mathematical simulation while playing GTA: San Andreas (and maybe a download too). --Andreas Rejbrand (talk) 19:43, 3 February 2010 (UTC)[reply]
Well, this is not a relevant remark, but I think that you would love Windows 7. In addition, I believe that Windows 7 works rather well with solid state disks, which are faster than conventional HDDs. It might be a good idea to put the OS and most programs on a SSD, but I have never tried that. Actually, I am very happy with the performance of my computer, even though it has a conventional HDD. This might be because I have a very high-end CPU, a lot of RAM, and - most importantly - never shut down the computer. In Windows 7, the "hybrid" stand-by mode is great. The computer is completely silent in this mode, and you can wake it within a couple of seconds. In addition, if you would loose the power during stand-by, you can still resume your work, for the most important parts of the RAM have been saved to the HDD. It will take some time to resume, but no data will be lost. --Andreas Rejbrand (talk) 19:54, 3 February 2010 (UTC)[reply]
You never shut it down ? Does that mean Windows 7 has completely eliminated the memory leaks which made periodic reboots necessary ? StuRat (talk) 04:46, 4 February 2010 (UTC)[reply]
I never shut down my Windows Vista PC either. But due to automatic updates requiring system reboots, I did never obtain an uptime of more than a couple of weeks, so I cannot say anything about the system stability for periods longer than that. --Andreas Rejbrand (talk) 09:54, 4 February 2010 (UTC)[reply]
In general, that's not necessary: the OS will automatically distribute processes to different cores when those cores would otherwise be idle (or under-subscribed). You need to use "Set Affinity" only when you want to use some other policy, like "these two long-running processes must share a core because I don't care how long they take and I'd rather have the other cores free for other usage as it arises". --Tardis (talk) 19:59, 3 February 2010 (UTC)[reply]

Thanks for the answers, so far. More RAM might be a good thing to try. I'd also like to try setting priority. Perhaps it might make more sense to lower the priority on all the other processes that are always running. Are there any common intrusive processes which could stand to have a lower priority ? How about Explorer.exe ? StuRat (talk) 04:55, 4 February 2010 (UTC)[reply]

I would not recommend chaning priorities; everything should work just fine when Windows schedules processes automatically. And I do not think that altering the priority of the Windows shell is a good idea... But I guess it safe to try; if something does not work out well, a reboot would fix the problem. --Andreas Rejbrand (talk) 09:52, 4 February 2010 (UTC)[reply]
Common sense tells me not to lower priority on explorer (no explanation given) - how ever you could lower priority on stuff like windowsupdate, googleupdate, adobeupdate etc - stuff that can wait. (not sure what they are called internally)87.102.67.84 (talk) 13:01, 4 February 2010 (UTC)[reply]
Before spending your hard earned cash on new memory I think Windows Task Manager can help you again. In the performance tab (where the CPU charts are), look at the bottom where it says "Commit Charge" (there's an article on that) - specifically look at the peak value, and compare it to total physical memory also found in "physical memory" (note "total physical memory" should be close to the amount of RAM you have) - if "peak value" of commit charge exceeds "total physical memory" then the computer will have had to use the hard disk to swap blocks of data in and out of ram - slowing it down. If the peak value is less then this hasn't happened (and you don't need more memory).
Note - look at the peak value after running windows for some time as you usually do, including all the stuff that you might do during the day. (The initial value at start up will be low).
You can monitor the effects on "total commit charge" as you open new programs. - it's always possible to max it out if you open enough browser windows etc - so just try normal activity.87.102.67.84 (talk) 12:58, 4 February 2010 (UTC)[reply]
(I'm 99% this analysis is correct - but please jump in if I've missed something obvious else. or maybe you meant to increase the number of utilised memory channels - not total ram?) 87.102.67.84 (talk) 12:58, 4 February 2010 (UTC)[reply]

interested in computers

If I wanted to learn more about computers, find out how they work, write my own programs, that sort of thing, where should I start first? And supposing I studied for an hour every day, about how long might it take to learn that sort of stuff? Would it be possible to do it all from here, just using my own computer and the internet?

148.197.114.158 (talk) 17:47, 3 February 2010 (UTC)[reply]

Definitely. There are tons and tons of self-taught programmers who are masters in their field. Take a look at Microsoft Small Basic for starters? Comet Tuttle (talk) 17:55, 3 February 2010 (UTC)[reply]
I am a self-tought programmer, and today I consider myself very experienced in Delphi and Win32 development. I learned programming at the age of 12 by studying sample code. At that time, there was a free Personal edition of Borland Delphi, but unfortunately, there is no such version anymore. But I believe that Microsoft Visual C++/C#/... Express Edition is free, isn't it? --Andreas Rejbrand (talk) 18:00, 3 February 2010 (UTC)[reply]
Yes, Visual Studio Express is free, link is here. Small Basic is free at this Microsoft link. Comet Tuttle (talk) 18:13, 3 February 2010 (UTC)[reply]
(edit conflict)Well Wikipedia's Personal computer article has some basic stuff about computer hardware, and you can click on each of the components to get more information on each bit (see the hardware section). Once you know a particular bit of hardware exists, you can search Google for it and likely get more good information. As for learning to program things, there are lots of good internet sites for learning that sort of thing. First you need to choose a language, I'd suggest Python, it seems useful and relatively simple. There are a list of tutorials for it here.
As far as how long it'd take, I think that'd depend on how much you wanted to know, I doubt you could ever know everything about everything computer related. It's more like a journey than a destination, you're not going to wake up one day and say "oh I know computers now". But you can probably learn the basics pretty quick and get a pretty good handle on Python within a week or two of daily use. TastyCakes (talk) 18:01, 3 February 2010 (UTC)[reply]
Python isn't unique in that sense. Most programming languages have highly similar concepts behind the structure. Once you understand the concepts, most of programming in a new language is just looking up syntax requirements. You know what you want to do (ie: use a for loop), but you just need to see what the syntax looks like. There are some languages which do not have the same general concepts as the majority of mainstream languages. You can safely ignore those and still be what most people would call a "computer expert." -- kainaw 22:28, 3 February 2010 (UTC)[reply]
True, Python uses very ordinary programming conventions, similar to C++ or Java or dozens of others. Its advantage, in my opinion, is a much more "beginner friendly" syntax and its large standard library to do all sorts of things very easily. I think Python is a good language to learn on for those reasons: you can learn the high level concepts of programming without (as many) semantic problems frustrating and slowing you down. TastyCakes (talk) 16:14, 4 February 2010 (UTC)[reply]

New question, I was looking around on the internet for a while and found this, http://en.wikibooks.org/wiki/C_Programming/A_taste_of_C , thought I might give it a go. It was going well right up until the running of the example program, which my computer insists does not exist, even though I can see it saved right there, where I put it. Nothing I've tried makes it see otherwise, so either I'm already doing something silly wrong, or this is a very long way of getting me to download a virus, which I hope it isn't. Any ideas? 148.197.114.158 (talk) 11:06, 4 February 2010 (UTC)[reply]

You should have two programs hello.c (the source file with the program text), and hello - the compile program you want to run.. Are you using windows - if so I wonder if you should compile to hello.exe - one possibility is that when you type "hello" (no quotes) into the command line windows might be thinking you mean hello is a command like "dir" or "cd".
ie try using "gcc -o hello.exe hello.c" (no quotes) - the .exe part signals to windows that the program is runnable.87.102.67.84 (talk) 12:46, 4 February 2010 (UTC)[reply]

Just tried that, doesn't work. It still insists hello.c doesn't exist. Perhaps if I renamed it something else... 148.197.114.158 (talk) 18:09, 4 February 2010 (UTC)[reply]

Yes try that - so you haven't even got past the compile stage (just to say - when you convert the text to a runnable program it's usually called "compiling")
If it doesn't work can you copy the error message (are you compiling at the command line - ie cmd.exe?) also have you got both the gcc program and the hello.c program in the same directory?87.102.67.84 (talk) 18:47, 4 February 2010 (UTC)[reply]
TEST - what happens if you type hello.c on it's own? Does the text editor open or not?87.102.67.84 (talk) 19:08, 4 February 2010 (UTC)[reply]
gcc might be a bit hard for beginners in windows - [2] - there are lots of others you can try - tiny c , and lcc are also c compilers - and the documentation seems easier to read, alternatively try an IDE there are lots to choose from.87.102.67.84 (talk) 20:06, 4 February 2010 (UTC)[reply]

OK, typing in the reccommended gcc -o hello hello.c brings up the messages: 'gcc: hello.c: No such file or directory' and 'gcc: no input files'. Typing just hello.c brings ' 'hello.c' is not recognised as an internal or external command, operable program or batch file.' I think I should just give up and try one of those others. 148.197.114.158 (talk) 20:16, 4 February 2010 (UTC)[reply]

  • It may be just a matter of cd-ing or chdir-ing into the source directory (the directory where you saved hello.c) before trying to compile with gcc. From the error message, your gcc installation seems to be working fine, and you are running the gcc command from a directory other than the one where you saved the hello.c file. --Zvn (talk) 20:22, 4 February 2010 (UTC)[reply]
If typing hello.c doesn't work it's not there! it should open the file for editing with a text editor - type "dir" and tell us what you see - both gcc and hello.c need to be there. Are you familiar with using the command line - if not you probably need a quick lesson, (searcg for "cmd.exe tutorial" or read this http://www.bleepingcomputer.com/tutorials/tutorial76.html (only one page - scroll past the spyware adverts to the useful stuff below) or alternatively use a program with an included IDE.87.102.67.84 (talk) 20:55, 4 February 2010 (UTC)[reply]
Try This - use windows search to find 'gcc.exe' then open the folder containing this file. (there will probably quite a few things in it - don't be put off). The get your "hello.c" file and copy it to the same folder. Then using "run" in the start menu open the command prompt ("type cmd.exe") - now navigate to that folder in the command prompt, type "dir" to get a listing of the files - verify that both gcc.exe and hello.c are present. Then type the compile command.this should work. If you get stuck or get errors please ask.87.102.67.84 (talk) 23:51, 4 February 2010 (UTC)[reply]

Well, I'm getting there, it seems. It was trying to work from inside some other folder, so I've moved to the right place, both gcc and hello.c are next to each other in the same folder, the file opens when I type it to, but it still doesn't run. The file format is not recognised, and it returns 1, which does nothing. 148.197.114.158 (talk) 10:54, 5 February 2010 (UTC)[reply]

Good - 1 means an error (in C return 0 (zero) means ok ) - the compiler found the file but didn't like it. One possibility is that you've saved in the wrong format - compilers like simple text files (no fonts, bold, italic, or colours) - if you didn't before - use notepad to make the program - you can copy the old program into notepad and save the result - this also creates a simple text file. (Note the coloured program in the tutorial you are using is how it would appear in a special development program - but the actual file is just plain black on white text)
If you already had saved as a text file (not .rtf , .doc etc) the something else must be wrong. At this point I'd recommend trying another compiler to see if it's gcc or something else - tinyc is a small download from here http://bellard.org/tcc/ (see Downloads section a page or two down)- once the tcc-0.9.25-win32-bin folder has been extracted, open it, and the tcc folder as well - this is the place to put the "hello.c" file and the compiler is the program called "tcc" - to try compiling just type "tcc hello.c" - a file hello.exe should be made. If you get this far and tinyc/tcc works then the program at the least is generally acceptable, if it doesn't work in tinyc as well as gcc it need looking at.
I'm hoping that you've saved the file in the wrong format - as that is easier to fix.87.102.67.84 (talk) 14:51, 5 February 2010 (UTC)[reply]
You should consider trying a more simplisitic/easier language such as Microsoft Small Basic or Visual Basic.net to get started. Starting on C will be a bit of a headache...Smallman12q (talk) 16:14, 6 February 2010 (UTC)[reply]


February 4

emergency! need a math library for Java

For some reason I don't think a math library is installed with my programming environment so ... I get weird errors like "method pow(int, int) is undefined for the type [class name]". Uhhh ... why can't I download a standard math library anywhere? Where do I find one, and why is it so hard to search for it on google? Doesn't everyone have a math library? John Riemann Soong (talk) 00:34, 4 February 2010 (UTC)[reply]

Sounds like you have a variable, I'll call it x. It is of some class type, I'll call it Foo. So, you have "Foo x;" somewhere. Then, you do something like x.pow(1,2);. But, there is no method called "pow" in Foo. This has absolutely nothing to do with a math library. It is a completely incorrect usage of pow. -- kainaw 00:49, 4 February 2010 (UTC)[reply]
Sun provides an excellent reference for Java. In this case, you want Java.lang.math. Note that the error message was correct: pow(int, int) IS undefined. The pow method takes two doubles. So if you convert your ints to doubles, you should be fine. Irish Souffle (talk) 01:00, 4 February 2010 (UTC)[reply]
Well actually I resolved it in another way -- I have another question though -- what is the escape sequence for printing the plus sign? I tried to use /+ but the compiler rejects it. John Riemann Soong (talk) 01:13, 4 February 2010 (UTC)[reply]
The plus sign doesn't need an escape character. Try compiling System.out.println("+"); and you'll see it works fine. Make sure the plus sign is in quotes. Your problem may be with string concatenation. For example, if x == 5, and you want to print the value of x with a plus sign in front of it, you write System.out.println("+" + x); This prints "+5". Does that help?--el Aprel (facta-facienda) 01:32, 4 February 2010 (UTC)[reply]

Booting Issue from USB Flash Drive

I'm trying to boot backtrack 4 (http://www.backtrack-linux.org/) from my flash drive, and it gives me an error every time I try to start it. It says "could not find kernel image: linux." I looked on the flash drive to see if syslinux.cfg is there, and it is. Also, I used UNetbootin to install the ISO onto the flash drive as it was recommended by the makers. Anyone know a solution? Thanks! —Preceding unsigned comment added by 76.169.39.243 (talk) 03:37, 4 February 2010 (UTC)[reply]

www0.?

Why www0. and not www. What are the differences and what does it mean? I understand that it goes all the way to 6 www0. - www6. ??????

××√× —Preceding unsigned comment added by Brandonark13 (talkcontribs) 06:00, 4 February 2010 (UTC)[reply]

See domain name. In the website "www.cnn.com", the www. is a subdomain of the cnn. portion of the address. The website owner chose to register the www. in the Domain Name System record. There is nothing special about "www." other than everyone in the world is familiar with it. Some websites register subdomains of www0. or www1. or en. as subdomains. So, a particular website may have subdomains of www0 through www6, but this is totally made up by the website owner — it could just as well be a123.cnn.com or sdlfajs8efsdlfjs8efsl8efj.cnn.com or what have you. Comet Tuttle (talk) 06:14, 4 February 2010 (UTC)[reply]
Historically, I think the plan was that "company.com" would point to the top level router in a company; then "www.company.com" would point to the server(s) which could deliver www content (i.e. deliver HTML pages over HTTP). Theoretically, there would also be "ftp.company.com" for an ftp server; "smtp.company.com" for an SMTP server; "gopher.company.com" for a gopher server; and so on. In practice, virtually all users only really access a network via its HTTP server - so commonly, the top-level DNS name points to the web server. Many large websites require redundancy in the form of load balancing or Round robin DNS - so while the user types "www.company.com", they actually get directed automatically to the least-busy server. That server is properly named something else - it might be something as simple as "www1", "www2", or so on - or it can be any other name at all - but it's aliased to www.company.com. This can be done transparently (and the user thinks they are connected to "www" even though they are actually connecting to "www37", or it can be done with an HTTP redirect, in which case the user sees that the exact server they are actually pointing to. Such systems sometimes persist for a long time after they are technically required, because they are public-facing - so changing details would require informing thousands of users to alter their bookmarks, etc. As far as the number of servers, "www0-www6" - this is neither a hard limit nor an exact count of the actual number of servers in use. (Each of those might be a separate round-robin DNS for an entire data center, for example). In practice, large websites such as Google have tens of thousands of WWW mirrors. It has been estimated that a single Google query by one user uses as many as 10,000 Google servers. (source: Energy limits force complete rethinking of processors, programming, Kunle Olukotun). Think how much electricity is wasted every time you click!! Nimur (talk) 06:35, 4 February 2010 (UTC)[reply]

Qualified Dublin Core in XHTML

Hello,

I didn't find any answer on the web, so i hope someone could answer me here.

I'm implementing DC metadata on my website. I'd like to use qualified Dublin Core to add refinements to the contributor element. I know that in XML, it is possible to use Marc relators code, but i have no idea how to implement these qualifiers in XHTML.

My question is : Is the syntax <meta name="DC.contributor.ill" content="Name of the illustrator /> (for instance) a valid syntax, according to Dublin Core and Marc relator codes specifications ?

It would be wonderful if anyone could answer me.

Thanks in advance;

Patrice —Preceding unsigned comment added by 79.84.252.128 (talk) 07:56, 4 February 2010 (UTC)[reply]

Excel LOOKUP function

Can anyone please help me with the correct format and syntax to be used in the LOOKUP function in Excel? Let us say that I want to use grades of A+, A, and A- in my grading scheme. (For simplicity, I will ignore the grades of B, C, and D for now.) My cut-off points are as follows: a grade of A- is from 90 to 93.333 points; a grade of A is from 93.333 to 96.667 points; and a grade of A+ is from 96.667 to 100 points. If I use the following function, it works correctly.

=LOOKUP(A1,{0,90,93.333,96.667},{"F","A–","A","A+"})

Now, let's say that I really want to use the actual "correct" cut-off points of 90; 93 1/3; and 96 2/3. (In other words, I want the exact value of 1/3 as opposed to 0.333; and I want the exact value of 2/3 as opposed to 0.667.) How can I modify the above function to accommodate for requirement of exact fractional equivalents ... and not use merely their decimal approximations?

I tried things such as these (below), but they all seemed to create syntax or formatting errors:

  • I used 93+(1/3) as a cut-off point instead of 93.333;
  • I used =(93+1/3) as a cut-off point instead of 93.333;
  • I used 280/3 as a cut-off point instead of 93.333;
  • I used =280/3 as a cut-off point instead of 93.333;
  • I used =(280/3) as a cut-off point instead of 93.333.

Any thoughts, ideas, or suggestions as to what is going on exactly ... and how I can fix the problem? I cannot imagine that Excel is so simplistic that it requires decimal numbers to be used (e.g., 93.333), but it will not accommodate a simplistic division operation (e.g., 93+1/3). The problem, I suspect, is in the exact typing / format / syntax of the formula (e.g., the correct use of parentheses or equal signs or commas, etc.). But, I cannot seem to figure it out. Any thoughts? Thanks! (64.252.68.102 (talk) 16:20, 4 February 2010 (UTC))[reply]

Fractions? We don't need no stinking fractions! Remember that to Excel, every number is a float, so asking for the 'real' value of 93 1/3 to be expressed is never going to happen. However, if you are interested in a 'more accurate' solution I would suggest using the cell array option for the LOOKUP function, thusly: =LOOKUP(A1,$D$1:$D$4,$E$1:$E$4). This will use the values in D1-D4 for the grade cutoffs, and the values in E1-E4 for the letter grades themselves (and the dollar signs allow dragging it down a column to check a bunch of grades without breaking the reference). In the range of cells you can input a fraction like 93 1/3 and it will accept it. It will, however, merely reduce it to the closest float it can find, such as 93.3333333333333, but at least it will be transparent to the user. Hope this helps! --Jmeden2000 (talk) 16:39, 4 February 2010 (UTC)[reply]
Oh my God. Thanks. But, in all honesty, I did not understand a word that you just said. I am not that fluent with Excel. I have no idea what a cell array is. Can you please tell me exactly what I have to do ... and exactly how to type the formula? I am gathering that ... I go to a cell (let's say B5) ... and in cell B5, I can enter the exact formula =93+1/3. And then cell B5 will "hold" my exact value. Correct? OK, but then what exactly do I do with that? And, I assume that I have to do this for every single grade (A+ in cell B5 ... A- in cell B6 ... B+ in cell B7 ... etc.) ... is that correct? If that is all correct, then what will my final function look like? Thanks, if you can reply back again! Much appreciated. (64.252.68.102 (talk) 16:53, 4 February 2010 (UTC))[reply]
I should mention, before you go too far down this path, the lookup function works based on 'equal or less than' so if a grade of 93 1/3 is entered it will show you 'A-' given your current set of rules. There are ways around this but the discussion so far is just the LOOKUP function... --Jmeden2000 (talk) 17:19, 4 February 2010 (UTC)[reply]
OK let's step through this. Say you have ten decimal grades in column A, so they are A1:A10. You have your table of letter grade minimum values like '0, F' '90, A-' '93 1/3, A' and you put those into columns D and E respectively, so column D has F,A-, A A+ in it starting from the top at D1. Column E has the minimum value number next to the letter, so 0, 90, 93 1/3, etc starting with E1. Now, for the formula, if you put this into B1: =LOOKUP(A1,$D$1:$D$4,$E$1:$E$4) it will check the number grade in the cell next to it (a1) and compute the letter based on the table. The dollar signs are there to let you 'drag-fill' the B column by grabbing the little black square in the lower right of that cell and pulling it as far down column B as you want calculated. It will use the same lookup table against whatever number is to it's left. Finally, if you decide you want a different set of values for the letters (say you want to expand it so you can do B, C, and D; unless you are that tough of a teacher ;) you can change the formula to something like =LOOKUP(A1,$D$1:$D$10,$E$1:$E$10) if your grading rules ran from row 1 to row 10 in columns D and E. --Jmeden2000 (talk) 17:16, 4 February 2010 (UTC)[reply]
Will the above work correctly to calculate values that are in between the given ones (e.g. a 91.5)? In the past when I have tried to do such a thing I had to develop extremely odious nested IF statements (if it is smaller than X, give it an A-, otherwise see if it is smaller than Y, then give it a B+, and so on). The nesting restrictions of Excel make you have to use multiple columns for this approach, though. I can look up my old code if it would be useful, though it is not pretty. --Mr.98 (talk) 17:29, 4 February 2010 (UTC)[reply]
I implemented this for a full range (F D C B A with -/+) and it works great with decimals or fractions, the only glitch is when 93 1/3 is used it decides it is an A-; whereas 83 1/3 and down doesn't show this behavior, nor do any of the + grades. I think it's a float rounding error of some sort... Researching during my lunch break, should know more soon. --Jmeden2000 (talk) 17:32, 4 February 2010 (UTC)[reply]
To the user asking about this, I can email you the excel file showing all the work; but I should warn you against opening excel files from people you don't trust (which includes me). If you have a virus scanner and know how to say 'no' to macros, drop your email address into my talk page and I will send it to you. --Jmeden2000 (talk) 17:38, 4 February 2010 (UTC)[reply]
Perfect! Thanks for all of your work ... and for your patient explanations. So, now -- yes -- I do understand exactly what you are saying. I do have one more (nit picky) question ... which goes to a caveat point that you raised above. Personally, I am looking at all of these cut-off points as the minimum required to earn a grade ... which seems to be the opposite of how the LOOKUP function works (I guess?). So, once a student "hits" the cut-off point of 93 1/3, he is entitled to an A (not an A-). If he earns less than 93 1/3, he is only entitled to an A-. Once he "hits" the cut-off point of 96 2/3, he is entitled to an A+ (not an A). So, will this LOOKUP function do what I want (at the exact cut-off points) ... or do I still need further modifications? Thank you so much! (64.252.68.102 (talk) 17:43, 4 February 2010 (UTC))[reply]
Well... yes (with exceptions.) The lookup function works thusly (according to Microsoft) "If LOOKUP cannot find the lookup_value, it matches the largest value in lookup_vector that is less than or equal to lookup_value." This would mean that since you specify the minimum required to reach the next grade in the table that entering that into the field will cause it to find the highest possible grade for that value. So, 93 1/3 should be marked an A. However, Excel is very funny about fractions. If you type in '93 1/3' it will show you that in the cell... If you type in '93.333333333333333' and set the data type to 'fraction' it will show you '93 1/3' in the cell but NOT treat it as if you had actually typed '93 1/3'! So, moral of the story, be careful when you enter values. Or, maybe you should consider just rounding up those last few decimals in the interest of student morale ;-) --Jmeden2000 (talk) 18:02, 4 February 2010 (UTC)[reply]
The file has been sent to you. Note that I added a grade tier (100) for testing purposes, you can simply delete it from the list of grades and it will revert to the grade rules as previously set forth. The examples illustrate that when Excel 'converts' something to a fraction it is only showing you the fraction value, what it has stored may not be exactly that fraction. This is how two grades showing '100' have two different outcomes (one is actually 99.999 and the other 100). --Jmeden2000 (talk) 18:11, 4 February 2010 (UTC)[reply]
Thanks a lot! I will take a look and sort through all of this tomorrow, when I have free time. Thank you! (64.252.68.102 (talk) 18:21, 4 February 2010 (UTC))[reply]

Thanks to all for the above help. Much appreciated! Thank you. (64.252.68.102 (talk) 23:45, 6 February 2010 (UTC))[reply]

Slideshow software

Slideshows are ubiquitous, and finding slideshow software is easy, right? WRONG!

OK, maybe not "wrong", but I, for one, am stumped (and did you know that our photo slideshow software article is a complete joke?). I am trying to find a (Windows) program that would have the following features:

  • free (open-source would be good, but is not necessary);
  • ability to handle a large number of images (around a hundred thousand);
  • Exif-orientation detection;
  • a good selection of transition effects;
  • does not take forever to index the images before starting to display them (a short wait is fine);
  • tweakable captions (or at the minimum it should be able to show the file name).

So far I've tried ACDSee (not free; has a pretty low limit on how many images can be included in a slide show); IrfanView (no transition effects, takes long to load the file list before the start of the show); and some antique 1990s program inventively called "Slide Show", which, surprisingly, is the best of what I've found, except it's not free, can't read Exif data, is flagged by anti-virus software as "harmful", and often glitches.

Any suggestions will be very welcome. I can't believe there's nothing appropriate for a task as simple as a slide show!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:04, February 4, 2010 (UTC)

I believe that Google's Picassa meets all of your requirements. They don't call them slideshows. They call them movies (since you can make the slides move around and not just go from slide to slide). -- kainaw 18:08, 4 February 2010 (UTC)[reply]
Sorry, I accidentally left out Picasa from the list of things I tried. The problem with it is that it does not seem to be able to show the pictures from a directory and its subdirectories; it only works with one directory at a time (at least it did three months ago when I tried it last). Any other suggestions?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:14, February 4, 2010 (UTC)
For me, Picasa shows pics from my computer and from my wifes computer (over the network). It spans all directories, showing photos I have in my photos directory, in my email downloads directory, and in my project directory - along with all subdirectories. -- kainaw 18:48, 4 February 2010 (UTC)[reply]
Hmm, that's not what my experience had been... I'll download a fresh version tonight and give it a go; perhaps they fixed it recently.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:51, February 4, 2010 (UTC)
This is only free if you already own it: The "My Photos" screensaver of Windows Vista is the best slideshow program I have ever seen. I think it has all your requested features except for the captions, and the part about being free. Comet Tuttle (talk) 18:42, 4 February 2010 (UTC)[reply]
Never even thought to try it (and it does fit my definition of "free" for this purpose). I assume it's the same in Win7? Will give it a try when I come back home tonight. No captions is a bummer, though...—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:51, February 4, 2010 (UTC)
Postscript: The Vista version is just called "Photos", not "My Photos"; and, if it matters to you, the Vista version has a bug whereby your monitor will never automatically shut off if the "Photos" screensaver is running. Comet Tuttle (talk) 07:26, 5 February 2010 (UTC)[reply]
Have you tried XnView? I've got an old (2006) version installed (win xp), and tried it on a directory tree with ~7500 jpegs just now. It fits most of your requirements - open source, no tweakable captions, but it shows the file names, it rotates based on exif data, my old version has only one transition effect (cross-fade), there may be more in recent versions, and it handled 7,500 files nicely (I haven't got a 100,000 image directory to try it on). Optional random order or looping of images. --NorwegianBlue talk 21:54, 4 February 2010 (UTC)[reply]
No, I have not tried XnView. Thanks for the suggestion; I'll try it out this weekend! Transition effects are quite important, though...—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:23, February 5, 2010 (UTC)
Ëzhiki: curiously I wrote my own slideshow program a while ago; I'll not spam you with it, as it doesn't do a bunch of the things you asked for. But your question has given me some ideas for the features-to-do list (I hadn't thought about the exif-orientation thing), and I wanted to know what you mean by "tweakable captions" - beyond the filename (perhaps with the file extension removed) what would you expect an automated slideshow program to display? -- Finlay McWalterTalk 00:53, 5 February 2010 (UTC)[reply]
Finlay, what I really meant by tweakable captions is an ability to include the contents of the Exif data fields into a caption. For example, if you keep comments in the exif comments field, it would be most useful to show them as a caption. That, and good old stuff like file name/path/creation date/etc. If it could pull the data from the ACDSee database, it'd be absolutely perfect, but I understand a feature like that would be too much to ask (or even hope) for. Incidentally, if you ever need the services of a beta tester for your program once it takes shape, I'm more than interested in helping :)—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:23, February 5, 2010 (UTC)
I would note that Irfanview allows you to save a text file of the slideshow after you've added all. Loading this text file seems quite fast, I tried it with one I created after I add all from my root drive which ended up with 33k files. Looking at the file, as I expected it's simply a list of the files with full directory trees. You could easily create a similar file with a "dir /b /s" in cmd or "get-childitem -recurse | foreach-object -process { $_.FullName }" in PowerShell or similar either making new files if you change some directories or just adding to the existing file if just add directories. This may or may not get around your loading time concern. It won't help with your transition effects one Nil Einne (talk) 08:22, 5 February 2010 (UTC)[reply]
Yeah, I noticed that feature. Problem is, the saved list is going to remain static, and since the pictures I need to run the slideshow on come and go, the list will need to be re-built quite often. It's good to know it can be updated with the dir command, but it's just too much preliminary work still. Thanks for the tips, though.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:23, February 5, 2010 (UTC)
I have used something called SuperJPG for a long time. It's shareware, but is readily cracked; handles lots of images (i've had folders with thousands); has transition effects; indexes dynamically (a separate thread maybe?); easily shows a filename caption; not sure about EXIF orientation though. Select the images you want in your slideshow and press F9 - skip through the images on a timer or on a key/mouse press. —Preceding unsigned comment added by 86.151.210.121 (talk) 02:43, 6 February 2010 (UTC)[reply]

Microsoft have their own free program for this, called Photo Story. Not sure whether it's any good, but I presume I'd be worth a try. Chevymontecarlo (talk) 18:12, 7 February 2010 (UTC)[reply]

Update: I tried Win7's Photos screensaver, and it turned out to not support Exif orientation. That and no captions rule it out. XnView, on the other hand, seems to be just the ticket (except for the "quick loading" part)—they've apparently added more transition effects, and the captions are tweakable like there's no tomorrow :) For the sake of experiment, I'm also going to try out the other two suggestions (SuperJPG and Photo Story). Thank you everyone for your help!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 17:01, February 8, 2010 (UTC)

Stolen account / username

What is the best course of action when someone malicious has stolen your account or created an account with an almost identical name and proceeds to impersonate you? In this hypothetical example, there are no admins or mods or anyone who are around or care so you're on your own with the problem. I'm not talking about wikipedia here, but it could apply to wikipedia if you imagine there were no admins. Thank you

If this was occurring to me and I knew who the person was, I'd get a lawyer to send them a demand letter, threatening lawsuits and a referral of the matter to the police. Depending on where I lived, I might also actually refer it to the police immediately. There is a crime called "criminal impersonation" in many countries, and in some it is apparently a felony. Identity theft may also being committed. Comet Tuttle (talk) 19:04, 4 February 2010 (UTC)[reply]
there's a difference between a stolen account and impersonating someone.
In the case of a stolen account (password hacked etc) - contact the site or service provider, tell them what has happened.
Impersonating you - on many sites - eg wikipedia, forums etc contact admins or moderators - and inform them. In the case of a similar e-mail address - you can contact the e-mail provider - but perhaps more important in the short term is to contact your contacts and inform them that someone is spoofing you. In the long term - you would have to decide if the similar name was accidental or malicious - in the case of malicious use of a similar name - I'd call the police -simple as that.87.102.67.84 (talk) 19:41, 4 February 2010 (UTC)[reply]
Contacting moderators is not an option; they're either non-existent or simply do not care. —Preceding unsigned comment added by 82.43.89.14 (talk) 19:48, 4 February 2010 (UTC)[reply]
If this isn't a hypothetical problem maybe you should say what or where the problem is? is it an email acount, a paysite, paypal etc ?? (we can't just randomly guess on a proper course of action) 87.102.67.84 (talk) 20:23, 4 February 2010 (UTC)[reply]
Here's what I did when my son's MSN account was hijacked by someone who obviously knew him, and who sent nasty messages to his friends, pretending to be him. They were constantly logged in, so he was unable to regain control by pressing the "forgot my password" button. He and a friend got in touch with the perpetrators while logged in using the friend's account. He asked them to stop; they just kept taunting him. I took over the keyboard, and wrote, "Hello, this is XXX's dad at the keyboard. I would like to warn you that I have recorded your ip-address, and that I will report you to the police unless you log off immediately". My threat got a silly reply, to which I responded that they had one minute to log out. They did, and we regained control of the account. I was bluffing of course. This approach will work only if the offender is not very computer-savvy and easily intimidated. --NorwegianBlue talk 20:49, 4 February 2010 (UTC)[reply]

How do I stop a major privacy invasion by Google?

When looking at a Google search results page, I clicked on "Web History" at the top right of the page out of curiosity. This gave me another page which had a link on it which said "Disable customisations based on search activity". When I clicked on it it changed to "Enable customisations based on search activity." There was another link for "Web History" and when I clicked on that, I was shocked to see a box which said "Sign in to Web History with your Google Account". I havnt got a Google Account!!! I don't want a Google Account!!!! However the box was already filled in - Email: my YouTube log in name, Password: presumably my YouTube password, Stay signed in: already ticked. WTF!?!?!?! So I deleted all my cookies using Ccleaner, details still there! Then with AdvancedSystemCare, details still there!! Then deleted all cookies thjrough Firefox itself, details still there!!! I'm shocked, upset, and annoyed by this invasion of privacy! I have not looked at YouTube for two or three days. I delete all my cookies every day almost. How did Google know what my YouTube account details are? How can I make it forget this information, and stop it hapening again please? I think this major invasion of privacy is disgusting and totally unacceptable! Sorry for all the exclamation marks, but I am upset. 78.146.193.0 (talk) 21:43, 4 February 2010 (UTC)[reply]

It is FAR more likely that Firefox assumed it was the same user/pass. When you save user/pass, it is not saved as a cookie. So, deleting cookies, spinning around three times, deleting cookies again, placing an ash circle around your computer, and deleting cookies again will not delete the saved passwords. You have to go into preferences and view/delete the saved passwords. -- kainaw 21:46, 4 February 2010 (UTC)[reply]

Thanks. I deleted all passwords in Firefox as suggested, and the box referred to above now is blank. That is something of a relief. I would not have expected Firefox to mistake Google for YouTube. 78.146.193.0 (talk) 22:01, 4 February 2010 (UTC)[reply]

By the way, you know Google and YouTube are the same organisation, right? Marnanel (talk) 22:12, 4 February 2010 (UTC)[reply]
(edit conflict) Google owns YouTube. The YouTube login is the same as the Google login. -- kainaw 22:13, 4 February 2010 (UTC)[reply]

Yes I did know. I do not like the monolith regarding privacy that Google has become - reading your Google emails, remembering your Google search history, your YouTube viewing history, Google websites - because of the bad arrogant uncaring insensitive privacy misuse I am seeking alternatives to Google. Do people hold demonstrations outside their offices in the US? They should do. 78.146.193.0 (talk) 23:58, 4 February 2010 (UTC)[reply]

You don't think other the sites keep track of your usage history? $10 says they do, but just don't tell you. The problem isn't Google, per se, the problem is the total lack of any kind of serious privacy protections in the USA. --Mr.98 (talk) 00:01, 5 February 2010 (UTC)[reply]
(ec)If you don't want google to read your emails, remembering your search history etc, there's a simple solution, don't use them. Also, you're assuming that google cares what emails you send and receive? Do you really think there are people at google who sit and go through your history?--Jac16888Talk 00:03, 5 February 2010 (UTC)[reply]

Other websites are not part of a multi-site empire where data from different websites can be collated. 78.146.193.0 (talk) 00:30, 5 February 2010 (UTC)[reply]

Oh, many are. For what it's worth, I don't like it either, and think I should have the ability to demand that any website purge its records of my activity, on my demand; but it's clear the only way this will happen is via government action, and this won't occur until there is some abuse that outrages the public. Ask.com is a search alternative that has a feature called AskEraser that purportedly purges its records of your activity once you log out ... except if the police has asked Ask.com to keep your search activity, which you can't find out ... so, we're all doomed. Comet Tuttle (talk) 00:49, 5 February 2010 (UTC)[reply]
When it comes to stuff like this, I'm in the Scott McNealy-camp, I don't really care if Google knows my search history. I mean, I suppose I would prefer they wouldn't, but hell, it gives me better service, so why the hell not. Privacy is dead, get over it. And it's not like it's anything important on there like medical history or financial information. Though I guess they have that Google Medical now, so that's not good.
However, I must disagree with you. I don't think Google has committed any big privacy violation at all. You signed up for and logged in with your Google Account. No one else. You didn't have to do that, you could use Google and Youtube without an account, but when you did, you gave Google permission to collect information on what you do on their sites. If you hate it so much, go use Yahoo! or Bing, but I guarantee you that they collect your web history as well. They're just not as upfront about it.
Regardless, Google has recently introduced exactly what Comet Turtle requests. It's called Google Dashboard, where Google shows you everything it knows about you, and (for some products) gives you the option to delete the stuff. This includes clearing your Google Web History. So there you go. Of course, this is no guarantee that Google actually deletes them or just tells you it did, but I personally believe them. The information is not that valuable, and if you went to all the trouble to tell Google to delete them, it would be the decent thing to do. Belisarius (talk) 06:52, 5 February 2010 (UTC)[reply]
I don't believe Dashboard lets you clear your search history at all, and it certainly doesn't let you clear their record of searches you performed from your current IP address while you were not signed in. Comet Tuttle (talk) 07:25, 5 February 2010 (UTC)[reply]
Use a library computer like I am. Here are my Google search results for "car bomb the white house".  :-D    192.30.202.13 (talk) 14:46, 5 February 2010 (UTC)[reply]
Dashboard allows you to manage all information associated with your google account except for the products listed at the very bottom. Additionally, some information can not be cleared as outlined in this help document. Caltsar (talk) 19:42, 5 February 2010 (UTC)[reply]
"And it's not like it's anything important on there like medical history" -- actually, http;//health.google.com -- Google do track medical history. Granted, you have to go out of your way to get it on there, but I still thought it was funny and worth mentioning.

And to the original poster: a YouTube account is a Google account. You already have a Google account. Go ahead, sign into Google Docs with your YouTube login -- it's the same account, YouTube is a Google service. 202.10.88.233 (talk) 11:22, 7 February 2010 (UTC)[reply]


February 5

Looking at conio.h? ("tcconio.h" ??) in C this seems useful for somethings I may need. (eg gotoxy like the old pascal) - however it's windows only - what alternatives are there for ouput routines that will compile to workable code on a variety of computer platforms? Simple ones are prefered - nothing beyond "print at col x row y" and possibly 2d line graphics (optional) - do I need to go all the way to openGL or is there something in between?87.102.67.84 (talk) 00:09, 5 February 2010 (UTC)[reply]

If you want to be coding in C then you might try ANSI escape codes: while really a Windows thing, they work in some terminal emulators on other platforms (according to that article). If you need graphics then you're going to end up in a more complex environment like Simple DirectMedia Layer (which isn't nearly as straightforward, for simple uses like you're talking about, as BASIC and Pascal's simple draw commands). Beyond that there's GDK and OpenGL, but that's really a lot of bother just to draw some text and some lines. If you're not attached to coding in C, Java has its own cross-platform graphics library, and javascript combined with the HTML Canvas element might be useful for some applications. -- Finlay McWalterTalk 00:38, 5 February 2010 (UTC)[reply]
ncurses will do this (really, generate escape codes like those Finlay mentioned) for you in a relatively portable and automatic fashion. --Tardis (talk) 02:49, 5 February 2010 (UTC)[reply]

Thanks, now looking at and considering some of those options.

Resolved

Graph representation of Wiki

Hello, I am a researcher who wants to model wiki pages as nodes of a graph. I was wondeing where I can find information about how pages/articles are connected(adjacent)? In particular, what information is available on every page about the authors, number of references it recieves (how many articles refer to it), frequency of access for articles, etc. Thank you for any help you can provide. All references are appreciated.Rmodarres (talk) 05:14, 5 February 2010 (UTC)[reply]

For MediaWiki, you may want to have a look at the Database layout, and in particular, the pagelinks and revision tables. Access counts are stored in the hitcounter table, but those are disabled in Wikimedia wikis for performance reasons (although data is available at http://stats.grok.se/. Titoxd(?!? - cool stuff) 07:18, 5 February 2010 (UTC)[reply]
Well, there are a few different ways to get at that information. If you want to get a complete snapshot of wikipedia, you can download the database. The current article snapshot (i.e. doesn't include the history of the pages is about 5 gigabytes when compressed, and up to 100 gigabytes uncompressed, so it's not a trivial download. This will get you all articles and what articles they link to, and you can make your graph (here's the sql schema, which includes the internal pagelinks). BTW, if you are just interested in what pages link to a specific article, you can just click the "What links here" link in the toolbox in the sidebar. That way you can find out that Cthulhu Mythos in popular culture apparently links to Hello Kitty. For some reason.
This wont get you the number of authors that have contributed to it (I think), for that you need the full dump, which includes the history. But that's 2.7 Terabytes big when it's compressed. So I don't recommend downloading that.
There is also a public facing API which you can use to interact with the site directly. See information here: [3]. I've never really used it, so I'm not aware of what information it can give you, but I suppose it's worth exploring.
As for frequency of access, you can get that data here [4]. I don't know how accurate the information is, but it does appear that you can download the raw data, so that's nice.
Is that all you needed, or do you want some more information? Good luck with your project! Belisarius (talk) 07:26, 5 February 2010 (UTC)[reply]
Get yourself a lot of ram and download the database dump. Shadowjams (talk) 07:15, 6 February 2010 (UTC)[reply]

steam

is steam (game) working right now for u guys? —Preceding unsigned comment added by 67.246.254.35 (talk) 03:08, 5 February 2010 (UTC)[reply]

Moved from Science Desk --220.101.28.25 (talk) 06:03, 5 February 2010 (UTC)[reply]

Yes, it is. 217.158.236.14 (talk) —Preceding undated comment added 13:54, 5 February 2010 (UTC).[reply]

Durr...RSS?

As the number of hi-larious sites I visit grows, so does my time spent checking each one for updates. I know all this RSS business should help, but I honestly can’t comprehend it. I’ve tried a couple of add-ons for Firefox, but they’re not quite what I’m looking for. As I thought it worked, an RSS aggregator thing could create a page listing all the new posts from whatever sites you’ve selected (including more than one site on the same page). I’m sure something like this exists; can somebody point me in the right direction please?--The Ninth Bright Shiner 06:28, 5 February 2010 (UTC)[reply]

I use http://individurls.com/ for that. See for example a friends selection on that site. Nanonic (talk) 06:34, 5 February 2010 (UTC)[reply]
Cool, best thing I've seen so far! Not to be picky, but...alright, I am being picky. I was thinking more like this format.
If Urban Dictionary was updated at 8:45 a.m., FMyLife was updated at noon, and I Can Has Cheezburger? updated at 6:00 p.m., then the page would look like this:
  • Cheezburger update
  • FML update
  • Urban Dictionary update
But, every update would be posted in its entirety. Anything like that?--The Ninth Bright Shiner 06:48, 5 February 2010 (UTC)[reply]
Google Reader can apparently do this according to various reviews online. Might be worth a look. Nanonic (talk) 07:00, 5 February 2010 (UTC)[reply]
Google Reader can absolutely do this, in fact, that is what it was made for! It's absolutely essential if you want to follow more than a few sites or blogs at once.
Using it is dead simple. Simply log in, press the "Add a subscription", and paste in the URL of the RSS-feed (which you can find by clicking the little RSS symbol that's to the right in your address-bar). Then all updates show up on Google Reader, for all your sites.
On caveat, though. Not all sites publish their complete content as RSS, sometimes it's just the first sentence or so. This applies mostly to things like newspapers, you're not gonna get a full content RSS-feed of the news stories from the New York Times, for instance. But those three that you mention all publish their full content, I just checked.
Seriously, start using Google Reader. It will change your life. Belisarius (talk) 07:34, 5 February 2010 (UTC)[reply]

You might also like the firefox addon SiteDelta. There's even a Wikipedia tutorial: WP:SiteDelta tutorial -- penubag  (talk) 09:52, 5 February 2010 (UTC)[reply]

Firefox's quick find?

Hey, two questions in a row! :D

Occasionally when I'm typing something in Firefox and attempt to type an apostrophe, I'll suddenly find myself typing in a box on top of the status bar that says "Quick Find (links only)." It can be frustratingly hard to type anything like this...what's the cause? How can I disable that whenever it pops up? Thanks.--The Ninth Bright Shiner 06:38, 5 February 2010 (UTC)[reply]

See http://support.mozilla.com/en-US/kb/Quick+find+bar+opens+when+typing+in+text+fields . Nanonic (talk) 06:41, 5 February 2010 (UTC)[reply]

electronics

how would i design a 2 bit synchronous up-down counter using j-k flip flop —Preceding unsigned comment added by Veedhoordeshmukh (talkcontribs) 12:11, 5 February 2010 (UTC)[reply]

You would examine the diagram at right (a 4 bit synchronous up-down counter using j-k flipflops) - and carefully lop off two of the bits! SteveBaker (talk) 03:38, 6 February 2010 (UTC)[reply]

rss

wats RSS, i hav an RSS reader in my mobile... how would it help me. —Preceding unsigned comment added by Veedhoordeshmukh (talkcontribs) 12:13, 5 February 2010 (UTC)[reply]

There's an encyclopaedia just down the hall...RSS. Xenon54 / talk / 13:42, 5 February 2010 (UTC)[reply]
Or you could scroll up a few lines.AndrewWTaylor (talk) 16:13, 5 February 2010 (UTC)[reply]

Malware warning

How much stock should I put into warnings such as this one? [5] I saw it when visiting Memory Alpha. I'm on a Mac running 10.5 and using Safari. Thanks, Dismas|(talk) 16:46, 5 February 2010 (UTC)[reply]

A lot of stock. From a Google search it appears this may be one of those websites that springs malware on users via Flash banner ads. Firefox blocks it as a "Reported Attack Site!" as well. Flagfox reports it's located in Luxembourg and whois links it to the Luxembourgish ISP root.lu. Obviously Wikia/Memory Alpha has nothing to do with Luxembourg. Xenon54 / talk / 17:44, 5 February 2010 (UTC)[reply]
You might want to check that you actually end up at http://memory-alpha.org/en/wiki/Main_Page Astronaut (talk) 01:52, 6 February 2010 (UTC)[reply]

Exporting .SWF movies to h264?

I have several old SWF video files. (Just video, no interactivity) How can I convert them to a more modern format (h264) that can play on Flash-free devices? Preferably, something Mac-based. But a Windows utility would be fine too. --70.167.58.6 (talk) 16:53, 5 February 2010 (UTC)[reply]

I've used iSquint for this in the past; it is pretty easy. For more heavy-duty conversion, there is always ffmpegX, but it requires a lot more fussing with settings. --Mr.98 (talk) 18:34, 5 February 2010 (UTC)[reply]

Nature of HTTP 400 errors

I find that when I get an "HTTP 400 Bad Request" error, it almost always go away when I refresh/reload the page I'm trying to open. How does this work? 128.237.226.131 (talk) 16:54, 5 February 2010 (UTC)[reply]

The 400 errors are almost always something related to malformed, slow, or dropped transmission of data. While it can be within the network connection somewhere between you and the web server, it is usually on your end. This is common with computers that have been turned into spambots. You want to surf the web, but your computer is using up all your internet capability to send out spam. So, your work gets squeezed out and you get a 400 error. -- kainaw 17:02, 5 February 2010 (UTC)[reply]
By definition, HTTP errors that begin with a 4 are client errors (i.e., errors on your end). 400 means you or your browser used incorrect syntax in requesting a page. Usually, the request you sent to the server was missing some text. Errors that begin with a 5 are a problem on the server's end.--Drknkn (talk) 17:19, 5 February 2010 (UTC)[reply]

data recovery

What's the best data recovery software. i had vista then formatted using windows 7. How can i recover the data..if possible a freeware. —Preceding unsigned comment added by 41.191.226.2 (talk) 17:01, 5 February 2010 (UTC)[reply]

Recuva has saved my bacon in the past. However if you've installed a whole operating system since the data was deleted the chances of recovery are probably slim to none; recovery works best when the disk has been left relatively untouched. Xenon54 / talk / 17:49, 5 February 2010 (UTC)[reply]
Also depends on the data. Are you trying to recover a corrupted file, or an erased file. Or has the relative path of the file become corrupted, and you're trying to recover that.Smallman12q (talk) 16:26, 6 February 2010 (UTC)[reply]

Auto refresher

How do you make an auto refresher?Accdude92 (talk to me!) 17:23, 5 February 2010 (UTC)[reply]

To refresh web pages? Try this greasemonkey script:
// ==UserScript==
// @include       http://www.example.com
// ==/UserScript==

(function()
{
    setTimeout("document.location.reload();", 60000);
})();
60000 is the interval between refreshes, 60 seconds. --kv7sW9bIr8 (talk) 18:17, 5 February 2010 (UTC)[reply]
There is at least one Firefox extension - ReloadEvery - that also serves this purpose. Just in case you don't feel like playing with Greasemonkey. Xenon54 / talk / 18:29, 5 February 2010 (UTC)[reply]
Or if want to try out a new web browser, Opera has a built-in right-click menu item called "Reload Every" with options like "5 seconds", "1 Minute", "30 Minutes", and "Custom". --70.129.128.154 (talk) —Preceding undated comment added 01:22, 6 February 2010 (UTC).[reply]

GTA 4 and Windows 7

Will GTA 4 run better on any system with windows 7 than one with Vista (as long as they otherwise fit the requirements), or does GTA 4 just suck that much? Aaronite (talk) 18:13, 5 February 2010 (UTC)[reply]

It will all depend on your graphics card, video RAM, general RAM, CPU, and other technical stuff. With Windows 7, it might run a bit faster, but not much. Otherwise, if you have under 1 GB of RAM, I'd suggest you get a 2 GB RAM stick, or even upgrade your graphics card. ConCompS talk 21:55, 5 February 2010 (UTC)[reply]
Completely agree. What graphics card make/model and system RAM do you have? Ultimately it's going to be the graphics card doing the work, but if you've got less than 2Gb main system RAM it's really not going to help. ZX81 talk 03:06, 6 February 2010 (UTC)[reply]

Actually GTA 4 is very CPU heavy because of all the physics stuff going on in the background. Anyway a clean Windows 7 runs pretty much the same as a clean fully updated Vista and you won't notice much difference in performance either way. Gunrun (talk) 09:14, 8 February 2010 (UTC)[reply]

Dummie question about configuring new things to a router

My landlord has open internet connection in our apartment building. I helped her set it up and have the password. I was trying to set up my new XBOX 360 to the internet via the new XBOX wireless network adapter I purchased today. When connecting, it can detect the network. Now here is the problem. It asks me for the WPA key. I know it is still the same password we set-up because my computer uses it fine and after several failed attempts at connecting to XBOX live at the network level, I called my landlord to confirm the password had not changed. When speaking to her, she said her computers are still connected, but her new Blu Ray player was not connecting to the internet. So, is the WPA key the password we set up or something different? What's are some (mind you, I'm no computer whiz) suggestions on troubleshooting this? I feel like this should be easily fixed if the router is obviously working for our PCs and these new devices are not...maybe I'm wrong? Please help! Thank you in advance. --24.187.98.157 (talk) 19:54, 5 February 2010 (UTC)[reply]

The WPA key is the password, yes. One possible problem is if you set up the router to use a security standard other than WPA; if the Xbox tries to connect via WPA, then the connect attempt will fail. I would go back to the router, write down all the acronyms that you've set up for wireless security — WPA? WPA2? TKIP? WEP? — and then go back to the Xbox and double-check that it is trying to log on using the exact same settings. Comet Tuttle (talk) 20:13, 5 February 2010 (UTC)[reply]
forums report that the adaptor suppots WPA but not WPA2, if the router is using WPA2 reconfigure it to WPA (otherwise you have my sympathies - my xbox couldn't even get the DNS even with DHCP on!) —Preceding unsigned comment added by 87.102.67.84 (talk) 01:53, 6 February 2010 (UTC)[reply]
What wireless adapter are you using on the xbox360 (it is a 360 right?)? Some older wifi adapters, as said above, won't do WPA2. Switching to WPA 1 is not a tremendous security issue, and if you do it with the same password then you won't need to reconfigure [any,probably] of your other devices. Just make sure you ask your landlord's permission.
You could also try to get a wifi adapter that supports WPA2, if that's practical (I think the xbox360 should support it if the adapter does).
The real problem stems from the fact that early wifi adapters only had hardware abilities to do RC4 (which has some properties that make it work nicely in some hardware) whereas the ideal WPA2 solution uses AES. The WPA[1] solution uses RC4, but avoids most of the problems of WEP. Thus, some adapters will work with WPA1 but not with WPA2. Maybe that's yours. Shadowjams (talk) 07:13, 6 February 2010 (UTC)[reply]

Yahoo messenger problem

Why cant the other person view my webcam? Important notes

  • OS=windows xp
  • my internet is fine
  • It worked once before
  • I select the option that invites the person to view my webcam, but the popup thingy say 0 viewers.
  • yes my webcam is pluged in
  • Yes I messed with my prefrences and made sure my device was selected
  • webcam-Logitech

Accdude92 (talk to me!) 22:01, 5 February 2010 (UTC)[reply]

Have you tried re-installing Yahoo Messenger? ConCompS talk 22:19, 5 February 2010 (UTC)[reply]
YesAccdude92 (talk to me!) 22:22, 5 February 2010 (UTC)[reply]
Have you tried using a different program (such as Windows Live Messenger, Skype, etc.)? ConCompS talk 22:24, 5 February 2010 (UTC)[reply]
She has yahoo too, so I want to use Yahoo.Accdude92 (talk to me!) 22:43, 5 February 2010 (UTC)[reply]
But have you tried using the webcam with another piece of software just so you can narrow down if it's Yahoo Messenger causing the problem or the webcam/driver itself? We're not suggesting you use the other program permanently, but if you can establish a connection with other software it'll help narrow down the problem. ZX81 talk 03:03, 6 February 2010 (UTC)[reply]

Watermark Problem in Word 2007

I have written a text in Word 2007, with different header and footer on the title page. (This can be accomplished in two ways: either you let the first page be a section of its own, or you use the "Different First Page" option (sv: "Annorlunda förstasida"). I chose the first way, beacuse I also need to alter the vertical alignment of the title page so its text will end up on the centre of the page.) But then I noticed that I cannot add a watermark to all pages. I can add a watermark to the title page, and I can add a watermark to all other pages, but no matter what I try (it seems), I cannot get a watermark on all pages. Surely there must be a way of doing this? --Andreas Rejbrand (talk) 23:36, 5 February 2010 (UTC)[reply]

February 6

Help with Python

I'm trying to create a program that writes the numbers 1-10000 to a text file in python. Here's the code I have so far.

 
file = open("L:\mudkipz.txt", "r")
filedata = file.read()
file.close()
import math
b = 0
while b < 10000:
   b = b+1
   num = b
   f = open('L:\mudkipz.txt', 'w')
   f.write(num()/n)
   f.close() 

The problem is, whenever I run the file, I get this error:

Traceback (most recent call last):
File "c:\Users\Mitch\Documents\filewriter.py", line 10, in <module>
f.write(num()/n)
TypeError: 'int' object is not callable 

What am I doing wrong? MMS2013 00:49, 6 February 2010 (UTC)[reply]

Sounds like "f.write(num()/n)" is line 10, and the computer things you are trying to divide by n when I imagine you want to write the escape code for a new line - put the /n in quotes.87.102.67.84 (talk) 01:06, 6 February 2010 (UTC)[reply]
The error message seems to say that because num is an int, you can't call the function num() --70.129.128.154 (talk) 01:09, 6 February 2010 (UTC)[reply]
Thanks for your help, but I made both of the changes you recommended, and I still get the same error. MMS2013 01:21, 6 February 2010 (UTC)[reply]
Possibly you will also need to convert the number to a string - I think write needs a a string.
The code would be f.write(str(num)+"/n")
str(x) is a function that converts x to a string [6] via [7] does this work - what di you write?87.102.67.84 (talk) 01:25, 6 February 2010 (UTC)[reply]
Why on Earth would you open and close the file 10,000 times? Even if it worked, the performance would be horrible.
On to the problem... Think about what the value of n is (if n is a variable) at each stage in your loop? In what way is functiuon num() linked to value num? Why even bother copying the value of b to num in the first place?Astronaut (talk) 01:36, 6 February 2010 (UTC)[reply]
It worked, thank you all :) MMS2013 01:53, 6 February 2010 (UTC)[reply]

Python Equivalent

What would the equivalent of the TI Basic command fpart() be in Python? MMS2013 01:56, 6 February 2010 (UTC)[reply]

modf. I'd post this link but Wikipedia has decided it is spam, despite it being the most useful page I could find on the subject: www tutorialspoint com/python/number_modf.htm --Mr.98 (talk) 02:12, 6 February 2010 (UTC)[reply]

Power adapter cables

I would like to purchase another hard disk. I have an extra power adapter cable. However, it is too short to reach the location that I would place a new hard disk. What are my options to handle this? Are there extension cables that can be plugged into the end of one cable? And if so, are there any concerns that I should be aware of? The existing cable runs back into the power supply, which is fairly tightly sealed up and a little difficult to access. If it is easier or recommended to just replace the cable with a longer one, though, I suppose I could remove that inner casing to access it. Thank you. 124.214.131.55 (talk) —Preceding undated comment added 02:24, 6 February 2010 (UTC).[reply]

The power cables in PC are pretty much standard throughout. Can you swap the spare with one that is in use on another drive? Astronaut (talk) 02:29, 6 February 2010 (UTC)[reply]
Yes, I can and just did. I now have enough length for an extra drive. Silly me for not trying the obvious first. Thank you. 124.214.131.55 (talk) 02:43, 6 February 2010 (UTC)[reply]
Although you've already resolved this, I just wanted to let you know you can get extension cables for both IDE drives (with a molex connectors) and SATA drives (with the SATA connectors). Assuming your PSU is actually capable of powering the extra device, the tiny amount of additional cabling that you're adding won't have any impact. You can also get "Y cables" that will split one cable into two new connectors (and giving a slight lead extension at the same time). These also don't don't really cause any problems assuming that your PSU can handle it, but they can make it more difficult to balance the load across the rails, assuming your PSU prefers/requires this. ZX81 talk 03:01, 6 February 2010 (UTC)[reply]
Resolved

Computational complexity of applying numbered permutation

What is the computational complexity of the algorithms given at Permutation#Algorithms_to_generate_permutations, if an arbitrary precision integer type is needed to store k? NeonMerlin 05:17, 6 February 2010 (UTC)[reply]

Computational complexity is not an exact measure of time. It is a measure of how much more time is required (or more resources) as the problem grows in size. If using arbitrary precision numbers, the slow math will be slow for small values of n and large values of n. You are going to perform the math approximately n times to produce the kth permutation. So, it is O(n). The key thing to understand is that the time it takes to perform n computations will be much longer for arbitrary precision math as opposed to just using standard integer types. How much longer depends on your implementation of arbitrary precision math. -- kainaw 05:31, 6 February 2010 (UTC)[reply]
For arbitrary precision maths the time taken depends on the encoding - ;(ignoring unary) the average length of a set of numbers encoded to base b is (n-1/(b-1))(b-1) = L, where n is the number range of numbers numerals, the time to add it proportional to L, to multiply L^2 and to divide to an integer b*L^2 (i think) doing sums in software - basic algorhtyhms, proofs on request, to complicate things each iteration of the loop shortens (reduces) the number - in a way not totally related to the base representation - if you can work out how the length of the representation of the number changes after each iteration of the loop it should be possible to calculate a formula (or at least the formula as a summation) for the time taken.87.102.67.84 (talk) 07:35, 6 February 2010 (UTC)[reply]
I assume you didn't mean the lexicographic method - which doesn't need numbers (except to store a value up to k - but not up to k! - much easier) - it can work with strings (or arrays of chars/numerals)...87.102.67.84 (talk) 07:40, 6 February 2010 (UTC)[reply]
And note that the range, since each swap narrows it, is i! for all 2 ≤ in. At Computational complexity of mathematical operations, it says the fastest multiplication algorithm for n-bit integers is O(n log n 2log* n) and that division is the same complexity as multiplication. Barring any other optimizations, this implies the permutation's complexity is
whatever that works out to be. NeonMerlin 21:02, 6 February 2010 (UTC)[reply]
What about the complexity of the memory unit inside the computer? What about the complexity of the pipeline (or lack of a pipeline) inside the CPU? In computational complexity, you focus on a single algorithm. If the algorithm requires multiplication, you don't add in the complexity of multiplication to the algorithm. You assume that multiplication can be accomplished. Similarly, you don't concern yourself with the complexity of memory management when working on a multiplication algorithm. You assume that memory management can be accomplished. Your goal should be to improve each algorithm separately, not in a big confusing mess of summing up a bunch of complexities into something that makes no sense. -- kainaw 22:37, 6 February 2010 (UTC)[reply]

Orkut

What is Orkut Buykkokten's religion?? —Preceding unsigned comment added by 59.164.73.59 (talk) 11:21, 6 February 2010 (UTC)[reply]

Please don't post the same question on multiple reference desks. --ColinFine (talk) 16:02, 7 February 2010 (UTC)[reply]
Then what should I do?? Paste it on my shirt?? —Preceding unsigned comment added by 59.164.73.39 (talk) 12:58, 8 February 2010 (UTC)[reply]

List of BASIC dialects than can run under both Windows or Ubuntu?

Is there a list anywhere please? For example the GPL version of SmallBasic (not the Microsoft language of the same name) can run the same code under Windows or Ubuntu. I'd like to find out what other dialects can do this. Thanks 78.146.77.179 (talk) 13:42, 6 February 2010 (UTC)[reply]

List of BASIC dialects lists several that run under several platforms. It's not shown as a platform comparison, but if you search that page for "linux" you mostly find that those that run on linux will also run on windows and very often on mac. -- Finlay McWalterTalk 14:15, 6 February 2010 (UTC)[reply]

From List of BASIC dialects by platform:

The free basics that can run under both Windows and Linux are Basic-256/KidsBasic, Basic4SDL/Basic4GL, Chipmunk Basic, FreeBASIC, OpenOffice Basic (?), RapidQ, ScriptBasic, SmallBASIC (also PalmOS), Vintage Basic, wxBasic, XBasic, Yabasic.

The commercial ones are BBx, BlitzMax, GLBasic, KBasic, Hotbasic, KoolB, ProvideX, PureBasic, REALbasic, TrueBasic

Not known if free or commercial: BluntAxeBasic. 78.146.77.179 (talk) 17:11, 6 February 2010 (UTC)[reply]

Languages most similar to BASIC

I have been using one or two versions of BASIC for decades. I seldom do any programming, just ocassionaly is it useful. For someone familiar with using BASIC, what other languages would be most similar? And easiest to learn for someone habituated to basic? Thanks 78.146.77.179 (talk) 13:46, 6 February 2010 (UTC)[reply]

Python (programming language) and Javascript are fairly similar, at least to a modern structured basic (one with while loops and blocks and stuff, rather than older stuff like ONGOTO and NEXT). -- Finlay McWalterTalk 14:11, 6 February 2010 (UTC)[reply]
People still use BASIC today. For example, you can compile GW-BASIC programs inside Windows and they will still run. You can use the old MS-DOS GW-BASIC program, too. Here is a list of BASIC dialects, if you'd rather try something else: [8].--Drknkn (talk) 14:18, 6 February 2010 (UTC)[reply]
Fortran I think is the nearest, Pascal (programming language) is quite similar to the more featured versions of basic (ie the ones with proceedures) and shouldn't be too much of a shock to the system (though not a great improvement either) , both tend to require more structure than the average basic. However I agree that python (which has a lot more concepts and features not in Basic - unlike pascal and fortan) would be a lot easier to learn. And more suitable to occasional programming - but a bit slow in comparison to the others (including compiled basic). I believe that freeBasic is still well supported if you want a feature package basic.87.102.67.84 (talk) 14:42, 6 February 2010 (UTC)[reply]
Are you looking for another language like basic, or another basic dialect(List of BASIC dialects)? There are still a number of working and decent Basic compilers...Smallman12q (talk) 19:38, 6 February 2010 (UTC)[reply]
I may be prepared to start using another language if it was quick to learn after using Basic for a long time, and it could do things that basic couldnt. I've been using GWBasic in a DOS window quite happily, but as I'm planning to get an old computer running Ubuntu as a spare, then as my question above indicates I'm interested in finding a Basic dialect that will work with Windows or Ubuntu. I was already aware there are many basic dialects available. 78.146.77.179 (talk) 20:00, 6 February 2010 (UTC)[reply]
FreeBASIC can be compiled to run on Windows, DOS, and Linux. --Phydaux (talk) 22:55, 7 February 2010 (UTC)[reply]

Confused by fancy variable names

In the old days variable names were just one word or even just one letter. Now looking at examples of code I see very long variable names with lots of "."s in them, or even "::"s in them. 1) Is there some cross-language convention for variable names that I could study? 2) Do the "."s or ":"s mean anything to the compiler or interpreter, or are they simply of significance to the programmer only? 78.146.77.179 (talk) 13:51, 6 February 2010 (UTC)[reply]

In C and C++ foo.bar can mean that bar is a member of the struct foo. In C++ and Java (and a bunch of other languages) it can also mean that bar is a member of an object called foo (you need to know if foo is an object or a struct). In C++ foo::bar means that bar is a class variable (or are we calling them "class member") of the class foo. Class members in Java use a . rather than ::   , so there's another reason you need to know what foo is before you can understand what foo.bar means. Other languages kinda follow these "conventions" sometimes, and sometimes not. Note that in most of these (C++,java and their ilk) bar can be variable (called a member) or a function (called a member function) so you can call foo.bar() just like you'd call printf(). These all mean something to the compiler and the language runtime; they're reserved syntax, so you can't just make a variable like int foo.bar=3; -- Finlay McWalterTalk 14:05, 6 February 2010 (UTC)[reply]
They are for the compiler. In the old days, there were no such things as classes and objects. Nowadays, dots have special meaning in object-oriented languages. Here's an example:
Dog.color = brown
Dog is a class. Color is a property of a dog. Here's a method:
Dog.bark()
The two colons are specific to C++, but are similar in meaning to the dot. They are used with classes, whereas a dot is used for objects. An object is an example of a class. For example, in Visual Basic, you could type this:
Dim fido As Dog
Now, fido is an object (instance) belonging to the Dog class.--Drknkn (talk) 14:08, 6 February 2010 (UTC)[reply]
So Dog.color is class.property, Dog.bark() is class.method. How would you refer to an actual dog, not just the dog class please? 78.146.77.179 (talk) 16:10, 6 February 2010 (UTC)[reply]
Typically you'd make an instance (as in 'instantiate') of the class - something like (disclaimer: my use of instance doesn't seem to match everyone elses - probably better to think of it as a variable declaration)
fido = new Dog
in the same way you might write:
name = new String (for a string variable named 'name' )
(syntax varies between languages)
Then the object (fido the dog) is the 'variable' (of type or class dog), and is refered to by fido.bark() , fido.ageof , fido.favouritetoy , fido.age etc.87.102.67.84 (talk) 16:18, 6 February 2010 (UTC)[reply]
So the interpreter would automatically understand that the method dog.bark() would apply to fido as in fido.bark()? 78.146.77.179 (talk) 17:09, 6 February 2010 (UTC)[reply]
Yes.87.102.67.84 (talk) 17:19, 6 February 2010 (UTC)[reply]
Note: one way to do this (if you have a lot of dogs) would be:
Doglist[] = new Array[101] of Dog
(Assuming you have 101 dogs). Then to find dogs called "fido" (and make them bark) you would loop over the dog array like this:
For x =1 to 100
if Doglist[x].name == "fido" then do something.. such as Doglist[x].bark()
Next x
(again actual sytax varies) Obviously bark() would be just a proceedure with something simple like print "woof" in it.87.102.67.84 (talk) 16:46, 6 February 2010 (UTC)[reply]
the dots are very much like path separators in file listings - defining sub variables in the same way that "C:/User name/my_files/my_images/holiday_in_tenerife/images_of_the beach/" defines a nested folder on the hardisk - compare with ""C::User name.my_files.my_images.holiday_in_tenerife.images_of_the beach" - as noted above the final "file" (by analogy) can be either a variable (x,y etc) or also a function or proceedure.87.102.67.84 (talk) 14:53, 6 February 2010 (UTC)[reply]
Double colons are also used for class separation in Perl. Marnanel (talk)
Fortran uses a class%member property system, so everything depends on the language as well. Titoxd(?!? - cool stuff) 19:20, 6 February 2010 (UTC)[reply]
Another important use of the "::" in C++ is in specifying a namespace, which is kinda like a class, only completely different. -- 174.21.224.109 (talk) 19:29, 7 February 2010 (UTC)[reply]

Selling financial software

What steps should a programmer take to avoid the possibility of legal trouble in the event that the financial software they develop and sell unexpectedly turns out to give wrong results which lead people to take wrong financial decisions? 78.146.77.179 (talk) 14:06, 6 February 2010 (UTC)[reply]

The most common strategy is to use the prevailing jurisdiction's limited liability provisions, typically by establishing a limited liability corporation, partnership, or whatever. As this programmer is worried about "the possibility of legal trouble" then they need to talk to a lawyer. -- Finlay McWalterTalk 14:24, 6 February 2010 (UTC)[reply]
Indeed, you should talk with a lawyer about your individual case. Common steps that are often taken are that the programmer forms a corporation or a limited liability company and makes sure all business is conducted in the name of the company. If the Exxon Corporation loses a billion dollars because of an error in the software, the programmer himself is not supposed to be liable; the company is, so it can declare bankruptcy in the face of the staggering losses, and supposedly the owner(s) of the company have no further liability. Another step you're probably familiar with is the lengthy legal disclaimer in the software's EULA. And also there is a type of insurance called Errors and omissions insurance that is supposed to cover this — though the policies are lengthy and complicated and always have lots of exclusions. E&O is expensive. I don't have any data on how effective each of these 3 steps is. Comet Tuttle (talk) 18:14, 6 February 2010 (UTC)[reply]

Record 2 speeches simultaneously on a single pc

I'm doing some experiments on speech separation.

My situation is: consider a conference with n number of speakers. There are n microphones to record the speech. But each of the microphone will get a weighted speech of all the users. I want separate each speakers using the outputs from all the microphones. For this first I've to record at least two speeches simultaneously on a same pc. I want to know if its possible. —Preceding unsigned comment added by JephyVarapuzha (talkcontribs) 14:50, 6 February 2010 (UTC)[reply]

Yes I think so, if I've understood correctly - assuming each microphone has the same characteristics - then the amplitude recorded on a given microphone will be = k1s1+k2s2+k3s3+etc where s1,s2 etc are the separate speech amplitudes of each speaker, and k1,k2,k3 etc are constants (assuming each speaker roughly stays in the same position to each microphone) - since you have multiple microphones (assuming 1 per speaker or more), and multiple samples of sound amplitude as well - you can treat the formula as linear equations and solve for s1,s2 etc - the key thing here seems to be to assume that the constants k(n) on microphone m and k(m) on microphone n are the same.. - since they are the same distance from the opposite speaker. Also assume that each speaker is the same distance from their own microphone - making k(n) for speaker n = k(m) for speaker n. This would give you a first approximation for the individual speaker amplitudes - multiple samples give you an average.
The next step would be to find a method of varying by small amounts the parameters of k until the channel separation of the S(n)'s are maximum - this might be done either statistically, or using a computer to iterate values.
Was that the sort of thing you were thinking of? If so and you need more info it you might get more answers on the maths desk - provided you can make it clear to them what the type of algorhtym you want to implement is. 87.102.67.84 (talk) 15:03, 6 February 2010 (UTC)[reply]


Actually i've some algorithms in hand. What i need to do is to record two speeches simultaneously in a single pc. My PC have two mic-in s (one in front and one in back). I want to know if I could record with these two simultaneously. The sound recorder on windows seem to record from one only. —Preceding unsigned comment added by JephyVarapuzha (talkcontribs) 15:22, 6 February 2010 (UTC)[reply]

ok I'd guess the sound in is stereo (it is on most) - and the microphones monoaural - so you just need a splitter - probably a 3.5mm stero male to 2 mono splitter ? http://www.google.co.uk/search?rlz=1C1CHNG_en-GBGB363GB363&aq=0&oq=3.5mm+stereo+to&sourceid=chrome&ie=UTF-8&q=3.5mm+stereo+to+2+mono+splitter ? :) I would guess the two mic ins are the same port - but to be certain you'd need to give us the soundcard model (or motherboard model if it's on there) - you can get this info via the sound drivers info panel probably.87.102.67.84 (talk) 15:26, 6 February 2010 (UTC)[reply]


My motherboard model is Gigabyte M61PME-S2P. By using a splitter we get only one sound file right? I need two separate wav files for both the mics. —Preceding unsigned comment added by JephyVarapuzha (talkcontribs) 16:00, 6 February 2010 (UTC)[reply]

The audio chip is http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=28&Level=5&Conn=4&ProdID=44 "2 stereo ADCs support 16/20/24-bit PCM format, one for stereo microphone, the other for legacy mixer recording" - so it's possible that you do have 2 stereo channels. Splitting a stereo wav into two monos is simple http://www.google.co.uk/search?rlz=1C1CHNG_en-GBGB363GB363&sourceid=chrome&ie=UTF-8&q=split+stereo+wav - you might need some extra audio software to do it. Similarily to get both stereo channels to record you'd need something with more features than windows sound recorder - I don't know what to recommend - maybe someone else can.87.102.67.84 (talk) 16:12, 6 February 2010 (UTC)[reply]

thank u v much. i'll buy a splitter and test it... —Preceding unsigned comment added by JephyVarapuzha (talkcontribs) 16:22, 6 February 2010 (UTC)[reply]

Consider also getting some USB sound cards. Like This one : [9].
Those should be selectable as seperate sound devices in whatever software you're using to do the recording. APL (talk) 04:39, 7 February 2010 (UTC)[reply]

Graphics tablet trainer

I recently purchased a graphics tablet and am using it for the first time. Obviously like any new device, it takes some time to coordinate one's muscle memory to the device—in particular I am finding it tough to gauge the pressure settings and making precise movements with it. I am not bad with pen on paper drawing (in the sense that my hands and brain are well in sync), but I am finding this rather fumbling at first.

Is there some sort of trainer/game/etc. that would help me with this? I imagine that one could fairly easily have something that forced one to basically "practice" using it under very precise conditions, helping the hand and brain learn how to do it "just right" each time. (Similar to the exercises one does in learning a musical instrument, where you are basically "programming" your brain and hands and etc. to work together in a new way.) Does anyone know of such a thing? I'm not sure what I ought to be searching for, really. Is there such a thing? (Don't make me program one myself.) Obviously practice makes perfect, but I'm not really capable of using the tablet for my "real" work yet, and so I guess I'm looking for some kind of program that would structure my "practice" a bit. --Mr.98 (talk) 16:04, 6 February 2010 (UTC)[reply]

I suggest a game where you win or lose based on how well and quickly you draw things. Yahoo Games used to have a version of Pictionary, but I can't find it any more. I did find "The Sketcher", which might also work, there: [10]. StuRat (talk) 00:19, 7 February 2010 (UTC)[reply]
I use a tablet instead of a mouse at home almost all the time (this may or may not be practical depending on how your computer is set up; picking up and dropping the stylus take time, so I do a lot of stuff from the keyboard). It is possible to do pretty much everything with a tablet, though there will always be more wiggle than using a mouse (I accidentally drag things I'm meaning to click on all the time). My tablet is medium-sized (I think it's 4x6 inches), but I prefer to use it with the screen mapped to a smaller rectangle; I like not having to move my wrist as much.
If you like logic puzzles, Simon Tatham's Portable Puzzle Collection are very good, and involve plenty of pointing; pick a puzzle with lots of clicking, choose an easy setting, and resize the window to something small if you want to practice precision. (These puzzles tire my wrists out, though, so don't go overboard.) Paul Stansifer 02:22, 7 February 2010 (UTC)[reply]
I enjoy playing iSketch. It's a fun web-based Pictionary clone. Wacom owners are at a natural advantage. APL (talk) 04:42, 7 February 2010 (UTC)[reply]
Crayon Physics and World of Goo are both good indie games (well worth the money) that are good for use with tablets. --125.239.49.44 (talk) 23:58, 7 February 2010 (UTC)[reply]

Administrative rights in Windows XP Media Center Edition

Resolved

Hi. I'm running Windows XP, and I was installing the latest version of iTunes when I ran into an error message, indicating that I didn't have permission to perform some task unless I log in as an administrator. That seems fine, except there's only the one account on this machine, and it has administrative rights. I'm kind of stumped. Does anyone have any ideas? -GTBacchus(talk) 18:30, 6 February 2010 (UTC)[reply]

Now I've found the secret "Administrator" login, and when I'm logged in that way, I get the same error message. It says:
Still stumped. -GTBacchus(talk) 18:56, 6 February 2010 (UTC)[reply]
Try right clicking the directory, click Properties then the security tab and check Administrator has Full Privileges. You could also experiment with the Advanced button, and take ownership of the directory. --205.168.109.130 (talk) 19:19, 6 February 2010 (UTC)[reply]
I kept searching after posting, and found an uninstallation program that does deep registry cleaning. Therefore, I'm now listening to music again. Regardless, the tip you suggest is something I didn't know about, and which may come in handy later. Thanks for that. -GTBacchus(talk) 20:28, 6 February 2010 (UTC)[reply]

Google redirect virus -- how does it work?

I've given up on trying to clean this infuriating bug off my system, but I would like to understand how it's operating exactly. Why, for instance, Google themselves can't deal with it. And why it affects every browser I have. Thanks. Vranak (talk) 19:01, 6 February 2010 (UTC)[reply]

If there's a computer virus on your system, it can do whatever wondrous imaginings the programmer thought up, including altering what URLs are accessed whenever any application on your computer attempts to resolve any URL. There's nothing Google can do about it. May I recommend, after you reformat your system, creating one account with administrator rights that is only used when installing software, and another account with no administrator rights, which you use on a daily basis for all your computing tasks? This makes it a lot harder for malware to infect your system files. Comet Tuttle (talk) 20:49, 6 February 2010 (UTC)[reply]
My HP Mini 311 failed, within two weeks of purchase, to even revert to its original state. Every HP I've used has failed catastrophically within three years. Best choice I have is just to live with it. Vranak (talk) 21:05, 6 February 2010 (UTC)[reply]
That strikes me as probably not the best choice you have. --Mr.98 (talk) 22:53, 6 February 2010 (UTC)[reply]
I've tried everything and nothing works. Vranak (talk) 23:44, 6 February 2010 (UTC)[reply]
It may be simply that the virus has modified your hosts file or is pointing to a different DNS. Have you tried visiting Google by IP? If HP provided you with installation media and you have nothing you care about on the disk, the obvious solution would be to completely wipe the harddisk/s and reinstall from scratch. I believe some computers have a recovery partition however in that case there's a risk the recovery partition has been infected (I don't know how common this is but it's clearly a possibility if the content is writable to the malware which it would be if it's on a disk connected to the computer when the malware is running and would even be possible if the partition isn't mounted since the malware can mount it or interpreted it itself.) If that really doesn't work, it sounds like you have more serious problems of some sort. You may of course want to do this offline particularly if you don't have a good firewall and are using an old version of Windows (getting online without getting infected may become a problem, worst case scenario you could download the necessary updates from another computer) Nil Einne (talk) 10:18, 7 February 2010 (UTC)[reply]
Hear me on this: I have tried everything. There's something that I just don't understand about the infection though, for all my efforts to be in vain. Why is it that all the antivirus and antispyware software I try is oblivious to the issue? How can that be? Vranak (talk) 13:20, 7 February 2010 (UTC)[reply]


It's pretty obvious some program has modified the way your requests to google are processed on your computer. Google has no way to helping you. As for why antivirus software can't detected, well maybe it's a new virus or undocumented. I suggest you try combofix —Preceding unsigned comment added by 82.43.89.14 (talk) 13:39, 7 February 2010 (UTC)[reply]

Personally I don't trust antivirus software to eradicate 100% of every virus anyway. At this point you should get an external USB drive, copy all the contents of your hard disk to it, then disconnect it, format your internal hard disk, set up 2 separate accounts as I mentioned above, and reinstall Windows and all your applications from scratch. Make sure antivirus software is installed, then connect the USB drive again and scan it. (Some viruses interfere with antivirus software.) Then be very careful about moving your documents from the external USB drive to your internal drive — some of them are infected. Comet Tuttle (talk) 15:11, 7 February 2010 (UTC)[reply]

Simple computer vision for linux to crop sheets of paper out of a photograph

I would like to take a picture of several sheets of paper. I would like for the computer to recognize the sheets, crop them out resize as necessary and then stick them in a PDF . Is anyone aware of a program (free and open source) that does this?

I am thinking about writing a quick little script using the example programs in opencv and some imagemagick but I would like to avoid reinvetning the wheel if possible. This seems like a problem someone might have already tackled, thanks. -- Diletante (talk) 19:24, 6 February 2010 (UTC)[reply]

Object and Instance

I've been reading Object-oriented programming after being inspired and enlightened by the very good and clear descriptions by 87.102.67.84 and Drknkn in the "Confused by fancy variable names" question above. But there is something I'm not clear about.

There is a class called Dog. The object Lassie is one particular Dog. But Lassie is also an instance of the Dog class. So what is the difference between an object and an instance please? 78.146.77.179 (talk) 19:47, 6 February 2010 (UTC)[reply]

In the inconsistent world of OO nomenclature, "object" and "instance" mean the same thing. -- Finlay McWalterTalk 20:33, 6 February 2010 (UTC)[reply]

Why are they given seperate paragraphs and headings in the Object-oriented programming article? 78.146.77.179 (talk) 20:35, 6 February 2010 (UTC)[reply]

an object is an instance of a class. --99.52.85.117 (talk) 20:39, 6 February 2010 (UTC)[reply]

The article says "One can have an instance of a class or a particular object." I'm confused. 78.146.77.179 (talk) 20:53, 6 February 2010 (UTC)[reply]

In my opinion, that's just really poor wording in that article: in a class-based language, "object" and "instance" mean exactly the same thing - basically, a particular variable whose type is some "class". "Instance" is perhaps a little less ambiguous because "object" is used so much when describing the abstract concept of object-orientation etc.
Prototype-based programming is a bit different, because there are no classes to have an "instance" of, so AFAIK the term doesn't apply. - IMSoP (talk) 21:05, 6 February 2010 (UTC)[reply]
FWIW, I've gone ahead and removed that "... or a particular object" - I really don't think it was a helpful phrase. - IMSoP (talk) 21:20, 6 February 2010 (UTC)[reply]
It is mainly just using a word that sounds nice. It doesn't sound nice to say "Lassie is an object of dog." It doesn't sound nice to say "Lassie is an instance." If you are going to follow it with the class name, you use instance. If you are going to leave it dangling, you use object. There are many areas of the English language in which one word sounds better in one situation, but is replaced with another word in a different situation. -- kainaw 21:12, 6 February 2010 (UTC)[reply]
The relationship between "instance" and "object" is just like the relationship between "son" and "man". Every man is a son and every son is a man (ignoring that "man" often implies adulthood, and sometimes doesn't imply maleness), but no one says "I am a son" in isolation. The word "instance" (like "son") is used to talk about relationships; you'd say myHat is an instance of Beret, where myHat is an object and Beret is a class. The word "object" can be a bit trickier. It's common to hear said of a language that "everything is an object", but it is not always clear what is meant by "everything". Paul Stansifer 02:14, 7 February 2010 (UTC)[reply]

Given the comments above, wouldnt it be best to combine the Objwect and Instances paragraphs in the article? 78.146.77.179 (talk) 00:29, 7 February 2010 (UTC)[reply]

(The desecription could be clearer on that page)
I think one example of the difference is that a class (ie the definition or template from which real objects are derived) is an object too, but is not an instance of anything (I go on to contradict this a few lines down!).
Sometimes people ignore or do not use the term 'object' to refer to classes.
  • Hint
    • Lassie (object) is an instance of the Dog class
    • Dog (class) is an instance of the class object (this is usually ignored since it's too abstract, and rightly so )
more correctly: Dog (class) is an extension of the prototypical class object. As you can see discussions of OO terminology rapidly descend into confusion.
Not quite true (well, the part about "confusion" is totally true). The "class object" is not worth thinking about. In some OO languages, there's a class named, confusingly, "Object". In those languages, every (lowercase) object is an instance of the class called (uppercase) "Object". It would have been less confusing (and also more accurate) if they had called that class "Thing". Furthermore, the uppercase "Object" is typically unimportant (unless you're using pre-version-1.5 Java). Summary: An object is something you can manipulate. Each object is an instance of some class. A class is a set of objects that share something in common. Paul Stansifer 19:33, 7 February 2010 (UTC)[reply]
I'd avoid worrying too much about the semantics since there will always be someone who uses the term object (broad or narrow definitions) differently.87.102.67.84 (talk) 16:36, 7 February 2010 (UTC)[reply]

Languages that have very high level commands

SmallBASIC has for example a chart command "which draws an automatically scaled and labeled graph of an array". Rebol has simple commands for its built-in text editor and other things. Are there any other programming languages or dialects which include simple commands for high-level things like these? 78.146.77.179 (talk) 20:50, 6 February 2010 (UTC)[reply]

See High-level language for an in-depth discussion. Marnanel (talk) 20:52, 6 February 2010 (UTC)[reply]
It does not seem to mention or list any actual languages, which is what I'm asking. 78.146.77.179 (talk) 20:55, 6 February 2010 (UTC)[reply]
Domain Specific Languages would be worth a look. See also MATLAB, R and friends. 131.111.248.99 (talk) 21:11, 6 February 2010 (UTC)[reply]
Also, I don't know, but I daresay GML will come pretty close to what you're looking for. 131.111.248.99 (talk) 21:18, 6 February 2010 (UTC)[reply]
In typical high-level languages, those features are located in libraries, rather than being a part of the language itself. For a small cost in usability (you need to track down and import the library), a language can have many, many more simple, powerful capabilities like chart. For example, in Python, you might use something like libplot or Gnuplot.py for charting. Paul Stansifer 01:57, 7 February 2010 (UTC)[reply]
Perl 187.26.127.255 (talk) 22:40, 6 February 2010 (UTC)[reply]
APL has some high level commands. It is possible to write a complex program, to calculate the inverse of a matrix for example, with just a few characters. Astronaut (talk) 19:05, 8 February 2010 (UTC)[reply]

Batch processing folder full of images?

Is there a simple, free, and easy way to convert an entire folder full of .bmps into another filetype like PNG or JPEG? 67.169.7.53 (talk) 23:04, 6 February 2010 (UTC)[reply]

ImageMagick --Andreas Rejbrand (talk) 01:01, 7 February 2010 (UTC)[reply]

"Open with GIMP" still shows up even after GIMP is uninstalled

When I right-click an image, in the menu it will show "Open with GIMP" even though I have uninstalled GIMP. How can I get rid of this? I have tried CCleaner and fixed all the registry problems it could find, but it did not fix GIMP from showing up in the menu. 67.169.7.53 (talk) 23:20, 6 February 2010 (UTC)[reply]

You may find this site helpful. --Andreas Rejbrand (talk) 00:38, 7 February 2010 (UTC)[reply]
I've tried MMM Free and Context Menu Editor, and "Open with GIMP" doesn't show up in those programs. Is it possible to manually edit the registry to remove it? 67.169.7.53 (talk) 18:45, 7 February 2010 (UTC)[reply]
If I were you I would use regedit to search the registry for "GIMP", or some part of the string displayed in the context menu. --Andreas Rejbrand (talk) 23:10, 7 February 2010 (UTC)[reply]
That worked, thanks! I backed up my registry and used find to search for GIMP keys and removed them. 67.169.7.53 (talk) 23:46, 7 February 2010 (UTC)[reply]

February 7

MacBook volume control doesn't beep

I have a MacBook running OS X 10.4. When I adjust the volume, it doesn't make the beeping sound. The volume itself is fine, it's just that the beeping has disappeared. Does anyone know of an explanation or remedy? --Lazar Taxon (talk) 00:26, 7 February 2010 (UTC)[reply]

I believe there's a setting somewhere ("System Preferences" > "Sound", perhaps?) that controls this. In any event, if you hold down shift while pressing the volume keys, it make a sound if it's set to be silent (and vice versa). Paul Stansifer 01:47, 7 February 2010 (UTC)[reply]
You learn something everyday. The option is System Preferences->Sound->Sound Effects->Play feedback when volume is changed. Rich(Contribs)/(Talk to me!) I can haz review plz? 14:03, 7 February 2010 (UTC)[reply]

How to record a streaming video from screen?

Can anyone recommend some software to record a streaming video directly from my computer screen to my HD please? (Technically, I suppose I mean record it from the graphics card I think.) Ideally it should be able to decide what the window of the video is. I am experienced in recording many other streaming videos to my hard disk, and have looked at or used several different programmes. This video will not record by the previous methods I have used because the stream is encrypted. So what appears on the screen is what I want to record. I have tried lots of different things, done lots of Google searches already. So can anyone recommend some software please (not just do a Google search)? Thanks. 78.146.77.179 (talk) 00:56, 7 February 2010 (UTC)[reply]

VLC media player can record what's happening on the desktop (Media -> Open Capture Device -> select "Desktop" as the "capture mode") but I don't know if it can restrict itself to one window. Xenon54 / talk / 01:04, 7 February 2010 (UTC)[reply]
I tried it but I just got a .ps file which windows didnt know what to do with, and which I could not get to play. 89.242.43.246 (talk) 20:37, 7 February 2010 (UTC)[reply]
CamStudio --kv7sW9bIr8 (talk) 12:11, 7 February 2010 (UTC)[reply]
I've had more success with FRAPS than anything else. Comet Tuttle (talk) 15:13, 7 February 2010 (UTC)[reply]
The freeware version only records for 2 minutes, the other version costs more than I'd want to pay. 89.242.43.246 (talk) 20:40, 7 February 2010 (UTC)[reply]

I have spent all day looking, without reaching a conclusion. I have found "Video Capture Software" on download.com http://download.cnet.com/windows/video-capture-software/?tag=mncol%3Bsort&filter=licenseName%3D%22Free%22%7C&filterName=licenseName%3DFree%7C&rpp=10&sort=downloadCount+asc and http://all-streaming-media.com/record-video-from-screen/screen-capture-software.htm I think there is another collection of similar software somewhere, but the URL seems to be missing from my History. The drawback of some of them described as freeware is that they have been made to only record two or five minutes. 89.242.43.246 (talk) 20:19, 7 February 2010 (UTC)[reply]

http://www.mplayerhq.hu/MPlayer/releases/win32/MPlayer-mingw32-1.0rc2.zip + http://www.mplayerhq.hu/MPlayer/releases/codecs/windows-essential-20071007.zip (goes into 'codec/s' dir of former). mplayer -playlist -dumpstream URIhere -dumpfile foo (occasionally you will not want -playlist). VLC can probably do this almost as well, though. ¦ Reisio (talk) 06:11, 8 February 2010 (UTC)[reply]

C99 and // comments after #include

In syntax highlighting for C code, Kate doesn't format comments that start with a double slash as comments if the line they're on starts with a #include. Is this a bug in the syntax highlighting, or does C99 actually disallow double-slash comments on the same lines as #includes? (GCC says C90 doesn't allow double-slash comments at all, which is why I ask about C99 specifically.) If the latter, what other preprocessing directives are affected? NeonMerlin 01:45, 7 February 2010 (UTC)[reply]

It may have to do with that comments aren't recognized within < > so one can have odd names in there, I haven't the foggiest why one would want to do that. Perhaps the editor treats such preprocessor lines specially as they can break all sorts of rules, as in fact can the source code but if one starts defining a macro that substitutes to a curly bracket one deserves the pain one gets. Dmcq (talk) 10:03, 7 February 2010 (UTC)[reply]
FYI emacs, enscript, and gedit work as you expect, and Mediawiki's "source" extension works like Kate. -- Finlay McWalterTalk 16:17, 7 February 2010 (UTC)[reply]

Word 2007 Table Alignment

Hello. I've been trying to figure this problem out for some time, and I can't even bring anything up on Google! I have Microsoft Word 2007, and I've been trying to make single-cell tables. The thing is, the alignment I keep choosing won't save: I want everything to align in the center and to the left, but when I save and exit the document, it doesn't stay the way I want it to. When I reopen the document, the alignment is always completely centered! —Preceding unsigned comment added by 69.16.91.90 (talk) 05:43, 7 February 2010 (UTC)[reply]

You can only align one way, either right,left, centered, or justified...Smallman12q (talk) 17:08, 7 February 2010 (UTC)[reply]
By "center" he probably is referring to vertical alignment: middle. This can indeed be combined with horizontal alignment left. (I am very annoyed about the Tab key that does no longer set focus to the next control.) --Andreas Rejbrand (talk) 09:19, 8 February 2010 (UTC)[reply]

Powering Computer during powercut - was Question

In a few weeks there's going to be a 10 hour power-cut. I want to use my desktop computer during this time, however obviously I can't because of the power-cut. I can't afford a uninterruptible power supply or a electrical generator, and I don't have a laptop. What solutions are available that might enable me to use my computer? I have access to car batteries and wires and stuff if that could help building a homemade UPS. —Preceding unsigned comment added by 82.43.89.14 (talk) 13:56, 7 February 2010 (UTC)[reply]

You probably want an inverter. You will almost certainly need a few batteries for 10 hours, however. Your average car battery is (I think) 40amp-hours{{fact}}. That provides 480Wh. A middle of the range HP desktop has a 220W power supply (that's ignoring the display), so each battery will last maybe two and a bit hours, although someone more current (pun not intended) on the maths involved should probably check this. --Rich(Contribs)/(Talk to me!) I can haz review plz? 14:33, 7 February 2010 (UTC)[reply]
(ec) The easiest solution would be to put you computer in your car and drive to where there isn't a power cut. Note that if you decide to buy a 12V to mains adaptor, you'll need to figure the load carefully, a PC and monitor can consume a surprising amount of power and your adaptor may not have the rating to cope and/or your battery may expire before the cut ends. Also if you are net connecting, you'll also need to power your modem. -- SGBailey - not signed in 82.45.16.156 (talk) 14:39, 7 February 2010 (UTC)[reply]
or plug an inverter into your car's cigarette lighter and leave the engine running!
Car battery inverters typically supply between 150 and 300W - so be careful to not overload it.87.102.67.84 (talk) 15:04, 7 February 2010 (UTC)[reply]
This page covers inverters and generators http://home.howstuffworks.com/home-improvement/household-safety/security/emergency-power3.htm (if you decide to use multiple 12V batteries connect them in parallel !)
You can rent generators (but obviously they might be in short supply during a power cut)87.102.67.84 (talk) 15:02, 7 February 2010 (UTC)[reply]
You should also be aware that you probably won't have internet access during the powercut.Smallman12q (talk) 17:10, 7 February 2010 (UTC)[reply]
Buy a cheap used UPS without a battery (this is much cheaper than an inverter). Make sure it's rated for the power draw of your computer + monitor + router and dsl/cable modem. Then hook it up to a car battery. Do the math to see how long it'll last though. Ariel. (talk) 05:54, 8 February 2010 (UTC)[reply]

Would a stripped-down Python equal Basic?

If you ignored the Python commands not present in your average BASIC, would programming with whats left be roughly equivalent to programming with BASIC? 89.242.43.246 (talk) 14:39, 7 February 2010 (UTC)[reply]

Yes, ignoring syntax and required formatting, and differences in reserved words. A good page is Comparison of programming languages note BASIC is an imperative, procedural language so any language that uses an imperative style (this means that commands are executed as they are listed) which also can implement procedures (in python you would use functions I think) can be programmed in the same style as you would in basic.
Or to put it another way making a utility that converts basic to python code would be do-able easily.87.102.67.84 (talk) 15:11, 7 February 2010 (UTC)[reply]
Except there's no GOTO in python - but you can live without that ? 87.102.67.84 (talk) 15:13, 7 February 2010 (UTC)[reply]
(By the way if you are looking for alternatives to basic - my suggestion for your first step would be to continue programming in basic - but practice writing proceedural code that never uses goto - repeat/until and do/while are usual replacements - it's sometimes a pain when a simple goto seems obvious - but worth learning for when you don't have a goto (as in many newer languages). If you were already programming without ever using goto then well done!)87.102.67.84 (talk) 15:17, 7 February 2010 (UTC)[reply]
Thanks, I have long been aware that goto was not approved of, and have not used it for years and years. I don't suppose theres any sort of tutorial or list of BASIC-like commands that would make the transition from BASIC to Python easier? Or even some patch or variant that would hide al the non-BASIC stuff out of the way? I've long though that programs of all types should have a built-in choise of Beginner, Intermediate, or Advanced modes that would make beginning to use them less daunting. 89.242.43.246 (talk) 19:36, 7 February 2010 (UTC)[reply]
If you ever used BBC Basic you're in luck BBC basic / pythton differences via roscidus.com - if not you'll still recognise a lot of the basic. (http://docs.python.org/ is the place to start in general) There are some VisualBasic to Python converters out there which might help in learning about equivalent python code.
No idea about a reduced version. Haven't heard of one.87.102.67.84 (talk) 20:40, 7 February 2010 (UTC)[reply]
Thanks, I've just read that. Pity Python wasnt called PYBasic - I bet it would be even more popular. 89.242.43.246 (talk) 22:12, 7 February 2010 (UTC)[reply]
Not everyone thinks BASIC is a good thing. Edsger Dijkstra, for example, had a rather low opinion of it. Others may not be so radical (I can't be, for instance, because I learned BASIC first!), but I doubt that Python would benefit from association with it. --Tardis (talk) 18:24, 8 February 2010 (UTC)[reply]
(edit conflict) I suppose so, more or less, although Python's for statement is technically a foreach, which is more general than BASIC's for loop. This is not a specific property of Pyhton - you can reduce almost any imperative programming language to BASIC + other stuff. But why would you want to write Python as if it were BASIC ? Gandalf61 (talk) 15:22, 7 February 2010 (UTC)[reply]

how does the size of an HP pavilion dv 9700 17" compare with an Apple MacBook 17"?

I know the aspect ratio might be different, so I was wondering how the screen size of an HP Pavilion DV 9700 17" compares, in terms of actual square centimeters, with the screen size of a MacBook 17". Thanks 92.230.233.5 (talk) 16:56, 7 February 2010 (UTC)[reply]

The apple mac book pro is 1680 x 1050 ( WSXGA+ ) [11], the apple mac book is 1280x800 Wide XGA [12] , the HP is 1,680 x 1,050 [13]
All have aspect ration 1.6:1 - the same then.87.102.67.84 (talk) 17:07, 7 February 2010 (UTC)[reply]

Wikitable

If, when I start making a table, I put class="wikitable", I get:

class="wikitable"

Which is nice.

If I put "border="1" instead, I get

Border = "1"

Which is nasty nasty.

However, class="wikitable" does not work when I try it on a table on this wiki. I assume I have to twiddle some settings somewhere to get the wikitable? I've seen it used on other wikis, after all. How do I get the wikitable? Be aware that my technical knowledge is very limited. Cheers in advance! Vimescarrot (talk) 17:31, 7 February 2010 (UTC)[reply]

Oh, and if you think I should be asking this somewhere else, feel free to point me in the right direction. Vimescarrot (talk) 17:32, 7 February 2010 (UTC)[reply]

Classes do not work by magic voodoo. Neither your browser nor the wiki software simply takes the word "wikitable" and intuits how you want the table to display. Wikitables look like that because of rules in a CSS stylesheet (in this case Mediawiki:Common.css) which tell your browser to apply various styles to tables with the "wikitable" class, and to elements of those tables. The relevant rules are as follows:
table.wikitable {
    margin: 1em 1em 1em 0;
    background: #f9f9f9;
    border: 1px #aaa solid;
    border-collapse: collapse;
}
.wikitable th, .wikitable td {
    border: 1px #aaa solid;
    padding: 0.2em;
}
.wikitable th {
    background: #f2f2f2;
    text-align: center;
}
.wikitable caption {
    font-weight: bold;
}
So to make a table display like a wikitable without using CSS, you'd have to style the table with {|style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;", and similarly add the appropriate styles for each <th>, <td> and <caption> within the table. Algebraist 17:46, 7 February 2010 (UTC)[reply]
Nice, thanks. So if I get one of the admins to put that in MediaWiki:Common.css, it'll apply across the wiki? Here's hoping they still have active admins...Cheers! Vimescarrot (talk) 19:31, 7 February 2010 (UTC)[reply]

Building netbooks

Can u build your own notebook. Like, 4 instance, an Acer Aspire One. —Preceding unsigned comment added by 68.34.181.72 (talk) 18:47, 7 February 2010 (UTC)[reply]

yes. [14] see also Barebook 87.102.67.84 (talk) 19:07, 7 February 2010 (UTC)[reply]

Does anyone know how to record a programme from the ITV Player? Only for my own personal use. It is only viewable to people in the UK. I think the most likely route is "video capture" from the screen, but the easier to use freeware can only record for 2 or 5 minutes, and I have not yet got any unrestricted freeware to work. See also the querstion "How to record a streaming video from screen?" above. Thanks. 89.242.43.246 (talk) 20:26, 7 February 2010 (UTC)[reply]

get_iplayer, which is primarily targetted at the BBC's iPlayer site, has at various times also been able to download and save content from 4OD and ITV. In the case of 4OD they got into something of an arms race with the 4OD people, and I don't think it supports 4OD any more. Equally it used to be able to work on ITV (per this post), until a redesign. You might be best asking on the get-iplayer forums, incase someone has it working there again. -- Finlay McWalterTalk 20:31, 7 February 2010 (UTC)[reply]
I've already got get_iplayer and asked on the forums, and it does not work with the ITV Player any more. 89.242.43.246 (talk) 21:29, 7 February 2010 (UTC)[reply]

I think it probably something to do with RTMP or RTMPE although I'm only guessing. 89.242.43.246 (talk) 01:24, 8 February 2010 (UTC)[reply]

Personal wiki recommendations

Can anyone recommend a free personal wiki? One I can run on my PC (WinXP) without having to have a server or anything like that, and preferably not too dissimilar in how you make links etc to the thing Wikipedia works on. I do tend to regard computers as "black boxes" so if you can avoid mentioning pythons and the like I'll be more likely to understand what you are saying! Thanks, DuncanHill (talk) 23:31, 7 February 2010 (UTC)[reply]

You might want to try tiddlywiki, I use it for organising information related to my undergraduate research project. It has very nice interface, active development, easy upgrades, a backup system, similar markup to Wikipedia and plenty of plugins if it doesn't do what you want it to out of the box. 131.111.185.75 (talk) 00:20, 8 February 2010 (UTC)[reply]
Thank you, that seems to be what I'm looking for :) DuncanHill (talk) 01:39, 8 February 2010 (UTC)[reply]
You may as well just use mediawiki. It needs a database (you'll have to install mysql) but does everything that you're used to. There are some other wikis like moinmoin or tiddlywiki that may be a little simpler to configure but nowhere near as featureful. 66.127.55.192 (talk) 02:19, 8 February 2010 (UTC)[reply]
You can use it with postgres as well! Marnanel (talk) 02:29, 8 February 2010 (UTC)[reply]
I just read the installation instructions for mediawiki and I do not understand them at all. It seems to need lots of other stuff, not just downloading it and starying it up. If there was a way to use it on my pc I would, but I can't see or understand how. DuncanHill (talk) 02:47, 8 February 2010 (UTC)[reply]
You could try MoWeS; it sets up everything you need for MediaWiki automatically, just make sure to select MediaWiki in the packages selection download page —Preceding unsigned comment added by Kv7sW9bIr8 (talkcontribs) 12:37, 8 February 2010 (UTC)[reply]
Would I be able to use that (once installed) without being connected to the internet? DuncanHill (talk) 21:34, 8 February 2010 (UTC)[reply]
Yes, you could use it offline. Thanks, gENIUS101 21:55, 8 February 2010 (UTC)[reply]
Alternatively, find a webhost (there are free ones available on google, I use x10hosting.com) with an automated mediawiki installer. The one I've encountered is softaculus. Simply load it up through the cpanel/other admin interface, tell it to install mediawiki, and follow the prompts. It'll sort all the complex stuff for you, and the default options are usually ok. Rich(Contribs)/(Talk to me!) I can haz review plz? 16:00, 8 February 2010 (UTC)[reply]
I'm really looking for something that doesn't need me to be connected to the internet - it's just for personal use as an aid to research and writing, not for something I want published online (and anyway, it costs money to be online!) DuncanHill (talk) 21:34, 8 February 2010 (UTC)[reply]

February 8

Pointers and local variables

If I use a pointer to a variable - and then pass that pointer as a parameter to a function or procedure - and that procedure then makes a local variable of the same name - which variable will the pointer point to? Specifically - as a question - what is the behaviour in different computer languages (C, pascal , others) - and how do I go about finding the defined behaviour for a given language - typically I have to resort to trial and error.87.102.67.84 (talk) 01:35, 8 February 2010 (UTC)[reply]

Um, to find the defined behavior for a given language you have to check the specification for the language, if there is one. But the whole idea of a local variable is that it's independent of other parts of the program, so the local variable and the function parameter will point to two different places. 66.127.55.192 (talk) 02:23, 8 February 2010 (UTC)[reply]
The pointer points to the variable by its memory address, not by its name. Even if the original name went out of scope, the pointer would still point to the variable you originally pointed it at. Marnanel (talk) 02:28, 8 February 2010 (UTC)[reply]
If I pass (any variable) to a part of a program with different scope as a function or proceedure parameter is that supposed to retain the old (local) scope? (exceptions? is this generally true?)
Also is it right to say that the situation would change when using a dynamically scoped language (I haven't been able to test this).
(I looked at some specifications for C and pascal and honestly couldn't find the explicit description of scope behaviour - does anyone more expert know where they are in the documents?)87.102.67.84 (talk) 03:10, 8 February 2010 (UTC)[reply]
In C, when you pass a pointer as a parameter to a function, what you are passing in is a memory address, and you are giving that address a name which lasts as long as that function is executing. Any other names which may exist in other scopes and happen to refer to pointers to the same data are irrelevant. Scope is about how long a name lasts, rather than how long a variable lasts, although if a language has automatic garbage collection these two ideas may be related. Marnanel (talk) 03:22, 8 February 2010 (UTC)[reply]
So the scope of a local variable lasts longer when passed to an external function or proceedure as a parameter (instead of 'ceasing to exist' as it usually would?) 87.102.67.84 (talk) 03:48, 8 February 2010 (UTC)[reply]
A function's local variables are in scope while that function is executing. When a function "A" passes a parameter to a function "B", it doesn't extend the scope of the data in "A": it creates a whole new scope which lasts as long as "B" is executing. During this time, "A"'s local variables are out of scope: you can't refer to them. Then when "B" is finished, "A" will resume and its local variables will be back in scope again. Marnanel (talk) 03:55, 8 February 2010 (UTC)[reply]
Yes, thanks - at the transition between A and B the variables (either pointers or values) passed from A will be copied into B's variables. I suppose this means that there is a requirement for local variables not to overwrite global ones (in memory) (even temporarily) since any passed pointers will end up pointing at the wrong thing. (Can anyone expand on this technically?)
What I'm thinking about is common examples such as:
procedure proc inc_to_ten (x)
  x=x+1;
  print (x)
  if (x<10) then proc_inc_to_ten(x)
  print (x)
  return

called from main with inc_to_ten(1) or similar - which counts 1 up to 10 and then back down again as the nested functions return and exit. What I was wondering was how the nested local scoped x's are stored - would it be normal to use stack to store the previous local x just before calling the proc. and the pop the x's back off the stack around the time the return command is fulfilled? Are there other implementations? (Also I wasn't kidding when I couldn't find the description in the language specifications - can anyone point to the section where it is covered)87.102.67.84 (talk) 04:17, 8 February 2010 (UTC)[reply]

In answer to your first question: local variables are allocated on the stack; globals are not. There is no risk of them overwriting one another. In answer to your second question: that would be one way of doing it (especially if x is actually implemented as a register); another, simpler way would be to keep x on the stack the whole time, so there was never any risk of loss or confusion. Marnanel (talk) 04:46, 8 February 2010 (UTC)[reply]

Type casting an assignment target in C

Why doesn't C (or at least why doesn't GCC) allow

(int)x = 1337;

as a synonym for the following?

*((int *)&x) = 1337;

NeonMerlin 02:45, 8 February 2010 (UTC)[reply]

Two reasons:

  1. Casts of lvalues are not lvalues, according to ANSI C.
  2. It's stopping you doing something stupid. You don't know that sizeof(x) is the same as sizeof(int). Your second example works, but if sizeof(x)==1 and sizeof(int)==4, you've just clobbered three bytes of memory. Marnanel (talk) 03:27, 8 February 2010 (UTC)[reply]
(int)x is not the same as *((int *)&x) when used as an rvalue. If assignment to (int)x were allowed, it presumably would mean something like x = (typeof(x))(int)1337, since that's roughly the opposite of the corresponding read operation.
In C++ you can say (int&)x = 1337, but you probably shouldn't. -- BenRG (talk) 05:31, 8 February 2010 (UTC)[reply]

Short term internet service in a rural area?

I am searching for a workable solution to a slightly odd technological conundrum. I have a friend that is running a somewhat impromptu, small scale IT convention in a rural Central New York State area that would like short term internet service (like 1 month tops) that would preferably provide a minimum of 5 Mbps for at least 5 computers. I was sure that the new-ish "MiFi" wireless, portable hot-spots would suffice but they only provide roughly 1.4 Mbps at best while most other options require long term contracts. Any recommendations? Thanks! 74.71.73.29 (talk) 05:31, 8 February 2010 (UTC)[reply]

Satellite internet, or tether some cell phones. Investigate Link aggregation, and have multiple MiFi (or cell) connections. Even if your ISP does not offer it, you can setup a server somewhere to act as the other end of the links, and route everything through that server. Ariel. (talk) 06:00, 8 February 2010 (UTC)[reply]
As a WildBlue customer, I wouldn't bet on satellite internet being a good option. At least for normal residential service, the installation and equipment costs are substantial (hundreds of dollars) and require a contract of at least a year. The largest package is 1.5 Mbps download, but I find that my throughput is often well below the stated 512 kbps that I pay for. The latency is very poor, which is annoying and excludes some applications (real-time video, audio, gaming). There is a monthly cap on data transfer (17 GB/month for the largest package), which may also be an issue. My feeling is that anyone who "needs" 5 Mbps is going to be dissatisfied with satellite internet, even if you technically manage to cobble together the bandwidth. -- Coneslayer (talk) 12:59, 8 February 2010 (UTC)[reply]
This reply reaches you from a rural area via a relay of miniature microwave transmitters and receivers. All that is required is line of sight between each pair. Such systems are not unusual in rural UK, and I would think that something similar could be hired in the USA, but I don't know about licence requirements. How far away is the nearest fast conventional connection to the internet? Dbfirs 18:11, 8 February 2010 (UTC)[reply]

SMS files into text files

So I have a cell phone where from I can download SMS files on my vcomputer. Sadly, no program but the Nokia synchro thingamagum can read those files. Is there a program or a nifty trick to convert hundreds and hundreds of important text message (fileas) into text files (like .txt)? Copy-pasting is a pain, I've tried. Any software should be compatible with Windows 7. Pitke (talk) 13:41, 8 February 2010 (UTC)[reply]

What file format does it come in? I mean, the file extension (filename.extension). Samwb123Please read 18:27, 8 February 2010 (UTC)[reply]

Two versions of Firefox?

I have been using Firefox with Windows XP for a few weeks. I am using an Add-On (a particular "Persona" I think) that makes it look similar to Internet Explorer. However, a major drawback with this is that the drop-down menu for saving Bookmarks is very narrow and also of a very short fixed length, so that it is impossible to see what Bookmark folders you have already.

Would it be possible to either a) run another version of Firefox on my computer without the IE "persona", for example having both versions available to start from their respective desktop icons, or b) alter the IE persona I have to make the Bookmark menu larger? Thanks 92.29.142.75 (talk) 13:48, 8 February 2010 (UTC)[reply]

Sure, you use as many versions of Firefox as you want. I regularly use the latest release (installed) and have several dozen daily builds that I also use. The daily builds are easiest since they are just a folder without an installer. However, if you just install to a different directory is should work as well. Then rename the shortcuts to the FF in a way that makes sense to you. The issue that you may encounter is each FF asking you if you want to make it the default browser. This can be disabled in the settings though. 124.214.131.55 (talk) 13:55, 8 February 2010 (UTC)[reply]
You can create different profiles that each have their own addons and bookmarks etc, this explains how. —Preceding unsigned comment added by Kv7sW9bIr8 (talkcontribs) 15:13, 8 February 2010 (UTC)[reply]

Generating sound of specified pitch and duration in browser.

Hello guys. I need to generate a sound of a specified frequency and duration using something like generateSound(frequency,duration) function in my browser using javascript (i don't have any other scripting or development platform on my pc). Can you please help? Is there any applet on the net to do this. I looked everywhere but could't find. Thanks. ReluctantPhilosopher (talk) 16:55, 8 February 2010 (UTC)[reply]

Guys? ReluctantPhilosopher (talk) 18:29, 8 February 2010 (UTC)[reply]
Sorry, I don't know how. But as a regular internet user, please consider very carefully whether your readers/customers really need that sound. Astronaut (talk) 18:31, 8 February 2010 (UTC)[reply]
I actually need it for myself, not to put on the web. After I posted the question i downloaded tcc compiler and used the beep() function but it is not producing sound (through the system/internal speaker). I know it is getting executed by the time it takes (the duration parameter I set). The beep device seems to be working in the device manager. I'm really flustered :( My laptop is Compaq presario c700 (c702tu) btw. ReluctantPhilosopher (talk) 18:44, 8 February 2010 (UTC)[reply]
Your laptop might not actually have a PC Speaker. Lately I've seen more and more computers coming without one and although the connections are still there on the motherboard (hence Windows "sees" a speaker), since there's nothing connected you hear no sound. ZX81 talk 19:25, 8 February 2010 (UTC)[reply]
Thanks. Yeah I guess that's the problem. If only my clunky old laptop had a stupid system speaker all this trouble could have been avoided. Now I first have to find drivers for my audio (which, i have found out, is next to impossible), and install java on my deathly slow machine :( ReluctantPhilosopher (talk) 20:12, 8 February 2010 (UTC)[reply]
Hmmm... I don't know of any, but you can see this page to see how to play a sound file is javascript. Samwb123Please read 18:34, 8 February 2010 (UTC)[reply]
As far as I know javascript doesn't have the ability to make sounds - I assume you want to play frequency x Hz for y seconds ?
Java can 'synthesise frequencies' - and you could put that in a java applet (needs java installed) - would that be acceptable.?87.102.67.84 (talk) 18:54, 8 February 2010 (UTC)[reply]
here's a simple beep using a java applet [15]
For different notes I think you need to use MIDI - not sure.87.102.67.84 (talk) 19:16, 8 February 2010 (UTC)[reply]
This appears to be a frequency generator - http://www.jsresources.org/examples/OscillatorPlayer.html
For what it's worth, I think a lot of developers use a simple Adobe Flash script for any sound functionality. (And please don't poke the Desk with notes like "Guys?". It doesn't speed us up.) Comet Tuttle (talk) 19:20, 8 February 2010 (UTC)[reply]
I'm sorry, it was just a friendly poke :[ It had been two hours (I edited the original question, hence the timestamp), and i was thinking it was something straightforward (i was mistaken). ReluctantPhilosopher (talk) 19:33, 8 February 2010 (UTC)[reply]

PDA or phone plan with only internet?

Is there a PDA or phone plan that offers no phone or text messaging, but internet access? I do not mean Wi-Fi, but access to their 3G network. And does it cost less than $50/month to access their 3G internet service? Thanks! Samwb123Please read 18:25, 8 February 2010 (UTC)[reply]

Many providers supply USB dongles for internt access via their 3G network. If you told us in which country you want the service, you might get more accurate help Astronaut (talk) 18:28, 8 February 2010 (UTC)[reply]
I live in Spokane, Washington, United States. Samwb123Please read 18:31, 8 February 2010 (UTC)[reply]
T-Mobile offers a data only service for Windows mobile devices for $40/month, Verizon seems to offer one for $50, and I can't find any info on an AT&T data only plan for smartphones. I have heard that it runs around the same as T-Mobile though if you ask. Many cell phone companies do like to place restrictions on what other services need to be purchased to be eligible for certain data plan price rates. Caltsar (talk) 20:46, 8 February 2010 (UTC)[reply]
Thank you. I was wondering, though, is there any sort of thing for the iPod Touch? Thanks. Samwb123T (R)-C-E 20:56, 8 February 2010 (UTC)[reply]
The Ipod Touch can't access 3G, but it can use WiFi hotspots. T-mobile recently offered a $5/month plan that allowed unlimited use of their WiFi hotspots by a single device, that could be an Ipod. EdJohnston (talk) 21:04, 8 February 2010 (UTC)[reply]

Ubuntu boot problem

I've got a Pentium 4 Ubuntu server that usually freezes during the boot process. Frustratingly, sometimes it gets all the way to the GNOME desktop, at which point it'll run fine for weeks, until I have to restart the server (usually because I have applied some updates via the update manager) and it then usually freezes on boot again. The freezing point is generally on the black screen that has the white Ubuntu logo on it. I generally hard-power-down the computer and turn it on again. Just now it booted in some sort of safe mode (I am guessing), with a screen full of text mode text that appears to be listing timestamps and system calls; here are the last three calls that it's listing:

mprotect_fixup+0x226/0x280
sys_mprotect+0x140/0x200
syscall_call+0x7/0xb

Then it locked up forever. Any hints on how to approach the problem? Comet Tuttle (talk) 18:39, 8 February 2010 (UTC)[reply]

Not a real solution, but in case it's a problem with the hardware/bios settings it might go away if you use kexec instead of a hard reboot. In any case you should have a look into /var/log/* and dmesg. --194.197.235.240 (talk) 20:25, 8 February 2010 (UTC)[reply]