Click here to Skip to main content
15,349,569 members

Comments by Richard Deeming (Top 200 by date)

Richard Deeming 3hrs 15mins ago View
   
Start by writing down the precise rules and requirements. Then work out the formula on paper. Then transfer it to Excel.

Nobody here can do that for you, because we have no idea what your criteria are, what you have tried, or where you are stuck.
   
Whatever is required to run your application - the correct version of .NET, any third-party components that need to be installed, etc.

We can't tell you precisely what the prerequisites of your application are, because we have no access to the code.
Richard Deeming 4hrs 5mins ago View
   
Your error message is not a "solution" to someone else's question.

If you want to ask a question, then ask a question[^]. But you'll need to provide a hell of a lot more information than just an error message if you want anyone to be able to help you.
Richard Deeming 4hrs 10mins ago View
   
There is nowhere near enough information in your question for anyone to help.
   
You've been here long enough to know that this should have been posted as a comment to the question, NOT a "solution".
   
I agree: your comment is NOT a solution. So why post it as such?

Resurrecting a solved question from nine years ago just to post a non-solution as a new "solution" is likely to get you kicked off the site.
   
The code you have posted does not produce any errors:
Clone | C# Online Compiler | .NET Fiddle[^]

Post the actual code you're struggling with, and the full details of the error(s) you're getting.
   
Completely irrelevant. Integer in VB.NET is an alias for the System.Int32 type.

Your change will make absolutely no difference - unless you have done something silly, like declaring your own Int32 class within your application.
   
The answer posted and accepted eight years ago is a more helpful solution than this rant you have posted as a solution.

If you want to respond to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

If you want to ask a question, then ask a question[^] - but you will need to provide a lot more information than you have here if you want anyone to be able to help you.

Resurrecting an ancient thread to post a non-solution rant as a "solution" will only serve to get you banned from the site.
   
I don't do Laravel, but surely if the route is:
admin/bedrijven/{bedrijf}/delete

then the parameter name needs to be bedrijf, not bedrijven, on the line:
{{route('bedrijven.delete', ['bedrijven'=>$bedrijf->id])}}
Richard Deeming 4 days ago View
   
If you want someone to help you fix a problem with your code, you need to provide a clear and complete description of the problem, what you have tried, and where you are stuck.

Dumping your code and asking someone to fix "an issue", without specifying what that issue is, does not make for a good question.
Richard Deeming 4 days ago View
   
It's not meant to be. Look at his profile: he was just trying to get enough rep points to display his spam links.

Spam and spammer.
Richard Deeming 4 days ago View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to the question.
Richard Deeming 4 days ago View
   
Your question is not a "solution" to someone else's question.

And nobody here is going to help you write malware.
Richard Deeming 4 days ago View
   
Your code is an absolute mess. I've done what I can to tidy it up, but you still have lots of syntax errors - presumably where you pasted the code and didn't check what had been pasted.

If the data is not being sent to the server, then something is going wrong in your validation code. You need to debug your code to find out why it's not working. We can't do that for you.
Richard Deeming 4 days ago View
   
Beyond that, if you want to include data from joined tables in your filtered query, you need to actually include the joins in your filtered query.
SELECT ... FROM foods JOIN ... WHERE foods.foodname = %s
Richard Deeming 4 days ago View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Richard Deeming 4 days ago View
   
There's not really enough information to know what the problem was. If it's really the FirstViewModel._navigationService field that was null, that would mean you were passing null into the constructor. But I can't see where it's actually being created.

You can guard against it by validating the constructor parameter:
public FirstViewModel(IMvxNavigationService navigationService)
{
    _navigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService));
}
Richard Deeming 4 days ago View
   
The order of members in your class is (mostly) irrelevant.

The only time it matters is if you have field initializers which depend on other field initializers.

None of the code you have shown has a field initializer. Moving the field and constructor further up the file will not make any difference.

You may have solved your problem, but you have come to the wrong conclusion about what the solution actually was.
Richard Deeming 5 days ago View
   
An unexplained code-dump is not a good solution.

And you don't help anyone by doing their homework for them.
Richard Deeming 5 days ago View
   
Read the previous solutions - your suggestion might pick up the proper nouns from an English text, but it will do nothing to extract the verbs.

The question was marked as "solved" nine years ago. Unless you're going to add something new to the discussion, stick to answering new questions that still need help.
Richard Deeming 5 days ago View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 5 days ago View
   
Yes, as I said in my answer: pass the callback function as a function, rather than calling it once and passing the returned value as the callback function.
.map(callbackFn)

Callback function - MDN Web Docs Glossary: Definitions of Web-related terms | MDN[^]
Richard Deeming 5 days ago View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Richard Deeming 5 days ago View
   
The error is on line 42 - you have a + instead of a - between frob and fubar.

Seriously, read the comments again: nobody can help you fix an error in code if we can't see the code.

As it stands, your question is simply: "Here's my homework assignment; do it for me."

Click the green "Improve question" link and update your question to include the relevant parts of your code, the input values you're using, the expected output, the actual output, and a clear and complete description of what you have tried and where you are stuck.

