Jump to content

Wikipedia:Reference desk/Archives/Computing/2011 July 21

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


July 21

[edit]

Backup autocorrect spelling Word 2010

[edit]

Hi, I'm doing a clean install of Win 7 and was wondering if there is a way to backup the autocorrect spelling entries in Word 2010?

Thanks, --58.175.33.226 (talk) 02:33, 21 July 2011 (UTC)[reply]

If it hasn't changed since word 2007 then this might help.. Vespine (talk) 08:47, 21 July 2011 (UTC)[reply]

Sort files into date folders

[edit]

Hi, I have a bunch of home video files that are just sitting in a loose mass. I was wondering if anyone knew of a program which could automatically sort the files into date folders (the date would be that of creation of the file -> ie when I took the movie).

Cheers, --58.175.33.226 (talk) 06:54, 21 July 2011 (UTC)[reply]

I wrote it as a bash script for my photos. The specific syntax depends on the scripting language you like, but it isn't complicated:
  1. Set the source folder as SOURCE
  2. Set the destination folder as DEST
  3. For each FILE in SOURCE
    1. Set CTIME to be the file's creation time
    2. Split CTIME into YEAR, MONTH, and DAY
    3. If DEST/YEAR does not exist, create it
    4. If DEST/YEAR/MONTH does not exist, create it
    5. If DEST/YEAR/MONTH/DAY does not exist, create it.
    6. Set DFILE to be the same name as FILE
    7. While DEST/YEAR/MONTH/DAY/DFILE exists
      1. Append "c" to the front of FILE
    8. Move SOURCE/FILE to DEST/YEAR/MONTH/DAY/DFILE
Now, when you run this, it will copy all of the files in the SOURCE folder to the DEST folder in subdirectories for year, month, and day. -- kainaw 14:47, 21 July 2011 (UTC)[reply]

Python: sum of sets

[edit]

In Python, if X is a list of sets, what's the customary way to say X[0] | X[1] | ... | X[-1] ? —Tamfang (talk) 07:46, 21 July 2011 (UTC)[reply]

If you had a = [ set([1,2]), set([3,4]), set([5,6,7,8]) ]
then you could take the union of them with reduce (set.union, a)
In Python3 you'd need to import reduce from functools -- Finlay McWalterTalk 09:54, 21 July 2011 (UTC)[reply]
Or, being rather contrarian, set(itertools.chain(*[list(x) for x in a])) -- Finlay McWalterTalk 12:10, 21 July 2011 (UTC)[reply]
Better set(itertools.chain(*a)) -- Finlay McWalterTalk 12:22, 21 July 2011 (UTC)[reply]
Or {x for s in a for x in s}. But the method below is better, I think. -- BenRG (talk) 18:24, 21 July 2011 (UTC)[reply]
set.union(*X) works since Python 2.6. -- BenRG (talk) 18:24, 21 July 2011 (UTC)[reply]
Gorgeous. I hope I remember that gimmick, it looks like it would have many applications. —Tamfang (talk) 04:38, 22 July 2011 (UTC)[reply]
If performance is an issue, I did some profiling (python 2.7). Unsurprisingly BenRG's set.union is the fastest; the better itertools thing and BenRG's set comprehension are both about 65% of its speed; the reduce thing comes at a sluggish 18%. -- Finlay McWalterTalk 23:30, 21 July 2011 (UTC)[reply]
Presumably the reduce approach is slow because it creates intermediate sets of steadily increasing size, making it O(n²) (ignoring log factors). The other approaches amount to s = set(); for t in X: s.update(t), which is O(n) (ignoring log factors). -- BenRG (talk) 22:05, 23 July 2011 (UTC)[reply]

How to recover deleted SMS

[edit]

Is it possible to recover recently deleted SMS from mobile phone that has no blue tooth connectivity say for example an old Samsung SGH X160.If possible will some one give brief idea about the process involved.Ichgab (talk) 11:16, 21 July 2011 (UTC)[reply]

