Magento 2 The value specified in the URL Key field would generate a URL that already exists

when I have the category in product assign after saving category below error showing

The value specified in the URL Key field would generate a URL that already exists.

To resolve this conflict, you can either change the value of the URL Key field (located in the Search Engine Optimization section) to a unique value or change the Request Path fields in all locations listed below:

enter image description here

How do I prove no algorithm exists for a given problem? [duplicate]

This question already has an answer here:

  • How to show that a function is not computable? 2 answers

Is there a general framework for showing that a problem has no algorithm? For example, to show that two problems are equally as hard to each other, we use reduction.

One example of where this was done, is Hilbert’s 10th problem

Best way to check if data exists in database using service, Unit of Work and Repository Pattern in c#

What is the best way to check if an data exists in the database

i am using service, unit of work and repository pattern

I don’t how check the data in present in database are not

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AutoMapper; using DataAccess; using DataAccess.UoW; using Model;  namespace ClassLibrary1 {     public class Service     {         private readonly Unit _uow;         public Service()         {             _uow = new Unit();         }         public IEnumerable<Mdl> GetAllLogins()         {             var logins = _uow.Register.GetAll().ToList();             if (logins.Any())             {                 var config = new MapperConfiguration(cfg =>                 {                     cfg.CreateMap<Table_1, Mdl>();                 });                  IMapper mapper = config.CreateMapper();                 var dest = mapper.Map<List<Table_1>, List<Mdl>>(logins);                 return dest;             }             return null;         }         public bool CreateEmp(Mdl insertEntity)         {             var config = new MapperConfiguration(cfg =>             {                 cfg.CreateMap<Mdl, Table_1>();             });              IMapper mapper = config.CreateMapper();             var Empinsert = mapper.Map<Mdl, Table_1>(insertEntity);             _uow.Register.Insert(Empinsert);             _uow.Save();             return false;         }              /*Login Part*/          public Mdl Login(Mdl Data)         {              return dest;         }     } } 

Check If an Item by same title exists in sharepoint list then display that info in the Infopath form

I have a requirement like this.

I have a SharePoint list named ‘Examdate’ which stores different CoursNumber, Semester and ExamDate. It uses an InfoPath form for entering the CoursNumber in the list.

Now they need to have a mechanism to find out if the user is adding a New ExamDate whose CoursNumber is already present. They don’t want the users to stop the adding process, but instead, want to display the ExamDate for this already existing CoursNumber in the form. This should not happen on the save button.

So, I was thinking of customizing the NewItem form by adding a button near the CoursNumber field, say “Check Existence”, and check if the CoursNumber and Semester exists by that number entered by the user. But I dont know how I can implement this.

What’s the best and simplest way I can do that?

Check If an Item by same title exists in sharepoint list then display that info in the Infopath form

I have a requirement like this.

I have a SharePoint list named ‘Examdate’ which stores different CoursNumber, Semester and ExamDate. It uses an InfoPath form for entering the CoursNumber in the list.

Now they need to have a mechanism to find out if the user is adding a New ExamDate whose CoursNumber is already present. They don’t want the users to stop the adding process, but instead, want to display the ExamDate for this already existing CoursNumber in the form. This should not happen on the save button.

So, I was thinking of customizing the NewItem form by adding a button near the CoursNumber field, say “Check Existence”, and check if the CoursNumber and Semester exists by that number entered by the user. But I dont know how I can implement this.

What’s the best and simplest way I can do that?

Magento 2.3 How to Auto Select Swatch Option Values if Only One Exists in Product View

I’m trying to have swatch option values selected on the Product View page, if only one value exists.

also i have try this reference but not working for me https://magento.stackexchange.com/a/176243/68695

like :

enter image description here

Note: when one swatch value available then this value is auto selected and remove validation message

How to form an array using values present against all the that exists in a json object?

I have a variable that contains a json object. I need to form an array using this variable such that all values present in the json object against all keys should be present in the formed array.

What I have

let obj = { "name":"abdus", "age":25, "present": true };

What I need

result: ["abdus", 25, true]

Is there any way to achieve this? thanks in advance.

