Jump to content

neylitalo

Staff Alumni
  • Posts

    1,853
  • Joined

  • Last visited

    Never

Everything posted by neylitalo

  1. I'm not entirely sure what you mean by "The first mistake I made violates [...] Fields in a relational database table should be related to each other but not be the same." Fields in a table should most certainly be related (in the less strict sense - they belong to the same thing), and they should most certainly not be the same, but I don't see how your layout violated that. The problems I saw with your original layout were a) Information about completely different objects were contained in one table, and b) Columns were being used where rows & id numbers would work much better. And it appears that you understand what you're doing now, so I'm wondering if you meant something else - can you explain?
  2. I think it would be more fun to just focus on the layout, colors, design, etc., of the website - just have them build a page or a few pages that demonstrate their design skills. Granted, functionality is huge in a website, but it would be a lot more fun creating and judging the aesthetically pleasing aspects of the website. So it would indeed be the visually/graphically "gifted" who are likely to win, but unfortunately, that's the way it goes sometimes. The point of contests is to see who's the best, they're not supposed to be an effort to make everybody happy.
  3. Three cheers for analogies! And thank you for your vote of confidence, cmccully, it's good to know that all that typing was good for something. :)
  4. Closed. This is already under discussion in http://www.phpfreaks.com/forums/index.php/topic,110264.0.html
  5. The PHP engine never sees that CSS file. The client's browser finds the file when it sees the <link> tag, and it never goes through the PHP engine - the client requests that file from apache, which delivers it just as it sees it.\ tomfmason's suggestion will almost work, but he's got a couple Apache directives and their syntax mixed up. The directives you would want to set would be either: [code]AddHandler x-httpd-php .css[/code] or [code]AddType application/x-httpd-php .css[/code] And you'll want to make sure that you set the variable $path in the CSS file - but since I think you're going for portability here, that doesn't make sense at all. It would make more sense to just hard-code it into the CSS file, since that's effectively what would be going on anyway.
  6. [quote author=redbullmarky link=topic=109986.msg446348#msg446348 date=1159911197] forget the flash, because i hate flash and its nothing to do with what i'm trying to reinforce here. [/quote] I hate Flash, particularly Flash 8... people just love to discriminate against Linux users. Either that or it's Macromedia/Adobe that's doing the discriminating. I haven't made up my mind on that. [quote author=businessman332211 link=topic=109986.msg446368#msg446368 date=1159912532] I would have said, but in another post obsidian told me it's best not to post how much someone is getting paid. [/quote] Hmm... I don't recall anybody asking how much you or someone else is getting paid, but rather asking why you're wasting time with this and not working on something productive. Let koolaidman manage the graphics, you work on the programming. Division of labor, friend... it's the idea that got the auto industry where it is today.
  7. I'm on a university's network, which has several OC3s directly to Chicago, and it still hasn't loaded after 30s...
  8. well, this thread is effectively useless... locked.
  9. Well, if you did actually purchase all those programs (except the free ones), then I say this: for shame. And if you indeed have them but didn't actually purchase them, then I say this: for shame.
  10. localhost always points to your current machine - I don't believe there's much you can do about that. But to access the website on 10.0.0.1 from 10.0.0.2, you would do: http://10.0.0.1/tst.php
  11. Yes, the sandbox does fix that. You just have to change the action="" attribute of your PayPal form. It normally points to https://www.paypal.com/something, but you need to change it to point to https://sandbox.paypal.com/something. I believe that's the URL, anyway - look around and you'll find it.
  12. [quote author=roopurt18 link=topic=109742.msg445495#msg445495 date=1159815079] You're not seriously going to stick 100 extra columns into your [b]test_questions[/b] table, are you? You're also not going to stick 500 extra columns into your [b]test_options[/b] table? [/quote] Oh, my... good catch. I completely missed the whole "100" thing in the column name. Get ready for lesson two of object oriented design. If I had to pick a concept that I thought of as the core of OO design, I think I would pick modularity. Most people with no training or experience know very little about modularity. Everybody should, and probably will, learn about it sooner or later, but it's much better to learn it via training than to spend the hours re-discovering the concept after realizing that there has to be a better way. Modularity is the idea that you build a system in parts, and connect the parts together, as opposed to building one great big system. I give to you an example, in hopes that it'll communicate better than just theories and ideas can, and it'll be a lot more fun. :) Legos. Or Lincoln Logs. Or Tinker Toys. We've all played with 'em. Castles were among my list of favorites, and it was not uncommon to stumble over the cities composed of docks, police stations, gas stations, and of course, the wild west-era Sheriff's office. (Let us not forget the little stick of Lego dynamite you put into the conveniently loose Lego brick to free Black Bart from the Lego jail.) All those toys are a prime example of modularity. How much fun would it have been if they had assembled them in the factory and then shipped them to you, made them as a single piece of plastic, or glued the Lincoln Logs together? And what if they had implemented a policy of making each particular set a different size, or used squares instead of dots on some Legos, and triangles on others? Had they implemented the "send it as one piece" idea, you would have had a log house or a plastic submersible, scientist locked inside with plastic. Had they decided not to make their toys universally interchangable, you would have had dozens or hundreds of Legos, Lincoln Logs, or Tinker Toys, but you certainly couldn't build the floor-sized log fortress or the ocean liner of Legos that weighed more than you did. But they decided not to make them like that. They chose to make their toys in [b]modules[/b]. That is, they were individual pieces that fit together if you asked them nicely, and you could do anything with them. If you wanted to add another wing to your castle, you could do just that. Everything worked with everything. They were designed to allow for future expansion, and for unlimited possibilities. One of the bonuses (purposes) of modularity is the... umm... modularity it provides. You can pick and choose parts to use. For example: What happens if you decide to build a new system that has questions, but not tests? If your questions are fully integrated into your test system, then you'll have to a) modify it, or b) make a new one, neither of which are particularly fun. However, if you modularized it from the beginning, you could say "Hey, I know! I'll just use the 'question' and 'answer' tables, and the systems I built for them!" And voila! you've got yourself another system with minimal work. If you've got any experience with *nix, then you'll know all about modularity - for example, the music players don't all have their own audio engine. They probably use a library that's been designed to be used in multiple different ways. For example, there's the libxine library. xine is a popular media library, and dozens of programs use it. Had it been integrated into a particular program, everybody would have to waste time making their own. Now that I've covered most of the ideas, let's see how you can apply this to your problem. I swear I covered this already, but you want your database table to be a representation of ONE type of object. [b]ONE.[/b] Not two. Not seven. Not even if one type of object belongs to the other. Tests in one table, questions in another, answers in another. They are completely different objects. They do not belong in the same table. You can have questions without tests, tests without questions, and questions without answers. This fits into the "bits-and-pieces-are-better-than-one-big-blob" part of modularity. You want them [b]separate[/b]. Keep them as their own individual units. This will allow you to pick and choose which parts to use for a particular implementation. You're definitely not allowing for future expansion. What happens if you decide that you want to add an extra hundred questions, and randomly pick half of them, to mix it up a bit? I think that's a fairly reasonable feature. You would have to go into your table and add 100 extra columns to the already cluttered table. Let's see how many headaches that would bring on: One for creating the columns, maybe two or three. I just developed carpal tunnel thinking about all the mouse clicks and typing. And then, don't forget the headaches that would come from updating, inserting, and everything else. Who wants to type a query to insert 100 values into a row? "Not I", said the cat. Any time you find yourself about to create more than 15 or 20 columns in a table, you'll want to seriously try to find a better way to do it. I imagine there are a few applications that it might be easier with all those columns, but it's certainly a very small number. And so, as I find myself falling asleep at the keyboard, I just want you to do one other thing. Use your common sense. Common sense should tell you that you don't want to type out queries to insert 100+ values into a row. Common sense should tell you that it's not always going to be the same, and that you should allow for the future. Excuse me as I retire for the night - I want to be able to finish my life-size Lego giraffe in the morning.
  13. Let's keep this thread dedicated to critiques, please don't resolve your misunderstandings here. Thanks! And businessman, I have one comment: In many (most?) circles, a person's wage or salary is extremely personal, and should not be discussed in public. I, personally, don't even like discussing my wage with my close friends, and would much less appreciate it if one of them decided to tell someone else about it. I think your mention of your associate's wage was rather inappropriate. If your associate has no qualms about it being on the web, then I guess it's kinda ok... but keep that in mind, in the future. It's definitely one topic you want to handle with kid gloves.
  14. http://www.thinkgeek.com/tshirts/science/8964/ [img]http://www.thinkgeek.com/images/products/zoom/pluto.jpg[/img]
  15. Well, it all depends on what you can afford to pay him, and what, if anything, he wants to be paid. If the numbers match up, then go for it - but make sure that you couldn't do better on your own. I know that I could reproduce any one of those products in The GIMP, given 15 or 20 minutes, and I'm no graphic designer. Make sure that he'll be able to provide something that's worth what you're paying for it.
  16. good eye, I hadn't noticed that one - I think that'll solve effigy's problems.
  17. [quote author=Daniel0 link=topic=110170.msg445031#msg445031 date=1159767638] Hmmm, makes it annoying to check filetypes. That makes us having to depend on the extension I guess. [/quote] Which is almost as useless as not checking filetypes at all, unfortunately. If your script is going to be published on a *nix system, then you might be able to find a way to use exec or passthru to run file on the uploaded file, but that'll only work if a) safe_mode is off, or b) safe_mode_exec_dir allows you to run programs in /usr/bin, or wherever file is located on that particular host. Which is rather unlikely.
  18. [quote author=businessman332211 link=topic=110161.msg445017#msg445017 date=1159763920] then more like 20 hours total.  10 hours per day, 2 days. So yes that was a typo, it would actually be 20 hours total working.  Maybe 3 days, I told him give me until wednesday, and I would see what I can do, that is 30 hours, minus 5 hours per day for other projects, that's 15 hours total.  I doubt it but it's worth a shot, he atleast wants most of it operational by then. [/quote] Well, if you think you can do it, then I'll say "Go for it." Go for it. And I'm pulling for you - in the words of one man: "Git 'er done." Oh, how I hate that saying.
  19. hm... 72 hours is three days' worth, are you sure that wasn't a typo? And that still leaves the question of whether or not they are consecutive hours or billing hours. It makes a huge difference - 48 working hours is considerably different than 48 consecutive hours. :) (Unless, of course, you can work for 48 hours straight...)
  20. In order for that to happen, phpfreak would have to pay Google every time someone clicked an ad for ServerPowered... and that wouldn't make much sense, now would it? :) To answer your question a bit more completely: The only ads that are going to show up in the Google Ads are for companies that are paying Google for the ad service, so yes, it is all on Google's side.
  21. [quote author=phpfreak link=topic=110155.msg444884#msg444884 date=1159737938] Thanks, our contract is per impressions, not per click. So thanks for unblocking them :) [/quote] Can you explain what makes an impression different than a click? I haven't any experience with hosting Google Ads.
  22. [quote author=akitchin link=topic=106377.msg444853#msg444853 date=1159733002] descent = best.  game.  ever. [/quote] I wouldn't go that far - top 10, maybe. UT2004 is #1 on my list.
  23. this is starting to look like an advertisement - take care that it doesn't keep going down that road.
  24. Hm... I always found the PL/pgSQL documentation quite good - look here? http://www.postgresql.org/docs/8.0/interactive/plpgsql.html However, I have to ask - have you actually created the function? All the PL/pgSQL procedures I've written, I stored in an SQL file and then \i filename.sql with psql to actually create the function. If you've done that, you may want to change the " to ' in your CREATE FUNCTION statement - postgres uses ' to quote values rather than ".
×
×
  • 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.