'
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';
'
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';
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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.
<?php error_reporting (E_ALL ^ E_NOTICE); ?>
Or you can add the following code which stops all the error reporting,
<?php error_reporting(0); ?>
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.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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 inng 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.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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>
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
Solution
Step 1 : Start Android Studio
Step 2 : Go to Build -> Build Bundles
Step 3 : Select Build APK
Step 4 : Build APK file
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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"}
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
We can 5 ways to create objects in JavaScript.
Lets understand how to Create it...
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
@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. |
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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. |
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
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];
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
Data Definition Language (DDL) : CREATE , ALTER , DROP (tables, views, procedures, triggers). Data Manipulation Language (DML) : SELECT ,...