magento2 – Unable to resolve the source file for ‘…Magento_Customer/js/zxcvbn.js.map’

I’m running Magento 2.4.0 in developer mode with server-side compilation using PHP Less library.

Console is showing this error in every page:

DevTools failed to load SourceMap: Could not load content for https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I tried to access to https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map through the browser and it says:

Unable to resolve the source file for 'frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js.map'
<pre>#1 MagentoFrameworkAppStaticResource->launch() called at (vendor/magento/framework/App/Bootstrap.php:263)
#2 MagentoFrameworkAppBootstrap->run() called at (pub/static.php:13)
</pre>

I checked also the file https://example.com/pub/static/version1600339825/frontend/Example/default/en_US/Magento_Customer/js/zxcvbn.js and it exists.


What I tried

I thought the error was generated by a file merging so I tried to exclude zxcvbn.js from it adding this row in my theme etc/view.xml:

<item type="file">Magento_Customer::js/zxcvbn.js</item> <!-- It was already present -->
<item type="file">Magento_Customer::js/zxcvbn.min.js</item>
<item type="file">Magento_Customer::js/zxcvbn.js.map</item>

but it didn’t work.

Any ideas?

How to Resolve My AOL mail Not Working Today

AOL is very popular mail service and it’s free to use, offered by AOL. Now a day’s AOl is a subsidiary of Verizon Communication mail… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1822348&goto=newpost

functions – Resolve parametrized schema in PostgreSQL

I’m looking for a way to use a parametrized schema in the DECLARE section of a PostgreSQL function.

Why am I looking this way ?

  1. This functions will refer %ROWTYPE from multiple schema like

Var1 s1.emp%ROWTYPE ===> to refer the columns of emp tables as variable from s1 schema

var2 s2.stg_emp_d%ROWTPE; ===> to refer the columns of stg_emp_d tables from s2 schema as variable

var3 s3.emp_comp%ROWTYPE;===> to refer the colums of emp_comp tables from s3 schema as variable

  1. s1, s2, s3 (schema names) are not same across different env eg:
IN DEV ENV s1, s2, s3
IN TEST ENV s1_t, s2_t, s3_t
IN PROD ENV s1_p, s2_p, s3_p
  1. As we accept schema names as parameter in function, same function can be deployed without any changes across environments. It will inherit appropriate schema name set during run-time.

As we use %ROWTYPE of respective table, any changes to table structure will not impact these function. These changes are inherited via %ROWTYPE.

  1. These functions need to get individual table columns name via %ROWTYPE with in BEGIN section like
if var1.emp_type = 'C' then ... do some thing ;
elsif  var1.emp_type = 'T' then ... do some thing ;

end if ;

Here is an example:

CREATE OR REPLACE FUNCTION get_list(in_code text(), p_schema text)
  RETURNS text  AS
$func$

DECLARE

  var1 user.emp%ROWTYPE;

BEGIN

SELECT q.id, q.title, q.code
FROM   questions q, emp e
WHERE  q.code <> ALL ($1)
and    q.emp_id = e.emp_id;

END ;  

$func$ LANGUAGE sql;

The above getting created.

When I change var1 user.emp%ROWTYPE; to

  • var1 p_schema.emp%ROWTYPE; or
  • var1 $$ || p_schema || $$.emp%ROWTYPE;

Function is not getting created, but throwing error

ERROR : relation emp not found

Are there any limitations using parameterized items within DECLARE section?

I used these kinds of parameters with queries within BEGIN & END section. It did not throw any errors.

functions – How do I make postgresql resolve parametrized schema?

I’m looking for a way to use parametrized schema in DECLARE section on Postgresql Function.

Here is an example:

CREATE OR REPLACE FUNCTION get_list(in_code text(), p_schema text)
  RETURNS text  AS
$func$

DECLARE

  var1 user.emp%ROWTYPE;

BEGIN

SELECT q.id, q.title, q.code
FROM   questions q
WHERE  q.code <> ALL ($1);

END ;

$func$ LANGUAGE sql;

The above getting created.

When I change var1 user.emp%ROWTYPE; to

var1 p_schema.emp%ROWTYPE; or
var1 $$ || p_schema || $$.emp%ROWTYPE;

Function is not getting created, but throwing error

ERROR : relation emp not found

Are there any limitation of using parameterized items within DECLARE section?

I used this kind of parameters with queries within BEGIN & END section. It did not throw any errors.

Thanks for sharing.

http – How is DNS resolve done, in simple words?

I understand how generally any internet process is done in the software level for the World Wide Web internet-utilizing applications (“web sites”):

  • Stage 1: Client (human or software) ⟶ User agentHTTP/S web-server request (by unresolved domain)
  • Stage 2: ISP-initiated Routing softwareDNS server (one, or two or more until resolve) ⟶ DNS resolve
  • Stage 3: A web Server which is part of a server environment of a computer system with the “resolved” IP address processes the server request
  • Stage 4: HTTP/S web Server response (by resolved domain) ⟶ Server-initiated routing softwareClient (human or software)

