15,606,999 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by BillWoodruff (Top 200 by date)
BillWoodruff
2-Mar-23 8:36am
View
My apologies for a recent comment ... it has been removed. cheers, Bill
BillWoodruff
2-Mar-23 1:16am
View
Deleted
You are writing code for QA posters, solving their homework problems, not guiding, or teaching, obviously confused newbies.
How much do you really need to build "reputation points" this way ? You are contributing to dependency, and, as you can see, in the OP's response to your solution, they may remain confused and "needy."
BillWoodruff
15-Feb-23 21:56pm
View
https://learn.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle
?
BillWoodruff
23-Jan-23 21:10pm
View
+5
BillWoodruff
23-Jan-23 21:07pm
View
I don't see any direct response to my comments, or the question I asked you.
BillWoodruff
20-Jan-23 7:54am
View
What level are you at with Linq and IEnumerable ? imho, that's important in responding to you.
Would another example, using simpler Linq, be helpful ?
BillWoodruff
20-Jan-23 7:51am
View
I asked the OP what level he's at with Linq and IEnumerable.
BillWoodruff
20-Jan-23 2:14am
View
+5 that code is like seeing notes by Bach for music he heard in his head (when he was deaf) ... and, when realized/played, was beautiful :)
the IGrouping of Anonymous Types it produces is a very strange beast; most mortals will have to struggle to enumerate/dereference it into "usable" form.
i wonder if the OP would benefit from a simpler version ?
BillWoodruff
19-Jan-23 22:27pm
View
how much memory do you have to work with, and, how did you end up with such a gigantic (not ordered) array ? what is the real world scenario, if any ?
"the number and values of the strings are unknown:" in an array of strings, each item is a string, and is the "value." confused.
BillWoodruff
19-Jan-23 6:52am
View
imho, learning tricks/hacks like this is a distraction from learning C# and WinForms: it is a clever one-off ... it doesn't generalize in a useful way to other challenges.
try one of Jessie Liberty's, or Chris Sells', books on WinForms ... oldies, but rock solid resources, for building a foundation.
BillWoodruff
19-Jan-23 6:48am
View
excuse me for saying this is a trick/hack, it increases UI/code obscurity, and, i would never expose a student to a technique like this. curmudgeon bill :)
BillWoodruff
19-Jan-23 0:04am
View
Well does it work or not ? Do you understand now why your original code does not work.
There is nothing about the technique that depends on FrameWork version.
Please express your judgement of solutions by accepting or voting, or both.
BillWoodruff
18-Jan-23 20:16pm
View
Assuming this is a WinForms app created by using Visual Studio's 'New Project' menu:
Look at the program.cs file, and show the code that starts the APP.
If 'frmStart is the Main Form, the code I showed will work.
BillWoodruff
18-Jan-23 5:49am
View
Amen !
BillWoodruff
15-Jan-23 10:52am
View
Yes, thanks for your time ! imho, the compiler should break on duplicate names in an inheriting class ... by default. I am surprised ReSharper didn't flag this. Is it possible a new update of VS has affected ReSharper settings: I'll ask JetBrains.
BillWoodruff
15-Jan-23 9:09am
View
I am tempted to post an example based on the fact that inheriting classes can access 'const fields in the class they inherit from, but, I think in this case, that's not what the OP needs, and, would be a distaction: what do you think ?
BillWoodruff
15-Jan-23 7:49am
View
Deleted
+5 what an excellent, comprehensive, solution !
BillWoodruff
13-Jan-23 10:35am
View
read all the comments, and look again: do you see any down-votes :)
fyi: #3 is not a downvote, to me.
BillWoodruff
13-Jan-23 5:07am
View
This is very unclear. What is the DataTable in relation to the XML whatever ?
BillWoodruff
13-Jan-23 3:13am
View
applause ! i have to vote this #5 now :)
imho, the type of OP we get here is unlikely to understand the advanced pattern-matching switch example, which, of course, does not make it any less valuable,
BillWoodruff
13-Jan-23 3:09am
View
users will accept anything :)
BillWoodruff
13-Jan-23 1:36am
View
and, it is your code ?
BillWoodruff
13-Jan-23 0:45am
View
did you actually run this code and verify it works ?
BillWoodruff
13-Jan-23 0:42am
View
have you actually run this code yourself and verified it works ?
BillWoodruff
13-Jan-23 0:39am
View
then try something, and come back with code and specific questions.
BillWoodruff
13-Jan-23 0:38am
View
voted #3 for response to gimme-codez OP who "haven't tried anything" on a question almost certain to be removed.
however, your reply is potentially helpful.
BillWoodruff
13-Jan-23 0:33am
View
special medal for helping homework shirkers/procrastinators who "haven't tried anything" ?
BillWoodruff
11-Jan-23 7:51am
View
i wanted the goodies in WPF, but bounced off XAML. when Sinofsky killed SilverLight, and took MS into the "Metro" weirdness ... and, then WPF cycled through deprecated and ? ... i lost interest.
the work Pete 0'Hanlon and others at CP in the "Disciples" group was fascinating, and, technically daunting.
BillWoodruff
11-Jan-23 7:19am
View
having gone through the complexity of doing this in WinForms and finding it took lots of effort to make it "look right" whatever the user did ... i wonder if, for a beginner (?), maybe a suggestion to go with WPF is appropriate.
BillWoodruff
10-Jan-23 4:30am
View
agreed: MDI is the evil demon that spawned this semantic plague ! :)
in the past, I was always surprised at the difficlty my students had getting "down" the difference between a class definition and an instance of the class. some had previous experience with VB or Java which seemed to contribute to their difficulty, and, if yoy do use inheritance from a "base form" in WinForms, you've got to do tricks to access the base form's controls that seem strange .. as strange as mucking with the base form desinger file to make stuff 'public.
did WPF fix all this ?
cheers, bill
p.s. for me "access to the instance" is a mantra.
BillWoodruff
10-Jan-23 0:56am
View
I have discussed my syntax issues with using 'Parent ... again, here :)
imho, a serious design error by MS, and, it generates confusion in students ... compared to words like "access" that do not have the "baggage" of ZOrder, TopMost, etc.
Also, exposing the public internals of a creating class to classes it creates is, imho, a serious violation of SOLID.
BillWoodruff
8-Jan-23 20:17pm
View
start studying and experimenting ...state why you don't save a file using one of the standard, built-in, facilities, and a standard file-format.
BillWoodruff
7-Jan-23 12:51pm
View
thanks, Dave, my brain is not doing DateTime that well, now. i thought Sergey might have come roaring back.
p.s. wondering why a spammer would choose an old QA question,
BillWoodruff
6-Jan-23 23:44pm
View
+5
BillWoodruff
3-Jan-23 7:52am
View
that's an excellent answer, if the OP wants a Console (string) type output !
i'd vote that #5 if you posted that as solution
BillWoodruff
3-Jan-23 0:25am
View
You either:
1) drag-drop a DataGridView Control onto a Windows Form at design time
or
2) create a new onw in code, and then add that to the Controls collection of a container control, like a Form or UserControl.
DataGridView dataGridView1 = new DataGridView();
BillWoodruff
27-Dec-22 0:50am
View
"If you have a letter A with fontsize being 14 and a letter B right follows A but has a fontsize of 30. The Height here for both these letters should be the same"
This makes no sense.
Assume a line of text in an RTF control where different characters are in varying fonts, styles, and sizes: what is your goal ? What happens at run-time ?
p.s. I spent years dealing with issues of character size and position, putting text on complex paths, etc., at companies like Adobe.
BillWoodruff
24-Dec-22 9:01am
View
+5
BillWoodruff
23-Dec-22 9:14am
View
"How to achieve dropdown and checkbox value saved and retrieved in .NET" your explanation doesn't clarify what you are trying to do.
"saved/retrieved" from what / to what ? where are the checkbox and dropdown located ?
BillWoodruff
22-Dec-22 5:38am
View
Get your instructor to work with you to figure out what this assignment requires.
The complexity of efficiently altering an image's brightness or contrast can be seen in this complex example:
https://stackoverflow.com/a/3115178/133321
BillWoodruff
21-Dec-22 9:50am
View
i'd say the OP probably wants to write doubles into the Excel WorkSheet Cells ... unless GemBox has some weird constraint.
BillWoodruff
21-Dec-22 8:24am
View
Deleted
study the Double.Parse() and Double.TryParse() methods in C#.
In Excel VBA see: https://www.exceldemy.com/excel-vba-convert-string-to-double/
BillWoodruff
21-Dec-22 6:38am
View
+5
BillWoodruff
17-Dec-22 21:31pm
View
that sounds like another question, and how would anyone help you when you don't describe exactly what the map is, or its behavior ?
you are not doing the work/study/experimentation needed to make a plan for your game, and specify its components and how they function.
we are not here to write your code for you, but to help you solve problems with your implementation.
Make a detailed plan, and get to work.
BillWoodruff
17-Dec-22 11:16am
View
... and ... ?
BillWoodruff
17-Dec-22 9:12am
View
possible the OP is using Buttons, not images ?
BillWoodruff
16-Dec-22 0:51am
View
why not learn to use WPF drag and drop ?
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/walkthrough-enabling-drag-and-drop-on-a-user-control
what grid control are you using ?
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/drag-and-drop-overview?view=netframeworkdesktop-4.8
BillWoodruff
15-Dec-22 7:46am
View
Describe your IDE and app context. Why use the Registry ? Why not use an app Setting ?
BillWoodruff
15-Dec-22 7:39am
View
Deleted
looks like javascript/web : what IDE are you using ?
BillWoodruff
13-Dec-22 22:14pm
View
show an example of a line of the data file, and show the output that is not formatted as you expect it to.
BillWoodruff
13-Dec-22 0:47am
View
and what result from what you tried ? error message ? text does not appear in textbox as expected ? or ? where is the code that disables the textbox ?
BillWoodruff
12-Dec-22 9:26am
View
+5
BillWoodruff
9-Dec-22 7:24am
View
Deleted
we are all blind men groping an OP elephant in the same dark room: i believe my suggestions were a positive contribution, i'm not sure anything i say meets your standards which is okay for me.
BillWoodruff
9-Dec-22 5:11am
View
I have another opinion, Sir :) but, i have changed my vote on Rick's solution to #4.
"inappropriate" was an inappropriate term for conveying the idea that learning a Console app, which is interactive, is an investment of time and energy which will not generalize in the way that a simple WinForm app will.
BillWoodruff
9-Dec-22 4:28am
View
Deleted
ad hominem responses bounce off me :)
"get the idea that this is a winforms question"
I got it the same place you got the idea it was a Console app question, but, my recommendation is based on years of teaching C# to beginners as well as programming. And, based on experience with how newbies get confused asking the Console to do useful, interactive, tasks.
BillWoodruff
9-Dec-22 2:30am
View
Deleted
#1 Rick, this is really inappropriate advice for a confused person who may, or may not, have any real intention to learn C#,: they will waste time learning the weirdness of the Console.
BillWoodruff
6-Dec-22 12:37pm
View
i have a string of "Whatis4compareToABig44Number" i want it to extract repeated
characters like in the string it has repeated character "40maeri".
what is the expected output for this string ?
BillWoodruff
6-Dec-22 6:53am
View
everyone here learns through mistakes, and incorrect assumptions. :) cheers, bill
BillWoodruff
6-Dec-22 6:40am
View
Have you searched MS for Outlook interop support ?
BillWoodruff
6-Dec-22 6:32am
View
look for support or information from "Apitron.PDF.Controls."
how do you know a byte array contains intelligible text ?
BillWoodruff
5-Dec-22 0:17am
View
Describe your usage of 'Panel' in terms of structure: href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/panels-overview
please review: https://wpf-tutorial.com/usercontrols-and-customcontrols/creating-using-a-usercontrol/
BillWoodruff
24-Nov-22 6:13am
View
Research it, experiment: Post specific issues on a new thread on this forum.
BillWoodruff
23-Jul-22 1:39am
View
Whar are you doing to persist (serialize, store) the list ?
BillWoodruff
21-Jun-22 4:09am
View
thanks, i'll report that as a site bug to CP.
BillWoodruff
21-Jun-22 3:43am
View
Well, great :) Perhaps it's tine you upvoted my solution ?
For some reason, I am getting 2 email notifications for each of your comments.
BillWoodruff
21-Jun-22 2:53am
View
Hi, I wanr to help you if I can !
Right now, I need more specific information on what your problem is.
I suggest you post a new question which includes your current code and an example of output that is not what you expect.
Please do not send the same comment twice.
cheers, Bill
BillWoodruff
20-Jun-22 5:31am
View
What have you tried ? And what solution are you after ?
Please be very specific.
BillWoodruff
21-Feb-22 0:55am
View
+5 amen !
BillWoodruff
11-Feb-22 18:13pm
View
a node can have only one child node ? that's a linked list ?
what is the reason you need to traverse up and down at the same time ?
BillWoodruff
25-Jan-22 9:40am
View
That indicates some kind of install error: you've got to identify the exact dependency that is not implemwnted, and remove the older whatever that is invoked now. Sorry I can't be more helpful.
BillWoodruff
22-Jan-22 8:37am
View
but, your code does not cause an error ? Try putting a break-point at the start of your code, then single-step (F11), observing the state of variables.
BillWoodruff
22-Jan-22 7:45am
View
What happens ... or does not happen ... when you run your code ?
BillWoodruff
19-Jan-22 21:24pm
View
While a TabPage doesn't expose an 'Enabled property at design-time, you can set it at runtime in code, and, the TabPage can still be selected.
see revised solution.
BillWoodruff
19-Jan-22 20:15pm
View
if this is C#, why are you using low-level API calls rather than controls on a Form or WPF Window ?
BillWoodruff
19-Jan-22 20:12pm
View
This idea and its code is so confused i suggest you get a good back on C# and study the "basics," and, re-think your design. What type of calculator increments some variable by #7 each time a mouse-click on a button occurs ?
There are lots of examples of C# calculators on-line: study them !
BillWoodruff
18-Jan-22 8:01am
View
'base ? what is the context here that makes you use ;base ?
I suggest you set your MDIForm size in its code, then use use the Dock Property to make amy one of child Forms fill it.
BillWoodruff
17-Jan-22 0:36am
View
Name:John,Age:18,Hobby:(text message)
Name:May,Age:17,Hobby:(text message)
Name:Jane,Age:17,Hobby:(text message)
this is the string output you want ? where each "text message" can havew any number of lines ?
BillWoodruff
14-Jan-22 14:13pm
View
from the "builders" of C# Tuples (.NET 4.0 release):
https://docs.microsoft.com/en-us/archive/msdn-magazine/2009/brownfield/building-tuple#id0400060
"The first major decision was whether to treat tuples either as a reference or value type. Since they are immutable any time you want to change the values of a tuple, you have to create a new one. If they are reference types, this means there can be lots of garbage generated if you are changing elements in a tuple in a tight loop. F# tuples were reference types, but there was a feeling from the team that they could realize a performance improvement if two, and perhaps three, element tuples were value types instead. Some teams that had created internal tuples had used value instead of reference types, because their scenarios were very sensitive to creating lots of managed objects. They found that using a value type gave them better performance. In our first draft of the tuple specification, we kept the two-, three-, and four-element tuples as value types, with the rest being reference types. However, during a design meeting that included representatives from other languages it was decided that this "split" design would be confusing, due to the slightly different semantics between the two types. Consistency in behavior and design was determined to be of higher priority than potential performance increases. Based on this input, we changed the design so that all tuples are reference types, although we asked the F# team to do some performance investigation to see if it experienced a speedup when using a value type for some sizes of tuples. It had a good way to test this, since its compiler, written in F#, was a good example of a large program that used tuples in a variety of scenarios. In the end, the F# team found that it did not get a performance improvement when some tuples were value types instead of reference types. This made us feel better about our decision to use reference types for tuple."
BillWoodruff
14-Jan-22 6:02am
View
just to keep things interesting :)
// Flight is a Class
IEnumerable<flight> testflight = null;
// => true
bool isnull1 = testflight is null;
// ValueType assignment compile error
// (Flight, Flight) testflights = null;
// no compile error
// (Flight, Flight) testflights = default;
// no compile error
// (Flight, Flight) testflights = (null, null);
// no error
(Flight, Flight) testflights = (new Flight("X"), null);
// => false
bool isnull2 = testflights.Item1 is null && testflights.Item2 is null;
testflights.Item2 = new Flight("Y");
// => true
bool isnull3 = testflights.Item1 != null && testflights.Item2!= null;
consider: if testflights is immutable, what will/won't happen when its Item2 is assigned after its first use ?
BillWoodruff
14-Jan-22 5:20am
View
:) Tony Hoare in 2009, speaking of his 1965 inventor of null: "I call it my billion-dollar mistake…At that time, I was designing the first comprehensive type system for references in an object-oriented language. My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years."
BillWoodruff
14-Jan-22 4:32am
View
Thanks ! I expanded the comment you just responded to. The second type declaration in your first example does not have a ? suffix ... accident ?
Since an IEnumerable is by definition nullable, why is the ? required ?
BillWoodruff
14-Jan-22 4:00am
View
You use DisplayMember and ValueMember ONLY when you use binding. If you ARE using binding: reset them after you add items and reset the DataSource and see if that makes a difference.
BillWoodruff
14-Jan-22 3:51am
View
As over-engineered as the Pragma weirdness :) ?
BillWoodruff
14-Jan-22 3:50am
View
One other thought: is there something special about the Tuple Type that is a factor here ? In .NET 4.0, the new Tuple Type is a reference type; then, in 7.0, the "literal" Tuple (ValueType) was introduced.
So, if I'm using a Tuple that I believe is not literal: why, if I just return null, does the compiler shout:
Error CS0037 Cannot convert null to '(IEnumerable<flight>, IEnumerable<flight>)' because it is a non-nullable value type
Clearly it sees the Tuple I define as a ValueType which explains why returning 'default works, but, makes the fact (null,null) works ... strange.
BillWoodruff
13-Jan-22 12:03pm
View
+5 as usual :)
i am wondering if there's a better syntax for returning a null value for a Tuple like this where type T in an IEnumerable<t> is a reference type.
(null, null) does work.
BillWoodruff
13-Jan-22 3:49am
View
see second example added to solution.
BillWoodruff
12-Jan-22 4:58am
View
excellent answers are timeless :) ... and deserve up-votes !
BillWoodruff
11-Jan-22 23:30pm
View
+5
BillWoodruff
11-Jan-22 23:28pm
View
+5 very useful !
BillWoodruff
11-Jan-22 3:11am
View
Have you considered opening an issue on the GitHub site ?
BillWoodruff
8-Jan-22 0:53am
View
Got it. Wonder how many DFA gurus are using the internet from their Himalayan caves OMG :)
Happy New Year !
BillWoodruff
8-Jan-22 0:37am
View
Writing a function that takes string data and a list of regex's as inputs, and then executes the regex's in sequence is not acceptable ?
BillWoodruff
7-Jan-22 8:37am
View
1) ListBox Items are Type Object: when you assign them at design-time they will be Strings.
2) assigning other Types will work if their Type implements 'ToString.
3) your code:
a) every time you create a new "something" inside a method (locally), the reference to that something is lost when the method exits (goes out of scope). That is almost always a bad thing. Define variables of Type something outside the method, andassign new whatevers tp them inside the method: that way you don't lose the reference.
b) I can't tell what you are trying to do with this code: revise your original post, and clearly explain it.
BillWoodruff
5-Jan-22 7:41am
View
fyi: there is a Dapper area on StackOverFlow: https://stackoverflow.com/search?q=dapper
BillWoodruff
5-Jan-22 0:37am
View
then, you'll have to do the hard work of finding that icon file in Windows using the techniques I directed you to. but, first, you need to research if Windows includes a 128x128 or larger icon for "This PC" which is a rather unique icon in terms of usage.
https://www.creativefreedom.co.uk/icon-designers-blog/windows-7-icon-sizes/
when/if you have the Icon file, you can display it in a Picturebox:
picturebox1.Image = TheIcon.ToBitmap();
BillWoodruff
4-Jan-22 15:48pm
View
What shows up on screen for a UFO ... a bitmap ? an icon ? a character in a font of picture/symbols ? ?
BillWoodruff
4-Jan-22 12:27pm
View
Unclear: are you asking how to report the state/value of something you did not find, or did not expect to fins ?
BillWoodruff
4-Jan-22 10:41am
View
Sorry, that's the only thing i can think of ... one way to check that might be to look for some other call to that librarys facilities and see if that, also, breaks ?
BillWoodruff
4-Jan-22 10:38am
View
Are you sure Win 10/11 does nor have a 128x128 size This PC icon ? You can almost certainly find a graphic you can capture or download on Google:
https://www.google.com/search?q=windows%2010%20%20%22This%20PC%22%20icon&tbm=isch&hl=en&tbs=isz:l&rlz=1C1CHWL_enTH966TH966&sa=X&ved=0CAIQpwVqFwoTCIiispW2mPUCFQAAAAAdAAAAABAC&biw=1352&bih=641#imgrc=6zy-nC76FaRv_M
BillWoodruff
2-Jan-22 23:43pm
View
well, i should not have mentioned "actual code" ... no time to try and decipher other people's complex code ... i'd be surprised if any of us who volunteer here would do that.
BillWoodruff
2-Jan-22 12:01pm
View
Is there any way you can examine the project file, or other app settings, to see if there is a valid reference to 'System.Runtime, Version=6.0.0.0 ?
BillWoodruff
2-Jan-22 11:58am
View
I wish I could assist further, but, without using your actual source code, I can only think of one more thing to check:
Set break-points after the DataGridView loads, and after you have reset the binding source:
When you hit the break-points: examine the 'Enabled and 'EditMode properties of the DataGridView: see any difference ?
BillWoodruff
30-Dec-21 6:09am
View
Your solution is logically inconsistent: you say OG's is correct, and it is ... then, you show an example of inserting a Form into another Form's Controls which is not only a bad practice, but also is not relevant to the OP's question.
BillWoodruff
29-Dec-21 22:51pm
View
Voted #1: Putting a Form inside another Form is always a bad idea. In this case the user asks how to load a Form.
BillWoodruff
28-Dec-21 2:49am
View
If we do your homework/coding for you, you will learn nothing.
BillWoodruff
28-Dec-21 2:46am
View
"Difficult to help OP as he clain no problem and just want a full blowup solution with explanation."
So, a statement with no content deserves a solution with no content ?
You are a tourist, lost in a big city: you ask a local for directions to the bank; they reply: " 'bank' is found in the 'B' section of the dictionary." :)
BillWoodruff
28-Dec-21 1:27am
View
voted #1: this reply has no content that might help the OP.
BillWoodruff
28-Dec-21 1:25am
View
+5 a thorough, satisfying, reply !
BillWoodruff
24-Dec-21 4:37am
View
If this is an assignment, you need to clarify what the assignment actually is.
An assignment to create a structure that emulates a C# Array, but provides Add/Remove functions makes no sense: if you remove an element the indexes may no longer point to the elements they were originally accessed by.
BillWoodruff
24-Dec-21 4:31am
View
Yes, a possible hypothesis, but, i think we don't have enough information to make that a probable hypothesis. imho, the most probable hypothesis is that the OP is confused.
I've added another comment to the OP's post.
to try and get them to clarify,
Merry Xmas :)
BillWoodruff
23-Dec-21 14:45pm
View
+5 at last the voice of reason speaks :)
BillWoodruff
22-Dec-21 4:12am
View
Start experimenting and post code here with specific questions.
BillWoodruff
22-Dec-21 4:10am
View
The date data you show here are not Hjri dates ? Is the problem how to convert to Hijri date ?
BillWoodruff
20-Dec-21 12:39pm
View
+5 what a thorough analysis !
BillWoodruff
14-Dec-21 15:10pm
View
Look carefully at the difference in structure between the first two entries, and the third: variations like that make parsing much more complex,
Is there any way you re-structure the data to avoid inconsistency in format ?
BillWoodruff
13-Dec-21 9:19am
View
Consider using a GIF file.
BillWoodruff
12-Dec-21 7:57am
View
Hi, that partly clarifies the context for me, thanks, but, i define my role here as "educator," and, the idea of helping you write code for some project of which you are a team-member, and. you can't disclose details ... that is not the dance music my feet are keen to move to :)
A general solution to creating a grid of sub-grids, and then efficiently
accessing/selecting "cells" by any arbitrarily defined row, #rows, column, #columns, sub-grid, etc., is an interesting problem ... particularly, if you have nested sub-grids beyond 1 level deep.
In your case, i don't think you'll need to get recursive (deal with more than one level of sub-grids).
Depending on my energy level, I may post some general ideas about one strategy you might pursue.
cheers, bill
BillWoodruff
12-Dec-21 1:50am
View
Hi, This question is specific enough i can help you with some specific code :)
First, i need to see/understand the code/strategy that creates the grid:
Are you binding the grid to a DataTable; or, creating it directly in a nested for loop ?
And, i believe you omit the case that you need to check for duplicates in a 3x3 sub-grid.
Are you looking for a generic solution for any size grid, or, only a solution for the classic Sudoku 3x3 sub-grids each 3x3 ?
BillWoodruff
12-Dec-21 1:22am
View
As Richard said, this is pretty simple, but, imho, a program that shows a moving picture until it exits is almost always annoying.
If you want the user to be able to do "other things" while the picture is being displayed, doing that in the SAME Form means you'll have to run it in a separate thread.
BillWoodruff
11-Dec-21 11:19am
View
you just go ahead and quibble all you need to :)
BillWoodruff
11-Dec-21 9:17am
View
to compare different methods of string to number conversion: http://aspalliance.com/80_Benchmarking_IsNumeric_Options.all
BillWoodruff
11-Dec-21 4:00am
View
appears to be a repost of: https://www.codeproject.com/Questions/5319708/Create-a-scrolling-text-in-the-title-bar-of-visual
BillWoodruff
11-Dec-21 0:15am
View
look ma, no errors:
000533 => 533
6.626E-34 => 6.626E-34
BillWoodruff
10-Dec-21 16:03pm
View
see comments in my solution below :)
BillWoodruff
10-Dec-21 14:22pm
View
okay, but, conversion will result in values of the same type ?
BillWoodruff
10-Dec-21 13:39pm
View
Are the numbers represented by the line-strings always of the same Type ? i.e. : Int32, or Double /
BillWoodruff
6-Dec-21 18:16pm
View
Hi, I don't want to see your script code ... I do want to see if I can help you to "pin down/define" what you want in a way that you can get more specific feedback :)
Please revise your original post to include;
The context in which you plan to use Unity ... in WPF, or, WinForms ? other ? What language is your script written in and what is its execution context ... in Unity ?
Describe the structure of your grid; show your code method that defined the Grid,
BillWoodruff
6-Dec-21 0:50am
View
Sleep well, GMT+7 here :)
Are you using WinForms, or WPF ?
I do know you can use Unity 3d in WinForms, although I have never tried that:
https://docs.unity3d.com/Manual/UnityasaLibrary-Windows.html
BillWoodruff
6-Dec-21 0:40am
View
I'm having difficulty visualizing what the different size grids are. Let's take the typical 3x3 sub-grid case where each sub-grid is 3x3 cells ... 9 rows, 9 columns, 81 cells.
I assume your script will "seed" the grid with valid initial values ... right ?
Then, the user will input a value in a cell, and you wish to check if that value is valid for the row and column where the value is entered ... right ?
One obvious strategy is to define the data structure for the grid, then pass it by reference to the code that seeds it with initial values ... does that seem relevant ?
"3d ness" ? Are only the contents of the cells 3d elements ? I am not familiar with Unity 3d, so don't know what data structures are available.
BillWoodruff
5-Dec-21 23:58pm
View
Glad you found my response relevant.
"making the 2D Array to hold the selected values for all subgrids."
please clarify what "selected" means here: this refers to cells the user has selected, or cells containing user entered values ... or ?
"I have been able to get a script that generates the whole grid"
what structure is returned by the script ? an array ?
BillWoodruff
5-Dec-21 21:14pm
View
What makes your game 3d ? What does the player see that a 2d flat grid doesn't show ?
BillWoodruff
4-Dec-21 0:44am
View
+5
BillWoodruff
4-Dec-21 0:36am
View
see: https://stackoverflow.com/a/32258205/133321
BillWoodruff
30-Nov-21 8:42am
View
If you study this book, your question will be answered.
https://www.amazon.com/Egyptian-Hieroglyphs-Complete-Beginners-Manley/dp/0500290288
BillWoodruff
29-Nov-21 1:33am
View
If we do your homework, you will learn nothing.
BillWoodruff
29-Nov-21 1:32am
View
Interesting: I am evaluating why the T here is not declared IEnumerable, and why People is not passed, as a param, to DistributeChocolates ... makes me "nervous" ... I'll get over it :)
BillWoodruff
29-Nov-21 1:26am
View
I was hoping to give you enough of a "clue" that you could complete the code by yourself. By removing the thread, you prevent anyone else seeing my response.
"Double posting" like this is technically against forum guidelines.
I find it unfortunate that other responders here write your code for you, rather than educate you. If we do your homework, you will learn nothing.
Think about it.
BillWoodruff
29-Nov-21 0:44am
View
Did you remove your previous question, and my responses ?
BillWoodruff
28-Nov-21 21:47pm
View
'TRyParse returns a boolean 'true if the conversion was successful:
https://docs.microsoft.com/en-us/dotnet/api/system.int32.tryparse?view=net-6.0
BillWoodruff
27-Nov-21 9:18am
View
+5
BillWoodruff
26-Nov-21 4:51am
View
Start by searching CodeProject.
BillWoodruff
25-Nov-21 23:38pm
View
What happens now when you run your code ? Errors ? Unexpected bresults ?
BillWoodruff
24-Nov-21 12:43pm
View
The revised code in my answer triggers the Dialog only when dataGridView3 has #0 rows.
All Selected rows are deleted with each button press.
BillWoodruff
23-Nov-21 23:52pm
View
Sorry, I'm too busy trying to post useful solutions to on-topic posts to continue wasting time on you.
p.s. a "suggestion" should avoid use of the word "should."
BillWoodruff
23-Nov-21 23:35pm
View
As expected, use of an ad hominem non-question to deflect response to the substance of my comment. Yawn.
BillWoodruff
23-Nov-21 23:25pm
View
Do you need rep points so badly you will post a non-solution to a non-question that will almost certainly get removed from QA ?
BillWoodruff
23-Nov-21 23:03pm
View
this is a comment, not a solution.
BillWoodruff
23-Nov-21 23:01pm
View
The revised code triggers the Dialog only when dataGridView3 has #0 rows. I that not what you asked for ?
BillWoodruff
23-Nov-21 12:21pm
View
See revised code above.
BillWoodruff
23-Nov-21 7:51am
View
You need to research genetic algorithms, select a programming language, and start experimenting. When you have code to show, and specific questions, come back here.
See those link to the right under "related question:" start there.
BillWoodruff
22-Nov-21 23:27pm
View
Indeed, 'Return of the Sophist' re-run.
BillWoodruff
22-Nov-21 23:22pm
View
please translate to English, and tag your question with appropriate Tags, like Excel.
BillWoodruff
22-Nov-21 6:35am
View
Deleted
Extremely doubtful the OP is using Win 11.
BillWoodruff
22-Nov-21 1:16am
View
You need to state clearly what you are trying to do.
Tag your question with appropriate tags: C# version, FrameWork version. Visual Studio/Code info.
Clarify exactly what is done in Win Forms, and what the use of AvastUI is about.
Are the Button and Panel standard WinForm controls on a Form ?
BillWoodruff
21-Nov-21 23:06pm
View
Are you asking how to make a Button or a Panel with rounded corners in WinForms ?
BillWoodruff
20-Nov-21 8:03am
View
Maybe ?
).Cast<cl_elab>().ToList();
BillWoodruff
16-Nov-21 21:51pm
View
"if I want to load the txt file back into the datagrid I get an error from the compiler again"
I wish I were psychic :) What error: where did it occur ?
Set break-points and single-step through your code (F11) until you find exaxtly where an error occurs.
BillWoodruff
14-Nov-21 19:58pm
View
i treasure these moments when i can see we are, temporarily, in different universes :)
"No he is asking how to ensure only one execution of a specific application is running at any one time."
uhhh ... that is what I said.
"You can run any number of copies of an application, even if it contains a singleton class within it."
The OP is talking about an application, not a class: i assume the OP is/has written the App, and the task is to enforce singleton behavior on one machine. Use of Mutex is one standard way to create a Singleton in a context where thread safety is critical.
It's been over 15 years since i touched C++, and i am not aware of current issues in creating Win apps.
BillWoodruff
14-Nov-21 10:58am
View
hi, we are talking about making an app behave like a singleton class here.
"What is a Singleton class in C++?
Singleton in C++
"Singleton is a creational design pattern, which ensures that only one object of its kind exists and provides a single point of access to it for any other code. ... You can't just use a class that depends on Singleton in some other context. You'll have to carry the Singleton class as well."
https://refactoring.guru/design-patterns/singleton/cpp/example
BillWoodruff
12-Nov-21 19:16pm
View
If we/others do your homework, you will learn nothing.
How do you code a program that simulates MARIE? - Reddithttps://www.reddit.com › AskProgramming › comments
2 days ago — Find the specs for how a MARIE CPU is supposed to work, implement a ... Going deeper, maybe you want to simulate each clock cycle, ...
How do I code a program in C# within Visual Studio that ...https://stackoverflow.com › questions › how-do-i-code-...
4 hours ago — I have a coding assignment due in 3 days that requires me to create a program in C#, within Visual Studio, that simulates MARIE.
BillWoodruff
11-Nov-21 17:15pm
View
what does "extract" mean ? break each record into a series of strings ? or, create instances of a strongly typed structure ?
BillWoodruff
11-Nov-21 9:32am
View
A key factor in determining the complexity of the code you'll need to write is how reliable the data is; for each field, like "ip address," will you need to write validation code (or use a RegEx) to check it ?
BillWoodruff
11-Nov-21 0:40am
View
+5
BillWoodruff
11-Nov-21 0:36am
View
Why aren't you asking Telerik support ?
BillWoodruff
10-Nov-21 6:49am
View
once again:
"I dock the FlowLayoutPanel on TableLayouPanel to enable the autosize of the User Control."
Why are you using both a FlowLayoutPanel and a TableLayouPanel ?
BillWoodruff
9-Nov-21 22:19pm
View
"I dock the FlowLayoutPanel on TableLayouPanel to enable the autosize of the User Control."
Why are you using both a FlowLayoutPanel and a TableLayouPanel ?
BillWoodruff
8-Nov-21 8:46am
View
define what "custom commands" are
BillWoodruff
7-Nov-21 20:36pm
View
no apology necessary, but, my time here is limited; any code you post here i will look at. i think you'll find folks here, or, on StackOverFlow, will not go to any external site to view content (security issues).
whatever your code is, i believe it must provide the three facilities i describe in my answer.
cheers, Bill
BillWoodruff
7-Nov-21 17:50pm
View
Hi, i am here to teach you how to help yourself develop your own code, not to write code for you.
Your question is relatively simple: start by completing the steps i outlined for you in my answer. Post your code here, and ask specific questions about the code.
cheers, Bill
BillWoodruff
7-Nov-21 13:56pm
View
+5
BillWoodruff
6-Nov-21 17:34pm
View
+5
BillWoodruff
5-Nov-21 11:09am
View
2nd. repost
BillWoodruff
5-Nov-21 8:57am
View
Please define exactly what "alignment" means. What do you expect to SEE after "alignment" ? What are "Transformation" and "PCALib" ?
We can't read your mind.
BillWoodruff
5-Nov-21 7:15am
View
put breakpoints in your code; single-step through it using F11, examine the values of variables ,,, that will show you what the problem is.
BillWoodruff
4-Nov-21 9:59am
View
If we do your homework, you will learn NOTHING !
BillWoodruff
4-Nov-21 9:42am
View
Is brushing your teeth after a meal a good idea if your house is on fire ?
One non-sequitur deserves another :)
BillWoodruff
4-Nov-21 9:17am
View
+5
BillWoodruff
4-Nov-21 9:15am
View
saying to a homework shirker whose plea for someone else to do their work, and, whose no-content post is almost certain to be removed: "go elsewhere and educate yourself," has no benefit except to inflate your reputation.
if a post like this is not removed, then the forum is cluttered, and, other users will also ignore the forum guidelines clearly described in the FAQ.
BillWoodruff
3-Nov-21 11:24am
View
i'm unable to replicate the behavior in the update you describe.
before
name Column1 displayindex : 0
name Column2 displayindex : 1
name Column3 displayindex : 2
name Column4 displayindex : 3
name Column5 displayindex : 4
dataGridView1.Columns[4].DisplayIndex = 2;
after
name Column1 displayindex : 0
name Column2 displayindex : 1
name Column3 displayindex : 3
name Column4 displayindex : 4
name Column5 displayindex : 2
i do know that weird results can occur if you move column #0 to another location, or move a > #0 column to #0.
put breakpoints before and after you set the DisplayIndex, and examine the runtime Columns state.
BillWoodruff
2-Nov-21 19:04pm
View
This is too abstract for me to respond. Please add more detail. What is the purpose of this application, who are its users ?
BillWoodruff
2-Nov-21 14:54pm
View
Okay, i can see that, now :) Have you explored the possibility of defining your own custom DataGridViewColumnHeaderCell ? While i would override CellPaint ... because i often have several reasons for doing that ... i would check out: (i have not tried it)
https://stackoverflow.com/a/24824261/133321
BillWoodruff
2-Nov-21 12:34pm
View
you're welcome :) i find myself wondering why you would want to hide a specific ColumnHeader Text. i can imagine changing the column header text for various reasons. cheers, bill
BillWoodruff
2-Nov-21 1:14am
View
Well, good luck wit that.
BillWoodruff
1-Nov-21 3:56am
View
Define a "real" OS. Unless you are an experienced developer with years of experience, and intimate knowledge of Win and .NET internals, I believe you will waste your time, and achieve nothing.
Why aren't you reading and studying the Cosmos docs:
COSMOS Repository on GitHub - The COSMOS source, issue tracker and other downloads
COSMOS Discussions on GitHub - Ask general questions, get help and show off your projects
COSMOS Discord Server - Ask any COSMOS related questions or just chat with other Cosmos users
COSMOS Facebook Page - Our blog where we post updates and other news.
COSMOS YouTube Channel
The current Cosmos DevKit and UserKit API Reference.
BillWoodruff
1-Nov-21 1:32am
View
Why not ask the author of the article ? Be sure and include the version of C# and FrameWork you are using.
https://www.codeproject.com/Articles/75770/Basic-serial-port-listening-application
BillWoodruff
31-Oct-21 9:05am
View
imho, this OP needs education, not having his code written for him.
BillWoodruff
30-Oct-21 7:16am
View
Any knowledge you have about patterns in the data can be exploited. "Real world data," is often not random.
If the data is "meaningfully" random, then you may be able to omit sorting. Of course, if sorting is a requirement ...
BillWoodruff
30-Oct-21 4:15am
View
okay, i'll study your explanation when i am more rested. another possibility is: a point may be on more than one segment. to the extent you can narrowly define the results you want, and exclude testing for other cases, you can optimize the code.
in "real world code," skilled programmers often optimize using assumptions about the likely frequency of what types of values the data holds. for example, if i can assume every point is on the line, i can omit testing for that; if the data os organized by magnitude, maybe i don't need to sort.
Different search functions may be used to optimize searching.
BillWoodruff
30-Oct-21 2:40am
View
Hi, maybe my brain is not at 100% today :) If i think of a horizontal line from x0,y to x1,y then any point on the line can be defined by an x value, and any segment by two x values. In the case the segments do not fully cover the width of the line, there is a possibility that a point can be on the line, and not on any segment.
Other possibilities include: a point is outside the line; or, a segment is "not legal" ... however you define "not legal."
If this accurately describes your "context," please help me understand how the sample data shown "work."
BillWoodruff
29-Oct-21 23:46pm
View
Don't play with guns !
BillWoodruff
29-Oct-21 21:23pm
View
An interesting question which i upvoted ... i only upvote class/homework posts that, like yours, show code and substantial work on implementation.
? Check the data for the Samples: they don't seem to be accurate given the description.
BillWoodruff
29-Oct-21 6:25am
View
once again you are posting a kind of semantic fantasia, where you pose as some kind of sophist disputing documentation.
if you want to learn C#, experiment, and observe behavior, and generate hypotheses, as well as study documentation.
imagine a carpenter that can tell you how a saw works, but, has never tried to use one.
BillWoodruff
29-Oct-21 6:19am
View
You're kinder than i am :) Indeed, strings are weird critters, and i hear echoes of Eric's classic mantra "implementation detail" every time i wander into the wilderness of what a char[] is doing in a box like 'string.
BillWoodruff
29-Oct-21 6:15am
View
Rude ? This is not about You.
BillWoodruff
29-Oct-21 5:14am
View
+5
BillWoodruff
29-Oct-21 5:13am
View
Please define what "INLINE" means; why would you sort a ListBox's contents rather than sort a column in your DataTable, or other structured data source ?
BillWoodruff
29-Oct-21 4:38am
View
i think this post might be from the latest incarnation of someone we know, whose specialty is semantic confusion. New member, #1 post.
What String is vis-à-vis reference/value-type, and how Strings are managed vis-à-vis heap/stack has some complexity that Eric Lippert has written about. Reference on request.
BillWoodruff
28-Oct-21 21:07pm
View
great, please tag your question to indicate context. context is important to know since search facilities/methods vary.
BillWoodruff
28-Oct-21 20:26pm
View
please tag your question to indicate if this is ASP, or WinForms, or whatever.
what would would the type of search queries you want to perform look like ? what syntax; what results expected ?
are you saving the blogs to a file, to a DB ?
my inability to read your language is at work here :)
BillWoodruff
28-Oct-21 12:49pm
View
Hi George, I will not engage with this thread further because i see no positive outcome in terms of enduring CP quality, and, my time is limited by vision problems.
Trying to drag information out of you piece-by-piece to try and get the big picture of what you are doing is a waste of time. Amd, i qn not about to go baxk to Win 7 and an early .NET Framework to test your code.
i have carefully verified your code, and Luc's, will not work in a standard VS 2019, C@ 4.8 Console app for reasons i understand completely.
i believe the idea/strategy of using both a Form and a Console is a serious mistake that will result in unnecessary complications.
What i will do, that i think will be valuable for CP in the long run, and will not waste my time, is to post a tip/trick showing what i consider a useful architecture for interactive run-time control of a WinForm's behavior where "control" is defined as response to a well-defined set of commamds, and/or queries.
Show More