If a variable will always be a number, is there a performace loss by putting it in inverted commas?
for example
"SELECT prod.product_name FROM prod WHERE prod.id = '$id'";
Hi,
I've got google apps setup on my server with all the correct MX records etc, now i want to start testing it.
I want to use it for all automated
emails (registration, lost password
etc).
I'm testing on a localhost.
I'm referencing my js files before the closing body tag, hoping they will be parsed last (as they're not needed untill last). However when I analyse activity with PageSpeed in Firebug, the images seem to be requested last.
How can i make the images higher priority than the js?
I'm trying to install imageMagick but i've got practically zero server knowledge,
i don't get what this means:
You can easily install Imagemagick on
a cPanel by using cPanel script.
/scripts/installimagemagick will do it
for you.
what is this /scripts business, where do i type it? do i type it? what's this all about?!!!
http://geobaby.in/installing-imagemagick-on-a-cpanel-server/
for the last cell in a row i want to perform a different action:
this doesn't work:
$('td').each(function(){
var $this = $(this);
if ( $this === $this.parent().last('td') )
{
alert('123');
}
})
and neither does it if i remove .parent()
This data is for a holiday cottage's simple accommodation calendars.
The data is simple and stores dates when each cottage is booked.
The cols would be cottage_id, booked_from_date, booked_until_date and I would expect around 60 rows per user per year * 200-300 users.
I should put this is one table right?
I have an array of timestamps referring to the days when a holiday home is booked.
each timestamp is a round day.
I want to turn this into an array of 'begins' and 'ends' pairs for consecutive dates
Are there any php functions I should be aware of for writing this function?
Or does anyone have any pointers for this kind of thing?
thanks!
edit:
example array:
Array
(
[0] => 1273536000
[1] => 1273622400
[2] => 1273708800
[3] => 1273795200
[4] => 1273881600
[5] => 1273968000
[6] => 1274054400
[7] => 1274140800
[8] => 1274227200
)
where a day = 86400 (seconds)
Because windows xp renders certain fonts so poorly, i would like to detect whether the user is using that OS and add a class to the body accordingly.
I'm looking ideally for an html conditional statement or php $_SERVER var to do this
However failing that a piece of javscript along the lines of below would do
if(users_os === 'xp'){
$('body').addClass('xp');
}
What avenues should i be persuing?!!!
thanks!
If i have a php generated widget canvas and site's using the widget iframe it with $_GET parameters,
is there anyway to get the domain that's making the request to my canvas page (javascript/php?)?
ie - stop people using my widget that don't have permission...
Ok so I have about six of these calendars on page, so thats around 180 td items (1 for each date):
each td has an id that is equal to that day's timestamp.
the dates I want are the red ones (class of .booked).
So i need the fastest way to 'serialize' the ids for td.booked items, any ideas?
what's better in terms of being transparent to search engines:
putting an image inside an 'a' tag?
or
using a background image for the 'a' tag?
or another method i'm not aware of?!
Does die() successfully terminate the php script at that point or only with output bufferring?
would it be secure to do a:
if(!isset($_SESSION['logged_in'])){
die('you do not have permission to access this page.');
}
I was recently watching a google lecture on mysql and learnt that MySQL wont use indexes for LIKE '%foo' searches.
My site's 'live search' (ajax search) searches the column full_details(TEXT), should i create a reversed version like full_details_rev(TEXT) and index that?
Or should i not index large text fields at all?