how to fix phpmyadmin access denied

 '



Find config.inc file under C:\wamp\apps\phpmyadmin3.5.1 Inside this file find this one line

$cfg['Servers'][$i]['password'] =";

and replace it with

$cfg['Servers'][$i]['password'] = 'Type your root password here';

What is an Undefined Index PHP Error? How to Fix It?




1. Adding Code at the Top of the Page

A simple way to ask PHP to disable reporting of notices is to put a line of code at the beginning of the PHP page.

Code:

<?php error_reporting (E_ALL ^ E_NOTICE); ?> 

Or you can add the following code which stops all the error reporting,

<?php error_reporting(0); ?> 

2. Changes in php.ini 

Php.ini is a configuration file and is essential for all the programs running on PHP. Open this file and find the field error_reporting. The easiest way is to use the ctrl + F shortcut key. By default, error reporting is set to E_ALL. That means all errors are reported. Change this to E_ALL & ~E_NOTICE. It means all errors except for the notices will now be reported.

What is preflight requests in Angular


Answer:

The preflight is being triggered by your Content-Type of application/json. The simplest way to prevent this is to set the Content-Type to be text/plain in your case. application/x-www-form-urlencoded & multipart/form-data Content-Types are also acceptable, but you'll of course need to format your request payload appropriately.

If you are still seeing a preflight after making this change, then Angular may be adding an X-header to the request as well.

Or you might have headers (Authorization, Cache-Control...) that will trigger it, see:



----


Unlike simple requests, for "preflighted" requests the browser first sends an HTTP request using the OPTIONS method to the resource on the other origin, in order to determine if the actual request is safe to send. Such cross-origin requests are preflighted since they may have implications for user data.


The following is an example of a request that will be preflighted:

const xhr = new XMLHttpRequest();
xhr.open("POST", "https://bar.other/doc");
xhr.setRequestHeader("X-PINGOTHER", "pingpong");
xhr.setRequestHeader("Content-Type", "text/xml");
xhr.onreadystatechange = handler;
xhr.send("<person><name>Arun</name></person>");

The example above creates an XML body to send with the POST request. Also, a non-standard HTTP X-PINGOTHER request header is set. Such headers are not part of HTTP/1.1, but are generally useful to web applications. Since the request uses a Content-Type of text/xml, and since a custom header is set, this request is preflighted.




origin 'http://localhost:4200' has been blocked by CORS policy in Angular12

 Solution 1 - you need to change your backend to accept your incoming requests

Solution 2 - using Angular proxy see here

Please note this is only for ng serve, you can't use proxy in ng build

Solution 3 - IF your backend accepts requests from a wildcard domanin like *.testdomain.example then you can edit your hosts file and add 127.0.0.1 local.testdomain.example in there, then in your browser instead of localhost:4200 enter local.testdomain.example:4200

Note: the reason it's working via postman is postman doesn't send preflight requests while your browser does.

EXCEPTIONAL DATA REPORT (EDR) STATUS

Check  EDR status Click




why we use header in top HTML

 The <header> element represents a container for introductory content or a set of navigational links. A <header> element typically contains: one or more heading elements (<h1> - <h6>) logo or icon.


For Example 

<!DOCTYPE html>

<html>

<body>


<article>

  <header>

    <h1>A heading here</h1>

    <p>Posted by John Doe</p>

    <p>Some additional information here</p>

  </header>

  <p>Lorem Ipsum dolor set amet....</p>

</article>


</body>

</html>


app not installed as package appears to be invalid.

 


Solution 

Step 1 : Start Android Studio 

Step 2 : Go to Build -> Build Bundles 

Step 3 : Select Build APK

Step 4 : Build APK file



How to Rename an Object's Key in JavaScript | Demo | Example

Demo URl

Code Example Here

 function renameKeys(obj, newKeys) {

  const keyValues = Object.keys(obj).map(key => {
    const newKey = newKeys[key] || key;
    return { [newKey]: obj[key] };
  });
  return Object.assign({}, ...keyValues);
}

Uses

 const obj = { a: "1", b: "2" };
const newKeys = { a: "A", c: "C" };
const renamedObj = renameKeys(obj, newKeys);
console.log(renamedObj);
// {A:"1", b:"2"} 



How many ways to create Objects in JavaScript

 We can 5 ways to create objects in JavaScript.

Lets understand how to Create it...

Demo URL



'use strict';
Example 1

var fruit = {};
fruit.name = 'Mango';
fruit.color = 'Yellow';
console.log(`fruit name ${fruit.name} and color is ${fruit.color}`);

Example 2

