This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../core-pages/core-pages.html"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File <yourtemplate>/email/order/items/order/default.phtml // | |
....... | |
<?php /** Get product attributes */ ?> | |
<?php $_product = Mage::getModel('catalog/product')->load($_item->getProduct()->getId()) ?> | |
<?php $_attributes = $_product->getAttributes() ?> | |
<?php $_arrDisplayAttributes = array('of_attributes_display') ?> | |
<?php foreach($_attributes as $_attribute) : ?> | |
<?php $_attributeCode = $_attribute->getAttributeCode() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---CSS | |
/* Helper to vertical align content*/ | |
.vhelper { height: 100%; padding: 0;} | |
/* Vertical-Alignment without given height */ | |
.vhelper, .justify-middle { display: inline-block; vertical-align: middle; } | |
---HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->get('/encrypt/:string', function ($string) use ($app) { | |
echo sha1($string); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
require 'Slim/Slim.php'; | |
require 'NotORM.php'; | |
\Slim\Slim::registerAutoloader(); | |
$app = new \Slim\Slim(); | |
$pdoDatabase = new PDO( | |
"mysql:dbname=szwebapp;host=localhost", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Normally you would calculate with css3 | |
style="width: calc((value/amount) * 100%);" | |
// With ExtJS - in order to build a native app - you have to use this workaround | |
style="width: {[(values.value/values.amount) * 100]}%;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<T> Query<T>(string query) where T:new() | |
{ | |
List<T> res = new List<T>(); | |
MySqlCommand q = new MySqlCommand(query, this.db); | |
MySqlDataReader r = q.ExecuteReader(); | |
while (r.Read()) | |
{ | |
T t = new T(); | |
for (int inc = 0; inc < r.FieldCount; inc++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Complex { | |
/** | |
* Real | |
* @var double | |
*/ | |
private $real; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Sitemap module public controller | |
* | |
* Renders a human-readable sitemap with all public pages and blog categories | |
* Also renders a machine-readable sitemap for search engines | |
* | |
* @author Barnabas Kendall <[email protected]> | |
* @license Apache License v2.0 | |
* @version 1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Plugin to fetch a themeimage by urlsegment | |
* | |
* usage: {{image:get by="url" default="default" img-type="png"}} | |
* | |
* Attributes: |
NewerOlder