I am trying to optimize the speed of a query that calculates bias/mean absolute error of forecasts against observations. The forecasts are issued hourly, and make hourly forecasts to the 48th hour. Furthermore, there are about 20 different forecast methods. On top of that, there are 12 different...
Ignore last post. If I could edit posts here I would have.
-> Turns out it was indeed the input being messed with. I was using an AJAX script to pass the username to the server, and I was using encodeURI and not encodeURIcomponent which seems to have fixed the bug. Thanks for your help...
I'm a dumdum, I should have just forced input. I didn't think my scripts were physically changing input, as for some reason the + and & characters are being converted to whitespace. I'll have to look into it more.
Out of curiosity, do you have to escape the '-' character in '/[^A-Za-z0-9]/'...
I'm trying to write a preg_match function that matches invalid characters in an input (in this case, a username). Here is the function:
if ( preg_match('/[^A-Za-z0-9]/', $username) ) { error; }
Based on the regex, the if-statement should return true when it matches a character other than A-Z...
I've been coding in PHP too much lately, and have really fallen short on the HTML/CSS/JScript standards of today. My goal is to have a website that conforms to the HTML 4.01 Strict standard (I do not plan on using XML unless "AJAX" operations that do not return XML- ie. just simple HTML, are...
Ahh, I couldn't help taking a shot at M$.
Anyway, the thing worked, and I'll keep the suggestion in mind. It surprises me that the Error Console didn't pop a warning about having the same names, it's been pretty helpful in getting those bugs.
Appreciate all the help guys.
Ironic, I might have the same problem as him then. I'll have to go off and change my hidden "action" variable which controls 100% of my site to usraction or something because poor little IE can't tell the difference between a form element and a form field based on syntax.
Thanks for finding...
Hate to double post, but I can't see an edit link on my own above.
I changed the function again based on monksnake's suggestion:
function preview_post() {
document.getElementById("postform").action = 'submain.php';
document.getElementById("postform").d.value = 'preview';
w =...
I changed the code accordingly and received the same error.
New code for "preview_post()":
function preview_post() {
document.forms['postform'].action = 'submain.php';
document.forms['postform'].d.value = 'preview';
w =...
Hello, my script is rather simple:
function preview_post() {
document.postform.action = 'submain.php';
document.postform.d.value = 'preview';
w = window.open('submain.php?d=preview','previewwin','scrollbars=yes,width=500,height=600');w.focus();
document.postform.target = 'previewwin'...
What about for percentage values? If you look at that code, (and if I were to show you others), it's the FIELDSET code that seems to jump out of bounds.
I believe this problem happens in a lot of browsers, even in IE for Mac. The tables basically explode, going to a width of 2000px or more. However, these tables are confined in a div:
<div style="position:absolute; top:96; left: 33; width:750;">
which is properly closed at the end of the file...
You can also try to have JavaScript print out the list, to save filesize (and bandwith) on your system, but such scripts are difficult to ensure on all Browser platforms.
How would I set that to 1, if I'm not a Server Administrator (ie. is there a runtime function to set it to 1? Since I am not sure if the administrator will set it up for everyone on the server)
And why would you consider it a security risk? (Besides the obvious fact that users can submit any...
Hi,
I am building a site that makes use of PHP Sessions. Obviously, PHP will transmit the PHPSESSID (The Session ID) to a cookie to identify users, however, I've noticed some users have been experiencing bugs, and if cookies aren't enabled, the PHPSESSID won't be placed in the cookie. Is there a...
Just a question that might help someone else. Did you try and do other things with the number 100? Like:
$n = 0;
while($n < 100) {
$n++;
}
echo "Loop ended successfully.";
Hi.
I am creating a system that will use both MySQL and the $_SESSION variable, and there will be data that users carry as they navigate the site, in fact, a lot of data. Some data will change a lot, some will not. I have an idea of what to throw into MySQL, and $_SESSION, but there is some data...
Hmmm, that trick worked, but it skips the tab order, where some people press tab, and want to get on that checkbox (Weird yes..) so it sacrifices user friendliness. Its a great script though and I compliment you on it, unfortunately I can't really use it.
http://www.seto-kaiba.com/tidir/login.php
-Note the Username/Password Entry. I want the Checkbox/Radio Button to have a similar format, a simple box, with no beveled appearance. and no background color around the box. Rather, a smaller, box version of that field. I looked all over CSS places but...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.