Without that, your question will simply be ignored and/or closed.
Richard Deeming 5 days ago View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 22-Jun-22 3:49am View
   
"Bumping" your question is rude. Doing it by posting a fake solution is likely to get you kicked off the site.

If you're not getting answers, then either nobody knows, or you haven't provided enough information. Consider editing your question to add more details if you can.
Richard Deeming 22-Jun-22 3:45am View
   
Nice SQL Injection vulnerability you've got there. :)

Dynamic SQL parameters need to be passed properly using sp_executesql[^].
Richard Deeming 22-Jun-22 3:23am View
   
If only there was some sort of website - a Project of Code, as it were - where people wrote articles[^] with accompanying source-code you could download and study.

Such a site would surely be of use to someone wanting to "download source code for study and debugg", no?
Richard Deeming 21-Jun-22 4:15am View
   
And Aspose is a commercial library, so this is also spam.

Kiss your account goodbye.
Richard Deeming 21-Jun-22 4:15am View
   
Copying someone else's work and posting it as your own is called plagiarism, which is not tolerated here.
Richard Deeming 21-Jun-22 4:11am View
   
An unformatted, unexplained code-dump which is not related to the question is not a "solution".
Richard Deeming 20-Jun-22 8:17am View
   
An uncommented code dump, which is virtually identical to solution 4, adds nothing to this thread.

And you don't help anyone by doing their homework for them. Especially not 6½ months late!

And finally, your chosen username make you look like a potential spammer.
Richard Deeming 20-Jun-22 8:08am View
   
My "valuable thoughts" are:

a) I don't. Since I'm not taking an "introduction to programming" course, I have no need of such code.

b) You haven't actually asked a question, nor explained what doubts you have.

c) If I really needed to calculate the Fibonacci sequence, I would avoid recursion, since that quickly leads to stack overflow errors.

d) If you submit a solution that you've taken from somewhere else as your own work, you will likely get kicked off your course for plagiarism.
Richard Deeming 20-Jun-22 7:59am View
   
Also, if you're using WebForms, you'll find it emits a lot of inline scripts which you can't annotate to comply with a CSP that doesn't allow unsafe inline scripts. For example, many controls will have an onclick attribute to wire up an event handler.

If you don't want to allow unsafe inline scripts, you'll probably need to rewrite the application in a different framework which gives you better control over the generated HTML.
Richard Deeming 20-Jun-22 7:56am View
   
A NONCE is a Number used ONCE. Using the same static value on every request defeats the purpose.
Richard Deeming 20-Jun-22 7:32am View
   
Yes: there's a great big "Delete" button on your question. Press it.

And in future, don't post the same question in multiple places on the site site.
Richard Deeming 20-Jun-22 7:31am View
   
Ignoring my solution and trying the same thing that you tried in your question is not going to make any difference.
Richard Deeming 20-Jun-22 7:31am View
   
No, because it doesn't work.
Richard Deeming 20-Jun-22 7:31am View
   
So:
DELETE
FROM
    R
FROM
    dbo.trebovnica_roba_roba As R
WHERE
    id_fakture = 7
And
    rn = 'RN 002 2022'
And
    Exists
    (
        SELECT 1
        FROM dbo.trebovnica_roba_roba As R2
        WHERE R2.id_fakture = R.id_fakture
        And R2.rn = R.rn
        And R2.sifra = R.sifra
        And R2.id < R.id
    )
;
then?
Richard Deeming 20-Jun-22 7:16am View
   
Not at all clear. The two rows you want to stay are also the two rows you want to delete?!
Richard Deeming 20-Jun-22 7:01am View
   
That doesn't match the comment:
"How to remove all rows except first minimal id and sifra"
Richard Deeming 20-Jun-22 7:00am View
   
The list of columns selected in an Exists / Not Exists query doesn't matter. You can use SELECT 1 FROM ..., SELECT * FROM ..., or SELECT id FROM ....

sql server - EXISTS (SELECT 1 ...) vs EXISTS (SELECT * ...) One or the other? - Database Administrators Stack Exchange[^]
Richard Deeming 20-Jun-22 6:14am View
   
Use the developer tools in your browser to examine the network request to see what is being returned.

We can't do that for you, since we have no access to your computer.
Richard Deeming 20-Jun-22 6:10am View
   
If you want someone to help you fix your query, you need to provide a clear and complete description of what you are trying to do, what you have tried, and where you are stuck.

Providing a sample table with two columns, telling us you want to delete one row, and then giving us conditions based on columns and tables which aren't in your sample, isn't going to work.
Richard Deeming 20-Jun-22 6:07am View
   
The select top 1 1 from ... is technically correct, since he's only testing whether the record exists. Removing the second 1 would result in an invalid query, since you haven't selected any columns. :)
Richard Deeming 20-Jun-22 6:05am View
   
NB: EPPlus is no longer free for use in commercial applications. The repository you've linked to is a read-only archive of v4, which was the last LGPL version.
Richard Deeming 20-Jun-22 5:52am View
   
It depends on the DBMS - for example, in MS SQL Server:
UPDATE (Transact-SQL) - SQL Server | Microsoft Docs[^]

