<?php | |
$db = mysql_connect ('localhost','root','12345'); | |
mysql_query('SET NAMES UTF8'); | |
mysql_query('SET character_set_client="UTF8"'); | |
mysql_query('SET character_set_cоnnectiоn="UTF8"'); | |
mysql_query('SET character_set_results="UTF8"'); | |
mysql_query('SET character_set_server="UTF8"'); | |
mysql_select_db ('blog,$db); |
<?php if($vimeo = $_product->getVimeo()): | |
$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$vimeo.php")); | |
$img = $hash[0]['thumbnail_medium']; | |
?> | |
<script type="text/javascript"> | |
jQuery(function($) { | |
$(".youtube-thumb a").fancybox({type:'iframe'}); | |
}); | |
</script> | |
<li class="youtube-thumb"><a title="<?php echo $this->__('Play Video') ?>" href="http://player.vimeo.com/video/<?php echo $vimeo; ?>?autoplay=1"> </a><img src="<?php echo $img; ?>"></li> |
<?php | |
function related_posts_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'limit' => '5', | |
), $atts)); | |
global $wpdb, $post, $table_prefix; | |
if ($post->ID) { |
$(document).ready(function(){ | |
$("#contactForm").submit(function(){ | |
return $("#contactForm").validate(); | |
}) | |
}); |
"I am your college professor that you requested, with a doctorate in Mathematics. I will break this down as simply as possible and end this debate as approx. 10 students have already asked me this today. The problem as it is written is 6÷2(1+2) , the ÷ cannot be substituted with a fraction bar because they have different ranks on the order of operations. It is an illegal math move to do this. The bar ranks with parentheses, ÷ is interchangeable with . therefore the problem must be solved as 6÷2(1+2) NOT 6 (over) 2(1+2) we do the parentheses first, so 6÷2(3), the parentheses are now no longer relevant, because the number inside is in it's simplest form. Every single number has implied parentheses around it. 6÷2(3) (6) ÷(2)(3) 6÷23, or even converting the division to multiplication by a reciprocal (a legal math move) (6)(1 (over) 2)(3) are all correct ways to write this problem and mean exactly the same thing. Using pemdas, where md and as are interchangeable, we work from left to right, so (3)(3) or 3*
<?php | |
$order = new Mage_Sales_Model_Order(); | |
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); | |
$order->loadByIncrementId($incrementId); | |
/** @var $order Mage_Sales_Model_Order */ | |
$cookieModel = Mage::getModel('core/cookie'); | |
// Save order ad origin as order field |
<?php | |
/** @var $order Mage_Sales_Model_Order */ | |
$order = Mage::getModel('sales/order'); | |
$order->load($orderId); | |
/** @var $shipment Mage_Sales_Model_Order_Shipment */ | |
$shipment = Mage::getModel('sales/order_shipment'); | |
$shipment->setOrder($order); |
<?php | |
class SomeClass { | |
public function somefunction() | |
{ | |
$orderId = 1; // some order id for example | |
$order->load($orderId); | |
$vars['order_id'] = $order->getIncrementId(); | |
$vars['order_date'] = $order->getCreatedAt(); | |
$vars['order_day'] = date('d', strtotime($order->getCreatedAt())); |