If user input is inserted into an SQL query directly, the application becomes vulnerable to SQL injection, like in the following example:
$unsafe_variable = $_POST['user_input'];
mysql_query("INSERT INTO table (column) VALUES ('" . $unsafe_variable . "')");
That's because the user can input s...
I am reading about mobile first and responsive design and I have a question about how you do it. I know you use media queries and so on, but what do you do with the actual content and markup? A desktop version of a website would potentially include a lot of markup while a mobile version only have some of it, would you use media queries and just display none/hide in the CSS?
Situation
You've got an abstract class, Consumer, that you'd like to extend. Consumer declares an abstract method consume(Argument $argument) which needs a definition. Shouldn't be a problem.
Problem
Your specialized Consumer, called SpecializedConsumer has no logical business working with e...
@Bracketworks Walking out the door right now, but:
user895378
I don't have time to go in-depth at the moment, but this is IMHO an important reason why it's better to prefer composition over inheritance. Your problem arises because you're trying to extend an abstract in the first place. My initial suggestion is to use interfaces instead of abstract classes, typehint the interfaces in your method signatures and compose functionality as necessary via the constructors. — rdlowrey1 min ago
@rdlowrey Thanks man; feel free to elaborate later if you want. I'm actually out the door myself :)
I guess the problem stems from the fact that I'm wanting to preserve the relationship between the Consumer and it's children/implementers; whether Consumer is an abstract base or an interface respectively, and unfortunately, this relationship involves a method which must change signatures between subtypes. I'll re-read the supplied wiki article (I've gone over it before) hopefully to some new understanding.
The wiki quote from my question, doctors and people, explains the situation perfectly, and the unfortunate mismatch in such modelling.
here is the code for the vernam cipher without modding with the key....... <?php $sparpad=array(array()); $i=0; $j=0; $col=0; $nemo="GOLD_FISH"; $second="PR5_E9ZBM"; $third="CQKT2_W3Y"; $fourth="1JU4A8_0X"; $fifth="LNV6_7_$@"; echo '<u>Vernam Cipher<br/></u>';
I'm working with smarty. I want to add if else condition in my .tpl file for nth-child li/div classes.
actually I've two image sizes. I want to use 600px image in 1st li, 400px in 2nd and 3rd and again 600px in 4th and so on.
currently I'm using css3 nth-child solution and using scaled 400px im...
It was like half year ago :D Documentation, translation, but I was told by Bjori it is not worth it (translating to inferior languages), at least you know German and by your name Russian I guess (everyone knows English). :) (I totally deserve to be nuked) Someone hacked Bjori's account? http://pokit.org/get/img/646e6e69984e9b7779c7c4026a1f0a2b.png :D
I will apply for patching stuff, in some other life...
nikic do me a favor, tell this to the person in context, coz i already sent a delete my account request... and do tell ircmaxel to come back and feel like a free man...