I suspect it's more to do with the fact that the WHERE clause references tables which aren't mentioned anywhere else in the query.
Richard Deeming 20-Jun-22 5:44am View
   
An unexplained code-dump which doesn't even attempt to answer the question is not sufficient reason to drag this already-solved question back into the active list.
Richard Deeming 20-Jun-22 5:20am View
   
If you want to reply to a comment, click the "Reply" button next to that comment.

Do not post your comment as a "solution" to your question.
Richard Deeming 20-Jun-22 5:15am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 20-Jun-22 5:09am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 20-Jun-22 5:07am View
   
You haven't shown any of your react code, nor your HTML markup. We can't help you fix code we cannot see.
Richard Deeming 20-Jun-22 5:04am View
   
You should post this as a solution. :)
Richard Deeming 20-Jun-22 4:50am View
   
Deleted
(Moved to answer)
Richard Deeming 20-Jun-22 4:45am View
   
You're almost four years late, and you've missed the part where one function needed to be in the code-behind.
Richard Deeming 20-Jun-22 4:44am View
   
The first thing that jumps out at me is that you're adding the required attribute to the list in code, after applying Select2 to the list.

You need to mark the model property as [Required] instead. That way, the validation attributes will already be emitted in the rendered HTML, and you won't need to add them via Javascript.

Also, you're removing the selected attribute from all of the list options every time the list changes. The user will never be able to select anything from the list!
Richard Deeming 17-Jun-22 6:50am View
   
Your question is not a "solution" to someone else's question.

If you want to ask a question, then ASK A QUESTION[^]. But you're going to have to provide a lot more information than you have here if you want anyone to be able to help you.
Richard Deeming 17-Jun-22 5:38am View
   
And?

Your query is not returning any data. We cannot access your database, so we cannot run your query against your data.

YOU need to debug your code to find out why it's not returning any data. We cannot do that for you!
Richard Deeming 17-Jun-22 5:18am View
   
So as I said previously, your Ajax/getStudents method is not returning any data.

You need to debug your code to find out why. We can't do that for you - we don't have access to your database.
Richard Deeming 17-Jun-22 4:55am View
   
Richard Deeming 17-Jun-22 4:13am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under the solution and post a comment.

Do not post your comment as another "solution".
Richard Deeming 17-Jun-22 3:30am View
   
Stuck with what, precisely? If the data is being returned to the datatable, then what is the problem?
Richard Deeming 16-Jun-22 9:37am View
   
That would suggest that your Ajax/getStudents endpoint is not returning any data.

Inspect the network request in your browser's developer tools to see what's being sent to the server, and what's being sent back.
Richard Deeming 16-Jun-22 4:22am View
   
You haven't attached a "reference snap". And you can't upload pictures here.

You could post a link to an image hosted somewhere else. But most members won't click on it.

Instead, try to provide a clear and complete description of the problem in words, including the relevant parts of your code.
Richard Deeming 15-Jun-22 11:31am View
   
Reposting someone else's answer just to say "thanks" is not worthy of a new solution.

And especially not when the question was solved over eleven years ago!

Delete this non-solution.
Richard Deeming 15-Jun-22 8:52am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

If you want to reply to a comment, click the "Reply" button next to that comment.

Do not post your replies as a "solution" to your question.
Richard Deeming 15-Jun-22 8:39am View
   
And there it is - solution 4.
Richard Deeming 15-Jun-22 7:44am View
   
For a single-dimensional array, why would you need more than two loops? (One for the start index, and one for the length.)
Richard Deeming 15-Jun-22 5:59am View
   
Your question has nothing to do with software development. You need to post on a general VMWare support site instead.
Richard Deeming 15-Jun-22 4:22am View
   
You've been here long enough to know that resurrecting old questions with incomplete solutions is strongly discouraged.

Posting two new unclear and incomplete solutions to the same ancient question within 24 hours starts to look like rep-point hunting, which will get you banned.

I suggest you delete both solutions you have posted here.
Richard Deeming 15-Jun-22 4:12am View
   
Why don't you avoid posting an irrelevant suggestion as a "solution"?

Delete this non-solution.
Richard Deeming 15-Jun-22 4:10am View
   
"Me too" is not a solution to anyone's question.

Either post a comment to the question, or post your own question.
Richard Deeming 15-Jun-22 4:04am View
   
Looking at this and his other question, the OP is increasingly looking like a spammer's stooge account to me.
Richard Deeming 15-Jun-22 4:02am View
   
If you want someone to help you fix an error in your code, you need to explain precisely what the error is. Just saying "exception error" tells us precisely nothing.

Click the green "Improve question" link and update your question to include the full details of the error, and an anonymized sample of the input data.
Richard Deeming 15-Jun-22 4:00am View
   
So you're getting an error we can't see, in a function you haven't shown, and you expect us to be able to tell you how to fix it?

Click the green "Improve question" link. Update your question to include the full details of the error, the relevant parts of your code, and an anonymized sample of the input data.
Richard Deeming 15-Jun-22 3:33am View
   
You haven't explained what you're trying to extract from the data, and there's nothing in the JSON that has the properties your code is trying to extract.

You need to work out what data you're trying to get, and how it relates to the JSON that's returned. Nobody else can do that for you.
Richard Deeming 13-Jun-22 6:25am View
   
