Click here to Skip to main content
15,393,638 members

Comments by Matthew Dennis (Top 133 by date)

Matthew Dennis 30-Jun-22 21:33pm View
CodeProject.AI Server is a 64 bit application.
Could you provide details of your system?

Do you have both 32 and 64 bit dotnet installed on your system, and which is first in your path?
Matthew Dennis 30-Nov-21 11:01am View
Since you are posting solutions, my one liner
Console.WriteLine(string.Join("\n", Enumerable.Range(-7, 15)
    .Select(x => Math.Abs(x))
    .Select(x => new string('-', x) + new string('*',  15 - 2 * x ))));
Matthew Dennis 30-Nov-21 10:55am View
I was able to do it in 1 line of code. Actually 3 lines with formatting, but one statement. :)
I'll send you the code as to not do his homework for him.
Matthew Dennis 15-Mar-21 11:25am View
No, its just so easy to do it right with the packages.
Matthew Dennis 4-Feb-21 11:37am View
CALL change_table('{foo:"true", dan:"3", 44:"bill"}');
Matthew Dennis 19-Nov-20 16:51pm View
Or better yet, in the Article Writing forum. Sean will see it.
Matthew Dennis 23-Sep-20 15:54pm View
as ASD asd ASD
Matthew Dennis 20-Jul-20 14:11pm View
It appears that you were able to change your display name.
What was the issue and add-in that was causing the problem?
Matthew Dennis 8-Jul-20 16:08pm View
This is a test comment.
Matthew Dennis 30-Oct-19 17:35pm View
Matthew Dennis 30-Oct-19 17:33pm View
Matthew Dennis 9-Aug-19 10:08am View
Is this block of html inside a form tag?
Matthew Dennis 28-Dec-18 2:45am View
You need to do some research on how DI Containers and DI work. Try using your friendly Google to find some articles, or use the search on this site to let people k for some articles.
Matthew Dennis 10-Feb-17 11:51am View
True, but then I would be processing a Huge data set and would be using something a little more complex that would allow for parallel processing of the data. Possibly Sort and Scan for duplicates. That would require the items to be Comparable as well as Equatable.
Matthew Dennis 17-Jan-17 12:06pm View
another test
Matthew Dennis 17-Jan-17 11:59am View
testing 1,2,3
Matthew Dennis 14-Dec-16 11:36am View
Why use a List<String>? How about just creating an anonymous object with the properties you want, or even use a class with the properties you want?
Matthew Dennis 5-Dec-16 17:23pm View
actually probably not in the top 10 dumbest languages. Try Malbolge I'm not even going to attempt it.
Matthew Dennis 16-Nov-16 14:59pm View
No, just posted an issue on GitHub
Matthew Dennis 16-Nov-16 14:27pm View
I got feedback from Rowan Miller of the EF team. There is no way out of the box.
Matthew Dennis 16-Nov-16 14:08pm View
exactly. we (Chris) likes to make sure that all columns are described in our databases.
Matthew Dennis 19-May-16 8:14am View
Please post your code. We can't read minds.
Matthew Dennis 18-Feb-16 17:41pm View
test comment
Matthew Dennis 11-Nov-15 21:17pm View
Reason for my vote of 3 \n just testing voting
Matthew Dennis 1-Nov-15 17:45pm View
You too.
An empty iteration statement (the third part) is a valid expression. This can be zero or more expressions separated by the comma operator, and don't have to do anything related to the termination condition.
Matthew Dennis 6-Oct-15 17:26pm View
Then you are probably trying to implement and divide-and-conquer algorithm for your Algorithms and Data Structures course.
When I took it, we had to calculate 72!, which has 100 digits. I had to do it in Pascal.
The trick is to break it into chunks that you can add or multiply, do the operation on the chucks, and then recombine them into a structure that can hold the result, possibly an array.
Matthew Dennis 5-Oct-15 23:12pm View
for an example of using BigInteger see my tip
Matthew Dennis 19-Aug-15 17:30pm View
Don't you mean string requiredFormat = "yyyy-MM-dd";?
Matthew Dennis 21-Jul-15 13:45pm View
Actually, the question lacks the context of seeing the time metrics during debugging.
VS has a lot of features that change depending on what you are doing.
I suggest that you edit your question to make it clearer where you expected the metrics so that others can understand you problem and benefit from the answers.
Matthew Dennis 27-May-15 22:14pm View
test comment
Matthew Dennis 8-Aug-14 14:49pm View
True enough. However, Console Apps work fine, as the output gets thrown away. Just don't try and read from the Console :)
Matthew Dennis 15-Jul-14 13:56pm View
Despite the fact that the async/await pattern was specifically created to address the complexity and non-scalablity of Threaded programming for IO bound code?
Matthew Dennis 15-Jul-14 13:41pm View
You obviously don't understand how Async works. When an async method awaits a Task, the Thread is made available for use for the execution of other Tasks. This means that each Thread will execute multiple Tasks and will scale better. If you just spin up a new Thread for each chunk of work you will end up creating and time-slicing a large number of threads, each of which has an overhead in terms of memory and CPU.
This is shown in MS examples that have a web site using 5000 Threads for a certain level of concurrent user access, while the async version of the same site will only need 50 Threads and a lot less memory/CPU making the system much more scalable.
I personally find the async/await code much easier to write and read, but it does take a certain level of study and experimentation until you reach the 'Eureka' moment and it all makes sense.
Matthew Dennis 15-Jul-14 12:31pm View
and another test
Matthew Dennis 15-Jul-14 12:22pm View
Debug verification
Matthew Dennis 15-Jul-14 12:21pm View
because I was stepping through the code. Expect some notifications while I work on this. I think I've found the issue and need to verify it.
Matthew Dennis 15-Jul-14 12:07pm View
Now with the debugger attached ...
Matthew Dennis 15-Jul-14 11:48am View
Just to drive me crazy, I bet you get the notification AND email for this.
Matthew Dennis 15-Jul-14 11:47am View
Thanks, looks like I've got some more code reading to do. Might be a bug in the caching that is affecting determining whether the user has permitted emails and if their email address is confirmed and the confirmation has not expired.
Matthew Dennis 15-Jul-14 11:32am View
The email should be working, but I only got the emails for the Solution and the Comment on the question. Did you get any emails.
Matthew Dennis 15-Jul-14 11:30am View
And I have my expected 7 :). I tweaked a few conditionals that might have resulted in some notification not being sent. I hope this works now :)
Matthew Dennis 15-Jul-14 11:28am View
And I have my expected 7 :). I tweaked a few conditionals that might have resulted in some notification not being sent. I hope this works now :)
Matthew Dennis 15-Jul-14 11:26am View
I checked the database and you have 3 Notifications, not including this one, which is what I expect. :)
Matthew Dennis 15-Jul-14 11:23am View
Here is a reply to your comment instead of talking to myself.
Matthew Dennis 15-Jul-14 11:22am View
That would do it, I explicitly don't send notifications to people who are talking to themselves :)
Matthew Dennis 15-Jul-14 11:14am View
And I got the email for this, I hope you get both
Matthew Dennis 15-Jul-14 11:14am View
I got the email for this
Matthew Dennis 11-Jul-14 12:36pm View
Well I got that notification. It appears I 'just' have an issue with Comments :(
Matthew Dennis 11-Jul-14 11:54am View
I appears to be a problem with comments. I got notifications for the replies to my comments in the solution but not to my comments in the Question.

Could you post another answer. Thanks
Matthew Dennis 11-Jul-14 11:09am View
That looks like a different issue than the one I fixed. More code spelunking is in my future.
Matthew Dennis 11-Jul-14 11:04am View
I got both the notification and the email for this.
Thanks for the help.
Matthew Dennis 11-Jul-14 11:03am View
Thanks for the assistance
Matthew Dennis 11-Jul-14 11:01am View
I at got a notification and an email :)
Matthew Dennis 11-Jul-14 11:00am View
It looks like its working. I got an email, at least for the solution.
Matthew Dennis 24-Jun-14 14:24pm View
In order to map business requirements to BDD test I will be using SpedFlow. This is a free extension for VS. Each test project needs to load the Nuget SpecFlow package to get the required dll.
It looks like Selenium is the UI automation test tool of choice. I had thought to use WaitN, but it appears to no longer being actively developed.
A Nuget package, FluentAutomation supports both Selenium and WaitN, and simplifies writing the tests.
Matthew Dennis 23-Jun-14 16:12pm View
Customized the templates to use the Bootstrap styling consistently.
Matthew Dennis 18-Jun-14 13:17pm View
It just worked.
Matthew Dennis 16-Jun-14 16:38pm View
This corrects a number of issues. The rate of updates means this will be in final beta or release when we are ready for release.
Will use the Samples as a starting point.
Matthew Dennis 15-Jun-14 16:58pm View
All this code does is reverse the order of the elements in the array. A simple O(N) operation.
Matthew Dennis 12-Jun-14 16:31pm View
Looks like an Issue with the UserPrefernces Caching
Matthew Dennis 11-Jun-14 22:18pm View
Please try again. I works for me.
What browser, and OS are you using?
Matthew Dennis 11-Jun-14 18:09pm View
UserPreferences do not have the correct values.
May need some help on this one.
Matthew Dennis 11-Jun-14 17:15pm View
Confirmed that OriginalGriff had comments to Q&A on June 5th that do not have corresponding entries in the Notifications table.
Matthew Dennis 11-Jun-14 16:34pm View
Traced the code, and it seems to be working correctly.
Check members' Email Enables and Email confirmation dates that reported the issue and they seem correct.
This could mean that the UserPreference data is incorrect either in the cookie, session, Redis, or database. I don't think it is the email server as there are reports of Emails but no Notifications.
Need to check if there is a multi-threading issue.
Matthew Dennis 28-May-14 13:29pm View
need to check the maintainence downtimes for DFP API. I know that with DART, we couldn't use the API on Staurdays. This would prevent getting Ads.
Matthew Dennis 26-May-14 14:07pm View
Was a type in url.
However, the url should be HTTPS, not HTTP except in development.
Matthew Dennis 26-May-14 12:43pm View
Cached the UserAuthenticationToken in Request.Items so that the same token is used for the duration of the Request.
Matthew Dennis 26-May-14 11:54am View
The problem is that the Url registered in the LinkedIn account does not match

