Be a Supporter!
Response to: Image upload not working, mkdir php Posted November 17th, 2013 in Programming

At 11/2/13 09:15 AM, Lopas1 wrote: I'm guessing something is wrong with the folders considering the exact same code works perfectly with manually made folders.

As the 0777 part will be ignored on Windows, it's probably that which is not working on the webserver.

You should also consider the significant security implications of allowing people to upload files containing whatever they like with names of their own choosing into directories with permissions set wide open.

Response to: Erm... Help (html5 + Css3) Posted December 27th, 2012 in Programming

You have body set to 90%, and then the #nav and #container (and possibly others) also set to 90% - this means their width will be 90% of the container they are in, so they are 90% of the width of body.

They are also floated left, so you get all of their margin on the right side, hence a bigger space over there.
The apparently smaller margin on the left is a result of body, and the larger space on the right is due to the margins of both body and #container.

Response to: Erm... Help (html5 + Css3) Posted December 26th, 2012 in Programming

For the main content DIV or whatever you have, use:

width: 80%;
margin: 0 auto 0 auto;

Change width value to whatever you want, either percentage or fixed.

As for people with no CSS - they will get nothing and like it.

Response to: Database Stuff Posted July 31st, 2012 in NG News

At 7/31/12 11:37 AM, MikeyS9607 wrote: I don't understand from a programming point of view, like when you use an insert query in MySQL, does the server not pick it up till later?

If you can run an insert query, it's rather obviously NOT a read only database.

For read only, items are inserted into a normal database, then replicated to one or more read only ones. Read only being much faster when selecting data, which for a website is probably most of the queries.
When the replication process doesn't work properly or whatever, things appear to be missing even when they are not.

Response to: In This Thread We Love Python Posted July 1st, 2012 in Programming

At 6/30/12 04:51 PM, Diki wrote: Newcomers to programmers are very much a part of Python's target audience

Newcomers to programming are pretty much doomed.

The majority of modern 'programming' consists of importing vast excesses of baggageware from predefined libraries / frameworks / modules / whatever you want to call them, and then selecting a couple of things from it and calling it a program.

There is no understanding of how anything works, other than calling predefined functions and whatever.

The result - mediocre programmers ideally suited to a lifetime of employment slavery with any number of large corporations, turning out vast quantities of substandard bug ridden software and calling it innovation and progress.

Response to: Create a site with partner Posted October 4th, 2011 in Programming

At 10/1/11 02:38 PM, fyko-chan wrote: What do you know?
What will you do?
What do you expect the person that joins to do?

We all know the answers to that.
Nothing, nothing, everything and probably for free as well. Never going to happen.

Response to: Html Image Not Loading Posted September 20th, 2011 in Programming

At 9/20/11 03:22 PM, J-Rex wrote: It was made using a tutorial from w3schools.

While it is possible to do it that way, it will be a huge mistake learning that. Look for their tutorial called 'Using Div Elements' which is the correct method. Or one of the thousands of other sites with far better instructions.

Response to: Html Image Not Loading Posted September 20th, 2011 in Programming

At 9/19/11 08:33 PM, J-Rex wrote: I still can't get the image to work but I tried my hand at at web design. http://recklesstest.webs.com/Web%20Desig n%20Test.html

Tables are not used for layout.
Unless you are time travelling and it's actually 1997.

Response to: Code's not working Posted September 3rd, 2011 in Programming

At 9/2/11 07:25 PM, preffertobedead wrote: What IDE is that one? o_O

www.vim.org

Response to: Code's not working Posted September 2nd, 2011 in Programming

Where the red arrow is - one of those brackets should be at the end.
Otherwise that last else is only called if $step is something other than the three wanted values.

Code's not working

Response to: Need programmer for a simple forum Posted August 16th, 2011 in Programming

At 8/13/11 04:15 PM, NESGeek wrote: It doesn't even require a user login system, those are too much of a hassle.

In that case you can expect to spend all of your time removing the vast quantities of spam postings which will be made.

Response to: Keyboards Posted August 8th, 2011 in Programming

At 8/6/11 03:51 PM, Jon-86 wrote: I normally use an ancient IBM keyboard, big, white, with klunky keys.

Keep it.

So if anyone has used one of them and now use a nice new ergonomic keyboard. Can you tell me if the difference it noticeable

Certainly is - 99% of new keyboards are junk.
Keep the old IBM one, and if it should break, then you can still buy new ones - search for 'unicomp keyboards'.

Response to: "Paper" a new tool I made Posted July 28th, 2011 in Programming

At 7/26/11 08:39 PM, mholmes wrote: Works great on linux and other OS's as well as Windows.

Does not work on Windows XP.

"Paper" a new tool I made

Response to: [Perl] Appending Zeroes [Help] Posted February 28th, 2009 in Programming

The original code only works if the decimal part does not start with 0.

Assuming that time() will return 10 digits before the decimal point and up to 5 digits after it, and the result wanted is a 15 digit number, then use this:

sub get_stamp {
return sprintf("%0.5f",time())*1e5;
}
Response to: Axis hosting's latest scandal Posted August 7th, 2007 in Programming