And? It's still a dead browser.

Surely it's better to concentrate on supporting current browsers, rather than worrying about cosmetic issues for dead ones?
Richard Deeming 13-Jun-22 4:38am View
   
You have a much bigger problem. Your code is almost certainly vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.

PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Richard Deeming 13-Jun-22 4:36am View
   
Nobody is going to download your entire codebase and debug it for you.

If you can narrow down the problem to a specific part of your code, and still need help fixing it, then you can post the relevant parts of your code, the full details of any errors, and the details of what you have tried and where you are stuck.
Richard Deeming 13-Jun-22 4:32am View
   
We can't help you fix code that we can't see.

Click the green "Improve question" link and update your question to include the relevant parts of your code.
Richard Deeming 13-Jun-22 4:30am View
   
Richard Deeming 13-Jun-22 4:26am View
   
So a homework assignment then?

Nothing else needs to be in jQuery.

If you want someone to help you, you're going to need to update your question to show what you have tried and explain where you are stuck.
Richard Deeming 13-Jun-22 4:12am View
   
Why? Most people are trying to go the other way - convert jQuery code into plain Javascript.

Most modern browsers support enough standard Javascript these days that jQuery is unnecessary. Adding an extra 30Kb overhead to every page load for a library that you don't actually need is pointless.

You Might Not Need jQuery[^]
Richard Deeming 13-Jun-22 4:09am View
   
NB: Internet Explorer is dead. You have two days until the final nail is placed in its coffin[^].

Rather than trying to write code for a deceased browser - which represents a serious security risk to your organisation - you should instead push to get everyone using a modern and still-supported browser.

If your company doesn't like the idea of moving away from a Microsoft product, then suggest Microsoft Edge. It's based on the same engine as Google Chrome, so it has the same support for modern standards.
Richard Deeming 8-Jun-22 5:29am View
   
The link is the whole point of this "solution". Spam and spammer.
Richard Deeming 8-Jun-22 5:28am View
   
566 lines of unformatted, unexplained, and incomplete code copied from someone else's GitHub project is not acceptable as a "solution".
Richard Deeming 8-Jun-22 5:20am View
   
Aside from the fact that you've included two references to the jQuery and DataTables libraries, you haven't actually told us what the problem is.

Remove the duplicate script tags, and then check your browser's developer console for errors. If you need help to fix them, then edit your question and provide the full details of the errors you're getting.
Richard Deeming 7-Jun-22 9:43am View
   
And again: nobody here is going to do your homework for you, no matter how many times you repost it, or how vague you make it!

If you'd put even a fraction of the effort you've spent trying to get someone to do your work for you into paying attention in your course, or learning how to use a search engine, you would have answered your own question yesterday.

Instead, you keep expecting someone else to do your work for you.

That's not going to happen.
Richard Deeming 7-Jun-22 9:26am View
   
I have removed the domain name from your question, since it makes this look like spam.

Unfortunately, you haven't provided enough details for anyone to even begin to help you. All you've done is show two sets of URLs, one of which has a querystring. That wouldn't cause any errors unless you've done something wrong in your code, which we can't see.
Richard Deeming 7-Jun-22 9:23am View
   
This is not a "solution" to your question. I suggest you delete it if you want to avoid attracting down-votes.
Richard Deeming 7-Jun-22 5:37am View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.

Python MySQL Execute Parameterized Query using Prepared Statement[^]
Richard Deeming 7-Jun-22 5:18am View
   
REPOST
You have already posted this:
Can't set height to "auto" in jquery[^]

If your question doesn't appear immediately, you need to wait until it passes the moderation queue. Do not post it again.
Richard Deeming 1-Jun-22 7:54am View
   
If you want someone to help you fix your code, you need to show the relevant parts of your code and provide a clear and precise description of the problem.

If possible, reproduce the problem in JSFiddle[^] or CodePen[^] and post the link.
Richard Deeming 26-May-22 7:54am View
   
We can't help you fix a problem you haven't described in code that we can't see.
Richard Deeming 26-May-22 7:22am View
   
REPOST
You have already posted this:
How can I get value of a as l[^]
Richard Deeming 26-May-22 3:50am View
   
The OP hasn't posted anything since last August, so don't hold your breath waiting for a reply. :)
Richard Deeming 26-May-22 3:43am View
   
If your values are numbers, why are you storing them as strings? Adding two strings together won't give you the result you expect - for example, "1" + "1" == "11".
Richard Deeming 25-May-22 11:37am View
   
The OP didn't reply to the two previous solutions. Unless he's practising Taarof[^], I doubt saying the same thing a third time will make much difference. :)
Richard Deeming 25-May-22 11:24am View
   
Something like this?
$(`input[name="inputpicker-${++inputCounter}"]`).data("itemsSelector", "#" + items.id).data("uomSelect", "#" + uom.id);
...
$(document).on("input", "input[name^='inputpicker-']", function(){
    const itemsSelector = $(this).data("itemsSelector");
    if (itemsSelector) { $(itemsSelector).val(""); }
    const uomSelector = $(this).data("uomSelector");
    if (uomSelector) { $(uomSelector).val(""); }
});