This is the area of digital forensics, obtaining the contents of a digital device including deleted files and data.
If the messages are stored on a SIM card, you may be able to use a sim card reader (search Amazon or another hardware supplier) to take a dump of the SIM card contents, which may include the text of the deleted message. Various software is available for analysing SIM cards.
If the messages are in the phone memory, then you need to make a copy of the phone's memory and then search that for possible deleted messages. If the phone has a USB or similar connection, the low-tech way of doing this would be with a bootloader or similar software, which can read and write the phone's flash memory over USB. Such software is available for many phones, though some use encryption. You could then use a hex editor or similar software to study the memory dump. A mobile phone shop that specialises in jailbreaking and unlocking phones would probably have such a tool and might be able to help.
There are experts in mobile phone forensics who specialise in reading data from mobile phones, which can be important in law enforcement, security, private investigations, and civil legal cases. They use a variety of sophisticated and very expensive equipment e.g.[1] If it was really important you may be able to find a private investigator or digital forensics expert. --Colapeninsula (talk) 12:07, 21 July 2011 (UTC)[reply]

General Programming and access times

[edit]

I just had a question about programming in general, with regard to the speed to access/display information. I am asking this not of any language in particular, so i am looking at almost any language whether it is able to be compiled into executable code or if it is more like scripting and is interpreted on run-time.

The question is, is there a general ranking to the speed of different types of data access and retrieval? For instance... can i say that from shortest to longest, it is faster to....

1. Store data to memory/read it from memory (variables, arrays, etc)

2. Read/Write that data to a file

3. Output information to a screen

I am asking in the interest in learning to code a little more efficiently. I was told by a programming professor that output to the screen generally takes more time, so i should alert the user to something only when necessary. Wouldn't it be more efficient, regardless of language, to make an algorithm that works by storing data in memory to use, instead of in files? etc


Thanks

216.173.144.164 (talk) 14:04, 21 July 2011 (UTC)[reply]

Storing in memory is faster than storing in a file, until memory is full. At that point the operating system moves the information to a file, and retrieves it when it is needed. On average then, memory is much faster, but a specific store or retrieve may be no better than a file access. Jc3s5h (talk) 14:08, 21 July 2011 (UTC)[reply]
Most programming languages store memory in RAM by default; to store memory in a file requires opening a file stream or something along those lines. So I think that's your answer to your last question. --Mr.98 (talk) 14:23, 21 July 2011 (UTC)[reply]
Input/Output to memory is much faster than input/output to a disk. The issue is size. A computer usually has far more space on a disk than it has in memory - so you cannot place everything in memory. Output to a screen is a complicated issue. If it is a text-only system, output is not overly complicated. If it is a GUI, output to the screen may required building a window, adding widgets to it, drawing the borders, adding a text widget, filling it with text, adding listeners for mouse clicks, updating the whole GUI, etc... In general, a text-based system will send a lot more information to the user than a GUI system. -- kainaw 14:41, 21 July 2011 (UTC)[reply]
Depends how you want to define "information" sent to the user. A graphical output of 1024x768 pixels at 60 frames per second at 24 bits-per-pixel is delivering over a gigabit of information to the user each second. You will not find any text-I/O system on the planet that can transmit or receive a gigabit per second with a human in a serial character-stream. On the other hand, the "information density" may be higher in a character-stream, if you abstract semantic meanings from the character-stream in ways that the graphical interface cannot. But, purely from the technical standpoint, no command-line interface on any modern computer is nearly as fast as a graphics bus.
However, most programmers are unable or unwilling to directly program the graphics output; so they rely on windowing toolkits and software abstraction layers. The result is that the maximum information throughput is limited to many orders of magnitude lower than the hardware can support. If you build a window, and print an 80-character string to it, your graphics bus still delivered a gigabit of data each second - but only 80 bytes was "useful" information from the program I/O! The information-density is, by this metric, very very low; and you could have made better use of resources with a serial-port or console emulator. Nimur (talk) 19:34, 21 July 2011 (UTC) [reply]
The issue isn't the speed of the graphics bus - it is the overhead of object/struct construction. To pop up a little modal window just to say "Hi dude!", you need to construct the entire window object in memory and attach it to the desktop display and then send that off to the windowing manager for display. Then, the high-speed graphics card will display it quickly. For a text-only display, you call a print command which requires very much less overhead in the terminal control. The worst you'll run into is management of a scroll buffer. -- kainaw 00:44, 22 July 2011 (UTC)[reply]