AWS Lambda is unable to find a SNS topic that clearly exists?

so I create an SNS topic via console and then try to call list_subscriptions_by_topic or sns.publish but they all fail because

An error occurred (NotFound) when calling the Publish  operation: Topic does not exist: NotFoundException 

so what gives??? the topic is accessible in the SNS console.

This is my lambda code:

from __future__ import print_function  import json import boto3 import random   print('Loading function') sns = boto3.client('sns')  def lambda_handler(event, context):      response = sns.publish(         TopicArn='arn:aws:sns:us-west-2:031436316123:topicExists'          Message=json.dumps(newMsg),         MessageAttributes={             'event_type':{                 'DataType':'String', 'StringValue':'something'              }         }     )       return response 

It is a Lambda trigger set on an SQS that is subscribed to topicExists SNS topic.

Is it true that there always exists a positive integer $n$ such that $p | ⌊k^n⋅α⌋$


Let $ k,M$ be positive integers such that $ k−1$ is not squarefree. Prove that there exist a positive real number $ α$ , such that $ ⌊α⋅k^n⌋$ and M are coprime for any positive integer $ n$ .

Since $ k−1$ is not squarefree, then there exists a prime number $ p$ such that $ p^2|k−1$ . Choose $ α=N+\frac{1}{p}$ , with $ N$ is a positive integer such that $ p⋅N+1$ is divisible by all prime factors of $ M$ (except $ p$ if $ p|M$ ), and $ N$ is not divisible by $ p$ . (we can choose $ N$ by using Chinese Remainder Theorem). Then for every positive integer $ n$ , $ $ ⌊α⋅k^n⌋=N⋅k^n+⌊\frac{k^n}{p}⌋=N⋅k^n+\frac{k^n−1}{p}=\frac{k^n⋅(p⋅N+1)−1}{p} $ $ Since $ p⋅N+1$ is divisible by all prime divisors of $ M$ , and $ ⌊α⋅k^n⌋$ is not divisible by $ p$ , because $ N⋅k^n$ is not divisible by $ p$ (we consider this in case $ p|M$ ), therefore, $ ⌊α⋅k^n⌋$ and $ M$ are coprime.

However, if $ α$ must be irrational, then I have a feeling that there are no such $ α$ that suit the problem’s condition.

So my question is:

Let $ p$ be a prime integer, $ k$ be a positive integer and $ α$ be a positive irrational number. Is it true that there always exists a positive integer $ n$ such that $ p | ⌊k^n⋅α⌋$ ?

Any answers or comments will be appreciated.

(Please let me know if this question should be closed, off-topic or unclear. I may not visit this page frequently, so I may not be able to know what is going on. Sorry for this inconvenience)

Determine if matrix exists or not

any help with optimizing following code to make it run faster.

Tried making function inline, tried cin.TIE(NULL), tried ios_base::sync_with_stdio(false);

#include <iostream> #include <vector> #include <algorithm> using namespace std;  class gfg { public: bool satisfiable(std::vector<int> a, std::vector<int> b) {   while (!a.empty()) {     std::sort(b.begin(), b.end(), std::greater<int>());     int k = a.back();     a.pop_back();     if (k > b.size()) return false;     if (k == 0) continue;     if (b[k - 1] == 0) return false;     for (int i = 0; i < k; i++)       b[i]--;   }   for (std::vector<int>::iterator i = b.begin(); i != b.end(); i++)     if (*i != 0)       return false;   return true; }  };   int main() {     gfg g;     ios_base::sync_with_stdio(false);     cin.tie(NULL);      int r,c,n,cnt=0;     cin >> n;     while(cnt<n){         cnt++;     cin >> r >> c;     int x;       vector<int> a;       vector<int> b;     for(int i=0;i<r;i++){             cin >> x;           a.push_back(x);     }      for(int j=0;j<c;j++){           cin >> x;           b.push_back(x);     }        if(g.satisfiable(a,b)) cout << "YES\n";     else cout << "NO\n";     }      return 0; } 

Expected : Average 1s or less processing time per test case Actual : Average 2s to 2.5s processing time per test case