NB: You only want to increment the inputCounter variable once per row. :)
Richard Deeming 25-May-22 10:50am View
   
Nobody is going to do your homework for you.
Richard Deeming 25-May-22 9:46am View
   
But does it give a number to the row when the row is added to the document, or when the plugin is initialized?

If you "inspect element" on a cloned row, does it have a new name, or the same name as the element you cloned?
Richard Deeming 25-May-22 7:04am View
   
It comes down to the template; unless you start with a .NET Standard or .NET Core project template, the project file will still be the "old" format.

If you open the csproj file in a text editor, you'll see that new-style projects start with:
<Project Sdk="...">

whereas old-style projects start with:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="..." DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Richard Deeming 25-May-22 6:15am View
   
You bought a CodeProject account?

I hope that's a translation error. CodeProject doesn't charge for accounts.
Richard Deeming 25-May-22 5:57am View
   
NB: The "target machine actively refused" usually means the connection was blocked by a firewall; if there was nothing listening on the port, you'd be more likely to get a connection timeout error. :)
Richard Deeming 25-May-22 5:44am View
   
According to a comment on that solution:
you can get the symbols to work with .Net Framework projects, but you must use the new .NetStandard project format, and target your preferred .NetFramework version.

If the project is supported, there's a command-line tool to change to the new format:
GitHub - hvanbakel/CsprojToVs2017: Tooling for converting pre 2017 project to the new Visual Studio 2017 format.[^]

Unfortunately, some projects aren't supported. Particularly ASP.NET projects (WebForms, MVC5) and projects with EF6 migrations seem to be verboten.
Richard Deeming 25-May-22 5:36am View
   
As solution 2, posted eight months before yours, already explained.

Stick to answering new questions unless you have something new to add to the discussion.
Richard Deeming 25-May-22 5:25am View
   
NB: SQL Server 2008 R2 has been "end-of-life" since September 2019. When the server this is running on eventually dies, you should look to upgrade to a supported version of SQL Server - especially since you can't install that version on any OS later than Windows Server 2012 R2 or Windows 8.1, both of which are effectively "dead". (Server 2012 R2 is eol in October 2023; 8.1 is eol in January 2023.)

Until you replace it, I hope this server is behind some serious firewalls, and has a decent antivirus system in place!
Richard Deeming 25-May-22 5:19am View
   
As I said two years ago, when this question was posted, there's no way to know how to fix the problem without knowing precisely how the data is transmitted.

Your solution assumes the data is transmitted as the path to an image. But there is nothing in the question to support that assumption. Based on the question, it's transmitted as a Base64-encoded version of the image contents, which would not work with your solution.

The OP never replied to the request for clarification, so we'll probably never know what the data actually looks like. A solution based on an (almost certainly incorrect) assumption doesn't really help anyone.
Richard Deeming 25-May-22 4:56am View
   
How many more ancient questions are you going to resurrect to post a link to the same StackOverflow thread?!
Richard Deeming 25-May-22 4:52am View
   
Which is precisely what the existing solutions suggested, over a week before you posted this.
Richard Deeming 25-May-22 4:09am View
   
The .clone() method won't change the name of any inputs in the element you're cloning. If the element in the last row has name="inputpicker-2", then the element in your cloned row will also have name="inputpicker-2".
Richard Deeming 25-May-22 4:06am View
   
I'm not familiar with Angular, but this line looks wrong:
return = reader.result;

At least in regular Javascript, you can't use the keyword return as a variable name.
Richard Deeming 24-May-22 3:13am View
   
REPOST
You have already posted this:
C# how can I calculate the dominant wavelenght?[^]

Don't repost the same question. If you don't get an answer, then either nobody knows the answer, or your question doesn't have enough information. If you think you can add more detail to the question, then click the green "Improve question" link and update the original question.

Posting the same question again, with less information than the original, will not magically make an answer appear.
Richard Deeming 20-May-22 8:40am View
   
Your lack of understanding is not a problem I can fix.

Read the links I posted, and then fix the critical security vulnerability in your code.
Richard Deeming 19-May-22 10:18am View
   
So the ServerManager instance is only returning a single site with ID 1. Either it's not connecting to the same instance you were looking at, or you're looking in the wrong place for the site ID.
Richard Deeming 19-May-22 8:46am View
   
It was Console.WriteLine; if you use Debug.WriteLine, you'll need to format the message yourself.
Debug.WriteLine($"Available sites: {string.Join(", ", serverManager.Sites.Select(s => s.Id))}")

That will display the list of site IDs returned from your ServerManager instance.
Richard Deeming 19-May-22 8:30am View
   
Any sites which are configured in IIS will be returned by the serverManager.Sites collection.

For example, I have two on my local computer: ID 1 is the default website, and ID 3 is a (stopped) FTP site. The collection returns both.
Richard Deeming 19-May-22 8:03am View
   
That output suggests the placeholder hasn't been replaced. It should look more like:
Available sites: 1
Richard Deeming 19-May-22 7:00am View
   
The error would suggest that the ProductImage column doesn't exist in your table. Are you sure you're looking at the correct database?
Richard Deeming 19-May-22 6:26am View
   