I don’t have access to the account to make the required change.

I have reassigned the task to Chris.
Matthew Dennis 26-May-14 11:03am View
Currently (26May14) have created a SVN-Git repository containing ALL the projects. Need to break it apart into separate repositories.
Matthew Dennis 2-May-14 19:26pm View
Tested, but most uses of location info use the UserPreferences for this information.
Tidied up the campsite a bit while I was in there.
Matthew Dennis 30-Apr-14 13:12pm View
Matthew Dennis 24-Apr-14 18:23pm View
Unable to recreate. May have been an issue due to lack of disk space, which has been resolved.
Matthew Dennis 24-Apr-14 17:48pm View
Not as simple as I thought it was going to be.

1. Need to Store filter in Campaign.

2. Status Indicators for both filtered and non-filtered contacts.

3. Need to be able to change filters at report.

4. Need to be able to export filtered and non-filtered versions.

Matthew Dennis 23-Apr-14 15:05pm View
Currently Article Edit Locks are maintained in the database in the Article table using the EditLockGained (DateTime?) and EditLockMemberId (int?) fields.

Unfortunately, the checking for the lock occurs in the code, not the database which can result in multiple users thinking they have the lock.
One of the reasons why the check is done in the code, is that the time stored is the time the lock was taken, not the time it should expire.

