Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 382: Line 382:
I am a php beginner and on my first day my tutor hacked my gmail password using a small php script(approx 5 to 6 lines) and then he deleted it.
I am a php beginner and on my first day my tutor hacked my gmail password using a small php script(approx 5 to 6 lines) and then he deleted it.
i requested him to tell me for knowledge purpose but he didn't. i am wondering is hacking passwords so easy with php scripts?.i browsed on web but couldn't find anything reasonable. will anyone please clear that if something so easy exists in php or it was just a trick(may be he had some software installed on his laptop).[[Special:Contributions/182.18.179.2|182.18.179.2]] ([[User talk:182.18.179.2|talk]]) 15:08, 24 July 2014 (UTC)
i requested him to tell me for knowledge purpose but he didn't. i am wondering is hacking passwords so easy with php scripts?.i browsed on web but couldn't find anything reasonable. will anyone please clear that if something so easy exists in php or it was just a trick(may be he had some software installed on his laptop).[[Special:Contributions/182.18.179.2|182.18.179.2]] ([[User talk:182.18.179.2|talk]]) 15:08, 24 July 2014 (UTC)

thanks for the reply Finlay Mcwalter, but i think i should have been more precise with the question the first time.actually, he wrote the code and saved in "htdocs" folder like normal procedure is and executed it in "localhost" then a page displayed with my username and password and he told that he had sent a request to "server".he also had a connection established to google and (through this) he tried to tell us that security depends upon coder's logic and not just this language is more secure and other not(between java and php here).[[Special:Contributions/182.18.179.2|182.18.179.2]] ([[User talk:182.18.179.2|talk]]) 19:10, 24 July 2014 (UTC)
thanks for the reply Finlay Mcwalter, but i think i should have been more precise with the question the first time.actually, he wrote the code and saved in "htdocs" folder like normal procedure is and executed it in "localhost" then a page displayed with my username and password and he told that he had sent a request to "server".he also had a connection established to google and (through this) he tried to tell us that security depends upon coder's logic and not just this language is more secure and other not(between java and php here).[[Special:Contributions/182.18.179.2|182.18.179.2]] ([[User talk:182.18.179.2|talk]]) 19:10, 24 July 2014 (UTC)



Revision as of 19:13, 24 July 2014

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:


July 19

Online port scanner for my computer

Does anyone know of an online port scanner that is capable of scanning ports 0-65535 all in one go (i.e. all of them)? I just want to thoroughly check my computer's security. Cheers. --Kurt Shaped Box (talk) 11:17, 19 July 2014 (UTC)[reply]

GRC ShieldsUp! do that.. or at least, that is what the page claims. It also checks for other leaks and holes. WegianWarrior (talk) 19:31, 19 July 2014 (UTC)[reply]
Yup - but that one only scans from 0-1056. Those are the standard ports, but there are more. I believe that you can enter the higher numbers in a custom scan, but only 64 at a time. There did used to be a site that did what I was looking for - the scan took about 10/15 minutes. I don't know if it's gone from the internet now though... --Kurt Shaped Box (talk) 08:23, 20 July 2014 (UTC)[reply]
These sites, [1], [2], [3] all appear to do what you are looking for. This site [4] asks you to only do a range of 500, but it looks like it may do more (I did not test it, only including it in the event that the others all fail to satisfy, you still have an option).Phoenixia1177 (talk) 03:33, 21 July 2014 (UTC)[reply]
Not as good as an external scan, obviously, but if you're familiar enough with a C++ compiler and the linking process you can at least scan your own ports internally with this simple program (to fine-tune things like timeout settings, you can pass probe.handle() to standard socket API functions):