var fruit2 = { name: 'Mango'color: 'Yellow' };
console.log(`fruit name ${fruit2.name} and color is ${fruit2.color}`);

function Fruit(namecolor) {
  (this.name = name), (this.color = color);
}

Example 3

var fruit3 = new Fruit('Mango''Yellow');

Example 4

var fruit4 = new Fruit('Donut''Sprinkled Yellow');

console.log(`fruit name ${fruit3.name} and color is ${fruit3.color}`);
console.log(`fruit name ${fruit4.name} and color is ${fruit4.color}`);

console.log(`Check fruit3 proto ${Fruit.prototype === fruit3.__proto__}`);

// console.log(`Property descriptor
// ${JSON.stringify(Object.getOwnPropertyDescriptor(fruit,'name'))}`)

Example 5

var fruit5 = Object.create(Object.prototype, {
  name: {
    value: 'Mango',
    enumerable: true,
    writable: true,
    configurable: true,
  },

  color: {
    value: 'Yellow',
    enumerable: true,
    writable: true,
    configurable: true,
  },
});

console.log(`fruit name ${fruit5.name} and color is ${fruit5.color}`);
console.log(`Check fruit3 proto ${fruit.prototype === fruit5.__proto__}`);

var fruit6 = Object.create(Object.prototype, {
  name: {
    value: 'Mango',
    enumerable: true,
    writable: true,
    configurable: true,
  },

  color: {
    value: 'Yellow',
    enumerable: true,
    writable: false,
    configurable: true,
  },
});

fruit6.name = 'Sausages';
//compile error comment it later
//fruit6.color="Red";

for (var props in fruit6) {
  console.log(`${props} : ${fruit6.color}`);
}

console.log(
  `Fruit name ${fruit6.name} and color is ${
    fruit6.color
  } and proto ${JSON.stringify(fruit6.__proto__)}`
);

//Getter Setter

var fruit7 = {
  color: 'Yellow',
  get fruitcolor() {
    return this.color;
  },
  set fruitcolor(val) {
    this.color = val;
  },
};

console.log(`Fruit default color is ${fruit7.fruitcolor}`);

fruit7.fruitcolor = 'Yellow';

console.log(`Fruit changed color is ${fruit7.fruitcolor}`);

console.log(`Check Fruit3 proto ${Fruit.prototype === fruit3.__proto__}`);


What is the difference between Components and Directives?

 
Demo URL



@Components

@Directives

For register component we use @Component

meta-data annotation.


For register directives we use @Directive meta-data annotation.


Component is a directive which use shadow

DOM to create encapsulate visual behavior

called components. Components are typically

used to create Ul widgets.


Directives are used to add behavior to an existing DOM element.

Component is used to break up the application into smaller components.


Directive is used to design reusable components.



Only one component can be present per DOM element.


Many directive can be used in a per DOM element



Component is used to define pipes

You can't define Pipes in a directive.



@View decorator or templateurl template are

mandatory in the component.


Directives don't have a View.


What is the difference between constructor and ngOnInit? | Demo | Example



Demo URL




Constructor

ngOninit 

A constructor is not the concept of Angular. It is the concept of JavaScript's class.


ngOninit is the second stage of Angular

component lifecycle hook whenever is called

when angular is done which creating the

component.


Constructor is best place to add all dependencies


ngOninit function which guarantees you that the component has already been created.


Constructor is automatically called at the time of creating the object of the class.


Invoked by Angular when component is initialized


Used for Injecting dependencies


Actual business logic performed 



we should use constructor() to setup Dependency Injection

is a better place to write "actual work code" that we need to execute as soon as the class is instantiated.

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in

 For making MailWatch work with Debian 11 and PHP 8, I had Fixed few code-file to avoid error :

PHP Fatal error: Array and string offset access syntax.

Sharing below changes for users using with PHP8., Hopeful to update in new version or users trying to use MailWatch with PHP8.
-Deepen.

Please change this 100% working

$c1 = $text[$i];

            if ($c1 >= "\xc0") { //Should be converted to UTF8, if it's not UTF8 already

                $c2 = $i+1 >= $max? "\x00" : $text[$i+1];

                $c3 = $i+2 >= $max? "\x00" : $text[$i+2];

                $c4 = $i+3 >= $max? "\x00" : $text[$i+3];


Solution




How to use Array.reduce with objects in Angular

Here Demo Filter Data




 

Demo Url


SQL Server — Core Concepts with examples

  Data Definition Language (DDL) : CREATE , ALTER , DROP (tables, views, procedures, triggers). Data Manipulation Language (DML) : SELECT ,...

Best for you