You are also storing passwords in plain text. Don't do that!
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

PHP even has built-in functions to help you do the right thing:
PHP: password_hash[^]
PHP: password_verify[^]
Richard Deeming 19-May-22 6:26am View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
Richard Deeming 19-May-22 6:25am View
   
// doesn't make it here after exception is displayed. 

What exception? If you want someone to help you fix an error in your code, you need to provide proper details of that error.
Richard Deeming 19-May-22 6:22am View
   
The "working" code from your solution is identical to the "not working" code from your question.
Richard Deeming 19-May-22 6:10am View
   
REPOST
The answer has not changed since you posted exactly the same problem back in March:
Error the datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large.[^]
Richard Deeming 19-May-22 5:33am View
   
Try:
Console.WriteLine("Available sites: {0}", string.Join(", ", serverManager.Sites.Select(s => s.Id)));

Check which site IDs are being returned by the ServerManager.
Richard Deeming 18-May-22 9:55am View
   
You seem to have mistaken this site for Google, or your preferred search engine.

Typing the same search query three times does not make it a question!
Richard Deeming 18-May-22 9:54am View
   
Nobody here is going to do your homework for you.
Richard Deeming 18-May-22 7:40am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 18-May-22 6:11am View
   
None of the list items you've shown contain a valid integer in their text.

What precisely do you think the result of Convert.ToInt32("A-0") will be?
Richard Deeming 18-May-22 5:59am View
   
The error message you posted is:
Input string was not in a correct format

That means at least one of the values you are trying to parse is not a valid integer.

Once again, we cannot see your screen, access your computer, or read your mind. We have no way of knowing what the values in those labels are. All we know is that at least one of the values is not a valid integer.

YOU need to debug your code.
Richard Deeming 18-May-22 5:49am View
   
I suspect it's because the $date variable is a string rather than a DateTime.

I've updated my solution.
Richard Deeming 18-May-22 5:35am View
   
The values in your labels are not valid integers according to the parsing rules of the current culture.

Since we can't see your labels, and we have no access to your application, we can't tell you why.

You need to debug your code to find out what the label values are, and why they're not what you expect.

NB: Do yourself a favour and start giving your controls meaningful names, rather than accepting the default names suggested by Visual Studio. You might remember what value Label42 represents today, but when you come back to your code in six weeks, you'll have forgotten.
Richard Deeming 18-May-22 4:55am View
   
If you want to reply to a solution, click the "Have a Question or Comment?" button under the solution and post a comment.

Do not post your comment as another "solution" to your question.
Richard Deeming 18-May-22 4:51am View
   
This question was solved nine years ago. It made no mention of WebView2. And assuming this is the Microsoft WebView2 control, that wasn't released until October last year, so there's no way it could be relevant to the question.

Which means your new solution is simply a repeat of the accepted solution: that you can't use a 64-bit dll from a 32-bit process, and vice-versa.

Unless you're going to add something new to the discussion, stick to answering newer questions where the poster still needs help.
Richard Deeming 18-May-22 4:41am View
   
There's not enough code there to see how you're saving the image to the database. But the use of addslashes makes me suspect you're writing code which is vulnerable to SQL Injection[^].

PHP: SQL Injection - Manual[^]

In addition to introducing a critical security vulnerability into your code, trying to save the file contents without using a properly-parameterised query will result in data corruption.
Richard Deeming 18-May-22 4:36am View
   
And?

Dumping your homework assignment without explaining precisely what you have tried and where you are stuck does not make this a question.

And if you're expecting someone to do your homework for you, you've come to the wrong site.
Richard Deeming 18-May-22 4:34am View
   
You have forgotten to ask a question. You have just dumped your entire code, without any explanation or description of the problem.

Click the green "Improve question" link. Remove everything and start again. Provide a clear and precise description of what you are trying to do, what problem you are facing, what you have tried, and where you are stuck. Include the relevant parts of your code, and the full details of any errors.
Richard Deeming 18-May-22 3:15am View
   
You'll waste space. As for the performance, you need to test that against your own data and queries.
Richard Deeming 17-May-22 12:23pm View
   
If you're using SHA2_512, the output will be 64 bytes; use varbinary(64).
Richard Deeming 17-May-22 12:17pm View
   
So long as you don't use varbinary(max), you can create an index on the column.

Your other questions are unanswerable. You'll need to do some research and testing against your own data and queries to find out what the "best" options are.
Richard Deeming 17-May-22 9:51am View
   
As already explained in solution 1.

And reposted in solutions 3 and 4.
Richard Deeming 17-May-22 8:46am View
   
As already explained in the accepted solution.
Richard Deeming 17-May-22 4:58am View
   
That is not a "solution" to this already-solved question.

And it's also not correct: you've changed the tense of the sentence.
Richard Deeming 17-May-22 4:57am View
   
Resurrecting a solved question from nine years ago to promote your own library is spam, and is not tolerated here.
Richard Deeming 17-May-22 4:37am View
   
If you want to update your question to add more information, click the green "Improve question" link and edit your question. Do not post your update as a "solution" to your question.

