Not able to load local file in WebView Nativescript Angular

your local file should be added in the webpack.config.js in the CopyWebpackPlugin section

From

new CopyWebpackPlugin([
{ from: { glob: “fonts/” } }, { from: { glob: “/.jpg” } }, { from: { glob: “/.png” } },
], { ignore: [${relative(appPath, appResourcesFullPath)}/**] }),

To

new CopyWebpackPlugin([
{ from: { glob: “/.html” } }, { from: { glob: “/.js” } },
{ from: { glob: “fonts/” } }, { from: { glob: “/.jpg” } }, { from: { glob: “/.png” } },
], { ignore: [${relative(appPath, appResourcesFullPath)}/**] }),

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe WordPress.com Blog

WordPress.com is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.

Magento 2.3: how to fix blank admin page not rendering windows

This is Magento bug. Wrong paths to Windows are generated. The fixed fix is

Magento 2.3.0

#/vendor/magento/framework/View/Element/Template/File/Validator.php:114

the string

$realPath = $this->fileDriver->getRealPath($path);

to replace

$realPath = str_replace(‘\’, ‘/’, $this->fileDriver->getRealPath($path));

Magento 2.2.7

/vendor/magento/framework/View/Element/Template/File/Validator.php:113

code

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    foreach ($directories as $directory) {
        if (0 === strpos($this->fileDriver->getRealPath($path), $directory)) {
            return true;
        }
    }
    return false;
}

to replace

protected function isPathInDirectories($path, $directories)
    {
        $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
        if (!is_array($directories)) {
            $directories = (array)$directories;
        }
        foreach ($directories as $directory) {
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }
        return false;
    }

How to use custom query mysql in magento2

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager
$resource = $objectManager->get(‘Magento\Framework\App\ResourceConnection’);
$connection = $resource->getConnection();
$tableName = $resource->getTableName(’employee’); //gives table name with prefix

//Select Data from table
$sql = “Select * FROM ” . $tableName;
$result = $connection->fetchAll($sql); // gives associated array, table fields as key in array.

//Delete Data from table
$sql = “Delete FROM ” . $tableName.” Where emp_id = 10″;
$connection->query($sql);

//Insert Data into table
$sql = “Insert Into ” . $tableName . ” (emp_id, emp_name, emp_code, emp_salary) Values (”,’XYZ’,’ABD20′,’50000′)”;
$connection->query($sql);

//Update Data into table
$sql = “Update ” . $tableName . “Set emp_salary = 20000 where emp_id = 12”;
$connection->query($sql);

Update Custom Field value woocommerce

$product = wc_get_product( $product_id );
//echo $csvpro[7].’
‘; exit;
$product->update_meta_data( ‘ean’,sanitize_text_field( $csvpro[7] ));
$product->update_meta_data( ‘grossweight’, sanitize_text_field( $progrossweight ) );
$product->update_meta_data( ‘expectedinweek’, sanitize_text_field( $proexpectedinweek ) );
$product->update_meta_data( ‘demostock’, sanitize_text_field( $prodemostock ) );

$product->save();