The current flow is

1. Is the article locked by someone else?
1. Set the article fields to Now and the EditorMemberId without checks.
1. Do stuff, possible over several Requests.
1. Release the lock, again without checks for ownership.


1. Because the check for locked is done using the current copy of the article, multiple users may see the article as unlocked.
1. Because of (1) multiple users will lock the article, last man wins but the others think the won.
1. Either by bad code, or because they erroneously think they have the lock, anyone can release the lock when the don’t own it.

Recommended changes:

1. Store the DateTime the lock expires DateTime so the stored procedures can check for expired lock.

1. Instead of using art_ArticleUpdateLockInfo stored procedure
UPDATE Article
SET EditLockGained = @EditLockDate, EditLockMemberId = @EditingMemberId
WHERE ArticleID = @ArticleID

or create new art_ArticleGetLock stored procedure
UPDATE Article
SET EditLockExpires = @EditLockDate, EditLockMemberId = @EditingMemberId
WHERE ArticleID = @ArticleID and
((editLockMemberId is null or editLockMemberId = @EditingMemberId) or
(editLockExpires is null or editLockExpires < GetDate()))

Success can be check by the number of records updated == 1

1. Similarily, an art_ArticleReleaseEditLock should be
UPDATE Article
SET EditLockExpires = null, EditLockMemberId = null
WHERE ArticleID = @ArticleID and
( editLockMemberId = @EditingMemberId or editLockExpires < GetDate()))

