Tutorial by Examples: c

If the response has already been created and set on the response object outside the regular rendering process (e.g., in an observer), the 'no-renderLayout' flag can be set on the action controller using Mage::app()->getFrontController()->getAction()->setFlag('','no-renderLayout'); ...
Mage_Core_Block_Template Mage_Core_Block_Text_List Mage_Core_Block_Messages Mage_Core_Block_Text_Tag Mage_Core_Block_Text Mage_Page_Block_Template_Links All blocks are either structural blocks or All blocks are either structural blocks or content blocks. Example: core/text_list Example ...
From an action controller: $this->getLayout()->getBlock('head')->getTemplate(); /** * Get specified tab grid */ public function gridOnlyAction() { $this->_initProduct(); $this->getResponse()->setBody( $this->getLayout()->createBlock('adminhtml/catalog_product_edit_...
Add-Type -AssemblyName PresentationFramework [xml]$XAMLWindow = ' <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="Auto" SizeToContent="WidthAndHeig...
/** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If y...
Simple The Simple Products type should be used for that generally have a single configuration (one-size-fits-all). This might include items such as: A Box of Crayons, Small (24 Colors) A Box of Crayons, Large (64 Colors) SuperHighTech 26” HD Computer Monitor Barrack Obama Action Figure (6”) ...
NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; attachment.image = [UIImage imageNamed:@"imageName"]; attachment.bounds = CGRectMake(0, 0, 35, 35); NSAttributedString *attachmentString = [NSAttributedString attributedStringWithAttachment:attachment];
In this context, using the this pointer isn't entirely necessary, but it will make your code clearer to the reader, by indicating that a given function or variable is a member of the class. An example in this situation: // Example for this pointer #include <iostream> #include <string>...
PHPUnit has two assertions to check values of class properties: assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '') assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '') These methods will check the value of a object p...
SELECT EncryptByPassphrase('MyPassPhrase', 'This text will get encrypted') This will also encrypt but then by passphrase instead of asymmetric(certificate) key or by an explicit symmetric key.
inline int add(int x, int y);
Bosun notifications are assigned to alert definitions using warnNotification and critNotification and indicate where to send the rendered alert template when a new incident occur. The ${env.VARIABLENAME} syntax can be used to load values from an Environmental Variable. In order to post alerts to Hi...
Graph Theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects. Did you know, almost all the problems of planet Earth can be converted into problems of Roads and Cities, and solved? Graph Theory was invented many years ago, even before the in...
Attributes can be useful for denoting metadata on enums. Getting the value of this can be slow, so it is important to cache results. private static Dictionary<object, object> attributeCache = new Dictionary<object, object>(); public static T GetAttribute<T, V>(this V va...
In some cases you may want to change which notification you use based on a tag in the Alert keys. You can do this using the Lookup feature. Note: Lookup only works if you are using OpenTSDB and sending data to the Bosun to be indexed. For other backends or non-indexed data you have to use lookupSeri...
Xcode 8 will automatically recognize any images you’ve got in an Asset Catalog and offer them up as a suggestion inside of a UIImage initializer. So you could basically declare a new variable and then add an asset name that you have added to your asset catalog. For example let img = dog. img does n...
Small, simple csv files can be built using just a text editor, because a CSV file is simply text. If you have spreadsheet software available these are usually an easy way to open and save CSV files. Reading and writing them, or otherwise processing their contents is done more efficiently using the ...
The basic method to escape reserved words for SQL Server is the use of the square brackets ([ and ]). For example, Description and Name are reserved words; however, if there is an object using both as names, the syntax used is: SELECT [Description] FROM dbo.TableName WHERE [Name] = 'foo' T...

Page 597 of 826