But it's clear from this post that you either haven't read solution 1, or you didn't understand it.
Richard Deeming 17-May-22 4:26am View
   
Profile your code. Find the biggest bottlenecks. Fix the bottlenecks. Rinse. Repeat.

We can't do that for you.
Richard Deeming 17-May-22 3:26am View
   
Well either you need to identify the post from the slug, which means having the ID within the slug somewhere; or you already have the ID elsewhere in the URL, in which case why worry about "duplicate" slugs?
Richard Deeming 16-May-22 10:42am View
   
Why not just append the id to the slug?
Richard Deeming 16-May-22 9:54am View
   
Absolutely nothing to do with the question!
Richard Deeming 16-May-22 9:03am View
   
Use Assembly.LoadFromFile to avoid the netstandard reference error, and change the parameter type to:
paramtype = p.ParameterType.FullName
Richard Deeming 16-May-22 9:01am View
   
Fix the data type of the column, and the DefaultCellStyle.Format should work.
Richard Deeming 16-May-22 4:47am View
   
Your question is not a solution to someone else's question.
Richard Deeming 16-May-22 4:45am View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
Richard Deeming 16-May-22 4:41am View
   
If you want to ask a question, then ASK A QUESTION[^]. DO NOT post your question as a "solution" to someone else's question!

But you're going to need to provide A LOT more information that you have here if you want anyone to be able to help you.
Richard Deeming 16-May-22 4:19am View
   
Either change your code so that it doesn't try to perform the forbidden operation, or change the security policy on your server so that the operation is no longer forbidden.

Unfortunately, since we have no information about your code, and no actual details of the exception, we can't tell you any more than that.
Richard Deeming 16-May-22 3:33am View
   
If you want someone to help you fix an error, then you need to provide proper details of the error. Just saying "I am getting error" tells us precisely nothing.
Richard Deeming 13-May-22 10:02am View
   
Your error message is not a "solution" to someone else's question.
Richard Deeming 13-May-22 8:12am View
   
Well, go and do some more research then.

If you have a question about a commercial product, ask the people who sell it. As it stands, this question smells like an invitation for a spammer to "answer" with a link to their own products or services.
Richard Deeming 13-May-22 4:51am View
   
If you want to ask a question, then ASK A QUESTION[^]. DO NOT post your question as a "solution" to someone else's question!

But you're going to need to provide A LOT more information that that if you want anyone to be able to help you.
Richard Deeming 13-May-22 4:47am View
   
If you want someone to help you fix your code, you need to provide the relevant parts of your code here, and explain precisely what the problem is.

Don't post a screen-shot of your code!
Richard Deeming 13-May-22 4:44am View
   
Using IDENTITY_INSERT in production code is almost always a mistake.

Don't try to disguise the problem like this, since it will only lead to data corruption. Instead, try to work out why you're trying to insert an explicit value for the identity column.
Richard Deeming 12-May-22 11:47am View
   
Use PHP's built-in functions to handle password storage safely:
PHP: password_hash[^]
PHP: password_verify[^]
Richard Deeming 12-May-22 11:45am View
   
"select image, pid, description, category, costprice, sellingprice from tblproduct where pid like '" & DataGridView1.Rows(e.RowIndex).Cells(1).Value & " ' "

Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.

Everything you wanted to know about SQL injection (but were afraid to ask) | Troy Hunt[^]
How can I explain SQL injection without technical jargon? | Information Security Stack Exchange[^]
Query Parameterization Cheat Sheet | OWASP[^]
Richard Deeming 12-May-22 11:41am View
   
"Me too" is not a solution to anyone's question.

If you want to ask for more information, click the "Have a Question or Comment?" button under the question and post a comment.
Richard Deeming 12-May-22 11:36am View
   
If IsDBNull("@StartingDate") = False Then

The constant string "@StartingDate" will never be DBNull. Whatever you think this line is doing, you're wrong.

sql &= ",'" & Setting.SettingHelper.HostName & "'"

Why do you suddenly stop doing things properly, and resort to string concatenation? Your code is now vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
Richard Deeming 12-May-22 11:26am View
   
Absolutely nothing to do with the already-solved question!
Richard Deeming 12-May-22 10:40am View
   
echo $row['password']

That line suggests you're storing your users' password in plain text. Don't do that!
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

PHP even has built-in functions to help you do the right thing:
PHP: password_hash[^]
PHP: password_verify[^]
Richard Deeming 12-May-22 10:38am View
   
Don't just dump a link to your project and expect someone to download it, debug it, and tell you what the problem is. Instead, clearly and precisely explain what the problem is, what you have tried, and where you are stuck. Include the relevant parts of your code, and the full details of any errors.
Richard Deeming 12-May-22 3:38am View
   
Nobody here is going to do your homework for you. If you don't know where to start, talk to your teacher.
Richard Deeming 11-May-22 12:11pm View
   
The error message will include a filename and line number, which should tell you where to start looking.

Are you sure it's a CS1002 error, and not a CS0201 error on the two lines starting currentScore + ?
Richard Deeming 11-May-22 12:09pm View
   
C# doesn't need a semicolon at the end of a class. :)
Richard Deeming 11-May-22 12:06pm View
   