[you'll need this header file]

#include <ip.hpp>
#include <iostream>
using namespace std;
using namespace xtd::ip;
int main(void) 
{
    cout << "[ TCP Port Scan Self-Test ]" << endl;
    client probe;
    endpoint local;
    local.address = "127.0.0.1";
    local.protocol = IPPROTO_TCP;
    for(local.port = 0; local.port < (1 << 16); ++local.port)
    {
        if(probe.open(local))
            cout << "Listening: ";
        else
            cout << "No Response: ";
        cout << local.port << endl;
    }    
}
Sebastian Garth (talk) 10:05, 22 July 2014 (UTC)[reply]

Concurrent programming languages and non-concurrent programming languages

What makes a programming language non-concurrent? Can't all languages start a process, a second process and so on? (in the same way that a user can start several programs). OsmanRF34 (talk) 12:36, 19 July 2014 (UTC)[reply]

It may be instructive to turn the question around and ask "what makes a programming language concurrent ?". Some languages provide native support for a concurrent programming paradigm. This is not just the ability to start new processes, but also involves a model for communicating between processes and handling interrupts. Other languages require an extension, add-on or library to support concurrent programming. This creates an additional learning overhead for the programmer, and may be less efficient (slower running, more memory overheads etc.) than a language that provides native support. Gandalf61 (talk) 13:53, 19 July 2014 (UTC)[reply]
Some languages are designed around concurrency to such an extent that virtually any nontrivial program in that language will make heavy use of it. Erlang and ToonTalk are examples. Others (like Java) are conventional sequential-imperative programming languages that just happen to have standard support for concurrency, and I wouldn't necessarily call those concurrent languages. Wikipedia's Category:Concurrent programming languages seems to be inconsistent about this—it includes Java but not C++11, for example. -- BenRG (talk) 23:01, 19 July 2014 (UTC)[reply]
Are there any languages/compilers that can figure out for themselves what can be optimized into concurrent processes and what can't ? (In some cases, it might need to gather statistics from several typical runs to figure this out, similar to how some relational database systems gather stats and use those to optimize indexing, etc.) StuRat (talk) 04:06, 20 July 2014 (UTC)[reply]
Automatic parallelization is very hard in general. The overhead of creating and synchronizing threads is large enough that you need to do a fairly large amount of independent computation in each one before it pays for itself, and most programs don't have such long independent computational chains in them, at least not without high-level algorithmic changes that compilers aren't smart enough to do automatically. Automatic vectorization, using SIMD instructions instead of threads, is much easier and a lot of popular optimizing compilers support it. (Historically this was a strength of Fortran compilers, but I think the C++ compilers have caught up.) -- BenRG (talk) 05:56, 20 July 2014 (UTC)[reply]
Thanks. StuRat (talk) 12:13, 20 July 2014 (UTC)[reply]

simple cross-platform library to display rasters?

I have a C program that runs a simulation and outputs the final state as a PGM raster image, but I want to make it display rasters for the intermediate states as they're computed. I know almost nothing about graphics libraries. I'm on my way to figuring out how to do what I want with OpenGL and GLFW. But that seems like overkill for such a simple task. If I understand right, the whole point of OpenGL is rendering, and I don't need any rendering. Just a window I can draw pixels on. So what am I missing? Is there a conventional cross-platform way to do what I want? Or do people just use OpenGL, since it exists and works? Thanks! --Allen (talk) 19:18, 19 July 2014 (UTC)[reply]

Graphics libraries take primitives operations like "draw line" and generate image files (or image buffers in memory). They don't display them. It sounds like you don't need the graphics library part at all (you're doing that yourself in your own code). What you need, as you say, is something to make a visible window, provide your program with something to draw into, and manage the usual events that keep a graphical application on Windows, Linux, etc. working okay. That's the job of a GUI toolkit; there are a bunch of cross-platform ones, including wxWidgets, GTK+ and Qt. But these are heavy tools for this simple job you want. For what you want, I'd recommend Simple DirectMedia Layer (SDL). Although SDL is designed for games, it's good for what you want too, and it's super simple to use. I have a program somewhere that draws a Mandelbrot set into an SDL window, with progressive updates as the computation proceeds. I'm pretty sure I used SDL; I'll see if I can dig it up. -- Finlay McWalterTalk 19:32, 19 July 2014 (UTC)[reply]
Thanks Finlay! I'll look into SDL. And it'd be great to see your Mandelbrot code if you do come across it. --Allen (talk) 19:47, 19 July 2014 (UTC)[reply]
It turns out I had some SDL code, and some Mandelbrot code, but they weren't together. So I merged the two to make this very basic example. Note that the flow of this code mostly resembles a conventional non-interative program, and as such it's a bad example of how you'd actually code in any interactive GUI system (whether SDL or another toolkit). Because a program has to respond to inputs and other events, they're typically event driven, where the main event loop never blocks (to keep the program responsive). In such environments, if a program needs to do long-running computation, the calculation is farmed out to a different thread, and care must be taken to properly synchronise (coordinate) access to shared resources. In this case, for simplicity (and laziness) I do just block, which is why the program is totally unresponsive during the calculation; it can't even be closed. -- Finlay McWalterTalk 22:32, 19 July 2014 (UTC)[reply]
I should note that it is possible to do long-running calculations without the complexity of another thread. What one typically does is have the main loop poll for events, and then (if there's no event to service) do just a tiny bit of the calculation (only a few millseconds worth) before going back and polling again. This isn't hard, but it rather everts the flow of control, so it takes a bit of getting used to. -- Finlay McWalterTalk 22:37, 19 July 2014 (UTC)[reply]
This is exactly what I needed; thank you! I'm not worried about interactivity just yet, so blocking is no problem. I'm just happy to know how to put pixels on a window. --Allen (talk) 02:24, 20 July 2014 (UTC)[reply]
I'd like to know the same thing, but from Fortran (specifically gfortran). My current approach is to output an image file and display that, but this is too slow for continuous updates. StuRat (talk) 02:30, 20 July 2014 (UTC)[reply]
In your position, I'd just have the program write out these consecutive intermediate images into a somewhat more common format (PNG, JPEG - using libpng and libjpg respectively) into a directory someplace and write a simple HTML wrapper so you can view your raster images in a browser. The nice thing about doing this stuff there is that the browser takes care of all of the windowing stuff for you. It's really easy to use JavaScript to grab different images and display them consecutively or whatever.
SteveBaker (talk) 03:57, 20 July 2014 (UTC)[reply]
That's exactly what I do now, from Fortran. It takes several seconds to update an image, though, and closing the old image is tricky, requiring you to kill the browser process. I used IE as the browser, since that's likely to be on any Windows PC. StuRat (talk) 04:02, 20 July 2014 (UTC)[reply]
There is a trick to making it reload - I used this to load still frames from a webcam feed - the file "webcamOutput.jpg" gets reloaded about once a second. To prevent the system from caching it, add a garbage "?t=xxx" to the end of the filename and increment xxx each time:
 <html>
 <head>
   <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
   <script>
     var unique = 0 ;
     function reloadImage()
     {
       var webcam0 = document.getElementById ( "webcam0" ) ;
       webcam0.src = "webcamOutput.jpg?t=" + unique ;
       unique++ ;
       setTimeout ( "reloadImage()", 1000 ) ;
     }
   </script>
 </head>
 <body>
   <div id="webcamWrapper">
     <img id="webcam0" src="webcamOutput.jpg">
   </div>
   <script>
     reloadImage() ;
   </script>
 </body>
 </html>
should work on any browser. (IE is by *far* the worst browser to choose for this kind of thing!) SteveBaker (talk) 15:38, 20 July 2014 (UTC)[reply]
So changing the title of the image file stops it from reading it from the cache ? Thanks, I might try that. But it still is probably too slow of a refresh rate for many applications. One issue that comes up is image compression. Either I spend the time to compress each image, or I deal with huge files, either of which may slow things down to an unacceptable degree. StuRat (talk) 16:25, 20 July 2014 (UTC)[reply]
Yes - changing the filename WOULD avoid the cache issues - but that's not quite what I'm doing. When the browser requests a file via a URL, it can add parameters to that request (like if you check a box in an online form). If the file (which in this case is a dumb image) has no interest in those parameters, they are ignored...but they serve to make the request unique - even though the file isn't. And that's enough to bypass the cache without you end up with a bazillion junk images on your computer. As for speed. I'm using this to monitor a web cam at one frame per second (or so) - and it's plenty fast enough for that - even grabbing the file over the Internet. However, if you need more speed than that, or if your files are *HUGE* then you're effectively building a full graphical program and/or engineering a video stream and then you'll be writing a LOT more code! However, for monitoring slow-running processes - this is great because you can view it over the network, view it on your phone and the amount of code you need is tiny. So YMMV. SteveBaker (talk) 17:04, 20 July 2014 (UTC)[reply]
My particular application was a redneck version of the board game Clue, featuring characters like "Skeeter" and "Bubba", locations like "The Trailer" and "the Outhouse", and weapons like "Bottle of Jack Daniels" and "Pit Bull". I had a separate text command line interface window, and wanted to also show the game board graphically. So, if I wanted to display (barefoot) foot prints when the player moved, a one second delay would be too slow for each step, with up to 12 steps per move. A tenth of a second would be good, though. I ended up using an animated GIF to get the speed I needed. StuRat (talk) 17:32, 20 July 2014 (UTC)[reply]
OpenGL is supposed to be a general graphics library with support for 2D as well as 3D graphics. If you just want to blit a bitmap into a window without any fancy 3D effects, glDrawPixels will do that efficiently. Here's a complete example doing more or less what you want, though using GLUT rather than GLFW. It's quite similar to Finlay McWalter's SDL code. GLUT doesn't support event polling, so you would have to do your calculation in the glutIdleFunc callback (which could be a hassle because of the control inversion), or else use GLFW which does support polling. -- BenRG (talk) 05:26, 20 July 2014 (UTC)[reply]

July 20

--Jessica A Bruno (talk) 18:19, 23 July 2014 (UTC)[reply]

July 21

What is the difference between formulas and algorithms?

If you take a formula, for example, Celsius Fahrenheit conversion, you can apply it step by step, and somehow fulfil the definition of algorithm (something that's finite and step by step to solve a problem). At least, with an intuitive interpretation that makes sense. Is the difference just the way you express things?OsmanRF34 (talk) 09:03, 21 July 2014 (UTC)[reply]

"Formula" usually means a mathematical equation or something similar. Evaluating a formula is indeed a simple algorithm, but algorithms can be more complicated: in particular, they can include ways to vary the sequence of actions, similar to "while" or "if" statements in a programming language. --50.100.189.160 (talk) 10:35, 21 July 2014 (UTC)[reply]
An algorithm is a series of steps to solve a problem or perform a task. A formula is a series of steps that takes an input and produces an output. In your example, the formula requires a Celsius input and produces a Fahrenheit output. The algorithm is the series of steps requires to solve the problem.
The articles on formula and algorithm should help. --  Gadget850 talk 12:18, 21 July 2014 (UTC)[reply]
A formula is a kind of minimalist algorithm - but it only encompasses arithmetic operations. An algorithm can be much more than that. For example, I can say that the algorithm for making a phone call is:
  1. Pick up your phone.
  2. Make sure it's turned on.
  3. Touch the phone button.
  4. Dial the number
  5. Wait for the caller to answer.
That's an entirely valid algorithm - but it would be impossible to express it as a formula. That said, as you pointed out, the Celsius to Fahrenheit conversion formula is indeed a very small algorithm.
So a formula is a kind of algorithm but an algorithm isn't necessarily a formula. There is another sense to it though. A formula can trivially be described as an equation 'F=Cx9/5+32' - and an equation can do something that an algorithm can't - you can use the standard rules of algebra to discover that 'C=(F-32)x5/9' - which means that you had a second algorithm (one that converts Fahrenheit into Celcius) contained within that very same formula. So in that sense, a formula (by it's very simplicity) is capable of conveying information that a generalized algorithm may not. This becomes increasingly clear as you consider equations with more unknowns in them. Ohm's law (I=V/R) effectively contains the description of three algorithms...I=V/R, V=IR and R=V/I.
The name of the FORTRAN programming language is short for "Formula Translation" - and it was first envisaged as a means to convert formulae into algorithms. That capability (to type in a formula into your computer program and have the compiler or interpreter of your software convert the formulae into algorithms) is now such a standard feature that we tend to forget that it's there. SteveBaker (talk) 14:37, 21 July 2014 (UTC)[reply]
  • There is obviously some overlap, and sometimes some ambiguity between the terms, as others have pointed out. One additional conceptual difference is that formulae are essentially declarative, while algorithms are essentially procedural. For example F=ma is a declarative statement, without any necessary action. Steve's example algorithm is a set of procedures, with no declarations. There is also an analogy to programming language paradigms, List_of_programming_languages_by_type has examples of declarative and procedural languages. SemanticMantis (talk) 15:47, 21 July 2014 (UTC)[reply]
It might be instructive to compare "equation" to "equation solving." These terms have a similar relationship like "formula" and "algorithm." Of course, in common parlance, these kinds of related terms can be applied in a variety of ways, blurring their dictionary-definitions and defying all efforts to draw a distinction among them. Nimur (talk) 16:41, 21 July 2014 (UTC)[reply]

Malware

Some time ago, during the World Cup playoffs, I picked up a virus that keeps plaguing me with popups advertising all kinds of things. It also makes my browser, Firefox, go back TWO pages when I hit the back arrow, and throws up unwanted/weird pages on my screen. Fortunately, Wiki seems relatively unaffected by these ploys. But when I'm visiting other websites, such as Reuters, BBC, AP, AOL (mail) it drives me crazy.

I reloaded AVG, and it keeps killing malware, but that keeps coming back like a metastasizing cancer. I've done innumerable AVG scans, which have isolated such things as Malsign.Generic.6E2 and Trojan Horse, but the problem continues.

Suggestions? Should I remove Firefox and reload it? Help!

TNX. Sca (talk) 16:32, 21 July 2014 (UTC)[reply]

If your machine is compromised, you need to completely re-install it. There is no way to confidently assert that any type of anti-malware or anti-virus software can ever possibly restore the machine to proper working order. If you'd like to dive in to the technical details regarding why antivirus software is completely unable to confidently assert that the malware is gone, we can explain in more elaborate detail. But, as this 2012 StackOverflow discussion also emphasizes, it is better if we just phrase it this way. "It will take longer and cost more money and cause more collateral damage if you correctly run anti-malware software than if you cleanly wipe and re-install your machine." The most rational choice, to minimize your time, effort, and data loss, is to wipe the machine and re-install it. The next course of action is your choice. Nimur (talk) 17:05, 21 July 2014 (UTC)[reply]
I've heard this general advice from several sources — not only this time, but a couple years ago when a PC of mine got infected. At that time I considered buying a Mac (Apple) laptop, which though expensive avoids the whole problem of viruses written for (IBM-type) PCs and their ilk. However, a hand-me-down Toshiba laptop became available, and I've been using it for a year and a half in a stationary position with an external monitor and keyboard. Until now it was fine.
I've just finished running a Malwarebytes scan on it and now must decide whether to tell it to quarantine all the dozens of items it found. Any suggestions? Sca (talk) 21:25, 21 July 2014 (UTC)[reply]
Could you describe these weird/unwanted pages to us? We may able to determine what it's trying to do then. -- 140.202.10.134 (talk) 21:33, 21 July 2014 (UTC)[reply]

Method in Java

I have a confusion with System.out.println() regarding its not taking methods with void return type. i mean why cant i call a method inside S.O.P that returns void.? i browsed it on web but did not come up with relevant answers.182.18.179.2 (talk) 19:18, 21 July 2014 (UTC) I got what Finlay Mcwalter pointed but what with the answer that Println has overloaded versions of object type.i need more clarity.182.18.179.2 (talk) 06:22, 22 July 2014 (UTC)[reply]

System.out.println() will only print java.lang.Strings, or things that can be converted into strings. For built in things like int, it knows how to do that itself. For everything else (things that are objects) they have to provide a toString() method. println calls that method to string-ify any objects it's passed; if those objects' classes don't themselves implement a custom toString, it falls back on the rudimentary one in java.lang.Object. A void function isn't returning anything, so there's nothing for println to ask to turn itself into a string. Javac's solution to this little kōan is to error with "void type not allowed here". -- Finlay McWalterTalk 20:10, 21 July 2014 (UTC)[reply]

Thanks very much@ Finlay Mcwalter.182.18.179.2 (talk) 06:22, 22 July 2014 (UTC)[reply]

A small correction to the above: println can print things other than Strings because it is overloaded. Such as println(boolean), println(double) and println(int). Your friendly documentation will give you a list of the overloaded versions. 88.112.50.121 (talk) 21:50, 21 July 2014 (UTC)[reply]
No, Finlay's answer was correct. Java does not use operator overloading. The argument will be converted to a String using its implementation of the toString method. Primitive data types, like boolean, are first promoted (for example, to java.lang.Boolean objects); and then the toString method is called. See, for example, Chapter 5 of the Java Language Specification.
Java's System.out object is a special instance of java.io.PrintStream object, and that object has no "overloaded" method for println( primitive data type ) : it only has the methods defined in its class definition. Nimur (talk) 22:49, 21 July 2014 (UTC)[reply]
Java's lack of operator overloading is obviously irrelevant since println isn't an operator. Java does support method overloading, and the page you linked shows that println has overloaded versions for primitive types as well as String and Object. So Finlay McWalter and 88.112.50.121 were both correct, but your reply seems to make no sense at all. -- BenRG (talk) 02:35, 22 July 2014 (UTC)[reply]
println does indeed work by method overloading (on call type signature). Latterly (in 2004) the language introduced autoboxing; where data of elementary types can be automatically autoboxed into a corresponding java.lang.Integer (etc.) object. That's what Nimur describes. They could now choose to implement println that way instead of all those different method signatures:
public class foo {
    static void print(Object o){
        System.out.println(o.getClass().getName() + " : " + o.toString());
    }

    public static void main(String[]args){
        print("hello");
        print(12);
        print(12.3);
        print(true);
        print('c'); 
    }
}
which works well. But println still has explicit methods for int, bool, etc., and we can verify that if they're found the compiler will preferentially use them, rather than autoboxing to an object, by adding:
    static void print(int i){
        System.out.println("native int : " + Integer.toString(i));
    }
...and we note that the int is printed by our new method rather than the Object one. There's a little wrinkle - so is the char (as its ASCII value 99) - because the compiler decided it was more appropriate to promote the char to an int rather than autobox it to a java.lang.Character -- Finlay McWalterTalk 09:28, 22 July 2014 (UTC)[reply]

thank u again @Finlay Mcwalter and Nimur.now,i can understand clearly.182.18.179.2 (talk) 17:09, 22 July 2014 (UTC)[reply]

There's no deep reason for it. There are languages (such as ML) whose equivalent of "void" is a type like any other: you can have variables of that type and print values of that type and so on. In ML the type is called "unit" and has a single value, written (). In Java the value could have been called void or something. Java copied the void quasi-type from C, which also treats it specially. C++ had to preserve the C behavior, which causes problems with templates (equivalent of Java generics). I can't see any reason why Java had to preserve it too; they probably just didn't think to change it, along with other questionable C design decisions, like the left associativity of ==. -- BenRG (talk) 04:03, 22 July 2014 (UTC)[reply]

Thanks everybody for the reply.182.18.179.2 (talk) 06:22, 22 July 2014 (UTC)[reply]

Java is a call-by-value language. You don't call anything "inside System.out.println" Asmrulz (talk) 16:47, 22 July 2014 (UTC)[reply]

Uexpress topics in URL

I asked here why it was possible to access Dear Abby topics, and topics by other columnists on Uexpress with or without the URL that included the topic. In fact, I could change the date, with the topic left in, and I would still get the column for the particular date. The answer was that part of the URL at the end was always going to be ignored, but having the topic in the "official" URL would help in searches. This seems like something Wikipedia should address in one or more articles, so I was wondering where to do this and what the sources might be.— Vchimpanzee • talk • contributions • 19:21, 21 July 2014 (UTC)[reply]

As to the first part: the URL article discusses that part of the URL (the "path") and simply says it "is used to specify and perhaps find the resource requested". It's left implicit that the server has licence to interpret the path in whatever way it chooses. Some servers and websites may implement common ways of doing things, and some people may have formed the misapprehension that these are actually how all URLs must be interpreted (e.g. that HTTP URL paths necessarily relate to file paths on the server; or that all parts of the path are necessarily significant; or that different paths must reference different resources), but as your Dear Abby, and my Amazon, example shows, sites can (and do) choose do work in different ways. As to the second part: it'd like to see a reference that supports the claim (that path fragments actually have SEO value); I suspect that it is not true. -- Finlay McWalterTalk 21:00, 21 July 2014 (UTC)[reply]
So there's no Wikipedia article that actually states the last part of the URL is ignored. And I knew the SEO claim had to be controversial and would need a source before I added that.— Vchimpanzee • talk • contributions • 21:06, 21 July 2014 (UTC)[reply]
The part of the path is ignored specifically on the Dear Abby website only; the first part is ignored specifically on Amazon only. On most other sites, the whole path is significant. It doesn't seem like it's encyclopaedic for a Wikipedia article to enumerate how each individual website chooses to handle its own paths, any more than it would be to list what default fonts each website might elect to use. -- Finlay McWalterTalk 21:15, 21 July 2014 (UTC)[reply]
No, of course it's not encyclopedic to say this is done and this is done for each web site. I was thinking more about "some" web sites do this. Obviously it would have to be sourced.— Vchimpanzee • talk • contributions • 21:33, 21 July 2014 (UTC)[reply]


1 Facebook like? Rob Ford

Hi all... I was on the official campaign website of Rob Ford, infamous Toronto mayor, and it links to a Facebook campaign page. It has one like. Is the Chromebook that I'm on acting up, or would that be true? I find that stunningly low. -- Zanimum (talk) 21:31, 21 July 2014 (UTC)[reply]

He has 2 likes just now. The Page was created on 2 Feb 2014, but appears to have been idle until 19 July 2014 (3 days ago). Still, I'd expect there to be more likes. CS Miller (talk) 10:57, 22 July 2014 (UTC)[reply]
Yes, if only from comedians, appreciative for all the material. StuRat (talk) 12:25, 22 July 2014 (UTC) [reply]

Thanks! Even the most random of no hope, non-notable mayoral candidates has more than Ford, I was sure that it was a glitch. -- Zanimum (talk) 19:08, 22 July 2014 (UTC)[reply]

It has four likes now. I don't see a FB page listed at Rob Ford mayoral campaign, 2014. I even searched the source text of the article thinking that it might be in some reference somewhere and didn't find mention of FB. My guess is that it's not actually his page and was just created by some fan of his who has done nothing to promote it to even their friends or relatives. As far as I know, FB has no "confirmed" status process to confirm that a page is actually run by the person or company that the page is about. So, there's nothing stopping everybody and their brother from creating a page for any celebrity or politician. Dismas|(talk) 03:16, 23 July 2014 (UTC)[reply]
Actually if you hover over the blue tick, it says it's a verified page (I don't know how long it's been verified). See [5] for Facebook's explaination of what this means and how it happens (it's basically up to Facebook, you can't request verification). Also AFAIK, our external link policy means we frequently only link to one official link Wikipedia:External links#Official links. I haven't checked our article, but the most logical place to link to would be the official website [6] which does link to the Facebook page, as well as Twitter, Google Plus and Youtube (I don't know for how long). BTW it's up to 7 likes now. Nil Einne (talk) 15:18, 24 July 2014 (UTC)[reply]

July 22

Rip off of the deleted website by the FBI

I heard there's a website containing survey when somebody downloads a file and it's a rip off of the old Megaupload website that was shutdown because of Copyright Infringement. It's called megadown.us that was not created by KimDotCom. Should wikipedia have articles about survey protected file hosting websites like FileIce or something like that?--HappyLogolover2011 (talk) 04:29, 22 July 2014 (UTC)[reply]

There's a large volume of such websites, and related, that are fading into, and out of, existence and usage all the time. Most are not in any way notable, nor do most have any pertinent sourced information pertaining to them. If one is the subject of media reports, and becomes notable, then that specific site might be worth adding an article on - or, perhaps, an article on the topic of such sites, if sources can be found - but, in general, there is very little compelling reason to give these sites articles.Phoenixia1177 (talk) 04:57, 22 July 2014 (UTC)[reply]
Some of the websites that has the contact button or whatever may not let us go to that page and find their info, but we can however trace the site's IP address.

Update: Fileice's IP address to the site is 66.252.2.22, the domain name that it uses is PROXYSHIELD.gigeservers.net and it was founded in Arlington Heights, Illinois.--HappyLogolover2011 (talk) 05:24, 22 July 2014 (UTC)[reply]

Not only is this information not really overly interesting on its own (as in, there wouldn't be much point to putting it in an article in the first place), but I don't see why this site, or any other like it, are notable enough to be included as articles. Is this site the subject of a news article? Several articles? etc.? If not, I see no reason this should have an article, is there a reason you believe it should? Finally, the reference desk really isn't the place to discuss this - to be honest, I'm not active enough on the other parts of Wikipedia to tell you what would be the place to discuss it, sadly.Phoenixia1177 (talk) 06:02, 22 July 2014 (UTC)[reply]
Wikipedia: Help Desk, probably. But no, nothing seems notable here. I wouldn't bother, Logolover. InedibleHulk (talk) 06:18, July 22, 2014 (UTC)

VoIP - two questions

I have two questions about VoIP:

  1. When I use Skype, there is a long delay, almost as long as when they were talking to astronauts at the Moon. My landline has no noticeable delay. Does VoIP have that delay?
  2. On my landline, I can talk and listen at the same time, as with a normal conversation. Does VoIP allow that, or can you only do one at the time? Bubba73 You talkin' to me? 07:29, 22 July 2014 (UTC)[reply]
Skype is VOIP. They are all different, and the delay can be dependent on the Internet speed of both participants, as well as any intermediary server that the VOIP is running through. Zzubnik (talk) 08:32, 22 July 2014 (UTC)[reply]
Indeed. I imagine some people with fibre connections and decent VoIP systems probably have lower average latency for medium distance calls (albeit neither being noticable) and probably longer ones too (presuming they're using a dedicated provider with decent routing, not just routing them randomly over the internet). And just because you're using your landline doesn't mean there's no VoIP somewhere in the system. I suspect in the modern world, the longer distance the call, the greater chance there's VoIP somewhere in the system. (Remember VoIP is just voice over internet protocol and has nothing to do with the internet per se.) Nil Einne (talk) 14:29, 22 July 2014 (UTC)[reply]
Not answers, but related comments:
1) Using satellites to communicate, especially the much farther out geosynchronous satellites, can cause this "satellite delay", as even at the speed of light, there's a noticeable delay in sending info that far. Undersea cables, on the other hand, are much shorter, and therefore faster. Of course, this all assume you are talking with somebody on the other side of the world.
2) Duplex (telecommunications) allows sending info both ways at the same time. However, you need a headset that isolates the speaker from the microphone, or they need to take steps to electronically prevent audio feedback. StuRat (talk) 12:34, 22 July 2014 (UTC)[reply]
No citations or sources, just based on my own experience:
  1. I do not experience a delay when using VoIP (Skype in my case) between developed countries. I did experience a delay while calling home from the middle of nowhere in Africa though.
  2. I've never noticed an inability to do duplex over VoIP - not even on a laggy line. If the line is lagging it can get confusing if both speak at the same time though.
WegianWarrior (talk) 14:30, 22 July 2014 (UTC)[reply]
Thanks to all of you. Duplex is the name for what I was talking about. In a traditional telephone, the mice and receiver are far enough apart so that feedback isn't a problem. The natural delay to and back a satellite is less than 0.25 second, but the delays now are longer than that. I've been Skyping to 800-900 miles away, and the delay is quite bothersome. Bubba73 You talkin' to me? 20:49, 22 July 2014 (UTC)[reply]
The path traveled by the signal might be far longer than the distance between sender and receiver. Both signals may go to a central hub, far away, and then sent on their way. Beyond that, there may be delays for processing the signals, and an overloaded system may put your signal in a queue until resources become available. StuRat (talk) 22:51, 22 July 2014 (UTC)[reply]
Processing definitely takes a long time. Back in the days of analog TV, when they would have a satellite hookup across the ocean, there wasn't nearly as much of a delay as there is now. And I can flip from a HD TV channel to its non-HD version, and the HD version is a long way behind the other one. Bubba73 You talkin' to me? 00:50, 23 July 2014 (UTC)[reply]

July 23

Editing from a Laptop

Recently I have been sometimes editing Wikipedia Dell laptop (Windows 8) with a mouse. It is frustrating. Sometimes, when I have an editor box open, I have tried to use the mouse and select text or to focus, and discover that a substantial amount of previous text (either my own or that of another editor) has blanked out. The only remedy that I have found if I have blanked another editor's text is that I have to leave the page. Restoring the deleted text would be harder than cancelling and trying again. My main question is: What can I do to prevent this blanking of text? This is one of two problems that I have that seem both to be due to the mouse focus moving. The other is having the focus change so that inserted text does not go where I had been entering it. What causes the mouse cursor to move, and what should I do about it? Robert McClenon (talk) 02:50, 23 July 2014 (UTC)[reply]

If the laptop has a touch-pad at the bottom of the keyboard - then probably you're inadvertently dragging your hand across it as you type. Both the mouse AND the touchpad are in control of the cursor - so this is an easy mistake to make. I don't know much about Windows 8 - but it ought to be possible to disable the touchpad somehow. SteveBaker (talk) 03:21, 23 July 2014 (UTC)[reply]
Thank you. Can someone else tell me how to disable the touchpad? Robert McClenon (talk) 03:55, 23 July 2014 (UTC)[reply]
My mom bought a Windows 8 Dell like that. The problem was it came with an unhelpful feature that made touching the trackpad click things, too. This might be what's happening when you think you're just selecting, but moving text out of the window instead. I think that was simply solved in the Control Panel, by unchecking a box ("Tap to click" or something). That's probably around where you'll find the option to disable it completely. InedibleHulk (talk) 05:10, July 23, 2014 (UTC)
I think that I have managed to disable the touchpad. At least I don't have the cursor moving randomly and eating things. Robert McClenon (talk) 05:38, 23 July 2014 (UTC)[reply]
Every laptop with a touchpad has a simple way of disabling it. On mine it is Fn-F8 (i.e., hold down the Fn key and press F8). Look over your function keys and see if you see a symbol that looks like a touchpad with a slash through it -- if so, that will be it. If it isn't there, look over the rest of your keyboard. Looie496 (talk) 15:00, 23 July 2014 (UTC)[reply]
Maybe I don't recognize any of the symbols as a touchpad with a slash. I disabled it from the Control Panel Mouse dialog. Robert McClenon (talk) 15:06, 23 July 2014 (UTC)[reply]
It might be a touchpad with an X in it Dell Instructions. ---- CS Miller (talk) 18:35, 23 July 2014 (UTC)[reply]

Thunderbird versions

Thunderbird just went from version 24.6 or 24.7 to 31.0. Why skip over major version numbers? Bubba73 You talkin' to me? 04:05, 23 July 2014 (UTC)[reply]

Firefox is currently at version 31.0. I suspect it was at version 24.x when Thunderbird was last updated. -- BenRG (talk) 04:14, 23 July 2014 (UTC)[reply]
Why do Firefox and Thunderbird need to have the same version numbers? I can see it with, say, an office suite, where you would want the individual programs to have the same version number. Bubba73 You talkin' to me? 04:16, 23 July 2014 (UTC)[reply]
Because version numbers give a certain expectation to users, so much that even completely unrelated softwares from different companies have jumped version numbers to "catch up" to their competitors, when they've upgraded to the same level of functionality. I can't remember the specific instance, i'm sure someone can chime in, but i think it happened in linux land where, for example, red hat who upgrade their software on a frequent basis made it to version 12 by the time some other linux flavor version only made it to version 6, but, that they were based on the same linux kernel and had essentially the same functionality, it's just that red had had performed their updates twice as frequently, so company B decided to release their "version 6" as version 12, since it was directly competing with red hat 12. Same thing probably happened here, thunderbird probably receives fewer updates as firefox, but it's based on the same technologies and is the same "generation" of software and has comparable security features etc... calling it thunderbird 24 when their flagship software is up to version 31 makes it "sound" like thunderbird is miles behind. Vespine (talk) 04:44, 23 July 2014 (UTC)[reply]
Thunderbird and Firefox are both based on Gecko. So, whatever version Gecko is, that is the version that both Thunderbird and Firefox will be. 209.149.115.166 (talk) 14:04, 23 July 2014 (UTC)[reply]
Thanks, Gecko must be this: Gecko (software). I didn't know they had so much in common, since their functions are so different. Bubba73 You talkin' to me? 21:48, 23 July 2014 (UTC)[reply]
Thunderbird 30 (...and earlier) were developer betas and were not marketed or advertised to the general community of users. From the developer mailing list archives, here is the May/June development plan for Thunderbird 31. If you subscribe to the developer feeds, or build your own Thunderbird from source - or if for some reason, you as an individual or organization have a special working relationship with the Mozilla development team - then you'll commonly have visibility into a lot more versions and forks than the well-advertised, widely-available, mass-announced general releases. But, the Thunderbird and Gecko code is still mostly open-source free software, so you can grab any version at any time. Nimur (talk) 15:09, 23 July 2014 (UTC)[reply]

Javascript function

Hi there, in Javascript I have a bunch of numeric variables, say a, b, c, d etc., and a procedure that takes any two variables, and changes both of them in a way that is dependent on both input values (for example, in a very simple case, a could become a + b, and b could become a − b). How do I create a Javascript routine to do this? I have a method at the moment that uses objects and "eval" statements, but it totally sucks, and it pains me to look at it. What is the elegant way to achieve this, given that I apparently cannot pass references to the numeric variables? 86.128.5.71 (talk) 11:25, 23 July 2014 (UTC)[reply]

Objects are passed by reference; so you can wrap those ints in objects, pass them, and mutations to their value are evident outside the function:
#!/usr/bin/nodejs

var add_and_diff = function (x,y) {
    var sum = x.val + y.val;
    var dif = x.val - y.val;

    x.val = sum;
    y.val = dif;
};

var a = {val:10};
var b = {val:20};
var c = {val:66};
var d = {val:99};

console.log('before:', a.val, b.val, c.val, d.val);

add_and_diff(a,b);
add_and_diff(c,d);

console.log('after: ', a.val, b.val, c.val, d.val);
Still kinda clunky, IMO. -- Finlay McWalterTalk 12:31, 23 July 2014 (UTC)[reply]
Thanks. I think this is slightly better than what I currently have, but it still means in the main code I have to refer to "a.val", "b.val" etc., rather than just "a", "b", etc., right? I find this a real nuisance. 86.128.5.71 (talk) 16:56, 23 July 2014 (UTC)[reply]
You could copy the values out of the struct like this, after which .val cannot be used.
var a = 10;
var b = 20;

a = {val:a};
b = {val:b};
add_and_diff(a, b);
a = a.val;
b = b.val;

console.log('after:', a, b);
Another way to do it, which might be cleaner, is to return an anonymous struct, and then copy the values out of it. CS Miller (talk) 20:14, 23 July 2014 (UTC)[reply]
Thanks, yeah, I know I can copy "a = a.val", "a.val = a" etc. back and forth, but it really sucks. Could you give an example of what you mean by the "anonymous struct" method? 86.171.43.119 (talk) 12:59, 24 July 2014 (UTC)[reply]
I was thinking of C. In Javascript all structs are anonymous, as Javascript isn't strongly typed. I was meaning code like
var add_and_diff =  function (x,y) {
    var _sum = x + y;
    var _dif = x - y;
 
    return {sum:_sum, dif:_dif};
};
This allows the function to return two values at the same time. CS Miller (talk) 18:10, 24 July 2014 (UTC)[reply]

July 24

Burning CD

What is the problem when one tries to burn an hour music to an audio CD and when they are finished only 25 minutes have been burnt in?--85.74.103.132 (talk) 03:03, 24 July 2014 (UTC)[reply]

I think it has to do with it wanting to burn the CD at a certain rate, and if the PC can't supply the data at that rate it runs out of music to record and just records a blank from that point on. You can lower the speed at which it writes the CD, to try to prevent this. However the CD you already recorded can't be saved, unless it's an erasable CD. StuRat (talk) 03:39, 24 July 2014 (UTC)[reply]
Also, make sure the source is on a local hard disk, I've seen this happen if you try to burn directly from a USB key or from a network drive, or even another CD drive. Vespine (talk) 06:41, 24 July 2014 (UTC)[reply]

Lang subcodes case sensitive?

In some of my websites I use the language code <html lang="en-gb"> which normally seems to pass the various validation checks. However I have now come across Powermapper which objects to this coding. After some puzzlement, I worked out that it would accept en-GB, with the subcode in upper case. Is this actually required by the standards, or is Powermapper being excessively pedantic? --rossb (talk) 07:57, 24 July 2014 (UTC)[reply]

For HTML4, the spec says "Names of character encodings are case-insensitive". HTML5's spec points us to IETF's BCP47 recommendation, which says "At all times, language tags and their subtags, including private use and extensions, are to be treated as case insensitive: there exist conventions for the capitalization of some of the subtags, but these MUST NOT be taken to carry meaning". W3C's advice on language internationalisation says "Although the codes are case insensitive, they are commonly written lowercased, but this is merely a convention". The only place I see a requirement about case is where a document has both xml:lang and html lang= tags (where it's a transition from XHTML to HTML5) where the case is required to be the same in both formats. -- Finlay McWalterTalk 10:38, 24 July 2014 (UTC)[reply]

hacking via php

I am a php beginner and on my first day my tutor hacked my gmail password using a small php script(approx 5 to 6 lines) and then he deleted it. i requested him to tell me for knowledge purpose but he didn't. i am wondering is hacking passwords so easy with php scripts?.i browsed on web but couldn't find anything reasonable. will anyone please clear that if something so easy exists in php or it was just a trick(may be he had some software installed on his laptop).182.18.179.2 (talk) 15:08, 24 July 2014 (UTC)[reply]

thanks for the reply Finlay Mcwalter, but i think i should have been more precise with the question the first time.actually, he wrote the code and saved in "htdocs" folder like normal procedure is and executed it in "localhost" then a page displayed with my username and password and he told that he had sent a request to "server".he also had a connection established to google and (through this) he tried to tell us that security depends upon coder's logic and not just this language is more secure and other not(between java and php here).182.18.179.2 (talk) 19:10, 24 July 2014 (UTC)[reply]

Things probably went something like this:
  1. he copied the gmail login page (e.g. by downloading it with wget or curl)
  2. he wrote a little PHP program that showed that page and waited for you to type your password
  3. then he tricked you into accessing that site (maybe he just typed it in for you, maybe he messed around with the machine you were using to alter its DNS or proxy-server settings)
  4. you didn't properly check that the connection was secure and signed by google
  5. you typed your password in, and inadvertently sent it to his fake site
So he didn't hack Gmail with PHP, he hacked you with social engineering. -- Finlay McWalterTalk 15:23, 24 July 2014 (UTC)[reply]
Well, Phishing to be exact. KonveyorBelt 16:24, 24 July 2014 (UTC)[reply]
As a general rule, one should never enter any kind of password into a machine that you don't trust (and for things that are really important - like banking - that you don't have total personal control over). He could have easily installed a keylogger, or could have altered the browser's settings (or its code) so that even if the site appeared to be an https connection properly signed by Google's certificate, it wasn't. -- Finlay McWalterTalk 15:28, 24 July 2014 (UTC)[reply]

text 'Chapter # ' missing before chapter in latex

I do not know much about Latex. I have written a thesis with the help of a sample thesis. But i have some problems. For example, the name my thesis first chapter is 'Preliminaries', But in table of contents only 'Preliminaries' is written rather than '1 Preliminaries' and first chapter starts with 'Preliminaries' rather than 'Chapter 1 'in next line 'Preliminaries'. base class of my thesis is 'book', I m using class file with no preamble file. — Preceding unsigned comment added by 39.35.150.202 (talk) 16:08, 24 July 2014 (UTC)[reply]

We may need more information about how you've set up your work. How are you adding the chapters? I presume you're doing something simular to me and not writting one big long document in one file. In my thesis to get the behaviour you are describing I used
\addcontentsline{toc}{chapter}{Abstract}
\input{Abstract.tex}
which gives the Abstract and no number in the table of contents, but for the main section I used
\include{Introduction}
which give 1 Introduction in the table of contents (As I named the chapter the same as the file but you can have different chapter headings). Dja1979 (talk) 19:08, 24 July 2014 (UTC)[reply]

Right or Left alignment for filenames in Windows7 folder

I have an open folder in Windows7 with "View Mode" set to "details"-view.
Can I somehow toggle between Left and Right alignment of the filenames?
-- 46.15.238.85 (talk) 19:01, 24 July 2014 (UTC)[reply]