Issue with flash security and a CD im using..........

[edit]

I am running some training software which is essentially HTML pages with embedded flash videos etc. I get an error when i run the main page from the CD.

It says...

Adobe Flash player has stopped a potentially unsafe operation...

The following application on your computer or network: (swf file path) is trying to communicate with this internet enabled location: (html file path)

it says i have to change the settings to allow it to work. However, flash thinks that this is on the internet, so i cant specify a url to allow. allowing all sites doesnt work either. I also tried the loopback address (127.0.0.1) to no avail. how do i allow the content to communicate so i can view it properly? I have current version of internet explorer and flash on win 7.

216.173.144.164 (talk) 15:26, 21 July 2011 (UTC)[reply]

If you hunt around on the disk with Windows Explorer you should be able to find the Flash Video files (probably .flv files) and if so you can play them directly with VLC media player. Hopefully the authors of the disk will have chosen sensible names, or sensible locations, for these, so you can know which file corresponds with which training lesson. -- Finlay McWalterTalk 15:30, 21 July 2011 (UTC)[reply]

The problem is that the swf files control navigation to the different pages etc. I fixed it however, by adding my cd drive to trusted locations for development rofl. Thanks anyway!

216.173.144.164 (talk) 15:32, 21 July 2011 (UTC)[reply]

802.11n technical question

[edit]

Quick technical question on 802.11n. Am I right that MIMO is independent for how many transmit and receive channels an adapter has? In other words, a 1T1R adapter (including ones in APs of course) can still have MIMO, although obviously it's limited to 150mbps? I've seen some things which suggest yes but they're not entirely trustworthy (although our article on MIMO also suggests yes to me) and I did read one thing suggesting no. If MIMO requires multiple channels (in other words a 1T1R can't be MIMO), how are two antenna used on a 1T1R adapter? Does one transmit and one receive? Nil Einne (talk) 18:44, 21 July 2011 (UTC)[reply]

1T1R refers to number of RF output stages. You can connect one output to arbitrarily many antennas, constructing a passive antenna array. You can have multiple inputs received or transmitted through the same physical antenna using separate frequencies (channels), if your RF input/output PHY supports that broad RF bandwidth. Consider MIMO to be synonymous with FDMA in that case. Nimur (talk) 19:26, 21 July 2011 (UTC)[reply]

Firefox sync

[edit]

I logged into my account for the first time in months, I've changed computers, and I can't find the option to sync up my data to my browser on my new computer. Anyone know where it is? 173.2.165.251 (talk) 18:48, 21 July 2011 (UTC)[reply]

Have you tried doing it from inside Firefox? Go to tools>set up sync. Fribbler (talk) 15:11, 22 July 2011 (UTC)[reply]

Updating information on the Memorial Sloan-Kettering Cancer Center Wikipedia site.

[edit]

1. I would like to know if the Memorial Sloan-Kettering Cancer Center Wiki page is protected from being updated?

2. Is there a way to find out who submitted the Memorial Sloan-Kettering Cancer Center Wiki page in case we need permission to update the information?

Davidthelion2 (talk) 20:22, 21 July 2011 (UTC)David[reply]