In stage 2 I wrote “one, or two or more until resolve” because I understand that some ISP routing software is trying to “resolve” or “translate” a given domain with a given IP address “somewhere in the internet” and because that IP address can be associated with one or more DNS servers, the routing software would have to go through all DNS servers in the world until it reaches one which can “resolve” or “translate” the domain to an IP address and then the rest of the process will continue.

javascript – Angularjs and Angular 8 hybrid and execute code micronization get Error: Can’t resolve all parameters for xxx-service

I have a difficult case which was organized from an old angularjs and angular8, besides it’s was also limited in the extensive refactoring to resolve in code of micronization.And the code of angularjs cannot be changed.

In the end I choose the library ngx-planet that is closest to my situation, but i got this error

Issue:

When I run it, I get this error message.
image

I have tested this way of writing under angularjs and angular8 code without planet library, it can work, but after using planet, the aforementioned error occurred.

After searching, it was found that the reasons for this error message are known as the following 6 types:

  1. Barrel index
  2. Circularity dependency
  3. Forgot to enable polyfills import’core-js/es6/reflect’
  4. Injectable decorator incorrect usage (EX: missing @ or capital & lower case error etc…)
  5. Tsconfig does not configure emitDecoratorMetadata
  6. Decorate parameter type use any in your constructor

The first 5 have been excluded, I suspect it is the last, because of this Configuring Dependency Injection in Angular
But I am confused, whether a certain configuration of planet causes parameter type to fail?

Code Structure:

1. There is a common service exported from angularjs

(File name: angular1-root-module.js)

(function () {

  angular.module('angular1', (
    'angular1.export-service'
  ));

  angular.module('angular1.export-service', ());

  angular.module('angular1.export-service').factory('Angular1ExportService', Angular1ExportService);

  Angular1ExportService.$inject = ();

  function Angular1ExportService() {
    function outPutString() {
      return 'I from Angular1 export service string';
    }
    return {
      outPutAngular1String: outPutString,
    };
  }
})();

2. Inject into the class named Angular1InjectorService through the factory provider and depend on angularjs’s $injector

export function Angular1InjectorServiceFactory(injector: any) {
  return new Angular1InjectorService(injector);
}

export const Angular1InjectorServiceProvider = {
  provide: Angular1InjectorService,
  useFactory: Angular1InjectorServiceFactory,
  deps: ('$injector')
};
@Injectable()
export class Angular1InjectorService {

  // I think probably this injector of type is any cause
  constructor(private angular1Injector: any) {
  }

  getService(serviceName: String) {
    return this.angular1Injector.get(serviceName);
  }
}

3. Then inject into the common AppBaseService

@Injectable()
export class AppBaseService {

  readonly angular1InjectorService: Angular1InjectorService;
  readonly testService: any;

  constructor(readonly injector: Injector) {
    this.angular1InjectorService = this.injector.get(Angular1InjectorService);
    this.testService = this.angular1InjectorService.getService('Angular1ExportService');
  }

  testGetAngular1String() {
    console.log('app base service is work!');
    return this.testService.outPutAngular1String();
  }
}

4. Then the service of the sub app inherits AppBaseService, and obtains the method that exists in angularjs

export class App1RootService extends AppBaseService {

  constructor(readonly injector: Injector) {
    super(injector);
  }

  GetLogAngular1String() {
    console.log('app1 root service is work!');
    return this.testGetAngular1String();
  }
}

Issue related resources:

EXCEPTION: Can’t resolve all parameters

Uncaught Error: Can’t resolve all parameters for

After upgrade Angular to v8: Can’t resolve all parameters for Component:

Intact issue code:

Stackblitz

Github

I have not found an answer, and already have the official github open issue, but hope to get more help

Thanks.

postgresql – Trigger to enfoce unique constraint on text column (Geometry) to resolve INSERT conflicts

I have a simple table with a geometry column like so:

CREATE TABLE geomtable 
(
  gid serial, 
  geom geometry, 
  trip_count integer
);

I want a unique constraint on the geometry column, such that if the same geometry is being inserted again then, the ON CONFLICT clause should add the trip_count to the existing row.

So my insert query looks something like this:

INSERT INTO geomtable (geom, trip_count) values (<geom>, 123) 
ON CONFLICT ON CONSTRAINT <equality_constraint>
DO UPDATE SET trip_count = geomtable.trip_count + EXCLUDED.trip_count;

I tried the approach to enforcing equality constraint as described here like so:

