null == 0;
0 == "0x0";
null != "0x0";
Why?
<?php | |
/*************** | |
* | |
* My Wordpress plugin | |
* | |
*********************/ | |
$myvar = "Hello"; | |
function show_my_var(){ |
$("...").ajaxForm({ | |
beforeSubmit: function (arr, $form, options) { | |
if ($form.find(":input").jqBootstrapValidation("hasErrors")) { | |
return false; /* we just found errors, so don't submit yet */ | |
} | |
} | |
}); |
$(/*...*/).jqBootstrapValidation( | |
{ | |
submitSuccess: function ($form, event) { | |
$form.ajaxSubmit({ /* your jquery.form options here */ }); | |
event.preventDefault(); // stops the browser from submitting the form and loading a new page | |
} | |
} | |
); |
#!/bin/bash | |
apt-get -y -qq install google-chrome-stable netbeans compizconfig-settings-manager ntp | |
./server_packages.sh |
<?php | |
// src/Acme/SubscriptionBundle/Entity/Transaction.php | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Doctrine\ORM\Mapping as ORM; | |
class Transaction | |
{ | |
/** | |
* @Assert\Luhn(message = "Please check your credit card number.") |
/** | |
* @Route("/user"); | |
*/ | |
class Users | |
{ | |
/** | |
* @Route("/{user_slug}") | |
* @ParamConverter("user", options={"mapping": {"user_slug": "slug"}}) | |
* @Template | |
* @Secure("ROLE_ADMIN") |
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
# upgrade system, so you can add to ignore all updates later | |
sudo apt-get update | |
sudo apt-get upgrade | |
# remove your php, apache, etc | |
sudo apt-get purge apache2 php5 libapache2-mod-php5 # add here your server packages | |
# change repositories to raring (with backup) | |
sudo sed -i.bak "s/saucy/raring/g" /etc/apt/sources.list |