Success can be check by the number of records updated == 1
Matthew Dennis 15-Apr-14 18:14pm View
There was a bug in EnsureFilesInSourceControl (or something like it) that was preventing updating of the Git if the Workspace already existed. Fixed this earlier.
Matthew Dennis 15-Apr-14 15:30pm View
The order by Popularity and limit of 20 article was killing the Showcase article as they have a low popularity (probably 0 or null).
Matthew Dennis 15-Apr-14 15:12pm View
Also the Poll was not being shown in the Monday Daily Build.
Matthew Dennis 15-Apr-14 14:09pm View
NewsletterRss.Aspx filters articles votes>=3 and rating >=3.0.
Showcase articles don't show the rating control, but surprisingly do show the Reporting flag. This means that the article will never be sent as content.
Additionally, only the top 20 articles, ordered by Popularity are selected.

Chris, how do you want to change this?
Matthew Dennis 14-Apr-14 14:26pm View
I may have inadvertently left the Incremental Crawl stopped, but will monitor for a bit to see if this re-occurs.
Matthew Dennis 14-Apr-14 14:24pm View
Actually it does, but was not pushing to all servers.
Matthew Dennis 11-Apr-14 17:18pm View
The Question is the Thread Message, so we need to allow tags when the initial question is posted.

Now we need to distinguish between the initial message and the replies.

We could use Search to get a list of the Questions and use the Thread View page to display the replies.
Matthew Dennis 11-Apr-14 13:08pm View
probably the best thing to do is set the Save Filters On and hide it.
Matthew Dennis 11-Apr-14 12:58pm View
Still setting the allTags flag!!!

Arrghhh! page needed compiling. ok now.
Matthew Dennis 11-Apr-14 12:49pm View
When using Search for the Question List, allTags is set to false.
Matthew Dennis 11-Apr-14 12:46pm View
document images are being converted correctly.
Changed code to convert Simley src URLs to absolute, but Workspaces is converting the to for these urls.
Matthew Dennis 11-Apr-14 10:40am View
Now a Super Task for the tasks to complete all this.
Matthew Dennis 11-Apr-14 10:06am View
A Union is much faster than an or in the Where clause.
Matthew Dennis 10-Apr-14 17:52pm View
I think that Runtime has to try and log the user in using CodeProject cookies.
Matthew Dennis 10-Apr-14 17:29pm View
On file save error, such as invalid exception, or other reasons, the filename to use for creating the RelatedFile.FileUrl was set to the original HttpFile filename, not the local filename. Then, the code did not check the Result.Success value when looping through the result collection from saving the files.
Matthew Dennis 2-Apr-14 19:00pm View
This has to be done by the someone who has rights to the CodeProject LinkedIn account.
Matthew Dennis 26-Mar-14 15:33pm View
Message were being removed from the faulted queue but not re-inserted if updating the cache failed.
Matthew Dennis 25-Mar-14 14:32pm View
Changed text in Draft mode to "Exit without Publishing"
Matthew Dennis 24-Mar-14 16:43pm View
changed to use System.IO.Compression.ZipArchive.
This seems to create valid zips.
Removed RAR from the lists of valid file types.
Matthew Dennis 24-Mar-14 14:16pm View
API/Authentication/Register was incorrectly returning and error of 'invalid operation' where the email was new, but the username was a duplicate. This was traced to an invalid assumption in the UserRepository.UserNameAvailable method which assumed that if UserProfile did not exist in the cache, it didn't exist. Changed to check the database as well.
Matthew Dennis 12-Mar-14 11:32am View
not required. Can determine files from RelatedFiles.
Matthew Dennis 20-Feb-14 16:04pm View
/Api/Git/GetAuthorizationInfo already exists.

IncreaseDownloadCount existed with additional parameter which has been removed and tested.
Matthew Dennis 12-Feb-14 15:00pm View
"I acknowledge that information from my Professional Profile may be sent to third party sponsors of Research Library content."