At 8/7/07 07:52 AM, Rustygames wrote: You know by the sounds of things I dont think she intends on giving me the domain, just "access" to it

For the rustygames.com domain, does this work:
1 go to http://cp.stargate.com/ForgotPassword.js p
2 enter your email address to have a new passord sent by email
3 log in at http://cp.stargate.com with the new password
4 change the details to whatever you want?

The email address registeredfor the domain doesn't look like it belongs to the hosting company (see whois details for it, not posting that here)

The Locked part should not matter, this is just to stop other people transferring the domain elsewhere without the owners permission, but as you are the owner you should be able to Unlock the domain from the registrars control panel and then transfer it wherever you want.

Response to: Know a good web host service? Posted January 29th, 2007 in Programming

At 1/29/07 09:36 AM, Eoewe wrote: Why wouldn't you leave your computer on?

Electricity costs - a 200W PC will use 1752 units of electricity per year if left on 24/7.
Even at 8 cents/unit that is $140 per year.

Response to: Image Uploads Mysql or directly... Posted January 29th, 2007 in Programming

Reference is much better, as the image will then be cached by the users browser.

Storing it in the database would require more processing to display the image, and the browser will request the data again every time the page is loaded, increasing page load time and using far more data transfer (= larger monthly fee for YOU!)
While you could code a script to check in the database for the last modified time and deal with the relevant 'Last Modified' headers, 304 response code and so on, why bother - the webserver already has all of that built in.

Having the image in the database will also result in a higher load on the database server and pages will take longer to display, as however good the script is, it won't be as fast as the webserver serving up a static image.
This won't be a problem on small sites, but as the site grows, the problem will become worse.

Response to: Rage's gift to you: Abusive reviews Posted December 28th, 2006 in Where is / How to?

Not abusive, but not wanted either:

http://www.newgrounds.com/portal/readreview.p hp3?pagea=1&pageb=-1&sort=date_mr&user_id=983 015

:Do not flood the review title or body. Examples would be long strings of characters or words with no breaks "HAAAAAAAAA", or repeating words or phrases over and over.

Response to: Top 2,000 Exp Users Posted November 28th, 2006 in Where is / How to?

Top 500 - What exactly is going on here?

All the rankings below this person are showing as 1 lower than the actual NG rank. There are also 2 people at position 499?

Top 2,000 Exp Users

Response to: Why Does Windows Cost So Much? Posted November 28th, 2006 in Programming

At 11/28/06 02:26 AM, Jordan wrote: I'm building a new PC, and decided to look at how much it would cost me for windows xp.
I was hoping to get xp pro, but the price of home edition is way too much already! £200!

That high price is for the retail version, which is NOT what you want if you are building a new PC.

http://www.savastore.com/products/components/ ms-sbuilder/
is the correct version for a new PC.

The expensive retail versions are for the unlilkely set of people who 1. know nothing about PCs and 2. somehow have a PC without any version of WIndows installed on it, and 3. expect that they will be calling up Microsoft for help with every little problem, hence the high price.

Response to: mysql_fetch_assoc(); + mysql_num_ro Posted November 18th, 2006 in Programming

This can't be right:

if($hash == $hash && $conf == yes && $exit == 1){

Redundant code - $hash will always equal itself. What exactly was this supposed to check?

As for the updating problem, this:

$upres = mysql_query($sql);

should be $upres = mysql_query($update);

Response to: Rage's gift to you: Abusive reviews Posted October 14th, 2006 in Where is / How to?

At 10/14/06 01:33 PM, ixfd64 wrote: I don't really see what's abusive about some of the reviews. Perhaps the bad ones were already moderated.

The bad ones get removed very quickly now, so most of the links only have abusive reviews for a short time.

Some more here:
http://www.newground..&user_id=1501494
http://www.newground..id=23992&page=10

Response to: Editing multiple html files at once Posted October 11th, 2006 in Programming

At 10/10/06 04:10 PM, Dominicc2003 wrote: isn't there some free program I can use?

If you just want to find/replace text across multiple files, use this:
http://www.fitsoftware.com/replace/

Response to: valid html help Posted August 28th, 2006 in Programming

At 8/28/06 04:07 PM, RAWRoutLOWD wrote:
Please take a look and explain to me what the errors mean. I'm especially confused with: "document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag". So if you can give me some tips or any sort of help, I'd greatly appreciate it. Thanks a lot!

Most of those errors are because you have not closed the paragraph immediately before these elements. Add a </p> to the end of the paragraphs and this will fix most of these errors.

Response to: Perl/cgi: Sending An E-mail Posted June 22nd, 2006 in Programming

open(MAIL,"| /usr/sbin/sendmail -t -O ErrorMode=m");
print MAIL "Content-Type: text/plain; charset=us-ascii\n";
print MAIL "To: Name <email\@example.com>\n";
print MAIL "From: Name <email\@example.com>\n";
print MAIL "Subject: Message From Website Script\n\n";
print MAIL "Body text for the email goes here\n";
close(MAIL);

If you don't have sendmail, change the first line to whatever your system has.