Jump to content

btherl

Staff Alumni
  • Posts

    3,893
  • Joined

  • Last visited

Everything posted by btherl

  1. Dude, I'm not trying to disprove anything I am talking about something different to what you are talking about. Both of us are correct. End of story. How you interpreted what I said was not the way I meant it. Do you get what I was saying? Imagine a 2-dimensional plane. You can view a 2 dimensional plane as a 2-vector with corresponding operations, or as a single complex value with corresponding operations. The corresponding operations are different in each case. That's a different thing from what you are talking about. You are talking about a 2-vector of reals vs a 2-vector of complex values, which gives 4 dimensions in total. We are talking about different things.
  2. Let's say you have this data (I'm making it a date for simplicity) RecordID SaidTime 1 2007-12-01 1 2007-12-10 2 2007-12-05 Now you group it by RecordID and order it by SaidTime. What order will the results be in, and what will the value of SaidTime be for each RecordID?
  3. SQL uses =, not == The other issue is that you are ordering by a column which you did not aggregate. If there are 2 rows with the same RecordID but different SaidTime, which should it order by? Try this query: $GetAppeals = mysql_query("SELECT reportedusers.RecordID, MAX(reportsituation.SaidTime) AS MaxSaidTime FROM reportedusers,reportsituation WHERE reportedusers.FrozenBy != 0 AND reportedusers.RecordID = reportsituation.RecordID GROUP BY reportedusers.RecordID ORDER BY MAX(reportsituation.SaidTime) ASC")
  4. Can you explain in more detail? Please say exactly what you do, and exactly what messages pop up.
  5. It may well be the hosting. Even if you successfully fwrite() and the udp packet is sent, the host may still block it and you will never know. You'll need to ask your host if they allow that (and hope that they know enough about networking to actually give you an answer!) You can just say "I am trying to send a udp packet to port x on ip x to test if a server is online. Is this allowed by x hosting company?" Given that your code works on your own pc, I would assume it's an issue with the hosting.
  6. You could try adding sleep(1); before calling fread(). That will wait for 1 second before checking for data, which might make a difference. I would also try a 10 second delay as well. If neither of those work, it's back to the drawing board.
  7. There's no such thing as "connection refused" with udp, as opening a udp "connection" actually does not communicate with the server. Given that, it's possible your packet is being blocked (or the return packet is being blocked) even though the connection succeeds. One thing you may want to try is waiting before doing the fread(). Perhaps there's some problem with the fread() not blocking like you expect it to.
  8. I was talking about a 2 dimensional plane using either cartesian mathematics or complex mathematics. Or put another way, the choice of a single complex number or a vector of 2 real numbers. What you're talking about appears to be vectors of complex numbers vs vectors of real numbers. I get your point that vectors of complex numbers can express more than a vector of real numbers of the same size. What I claim is that a single complex number cannot model the same things that a vector of 2 real numbers can model, using the standard operations.
  9. Can you provide some evidence to back up that claim that complex mathematics models strictly more than cartesian mathematics? I'm not going to let you define additional operations other than the native multiplication and so on, because if that is allowed, both systems become equivalent. Put another way, both have the same domain but have different native operations. That is why they model different problems.
  10. Cartesian mathematics isn't false, it just models different things to what complex mathematics models.
  11. It's weird because complex multiplication acts quite differently from real multiplication. And because the square root is the number (or numbers) such that multiplying it with itself gives x, the behaviour of square root depends on the behaviour of multiplication. And the weirdness of complex multiplication comes from i*i=-1. That means that a number on the imaginary axis multiplied by another number on the imaginary axis takes you to the negative real axis. And that IS weird.
  12. Good to see you've solved it That's why it's a good idea to execute the queries as well as echoing them out. If you echo only, then you don't get any of the side effects that may come from executing the queries, and that can give you misleading results.
  13. What happens if you both echo and execute the queries? Can you do that and copy and paste the exact queries that it prints out so we can examine them?
  14. corbin, your answer is here Note that in general, sqrt(zw) != sqrt(z) * sqrt(w) for complex numbers z and w. That rule only works for real numbers, and for the special case of extracting i from a negative square root.
  15. Here's the code I use header('Content-Type: text/csv; name="' . $filename ); switch ($disposition) { case 'attachment': header('Content-Disposition: attachment; filename="' . $filename . '"'); break; case 'inline': default: header('Content-Disposition: inline; filename="' . $filename . '"'); break; } Inline will attempt to display in the browser, attachment will attempt to prompt for download. What actually happens will depend on the browser. Remember to quote the filename.
  16. What you've stated is a range of solutions .. it's much easier to work with something precise. For example: 1. Spread the gaps so that each is exactly 1.7 times the previous gap, allowing for fractional numbers 2. Round each fraction to the nearest number. Then you'll get something which is within your tolerance range (well I haven't checked this, I just picked 1.7 at random), but is exactly specified, and therefore easy to program. Does that kind of thing sound suitable? If so, we can look at deriving a formula that takes start, end, number of steps, and the multiplier (1.7 in the example) and produces the steps.
  17. I don't know if this helps for what you want to do, but "SHOW CREATE TABLE tablename" will give you the command to create a table. Then you can just edit the name and execute that command.
  18. You need to seperate * and the rest of the select list with a comma, like this: SELECT *, IF(Sender='$ID', Receiver, Sender) as otherPartyID
  19. Mysql identifies user by connection. A new script will use a new connection, therefore a new transaction. You do not need a transaction name. If 2 users call your script and each starts a transaction, mysql knows the difference. It will not mix them up.
  20. If you terminate the mysql connection without committing, the transaction will be rolled back. Think about it from mysql's view .. it doesn't know if your transaction is complete until you say "commit". So if you stop without saying "commit", it is better for it to abandon all changes than to possibly commit partial changes. If the changes conflict with each other, then usually one script will get an error, the other will complete normally. If the changes do not conflict, both scripts will succeed. If you commit for one user, it will not commit another user's transaction.
  21. overlib might be appropriate here. You can use it to pop the large image in a div without interfering with your pages layout at all.
  22. Oh .. I get it. You are generating php code. You can do something like this: $code = "$data[0] = 'foo';"; eval($code); print $data[0] . "\n"; But really, it would be better if you rewrote the program logic so you didn't need to do something so awkward.
  23. What teng84 cryptically referred to is this: echo htmlentities('<script type="text/javascript"> the script inside here</script>'); The call to htmlentities() will protect your code from being interpreted by the browser.
  24. What I'm asking is if the problem is that onunload is not running, or if the problem is in your Open4() function. You can determine which of the two it is by trying an alert instead of Open4().
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.