The checkbox should be marked as required.
Matthew Dennis 12-Feb-14 14:34pm View
Forget the stuff in parentheses. Makes it too long.
Matthew Dennis 4-Feb-14 11:25am View
It's not a solution, just another way to do it.
Matthew Dennis 3-Feb-14 18:01pm View
Why did you flag the question as Unclear or Incomplete? It seems very clear to me what he is asking.
Matthew Dennis 3-Feb-14 15:35pm View
You could also do
string u = "...";
drpdwn.datasource = context.DB.SUB_HEAD.Where(x => x.head_code == u).ToList();
Matthew Dennis 28-Jan-14 16:39pm View
The methods using the UserCacher.CacheUserInfo did not ensure that the UserProfile had all the properties populated. TagList, for one, was null in may cases. This has been corrected.
Matthew Dennis 20-Jan-14 16:45pm View
Test message -- Ignore
Matthew Dennis 20-Jan-14 12:31pm View
The UserCacher does not cache tags.
Should this be rewritten to use the new MappingCacher?
Matthew Dennis 17-Jan-14 13:12pm View
Haven't decided where is the best place for these files yet.
Matthew Dennis 16-Jan-14 12:47pm View
Not so. The current implementation can use any unique string as an ItemReference. However, if it is in the format of site.objectType.Id, the additional information is parsed and saved. I think the issue is that other services are assuming that the siteId, objectTypeId, and objectId exist and are using them to join tables rather that having a GlobalItemId.
Matthew Dennis 10-Jan-14 16:53pm View
Test Comment
Matthew Dennis 9-Jan-14 15:06pm View
After discussion with Kamil, made sure that CodeProject only displays Comments for Items on the Site, not all.
Does not require Private flag on Comment. Private/Public is a Workspace attribute, not a Comment attribute.
Matthew Dennis 25-Aug-13 12:49pm View
Did you check the trash bin for the file?
Matthew Dennis 21-Aug-13 19:14pm View
Not SEO friendly. The URL should include something that describes what the URL is about.
Google will find it if there is a link to that URL on some page that it indexes.
Matthew Dennis 11-Feb-13 11:09am View
try searching for ASP.NET Membership
Matthew Dennis 18-Oct-11 19:55pm View
I used an array of ints of 5 digit length as the product would be 10 digits or less, the max on the machine we were using. Then iteratively multiplied the array by the each number and 'normalized' the array items to 5 digits. See my alternate below on using the BigInteger class.
Matthew Dennis 18-Oct-11 19:30pm View
I had an assignment in university to calculate 72!, all 100 digits of it. Most of the class blew their account limits with infinite loops and other errors.
Matthew Dennis 19-Jun-11 14:36pm View
Matthew Dennis 16-May-11 15:17pm View
And how much are you willing to pay?
Matthew Dennis 2-Sep-10 18:56pm View
asfasf asdfasf
Matthew Dennis 3-Aug-10 11:17am View
Reason for my vote of 5
test vote
Matthew Dennis 3-Aug-10 11:17am View
Reason for my vote of 3
test vote
Matthew Dennis 8-Jun-10 11:46am View
Is this a Windows Forms Application or a WebForms Application? If Windows Forms, you will need to host the browser to display the HTML as you want.
Matthew Dennis 29-May-10 11:16am View
this is a test comment
Matthew Dennis 27-May-10 16:21pm View
Matthew Dennis 24-May-10 12:40pm View
Matthew Dennis 22-May-10 19:30pm View
You might want to check out the Reactive Extensions for .Net (or JavaScript). Any IEnumerable can be turned into an Observable collection. See
There are also a number of Blogs about it. Also Channel9 has several videos.
Matthew Dennis 18-May-10 22:06pm View
this is a test
Matthew Dennis 17-May-10 16:51pm View
Matthew Dennis 17-May-10 13:08pm View
test to see iff the spaces get mangled.
Matthew Dennis 13-May-10 7:19am View
test "test";)
Matthew Dennis 13-May-10 7:19am View
Matthew Dennis 12-May-10 17:13pm View
A test comment; alskfjslfkj
Matthew Dennis 10-May-10 10:40am View
This is a test for a commenting issue, ignore.
Matthew Dennis 6-May-10 9:37am View
Matthew Dennis 6-May-10 9:36am View
Testing Comment
Matthew Dennis 4-May-10 16:12pm View
a test comment