Tutorial by Examples: f

$model = Mage::getModel('catalog/product')->getCollection() Filter based on store: $mode->addStoreFilter($storeId) Filter based on product type: $mode->addAttributeToFilter('type_id', 'configurable') $mode->addAttributeToFilter('type_id', 'simple') Filter based on status: $m...
Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getThumbnail()); //Thumbnail Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getSmallImage()); //Small Image Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage(...
$rootId = Mage::app()->getStore($storeId)->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('path', array('like'=> "1/$rootId/%")) ->addAttributeToFilter('level', 2...
A static data member of the class may be fully defined within the class definition if it is declared inline. For example, the following class may be defined in a header. Prior to C++17, it would have been necessary to provide a .cpp file to contain the definition of Foo::num_instances so that it wou...
$isSecure = Mage::app()->getStore()->isCurrentlySecure(); This will return true if the current url is secure.
Since a signal handler will be called by the kernel using the C calling convention, we must tell the compiler to use the C calling convention when compiling the function. volatile sig_atomic_t death_signal = 0; extern "C" void cleanup(int signum) { death_signal = signum; } int mai...
let col_1 = db.collection('col_1'); let col_2 = db.collection('col_2'); col_1 .aggregate([ { $match: { "_id": 1 } }, { $lookup: { from: "col_2", localField: "id", foreignField: "id", ...
retrieve all documents in a collection db.collection.find({}); retrieve documents in a collection using a condition ( similar to WHERE in MYSQL ) db.collection.find({key: value}); example db.users.find({email:"[email protected]"}); retrieve documents in a collection using Boole...
db.collection.findOne({}); the querying functionality is similar to find() but this will end execution the moment it finds one document matching its condition , if used with and empty object , it will fetch the first document and return it . findOne() mongodb api documentation
We're going to integrate the AlmostEqualToConstraint with the fluent NUnit interfaces, specifically the Is one. We'll need to extend the NUnit provided Is and use that throughout our code. public class Is : NUnit.Framework.Is { public static AlmostEqualToConstraint AlmostEqualTo(int expected,...
Let's say we have some server that registers new users and greets them with some message. And we want to monitor this server and change some of it's parameters. First, we need an interface with our monitoring and control methods public interface UserCounterMBean { long getSleepTime(); ...
Let's take an scenario to understand advance function in better way, struct User { var name: String var age: Int var country: String? } //User's information let user1 = User(name: "John", age: 24, country: "USA") let user2 = User(name: "Chan", age...
The Entity Framework library comes only with an SQL Server provider. To use SQLite will require additional dependencies and configuration. All required dependencies are available on NuGet. Install SQLite Managed Libraries All of the mananged depedencies can be installed using the NuGet Package Man...
public async int call_async () { return 1; } call_async.begin ((obj, res) => { var ret = call_async.end (res); }); To call an asynchronous functions from a synchronous context, use the begin method and pass a callback to receive the result. The two arguments are: obj is a GLi...
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" ...
NPM If external library like jQuery is installed using NPM npm install --save jquery Add script path into your angular-cli.json "scripts": [ "../node_modules/jquery/dist/jquery.js" ] Assets Folder You can also save the library file in your assets/js directory and in...
The Stock Items screen (IN.20.25.00) is one of the most often used data entry forms of Acumatica ERP to export data. Inventory ID is the only primary key on the Stock Items screen: To export records from a data entry form, your SOAP request must always begin with the ServiceCommands.Every[Key] co...
The Sales Orders screen (SO.30.10.00) is a perfect example of a data entry form with a composite primary key. The primary key on the Sales Orders screen is composed by the Order Type and the Order Number: The recommended 2-step strategy to export data from the Sales Orders screen or any other dat...
If you do not only wish to display static objects, but have your UI respond to changes to correlating objects, you need to understand the basics of the INotifyPropertyChanged interface. Assuming we have our MainWindowdefined as <Window x:Class="Application.MainWindow" xmlns=&quot...
As you may have noticed in the example above, we are rewriting the same step multiple times: Given the user is on the login page This can be exceptionally tedious, especially if we have more than one given step that is reused. Gherkin provides a solution for this by giving us another keyword to ...

Page 398 of 457