It isn't locked at present (there's no padlock on the top-right of the page, the second tab is 'Edit', not 'View Source', and the edit link works). To see who's edited the page, click on 'History' on the page. CS Miller (talk) 20:27, 21 July 2011 (UTC)[reply]
Every page has a visible History, which can be accessed from a tab at the top, showing all editing contributions. In this case a look at the history shows that Davidthelion2 has made about 20 edits to the page over the past week, which have in whole or part been reverted because they apparently contain copyright violations and other problematic material. The right way to proceed is to start a discussion at Talk:Memorial Sloan–Kettering Cancer Center. Looie496 (talk) 23:29, 21 July 2011 (UTC)[reply]
And you do have permission to change what is there. This is part of the conditions of the creative commons license that the content was submitted under. Graeme Bartlett (talk) 09:00, 25 July 2011 (UTC)[reply]

Slow startup of PC

[edit]

I have a PC with 2.25GB RAM, 1.38 GHz processor and 160GB hard disk. The OS is Windows XP SP3. Recently, it has started taking a lot of time to start, as compared to a few days back. I even uninstalled a few programs, but it was of no use. The C drive has 26GB free space. Could someone please tell me the reason for this sudden slow startup and how I can get it to start up faster? Zebec 21:41, 21 July 2011 (UTC)[reply]

Consider reading this technical document from Microsoft: Troubleshooting the Startup Process. With the information you have provided, it is impossible for us to diagnose anything. But, after reviewing the startup event logs, as explained in this technical doc, you may be able to solve the problem yourself, or at least provide us with the information we need to give any meaningful feedback.
The first step is to identify what stage of startup is taking a long time. You should investigate your System Event Log - read the log, determine what process or event is taking a long time, and then we can proceed to make some suggestions. Nimur (talk) 22:17, 21 July 2011 (UTC)[reply]
Another option is to check using the "system configuration utility" - type "msconfig" in the run window (ie start >> run >>msconfig) - here you can see some useful info - the "Startup tab" gives a list of programs that run on start up, whilst the "boot.ini" shows the boot thingy. You might see something on these lists that looks new or unusual. I'd assume that something you've installed recently is causing it. Another possibility is some updated driver that is having difficulty loading. Or maybe a virus? - If you haven't already do a full scan - you could use http://www.microsoft.com/security/pc-security/mse.aspx amongst others to scan.
Defragment the hard drive just in case... When you use Task Manager how much memory is marked as "PF Usage" after startup- for XP I'd expect less than 300MB. If nothing obvious turns up from these - you'll probably need to go to Nimur's event logs above.
Have you done anything different in that last weeks on the computer? Imgaril (talk) 13:06, 22 July 2011 (UTC)[reply]
I've used a program called Soluto to get information on what is running during the startup process and how long it's taking. --LarryMac | Talk 13:31, 22 July 2011 (UTC)[reply]
It may be loading a lot of unwanted programs during start up, instead of loading them when and if needed. Use Ccleaner to manage and remove what is loaded at start-up. 92.28.245.233 (talk) 19:26, 23 July 2011 (UTC)[reply]

Thank you all for your suggestions.
LarryMac:I downloaded Soluto. It showed 33 applications running in the startup. I paused some of them. Then the boot time reduced to 48 sec till the last boot. It shows 22 applications which run at startup which cannot be removed with Soluto (yet). Why is that? And the time varies with each boot. Why is it fluctuating? Also, it takes 48 sec to boot, but it also takes an additional 1min12sec for the icons to come on the desktop. Why is that? Thanks for suggesting Soluto, because it showed all the programs running at startup, which was not the case with msconfig.
Imgaril: I defragmented all the hard drives before posting this question. So it was of no use. I use Norton Internet Security. So can it still be a virus? The PF usage just after startup is 375MB.
I also downloaded Ccleaner and will try it out.
Nimur: Thanks for your advice. I'm trying out all other options now, if nothing else works, I'll go to the logs. Thanks a lot,all the same.
Zebec 21:18, 24 July 2011 (UTC)[reply]