-
Posts
5128 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Events
Everything posted by Dave
-
On a sidenote, ports range from 0-65535 (this is the range of a 2-byte integer). If you wanted to forward all of the ports to one computer (not recommended as it's a big security risk), then you need to set up a DMZ. Most routers have this capability; it's just a matter of finding it in the options.
-
The problem sounds like your DNS servers aren't working properly. I know that I had a similar problem with my old router (before I switched to using a dedicated machine to route my traffic). Established connections won't be dropped, but you won't be able to resolve any IP addresses and hence you won't be able to connect to the machine. You might want to try saving the IP address of something static, like http://www.google.com. Then, when it happens again, ping that IP address. If the ping works, then your DNS servers are down and it's probably your router that's playing up. My suggestion would be to make sure that your /etc/resolv.conf file contains the IP addresses of your ISP's nameservers, and make sure that dhcpcd doesn't overwrite that file (if you're using Gentoo it's a simple matter of configuring /etc/conf.d/net correctly).
-
Of course, this is all completely useless if the user chooses to save the image to their hard-drive.
-
The thing is, it's not all that useful for general usage. The only time you're going to see any benefit from it, in my opinion, is when running big scientific applications or doing something like compiling software (distcc is quite good for this).
-
After posting this, I realised that it might not be clear what I mean by "level sets", so here's a follow-up. Consider the function [imath]f:\mathbb{R}^2 \to \mathbb{R}[/imath] defined by [imath]f(x,y) = x^2 + y^2[/imath]. (This is called a paraboloid; it looks like the surface generated by y = x2 rotated around the z-axis). Now, whilst its possible to graph this function, it's handy to use it as an example to show what level sets are. The idea is to look at the plane parallel to the xy-plane, and adjust its height to build up an image of what the graph does. This is particularly easy for this function. Solving [imath]f(x,y) = c[/imath] we get the equation [imath]x^2 + y^2 = c[/imath]. This clearly defines a circle with radius [imath]\sqrt{c}[/imath] if c > 0, and if c < 0 then we get no solutions (i.e. the graph doesn't exist). So basically, as we move the "height-gauge" up and down the z-axis, we build up an image of what the graph should look like. You can extend this idea by another dimension, but instead of curves, you're going to get some kind of surface. This is pretty much the only way I know of getting a good idea of what the graph actually does.
-
A much easier way (on the eye) to "plot" 4-dimensional graphs is to take the level sets. For example, if you have some function [imath]f(x,y,z)[/imath], then its graph is a subset of [imath]\mathbb{R}^4[/imath]. However, if you consider the set: [imath]f^{-1}© = \{ (x,y,z) \in \mathbb{R}^3 \ | \ f(x,y,z) = c \}[/imath] then it's easy to plot this since it lies in [imath]\mathbb{R}^3[/imath]. One can then plot the set for various values of c and get a general idea of the behaviour of the graph.
-
UK keymaps usually have them on the same key as the # key, located next to the carriage return key.
-
That has to be the understatement of the century.
-
You can set x to be equal to (pretty much) anything as long as you change the limits. A typical substitution might be something like [imath]x = \cos\theta[/imath].
-
Oh God, not another one of these threads. Please, for the love of the most Holy One, read the substantial thread on this that already exists, otherwise I run the risk of having to gauge my eyes out with a rusty spoon.
-
I can't agree with quite a lot of it, simply because the author clearly has a death-wish against the language. Personally I find the language to be very intuitive (minus a few things, such as passing multi-dimensional arrays via functions). One of the key points that he is apparently making is this: Without meaning to sound like I'm contradicting myself; this is the entire point of C++. The reason that you are able to do so many things in C++ is because you're not overly constrained by the limits of the language. A part of this is, of course, lack of an all-singing, all-dancing standard library like you'd find in C#. I don't find that a problem, simply because of the plethora of libraries out there to help you along the way. The nice thing about C++ code is that it's reusable. I spent a fair amount of time creating a class to implement general PDE solving methods. Today, it's taken me less than an hour to get a fully functional psuedo-spectral solving method going, with an X plotter and various other doodads. Basically, if you're willing to put in the time to create proper code, then the rewards will be great. As for your point about tutorials taking a long time; I don't deny it. Heaven knows I spent many, many hours getting to grips with the basics of C and C++, but it was definately worth it. I find that with something like Java or C#, you are abstracted too much from the actual mechanisms going on, and it's very easy to get lazy and make silly mistakes. I don't get that a lot with C. Java's nice. I know that at my university, and many others, it's the language of choice because it gets the ideas of programming behind the student without having to actually worry too much about stuff like memory management. However, I don't really rate it purely because of the speed issues. I can get much, much faster and responsive code from many other languages, and so I tend to use other things. It should be noted that this is being used more and more (along with .NET) in enterprise solutions. I'm not a big fan of all that so I'm going to keep my mouth shut, but that is potentially one area to which C++ is not suited. Anyway, that's my two cents worth.
-
There's an awful lot of mathematical trickery out there. That doesn't mean that it's true. Clearly there's no way that 4 > 5, unless of course you're considering some crazy field other than the reals which has a different ordering. But since he's talking about logs, you can pretty much discount that. Bottom line: ignore him
-
I don't have the time to sit down and decode this, but it does look somewhat like a Caesar cypher; in which case it's simply a matter of decoding, say, the first line with a variety of permutations of the alphabet until you get one that looks like it might make sense. If not, the standard method is to analyse the small word and try to guess what they are. You're lucky in that this is quite a long ciphertext, and hence there's quite a few small words in there that you should be able to guess. Maybe I'll try and write some code (C++) for this later if I'm bored
-
Potentially, you can make pretty much any program you care to choose in C or C++, simply because they are two of the most powerful languages around (well, strictly speaking they're the "same" language of sorts). There's an awful lot of flexibility, and because of that there's quite a fair margin for error.
-
Oh, I don't know. LyX is pretty good, and does proper LaTeX rendering.
-
When you say "only an internet connection", do you mean a modem, or something else? Chances are you're going to have to either buy a USB LAN adapter or PCI NIC card. The second option is really cheap (under 10 GBP for me); not so sure about the first.
-
Well, use your brain a little. For a start, you can immediately disclude all of the even numbers since 2 divides any even number. There's millions of articles on this; just do a search on Wikipedia and you're bound to find something. For your information, the "great question" you were talking about is a formula for generating the n'th prime number. This is currently an unsolved problem.
-
Not a problem
-
I can post working if it is needed, but you should get to a point where you have to calculate [math]\sum_{n=1}^{\infty} \left( \frac{1}{9} \right)^n[/math]
-
I get a somewhat different answer of [math]\frac{11\pi}{96}[/math].
-
Yes, there are mathematical objects which posess the property of having a non-integer dimension; you've probably heard of them before because they're called fractals. In fact, one can think of a fractal as something which has a non-integer dimension (I'm sure others would disagree since there's no good description of what a fractal is, but this is beside the point). A nice easy example of why one might consider using a non-integer dimension is given by the Koch snowflake (google for it and you'll find the appropriate construction). If you go ahead and measure the perimeter, [imath]p_n[/imath] at the n'th step, you'll notice that [imath]\lim_{n\to\infty} p_n = \infty[/imath]. But if you measure the area at the n'th step, [imath]A_n[/imath], [imath]\lim_{n\to\infty} A_n < \infty[/imath] (I can't remember the exact value off the top of my head). This would seem to imply that the Koch snowflake is somewhere in-between one and two dimensions. Interestingly there's several ways of measuring the dimension of a set (more precisely, a metric space I believe). As Atheist mentions, there's the Hausdorff dimension. But there's also the box-counting dimension, Lyapunov dimension, and a number of other things as well. It's a little confusing at first, but well worth putting the time in to study these objects. Fractals like the Mandelbrot Set are amazingly complex and yet are easily generated from something like a simple quadratic map. I hope this helps a little bit. PS: If you want an "easy" fractal to get you started, take a look at the (middle third) Cantor set. It's just about the easiest you're likely to come across..
-
That's a nice little problem; reminds me somewhat of the Koch Snowflake. I might have a go at it in a bit and see if I can confirm your answer.
-
Have to say that this is just going one step too far. My own personal opinions on abortion aside, women should have the right to choose whether or not to keep a baby. Banning abortion outright is just not the right thing to do.
-
For this type of thing I use PHP for simplicity. The streams make it extremely easy to grab the contents of a webpage and then use something like preg_match or similar to get rid of all the useless stuff with a simple regexp. I highly recommend that you do not do this for something like your bank balance. It's a recipe for disaster, and you can be really screwed over by it.
-
CSS/positional question -- height of one div = height of another div
Dave replied to Dak's topic in Computer Science
Well, there's no actual way of making the toolbars the same height. The fact of the matter is though that you don't need to, as long as you can make it look as though they are the same height. I will try and make an example for you a little bit later, but right now I'm fairly busy so I can't. If I don't get back to you, just PM me and I'll try to come up with something.