Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 May 22

From Wikipedia, the free encyclopedia
Computing desk
< May 21 << Apr | May | Jun >> May 23 >
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.


May 22

[edit]

Templates on another wiki running media wiki

[edit]

On another wiki, I have the following template - which works fine.

{| class="wiki-table" align="right"
! class="hl2" | {{{Name|Name}}}
|-
| [[Image:{{{Image|Picture.PNG}}}|180px|Level Screenshot.]]
|-
| style="text-align: center"|Previous level: [[{{{Prev|Previous}}}]]
|-
| style="text-align: center"|Next level: [[{{{Next|Next}}}]]
|}

Two questions: (1) are the parameter names case sensitive (ie will prev=123 work just as well as Prev=123?; (2) How do I detect the absense of the Prev parameter and omit that row of the table? -- SGBailey (talk) 12:57, 22 May 2010 (UTC)[reply]

1) I don't think so, but someone else should know for sure. 2) I think that that needs the ParserFunctions Extension, which can be found at [1]. If it's already installed, or not your wiki, try using this. I would use the if function to determine if that parameter is non-empty, and then enter text to display if it is, and if it isn't. Thanks, gENIUS101 13:53, 22 May 2010 (UTC)[reply]
Empirical tests show that {{#switch:Ba|{{{2}}}|{{{3}}}|{{{4}}} = [[Image:Badgeless.png}} repsonds to Ba ut not to ba.

Also in the template above I see that Prev=U-Turn produces U-Turn and prev=U-Turn produces Previous. So that answers (1) - the are case sensitive.

I tried making User:Meconopsis/Sandbox2 = Parameter p is {{#if:{{{p}}}|first|second}} and called it with {{User:Meconopsis/Sandbox2|p=hello}} and it always evaluates as

Parameter p is first

. Does this mean I don't have the extension or that I have the syntax for #if wrong? -- SGBailey (talk) 16:36, 22 May 2010 (UTC)[reply]

Changing Sandbox2 to Parameter p is {{#if:{{{p|}}}|first|second}} appears to make it work. I'll experiment from here. Thanks. -- SGBailey (talk) 16:49, 22 May 2010 (UTC)[reply]
I can't make it work. To simplify things with all the | and || floating around, I've changed to html table/tr/td/th. Is there any chance someone could have a look at the calling page and the template for me? I'd be most grateful. -- SGBailey (talk) 19:44, 22 May 2010 (UTC)[reply]
I think I've fixed it, one of my { { # if was ( ( # if -- SGBailey (talk) 20:32, 22 May 2010 (UTC)[reply]

Simple to do list with reminders for overdue replies

[edit]

I use a simple text list of tasks to do. Often these tasks are writing business letters to people. When I have written and posted the letter, the task then goes into "pending" status until I get a reply.

That is the important thing - I want to be able to see which replies are overdue. If I have not recieved a reply say 14 days after sending a letter, then I want that to be easy to see.

What would be the easiest way to create something that could do this please? Something like Notepad where dates would flash red if they were older than the current date would be ideal. Another feature would be that finished tasks are removed from the main list, to a list of finished tasks.

I have Googled and looked at several To Do programmes, did not like any of them as they were too fussy and complex. I may be willing to programme something if it would take less than an hour. Thanks 92.28.248.33 (talk) 13:44, 22 May 2010 (UTC)[reply]

You could move your list to / import your list into Excel and use its conditional formatting on cells to highlight things based on dates. Alternatively you could run a program which filters your list based on dates. For that to work easily you would have to impose some structure on your list - for example all dates might be written in ISO format as yyyy-mm-dd - and on yourself - entering a due date into the file. Then you could print any line in the file out that contains a date older than today. A straightforward task such as this could be written in many languages - which do you have available to you? Is your list 'moveable' or is it always at the same location (eg C:\Data\Docs\Lists\Todo.txt or something?). -- SGBailey (talk) 16:44, 22 May 2010 (UTC)[reply]
Excel is probably easiest, Emacs org-mode is more fancy (in the "less is more" sense), it's basically text file editing with some more functions. (I'm not sure it can do what you wish for but I'd be surprised if it didn't). Jørgen (talk) 19:19, 23 May 2010 (UTC)[reply]

Thanks, although I don't use Excel, and I'm thinking of deleting MS Office from my HD completely.

Is there anything like a notepad or editor where the contents can be scanned by conditional expressions, and where I could get a notepad-like editor to always load the same text file? Rebol, perhaps. Thanks 92.28.255.202 (talk) 21:22, 23 May 2010 (UTC)[reply]

which really big dotcom was cofounded....

[edit]

...by a chinese american and an indian american? —Preceding unsigned comment added by 59.189.218.251 (talk) 14:12, 22 May 2010 (UTC)[reply]

I'm still surprised to see no answers here; there are probably dozens that can fit the description. Try reading about Vinod Khosla, he's founded dozens of companies and ventures (directly and indirectly), some have been huge. Undoubtedly, you can find one of his startups that fits your description; if nothing else, you'll get to read about an interesting guy. Nimur (talk) 15:36, 24 May 2010 (UTC)[reply]

Line cutting through infobox

[edit]

Can anyone help me out with understanding and fixing the section line that cuts through the infobox on this page? http://en.wikipedia.org/wiki/User:Trouver/Terrain

I would also like to know if there is a way of controlling the size of the thumbnail pictures. I would like to make the bottom 2 pictures a little larger. I'm assuming the thumbnail size is based on the original size? Thank you. LoreMariano (talk) 16:00, 22 May 2010 (UTC)[reply]

Thumbnail sizes:
..thumb|300px|..
..thumb|400px|..
etc
px is pixels I think - default is 150 (or is it 180?) (ie the thumbnails are a default width)
There are various instructions for images eg Wikipedia:Picture tutorial or Wikipedia:Extended image syntax
In general the Wikipedia:Manual of style recommends using standard settings for image size (or used to) - the small images look ok to me .. see Wikipedia:Image_Use_Policy#Size for the obscure reasons why. 87.102.18.191 (talk) 17:04, 22 May 2010 (UTC)[reply]
87.102.18.191 (talk) 16:41, 22 May 2010 (UTC)[reply]
Does this edit fix the problem http://en.wikipedia.org/w/index.php?title=User:Trouver/Terrain&action=historysubmit&diff=363575929&oldid=363551999 ?
The {{-}} makes the text after it display below any images/infoboxs etc.
The {{TOC left}} inserts the "Table of contents" at that point.
If the line actually went all the way through the infobox that may be a browser display problem. ? 87.102.18.191 (talk) 17:33, 22 May 2010 (UTC)[reply]
Cross posted at Wikipedia:Help desk#Line cutting through infobox. --

Connected to home network but no internet

[edit]

Hey guys. I'm a bit of a novice when it comes to home networks and internet issues and am completely perplexed by this problem. We recently switched to AT&T from Comcast and got a new modem/router all-in-one in the process, one that comes with a firewall. At first, the internet was working completely fine for my sister's laptop, but one day it stopped working even though the connection icon is blue (Windows Vista) and says connected to Local and Internet. When I try to go online, it says "page can not be found" on both Chrome and Internet Explorer.

Any ideas? I'm completely lost. I checked the proxy settings to make sure those weren't changed somehow but those seem to be at the defaults. I also don't think it's malware of any kind, though it could be a possibility.

Thanks a ton. 184.36.108.188 (talk) 22:26, 19 May 2010 (UTC)[reply]

This is almost certainly a wireless problem, but the first thing I would do to verify this is to run an Ethernet cable from the laptop to the router to see if the wired connection works. If so, that will rule out various problems the router itself may be having. Comet Tuttle (talk) 22:39, 19 May 2010 (UTC)[reply]

Interesting. When I plug in the ethernet cable, it still shows a blue bubble in the connection window and has a 'connected' status, but I have no access to the internet. Extra info: I already tried a system restore, and a full scan with AVG and Malwarebytes. 184.36.108.188 (talk) 00:05, 20 May 2010 (UTC)[reply]

It sounds as if some communication settings have been changed. Have you tried the "diagnose and repair" option from Vista's "Network & Sharing Center"? Dbfirs 06:27, 20 May 2010 (UTC)[reply]
Is it a problem with your router or your ISP? If the modem/router is at fault, no matter what you do with your computer, the connection won't restore. I once had a problem with a netgear router. Although it show it is connected, I couldn't access to the internet. Finally, I exchanged the router, and viola!, internet restoration! --Tyw7  (☎ Contact me! • Contributions)   Changing the world one edit at a time! 07:06, 20 May 2010 (UTC)[reply]
Have you tried restarting the modem/router box? Turn off the power, wait a few secs and restart it. I often find this procedure clears many internet connectivity problems. Astronaut (talk) 10:57, 20 May 2010 (UTC)[reply]

Well, the router works for both the other computers in my house. Yes, I tried Diagnose and Repair and it said it could find nothing wrong with the connection. I'll try resetting the router. What I'm afraid of is that some malware changed the internet settings to cause the current problem because my sister says when it happened, some pop ups came up and she lost control of the computer. But she's not really the most tech savvy person in the world. 184.36.108.188 (talk) 15:59, 20 May 2010 (UTC)[reply]

To rule out router problems, either use another computer to connect to your network or bring the problematic computer and try connecting it to another network. --Tyw7  (☎ Contact me! • Contributions)   Changing the world one edit at a time! 21:12, 20 May 2010 (UTC)[reply]
Yes, it's definitely worth trying out your sister's laptop on a friend's network or at an internet cafe. The "Network & Sharing Center" actually contacts a Microsoft site before reporting that the connection is working correctly, but it doesn't transfer much data. The page not found message sometimes appears when only a small amount of data is received. I assume that you have tried different sites. Could malware be redirecting your browser to a non-existent site? (Though the fact that you have tried two different browsers probably rules out this.) I sometimes get an intermittent fault on my (microwave delivered) internet connection and this results in lots of "page not found"s even when "Diagnose" says that I have a connection, but when I repeatedly try "Diagnose and repair" is eventually notices the problem and shows a local only connection. Dbfirs 23:46, 20 May 2010 (UTC)[reply]
I think sometimes a malware can knock out the internet through multiple applications. Therefore, I would recommend running MBAM full scan --Tyw7  (☎ Contact me! • Contributions)   Changing the world one edit at a time! 23:59, 20 May 2010 (UTC)[reply]

I'll try another full computer scan with Malwarebytes and AVG to see if some malware is redirecting e through a proxy. Argh, this problem is so frustrating, especially since I don't even know where to begin to fix it. 184.36.108.188 (talk) 19:35, 22 May 2010 (UTC)[reply]

Do you not have access to any other internet connection, just to test? Have you tried pinging your router, the DNS server and various websites (e.g.Wikipedia: ping 208.80.152.2)? I agree that these problems are frustrating because there are so many possible causes. Dbfirs 00:27, 23 May 2010 (UTC)[reply]

Windows Questions - Technical

[edit]

Hi,

In some notes for the Windows 16 bit New Executable format, I found reference to some fixups performed in respect of 'floating' point emulation.

i) So my first question is , in the absence of a h/w co-processor what techniques exist for trapping and implementing floating point (8087 type) in software? ii) Are the specifcs of the floating point fixes (OSFIXUP in relocation data) type in relation to NE type image formats documented?, (WINE doesn't seem to use these directly, instaed using the Linux Kernel's floating point emulation...)

Next questions

iii) What really happens when an NE file is loaded on Windows ? (Apparently there is some kind of startup code which sets up a stack, local heap , task entry and a message queue... and that's BEFORE you even see a Window)

I'm assuming that somewhere Windows is reserving a set of page-table to store data on the usage of memory? In this table, a set of byte values indicate if memory is in use or not? (And presumably what the memory's being used for?)

For example , Assuming 'real' mode... one possible tactic is to reserve an entire segment for a page table covering every possible 'paragraph', When memory is allocated or removed this page table is updated?

iv) How does Windows (or WINE) resolve where modules are loaded (lif loaded?) (On a related note my understanding is that it keeps some kind of table containing loaded modules along with a refernce/instance count?) Thusly you would have something like

char * p_Z_module_name
WORD reference count
WORD instance
WORD offset_first_instance_selector

For each module, followed by a list of selectors for each instance data?

Of course this is all complicated by the fact that Windows can run in real or protected mode...

Sfan00 IMG (talk) 21:10, 22 May 2010 (UTC)[reply]

For iii), windows maintains a Local Descriptor Table for each process; the task switcher is responsible for managing the appropriate CPUMMU registers to make sure the current one is active when a process switch occurs. Naturally this uses memory allocated by the global memory manager, which keeps track of which process has which memory. For iv), by "modules" I guess you mean DLLs? DLLs (and their unix counterpart .SOs) have a default load address. Ideally the loader assigns an LDT mapping that matches this and loads the DLL into that space. If there is a clash the loader must perform a relocation, by altering the loaded binary by performing the relevant fixups. If two different applications try to load the same DLL (and lets say that fixups aren't required) then Windows (just like Linux) will load a single copy into physical RAM and each process will have an image of that in their LDT. I'm pretty sure these are copy-on-write, which means if one process decides to write into that space (e.g. to place debug breakpoints) then the OS has to make a dedicated copy for it (I don't know whether it's copy-on-write per page or per DLL, probably the former). For i), executing an FPU instruction on a machine without an FPU will cause an illegal instruction exception. THis causes the CPU to transition to ring0 for the exception to be handled; so in the worst case the software FP library can run in that context. But ring transitions are expensive (and blocking) so rewriting the binary means you can do the whole thing in userspace. But ii) I honestly don't know what older Windows versions did when they encountered this scenario - it would be quite reasonable to just barf the application, as apps written when FPUs weren't ubiquitious either insisted that they only be run on a FPUed machine or shipped with a software-math-instead version, and I'm not sure Microsoft ever felt it was necessary to handhold those few programs that just assumed an FPU was there. -- Finlay McWalterTalk 21:36, 22 May 2010 (UTC)[reply]
Note that this holds for a version of Windows with a full protected-mode kernel (which I guess is Win95 onward), where the power of the processors address virtualisation makes things straightforward. For genuinely old versions like Windows 2, I really don't understand how they work (fixups and little bits of string, I gues). -- Finlay McWalterTalk 21:46, 22 May 2010 (UTC)[reply]
This site contains the FP source code for Borland's CRTL, including some stuff for FP fixups. FPINIT.ASM explains pretty well - it says that if an FPU isn't detected it resolves the special Borland FP fixups to library calls in the emulator. If an FPU is detected then E087ENTR.ASM patches those fixups out and replaces them with actual FPU instructions. Unfortunately E087ENTR.ASM isn't present on that site (and Google doesn't show it elsewhere) so I don't know the correspondence between the fixups and the actual FPU instructions. From this, it seems this scheme works only with a binary that's compiled to use these fixups rather than to explicitly emit the FPU instructions (so a hand-written program that just called FMUL or whatever wouldn't be patched). None of this relies on there being a standard - MS' CRTL will surely do something similar, but as the CRTL startup is part of the compiled .EXE (and not part of the OS loader) there's no need for MS' and Borland's to interoperate. -- Finlay McWalterTalk 22:48, 22 May 2010 (UTC)[reply]
Although judging by this Microsoft KB article it seems the Borland and MS crtls share the same names for FP fixups. This article talks about how link (which I think is microsoft's language-agnostic linker) leaves fixup info in the NE file, and confirms that those FIARQQ (etc.) fixups are resolved as either FWAIT or NOP. -- Finlay McWalterTalk 23:29, 22 May 2010 (UTC)[reply]
The Old New Thing has some posts about 16-bit Windows: [2] [3] [4] [5]. Even in protected mode, all 16-bit Windows apps ran in a common memory space and all (far) pointers were valid system-wide. The only difference between real and 286 protected mode was how the segment numbers were translated into segment base addresses: in real mode they were multiplied by 16, while in protected mode they were looked up in a table. (Also, in protected mode, every segment had a size which could be less than 64K, so an out-of-bounds array access couldn't accidentally trample on someone else's memory.) 386 enhanced mode added a 32-bit kernel and was introduced in Windows 3.0 (not 95). -- BenRG (talk) 23:47, 24 May 2010 (UTC)[reply]