Tutorial by Examples: c

SET FOREIGN_KEY_CHECKS=0; -- Customers TRUNCATE `customer_address_entity`; TRUNCATE `customer_address_entity_datetime`; TRUNCATE `customer_address_entity_decimal`; TRUNCATE `customer_address_entity_int`; TRUNCATE `customer_address_entity_text`; TRUNCATE `customer_address_entity_varchar`; T...
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalog_product_entity_decimal`; TRUNCATE TAB...
{-# LANGUAGE RecordWildCards #-} import Text.XML.Light data Package = Package { pOrderNo :: String , pOrderPos :: String , pBarcode :: String , pNumber :: String } -- | Create XML from a Package instance Node Package where node qn Package {..} = node qn [ un...
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.
$store = Mage::app()->getStore(); $storeId = Mage::app()->getStore()->getStoreId(); $storeCode = Mage::app()->getStore()->getCode(); $websiteId = Mage::app()->getStore()->getWebsiteId(); $storeGroupId = Mage::app()->getStore()->getGroupId(); $storeName = Mage::app()-&...
A C library header can usually be included into a C++ program, since most declarations are valid in both C and C++. For example, consider the following foo.h: typedef struct Foo { int bar; } Foo; Foo make_foo(int); The definition of make_foo is separately compiled and distributed with the...
This simple function can be used to get value from exactly one field one record query result Public Function getDataScalar(ssql As String) openConnection() Try Dim q As New MySqlCommand q.Connection = db q.CommandText = ssql getDataScalar = q.Execut...
An explicit instantiation definition creates and declares a concrete class, function, or variable from a template, without using it just yet. An explicit instantiation can be referenced from other translation units. This can be used to avoid defining a template in a header file, if it will only be i...
As node.js is often used to build API, proper CORS setting can be a life saver if you want to be able to request the API from different domains. In the exemple, we'll set it up for the wider configuration (authorize all request types from any domain. In your server.js after initializing express: ...
Suppose we want to write a constraint which matches a number, but approximatively. Say, you are supposed to have 95 people in a survey, but 93 or 96 will do as well. We can write a custom constraint of the form: public class AlmostEqualToConstraint : Constraint { readonly int _expected; ...
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 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...
After going through the Basic Setup example, you may find yourself repeating most part of it in every single Scala Gradle project. Smells like boilerplate code... What if, instead of applying the Scala plugin offered by Gradle, you could apply your own Scala plugin, which would be responsible for h...
package com.j2ko.webviewapp; import android.graphics.Bitmap; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.webkit.WebResourceRequest; import android....
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...
To use jquery in your Angular 2.x components, declare a global variable on the top If using $ for jQuery declare var $: any; If using jQuery for jQuery declare var jQuery: any This will allow using $ or jQuery into your Angular 2.x component.
AWS-SDK for javascript Lambda contains aws-sdk (https://aws.amazon.com/sdk-for-node-js/) in its global so no need to upload this node-module into the zip. const AWS = require('aws-sdk'); Sample function module.exports.myFunction = (event, context, callback) => { const response = { ...

Page 723 of 826