We can't see your data, we can't access your database, and we have no idea what "doesn't make sense" means to you.
Richard Deeming 11-May-22 12:04pm View
   
1) DON'T SHOUT! Typing everything in upper-case is considered extremely rude.

2) Don't just dump a link to your project and expect someone to download it, debug it, and tell you what the problem is. Instead, clearly and precisely explain what the problem is, what you have tried, and where you are stuck. Include the relevant parts of your code, and the full details of any errors.
Richard Deeming 10-May-22 10:52am View
   
You are also preparing to store users' passwords in plain text. Don't do that!
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

PHP even has built-in functions to help you do the right thing:
PHP: password_hash[^]
PHP: password_verify[^]
Richard Deeming 10-May-22 10:51am View
   
Assuming those values will eventually come from the user, your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Richard Deeming 10-May-22 10:30am View
   
Nobody here is going to do your work for you.

And mentioning a commercial app-building service in the title of your question for no obvious reason makes you look like a spammer.
Richard Deeming 10-May-22 3:59am View
   
You are storing your users' passwords as an unsalted MD5 hash. MD5 has not been considered "secure" for at least twenty years.

Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]

PHP provides built-in functions to help you do the right thing. Use them.

PHP: password_hash[^]
PHP: password_verify[^]
Richard Deeming 10-May-22 3:58am View
   
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Richard Deeming 9-May-22 3:22am View
   
No. As I said, anything that's part of the window you're sharing will be shared.
Richard Deeming 9-May-22 3:21am View
   
The ListView[^] control is probably the easiest option.
Richard Deeming 6-May-22 3:58am View
   
Which "flavour" of ASP.NET are you using? The solution will be different for WebForms, MVC, Razor Pages, etc.
Richard Deeming 5-May-22 5:43am View
   
If you can't work out how to set a breakpoint in your function using the developer tools, then add a debugger; statement to your function.
$('#itemNo, #title').on('keyup', function(){
    debugger;
    ...
debugger - JavaScript | MDN[^]

Start typing in the fields. If the debugger breaks on that line, then step through the code to see what values you get, and why you're not triggering the AJAX call.

If the debugger doesn't break, then you need to work out why the event handler isn't being triggered.
Richard Deeming 5-May-22 5:27am View
   
So you want someone else to debug your code for you?!

Seriously, learn how to debug your own code. It will save you a ton of time in the future, and make you a better developer.
Richard Deeming 5-May-22 5:01am View
   
So either the keyup event isn't firing; or one of the fields is empty, meaning you return from the event handler before getting to the AJAX request.

Set a breakpoint on the first line of the event handler and step through it to see which is the case.
Richard Deeming 5-May-22 4:54am View
   
If you want someone to write your code for you, there are plenty of sites where you can hire a developer. This is not one of them.

If you actually want someone to help you with a question, then you need to learn how to ask a question. Dumping your list of requirements and demanding help, without showing any effort to do your own work, is not how you do it.

And complaining when you're asked to follow the rules of the site is a great way to get kicked off the site.
Richard Deeming 5-May-22 4:47am View
   
For Chrome / Edge:
Inspect network activity - Chrome Developers[^]

For Firefox:
Network Monitor — Firefox Source Docs documentation[^]
Depending on your settings, AJAX requests may also be visible in the Browser Console[^]
Richard Deeming 5-May-22 4:21am View
   
You've forgotten to ask a question. Just dumping a list of requirements and saying "I need help" suggests you want someone to write the code for you - in which case, you've come to the wrong site.

If you actually need help to fix a problem with code you have written, then you need to provide the relevant parts of your code, the full details of any errors, and a clear and precise description of what you have tried and where you are stuck.
Richard Deeming 5-May-22 4:19am View
   
Define "not working". If you use your browser's developer console, do you see the AJAX request? If so, what is the exact content of the response?
Richard Deeming 4-May-22 12:17pm View
   
Absolutely nothing to do with the question!
Richard Deeming 4-May-22 12:16pm View
   
Absolutely nothing to do with the question!
Richard Deeming 4-May-22 12:16pm View
   
If the imports weren't correct, the code wouldn't compile; it certainly wouldn't run and produce the error shown in the question.
Richard Deeming 4-May-22 12:14pm View
   
You've missed the requirement that the card number has not checked out again after it checked in.
Richard Deeming 4-May-22 6:18am View
   
Neither version of the code you've posted produces the syntax error you describe.

However, your "average" calculation does nothing of the sort. Aside from the fact that you're performing integer division, which will truncate the result, you're also only dividing the third number by the count, rather than dividing the sum of the numbers by the count.

Eg: Enter 1, 1, 1, and your code will tell you that the average is 2, which is clearly wrong.

double avgRes = (num1 + num2 + num3) / 3D;
Console.WriteLine("The average of ({0}, {1}, {2}) is {3}", num1, num2, num3, avgRes);
Richard Deeming 4-May-22 3:55am View
   
Your question is not a "solution" to someone else's question!
Richard Deeming 4-May-22 3:51am View
   
Help with what? What's the problem with the code you've tried?

And if you only want the first row, why rank <= 20? If there are any ties for first place, they will all get a rank of 1.