CREATE FUNCTION equality_constraint_func(
  id INT,
  gm GEOMETRY
)
RETURNS boolean AS
  $$
    SELECT NOT EXISTS (
      SELECT 1
      FROM   geomtable AS a
      WHERE  a.gid <> id
        AND  a.geom && gm
        AND  ST_Equals(a.geom, gm)
    );
  $$
  LANGUAGE sql
;

And adding a CHECK constraint like so :

ALTER TABLE geomtable
  ADD CONSTRAINT equality_constraint
  CHECK (equality_constraint_func(gid, geom))
;

However, this does not help me perform the DO UPDATE part of conflict resolution. It just raises an error on duplicate geometry. I of course can’t create a primary key out of my geom column as I get the index row requires 42632 bytes, maximum size is 8191 error. I get a similar error on creating a unique index on the geom column. I tried creating a unique constraint using the above syntax by replacing CHECK with UNIQUE, but I get a syntax error. How would I go writing a trigger to enforce the unique constraint?

Specifically, how do I handle the conflict case? Let the insert happen as usual and then perform a delete etc.

My version information is as under:

PostgreSQL 12.4 (Ubuntu 12.4-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0, 64-bit POSTGIS="3.0.1 ec2a9aa" (EXTENSION) PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.1" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.4.3 (Internal)"

dnd 5e – When do you resolve a spell with a casting time of 1 action?

A spell with a casting time of 1 Action takes no longer to perform than a Weapon Attack.

On your turn, you can take one Action. Example Actions are Attack, Cast a Spell, Dash, etc.

In the Cast a Spell section it specifies

Most spells do have a casting time of 1 action, so a spellcaster often uses his or her action in combat to cast such a spell.

So, if you cast a spell with a casting time of 1 Action, you resolve it the exact same way that you would resolve an attack. You declare that you are casting the spell, then you (and your target) immediately make any dice rolls necessary to resolve the outcome of the spell.

Some spells have repetitive effects once they are cast, and all of them clearly specify when those repeating effects occur.

dnd 5e – When do you resolve a 1 action cast time spell?

A spell with a casting time of 1 Action takes no longer to perform than a Weapon Attack.

On your turn, you can take one Action. Example Actions are Attack, Cast a Spell, Dash, etc.

In the Cast a Spell section it specifies

Most spells do have a casting time of 1 action, so a spellcaster often uses his or her action in combat to cast such a spell.

So, if you cast a spell with a casting time of 1 Action, you resolve it the exact same way that you would resolve an attack. You declare that you are casting the spell, then you (and your target) immediately make any dice rolls necessary to resolve the outcome of the spell.

Some spells have repetitive effects once they are cast, and all of them clearly specify when those repeating effects occur.

nuxt.js – Vercel deploy Cannot resolve “~/api/index.js” from “/var/task/api/index.js”

My app is deployed on vercel. However, it’s not working. In function logs it has following

FATAL  Cannot resolve "~/api/index.js" from "/var/task/api/index.js"
at Resolver.resolvePath (node_modules/@nuxt/core/dist/core.js:572:11)
at Server._requireMiddleware (node_modules/@nuxt/server/dist/server.js:799:32)
at Server._normalizeMiddleware (node_modules/@nuenter code herext/server/dist/server.js:756:25)
at Server.resolveMiddleware (node_modules/@nuxt/server/dist/server.js:824:23)
at Server.useMiddleware (node_modules/@nuxt/server/dist/server.js:849:36)
at Server.setupMiddleware (node_modules/@nuxt/server/dist/server.js:707:12)
at async Server.ready (node_modules/@nuxt/server/dist/server.js:637:5)
at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:719:7)
2020-08-21T06:58:37.024Z    da066c7e-660f-4f4e-b080-9dfca786aa73    ERROR   λ Error while 
initializing nuxt: Error: Cannot resolve "~/api/index.js" from "/var/task/api/index.js"
at Resolver.resolvePath (/var/task/node_modules/@nuxt/core/dist/core.js:572:11)
at Server._requireMiddleware (/var/task/node_modules/@nuxt/server/dist/server.js:799:32)
at Server._normalizeMiddleware (/var/task/node_modules/@nuxt/server/dist/server.js:756:25)
at Server.resolveMiddleware (/var/task/node_modules/@nuxt/server/dist/server.js:824:23)
at Server.useMiddleware (/var/task/node_modules/@nuxt/server/dist/server.js:849:36)
at Server.setupMiddleware (/var/task/node_modules/@nuxt/server/dist/server.js:707:12)
at async Server.ready (/var/task/node_modules/@nuxt/server/dist/server.js:637:5)
at async Nuxt._init (/var/task/node_modules/@nuxt/core/dist/core.js:719:7)
RequestId: da066c7e-660f-4f4e-b080-9dfca786aa73 Error: Runtime exited with error: exit status 1
Runtime.ExitError'