Se encontraron 274 coincidencias

Actual Results

Post Posted: Septiembre 2nd, 2011, 9:46 am

It would probably help if you explained what you mean by 'freeze columns/panes'. Also, what part should be frozen? Why aren't they frozen now?

Finally, is this for layout? Tables should only be used to display tabular data. Using tables for layout is the epitome of doing it wrong.

Post Posted: Junio 22nd, 2011, 4:50 am

I'd do something like this: [php]public function logged() { // Note, no 'global'. Why? Because our user object should // have a reference to the db. 'Global' breaks // encapsulation, one of the main components of OOP // Checking if the user is logged in the session table $sql = $this->db-...

Post Posted: Junio 20th, 2011, 7:51 am

You need to swap your quotes around:
PHP Código: [ Select ]
"SELECT * FROM users WHERE email='$email' AND pass='$pass'"
Variables are only interpolated if the entire string itself is double-quoted. You'll also need to fetch your results as mysqli_query simply returns a resource. Finally, you can't mix...

Post Posted: Junio 19th, 2011, 3:59 pm

This: Each field may contain more than one value, in which case they will be seperated by a comma. Makes me think you should read this: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Comma-separated values in a column is generally a sign you're doing it wrong. This is espec...

Post Posted: Mayo 22nd, 2011, 1:34 pm

A sheet of paper is fragile yet a telephone directory can stop a bullet. Look beyond the weakness of the language and examine its strengths. It took me a week, couple of nights without sleep and coffee so thick you could slice it before I figured out how to do this :lol: . When I have enough posts ...

Post Posted: Mayo 21st, 2011, 8:39 am

[javascript]//Javascript Document function checkform(form) { var errors = new Array(); if (form.occupation.value == "") { errors.push("Please enter your occupation."); } var gender = form.elements["gender"]; var genderCount = 0; for (var i = ...

Post Posted: Mayo 20th, 2011, 11:40 am

Your mistake is that you keep redefining your checkForm function over and over again. The end result is that only your last definition of the function, which checks the last input, actually exists.

You only need one checkForm function. Combine what you have.

Post Posted: Mayo 17th, 2011, 1:33 pm

*eye twitch at more 'global' parameters*

You may want to look into dependency injection for this kind of thing.

Post Posted: Mayo 17th, 2011, 1:31 pm

Both are used to facilitate polymorphism. Abstract classes and interfaces create is-a relationships. If a class implements a particular interface, or extends an abstract class, then an object of that class is also considered to be an instance of that interface or abstract class. Unfortunately, since...

Post Posted: Abril 1st, 2011, 5:35 pm

FWIW, using a member's registration timestamp as a salt is pretty common. It's unique, and unique to each user. Even better, if you keep that date hidden to everyone except that user when viewing the profile, it's impossible to guess. No one's going to want to brute force every second from the epoch.

Post Posted: Enero 20th, 2011, 12:08 pm

That still doesn't stop you from passing your config variables in through a function's argument list. When you have a function like:
Código: [ Select ]
<?php function doSomething($arg1, $arg2) { global $configVar; // code that does something } ?>
You're hiding the fact that the function needs your c...

Post Posted: Enero 19th, 2011, 1:28 pm

Exactly right. Globals lead to coupling rather than reduce it. They, by definition, break encapsulation. They're a crutch, and in the vast, vast majority of cases, a sign of poor design. See also: http://www.ozzu.com/programming-forum/classes-interfacing-php-t97447.html#p546909 Even though the link ...

Post Posted: Enero 15th, 2011, 5:54 pm

That doesn't stop you from passing the variable in through the function's argument list.

Post Posted: Enero 14th, 2011, 3:44 pm

Gah, why are you using a global variable? Pass $sys_url through your argument list.
  • Ordenar por
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC