Quick Way to remember Variance Analysis Equations
Thursday May 21st 2009, 8:20 pm
Filed under:
University
For all of you who need a bit of help with their Variance Analysis equations (BMAN10632) here is a simple way to remember them, discovered by me and Vikash 13 hours before the exam, procrastination champions :p
Just in time for the exam I know
hehe
With the exception of Sales Volume (see vi) the rules to follow is
i) If the variance deals with money paid into the company
Variance = (actual - flexed) x something (see iii)
If result is positive the variance is favourable
else the variance is adverse
ii) If the variance deals with money paid out of the company
Variance = (flexed - actual) x something (see iii)
If result is positive the variance is favourable
else the variance is adverse
iii) If you looking for volume :
something = the actual unit price/rate
of the variable factor ure looking for
else if you looking for price :
something = the actual unit quantity/volume
of the variable factor ure looking for
iv) For Sales Volume Variance the formula is :
SVV = (actual units sold - budgeted units sold)
* contrib per unit [from orig. budget]
v) Actual Profit = Orig. Budget + Fav Variances - Adverse Variances
I hope this helps
Share with who-ever needs help.
Getting First Image from Wordpress Post, Without Killing Your Server
Sunday May 03rd 2009, 5:59 am
Filed under:
Opinion
OK, so over at OnThisIsland we had a problem arise from the fact that our first-image-fetching function was killing our server. We had warnings flying in from our hosting company, and pages slowing down to unbelievable speeds. After a bit of investigation we realised that on each archive, home or search page, this function was called about 10 times, making it search through 10 different articles to find the image EACH time it loaded.
What we did was make it store a custom field automatically on its first load. (We also made it return a default image as we were using timthumb.php to resize images on the fly and didnt want to resize externally hosted images).
Here’s my version to get the first image from an article. Its partially based on the Wordpress Recipe and some ideas of my own. Hope you find it useful.
<?php
function getImage($post){
$externalimage = get_post_meta($post->ID, ‘external’, true);
$gthumb = get_post_meta($post->ID, ‘gthumb’, true);
if ($externalimage==”TRUE”){
$returnimg = “http://www.yoursite.com/default.png”;
} else {
if ($gthumb==”"){
$szPostContent = $post->post_content;
$szSearchPattern = ‘~<img [^\>]*\ />~’;
// Run preg_match_all to grab all the images
// and save the results in $aPics
preg_match_all( $szSearchPattern, $szPostContent, $aPics );
// Check to see if we have at least 1 image
$iNumberOfPics = count($aPics[0]);
if ( $iNumberOfPics > 0 ) {
for ( $i=0; $i < 1; $i++ ) {
$img = explode(”\”", $aPics[0][$i]);
$returnimg = $img[5];
// ==> Added to combat server performance.
add_post_meta($post->ID, ‘gthumb’, $returnimg, true);
};//end for
};//end if no. of pics more than zero
} else {
$returnimg = $gthumb;
}; // end if gthumb is set
}; //end of if externalimage
return $returnimg;
}//end function getImage
?>
And so the first year ends…
Aint blogged in aaaages, but hey I kinda been kept busy with Erasmus Parties, OTI, group projects and general uni.
As I pack my last few belongings into my bag and storage boxes, I realise I gna miss the wonderful land of Whitworth Park and the neighbours I would annoy day and night. So this is my bye bye to my dear Burleigh Massive lol and i hope to meet up with you all (even those i wont be living with :p)
Then we get my dear Erasmus friends, all of you who came into the lives of us as promoters and fellow party-boozing animals… I will miss you and do hope you all decide to escape from the obviously boring lives u have back home, to join us for some parties next year
Thats about it really, as those who know me know I am not very good at expressing emotions at all, let alone writing bout them.
See you who I do in September, and take care of yourselves.
Looking for Jane…
Ready to scare or impress? Or already in the Halloween spirit? Manchester’s halloween parties started off well into last week with the scarErasmus party at Tiger Tiger and several other parties throughout the weekend at clubs like the Attic, Sankeys and 5th Ave.
But halloween is only tomorrow and I’ve already seen some very impressive outfits throughout the city, from axe murderers to alleged ‘first time’ cross dressers. Although impulse dressers did party in horns and wings (some of which had the bodies to get away with only that) I was left impressed with the ammount of effort put into other costume ideas. I personally wore out a tarzan costume (being from South Africa I was aiming more for the African Warrior look but hey) and almost froze my cahones off, but it was well worth it, although several pieces of my costume did go missing, and if you are holding a piece of it, keep it, just let me know where they wound up
That brought me to my problem at hand, I never found any woman (or man :s ) dressed as tarzan’s other half, Jane. So if anyone see’s her, take a picture and send it to me. Lets see if there’s any daring young people who risked the cold for a good laugh.
South Africans in the United Kingdom
Monday October 15th 2007, 8:31 am
Filed under:
Rugby
Well being South African in England right now is pretty much like being a donut at a weight-watchers meeting, everyone knows you’re there but are pretending they have want nothing to do with you.
Many might ask wtf I’m on about, but with the count-down to the Rugby World Cup finals drawing even closer, being played this Saturday, both English and South African fans are hoping for the win. However it’s a little bit more complicated being from South Africa and being in the UK as most your friends, fellow students and co-workers are probably English or more swayed to supporting the red striped guys, making supporting your team a tiny bit less appealing. I mean even I have been told that the game is a lose lose situation considering I live in a residence that 70% comprises of English students.
But this is my call to all South Africans living in this cold country… meet up with fellow Africans and be anywhere on Saturday wearing the green and gold… Show your colours because you know if we were back home, there would always be some Englishman wandering into the pubs/bars with that white kit on.
Come on bokke! Make us proud!
[and yes I DO realise this post will recieve a lot of anti-SA responses, but so will SA winning the World Cup
]