15,886,026 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 C++ questions
View Javascript questions
View Visual Basic questions
View Python 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 PIEBALDconsult (Top 200 by date)
PIEBALDconsult
yesterday
View
3445678352.123 can be represented in scientific notation as
3.445678352123E9 (if I have that right)
__^^^^^^^
and single-precision values have only about seven places of precision -- you are trying to exceed that.
PIEBALDconsult
yesterday
View
You can use the Improve question button to edit the question.
PIEBALDconsult
2 days ago
View
fscanf ?
strtok and atof ?
PIEBALDconsult
2 days ago
View
Really an error? Or a warning treated as an error?
What happens if you comment it out?
Bear in mind that no using directives are ever strictly necessary.
PIEBALDconsult
3 days ago
View
What does AddItems do?
Should the "0" be a different value on each call?
PIEBALDconsult
3 days ago
View
Write it in a real language.
PIEBALDconsult
19-Apr-24 11:48am
View
Personally, I would probably set up a map of characters in an array.
But I would need more detail. Are you actually supposed to be implementing a Caesar Cipher?
Caesar cipher - Wikipedia
[
^
]
PIEBALDconsult
12-Apr-24 17:23pm
View
Please don't try to answer your own question. Use the Improve question button to add detail and context.
PIEBALDconsult
12-Apr-24 14:45pm
View
Will 1.23E3 work?
PIEBALDconsult
12-Apr-24 14:38pm
View
Revert to the published version?
PIEBALDconsult
12-Apr-24 10:52am
View
You should use the Improve question button to add that to the question.
Try putting the items in a different order and see what happens.
PIEBALDconsult
11-Apr-24 12:51pm
View
Please don't try to answer your own question. If you have additional information to post, just use the Improve question button.
PIEBALDconsult
11-Apr-24 10:31am
View
And don't store 'True' as a string -- use a BIT.
Better yet, make them number_of_toilets , number_of_elevators , number_of_bathtubs -- then test against zero.
PIEBALDconsult
10-Apr-24 14:55pm
View
Contact the developer of it.
PIEBALDconsult
10-Apr-24 12:47pm
View
"2. Manager doesn't have access to UI." -- That seems like a bad idea to me. Why can't a manager access the UI and approve or deny any pending requests?
PIEBALDconsult
8-Apr-24 15:36pm
View
I'd sooner use a Stack than a StringBuilder.
PIEBALDconsult
8-Apr-24 11:32am
View
And don't use string concatenation to form SQL statements.
PIEBALDconsult
2-Apr-24 17:04pm
View
Best not to put contact info in posts.
P.S. I'm originally from Reading.
PIEBALDconsult
28-Mar-24 16:38pm
View
I would use a text editor and the Borland C/C++ compiler.
PIEBALDconsult
25-Mar-24 14:30pm
View
We won't do your homework for you.
PIEBALDconsult
25-Mar-24 14:28pm
View
0) I think it's doing exactly what you told it to do.
1) Avoid using DISTINCT.
2) Don't put the ORDER BY in the CTE.
PIEBALDconsult
22-Mar-24 12:35pm
View
Avoid the Convert class. Use the parsers for the type you want.
PIEBALDconsult
19-Mar-24 17:25pm
View
A number of points come to mind...
0) Why are you copying all the data from data to orderdata/orderlist?
1) Can't you pre-allocate the orderlist with the ArrayList(Int32) constructor? That should save some time.
1.a) Or the ArrayList(ICollection) constructor?
2) Instantiating such a large structure for such a short duration is a waste of resources.
3) Wouldn't something like orderRepository.save(data)work?
3.a) Maybe with a begin transaction / commit transaction?
Looking at that code, all I see is time/resource wasters.
PIEBALDconsult
15-Mar-24 10:43am
View
You can use the Improve question button to add context and detail to the question.
PIEBALDconsult
15-Mar-24 10:32am
View
Please don't try to answer your own question. You can use the Improve question button to add context and detail.
PIEBALDconsult
13-Mar-24 19:00pm
View
What currency?
(We won't do your homework for you.)
PIEBALDconsult
12-Mar-24 23:34pm
View
What system? Some don't do the order of operations correctly.
PIEBALDconsult
10-Mar-24 11:29am
View
We won't do your homework for you.
PIEBALDconsult
9-Mar-24 20:21pm
View
dataGridView is not viable for anything but quick proof-of-concept and demos.
Find something better.
PIEBALDconsult
9-Mar-24 14:36pm
View
Try asking here -- https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
7-Mar-24 18:49pm
View
Please! don't form an SQL statement that way.
PIEBALDconsult
5-Mar-24 18:31pm
View
I think the plot was back that way.
PIEBALDconsult
29-Feb-24 11:17am
View
What if I copy/rename the EXE?
It seems to be an impossible goal. Not worth worrying about.
The EXE would have to protect itself; I see no other way.
Or, are you actually trying to push ExeLock because you wrote it and think it's great? It probably truly is kaka.
PIEBALDconsult
28-Feb-24 10:29am
View
An index is not a magic bullet which always makes everything faster. A bad index can make some things slower.
Without seeing your SQL statement and such, we can't really tell.
PIEBALDconsult
28-Feb-24 10:01am
View
I wrote my own tokenizer for that. I wouldn't use Split except in very simple cases.
PIEBALDconsult
23-Feb-24 11:18am
View
How about a Regular Expression?
PIEBALDconsult
20-Feb-24 12:24pm
View
What type is PermitID?
I recommend against setting the datatypes of parameters.
PIEBALDconsult
16-Feb-24 20:33pm
View
Try posting that over here:
https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
10-Feb-24 20:57pm
View
Every other column? Or every other row?
PIEBALDconsult
9-Feb-24 10:36am
View
Having to calculate that kind of thing is a code smell. Why did you not store the number you allocated?
PIEBALDconsult
8-Feb-24 11:37am
View
I'm sure my copy of VS 2010 (Express) will continue to work just fine for a while yet.
PIEBALDconsult
8-Feb-24 10:33am
View
Not me. I use WinForms when a command-line utility won't suit.
PIEBALDconsult
7-Feb-24 21:52pm
View
Did you have a question?
PIEBALDconsult
1-Feb-24 15:00pm
View
Maybe they can help you over here...
https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
31-Jan-24 13:38pm
View
Please don't try to answer your own question. Use the Improve question button to add detail and context.
PIEBALDconsult
31-Jan-24 11:45am
View
With a name like that it could be a spam set-up or test.
PIEBALDconsult
30-Jan-24 15:58pm
View
Stick it on a floppy disc.
PIEBALDconsult
30-Jan-24 10:53am
View
Yeah, we're gonna need a clearer spec, mmmkay?
PIEBALDconsult
29-Jan-24 17:17pm
View
It definitely sounds homeworkish and poorly defined.
PIEBALDconsult
28-Jan-24 19:08pm
View
Few people will click on a link.
And I don't think you want a subsequence.
PIEBALDconsult
28-Jan-24 19:06pm
View
Put the characters from box 2 in a HashSet (A).
For each word in box 1, put the characters in a HashSet (B).
If HashSet B is a subset of Hashset A, then note its length.
If more than one word from box 1 is a subset, then keep the longest.
PIEBALDconsult
28-Jan-24 11:33am
View
I suspect a spam set-up.
PIEBALDconsult
28-Jan-24 10:17am
View
As someone who has written code for a taxi company (twenty years ago), I don't see why you would be doing this rather than buying an existing taxi routing/scheduling package -- there are (or were) many.
Furthermore, it seems that in many areas, ride sharing services have killed traditional taxi services, so this does not seem like a reasonable business to be getting into now. The taxi company I worked for is no longer in business, maybe the software companies have also died.
Similarly, if you are actually trying to start a ride sharing service, you are way behind the established leaders.
PIEBALDconsult
26-Jan-24 15:01pm
View
Did you have a question?
PIEBALDconsult
24-Jan-24 13:11pm
View
Might be running by double-clicking in Windows Explorer.
PIEBALDconsult
23-Jan-24 10:51am
View
We advanced users never do that. That's for newbs. ;)
PIEBALDconsult
22-Jan-24 9:56am
View
I definitely wouldn't do that (or anything else) with Linq.
At most you will get "can be interpreted as a date", but not necessarily the correct date (as has been mentioned).
Just loop through each of them, and pass each to DateTime.TryParse and DateTimeOffset.TryParse and note the results.
PIEBALDconsult
22-Jan-24 9:52am
View
As well as some the reasonable "never" or "N/A" as an expiration date or similar.
PIEBALDconsult
13-Jan-24 18:28pm
View
Something along the lines of:
string query = "SELECT null , '--SELECT--' UNION ALL SELECT ID, Type FROM NoteExpires " +
" ORDER BY Type;";
PIEBALDconsult
8-Jan-24 20:06pm
View
DataGridViews are generally not a good idea. I recommend thinking of a better design.
PIEBALDconsult
7-Jan-24 17:53pm
View
Please add it to the question with the Improve question button.
PIEBALDconsult
7-Jan-24 16:34pm
View
Parent as in inheritance? Bh _IS_A_ Ah?
Or only Ah _HAS_A_ Bh?
PIEBALDconsult
5-Jan-24 10:32am
View
Maybe you want to run in kiosk mode?
PIEBALDconsult
5-Jan-24 9:51am
View
Is that what your users want?
PIEBALDconsult
4-Jan-24 18:20pm
View
0) Doesn't Access use OleDB?
1) I recommend against using a data adapter, especially for this case.
2) "0".ToString() -- is just freaking stupid.
3) You don't need to Clear a new DataTable.
PIEBALDconsult
27-Dec-23 10:14am
View
I see a number of issues which should be addressed:
First, don't have the database code directly in the UI code -- make a separate object/project for all the Database Access Layer. Then call that from the UI layer.
Second, have the button (button2) disabled until the textboxes and comboboxes have have values. For this, in the changed handlers for each of the boxes, set the Enabled property of the button to true only if the boxes have appropriate values. I usually write an UpdateUI Method to do that which all the other handlers call. All of that validation should happen before the button can even be pressed. Including checking to determine the existence of the ID.
Third, you need to check the state of the connection in the finally before just trying to close it. No need to close the connection inside the try if the finally will do it anyway.
Fourth, can you make the textBoxCId a NumericUpDown instead?
PIEBALDconsult
22-Dec-23 11:25am
View
I doubt you actually need to have all of those items in memory all at once.
PIEBALDconsult
22-Dec-23 11:06am
View
I doubt there is any actual reason to have all of those objects in memory at once. Rethink.
PIEBALDconsult
13-Dec-23 10:57am
View
Then don't repost, use the Improve Question button.
PIEBALDconsult
27-Nov-23 15:38pm
View
Derive a new custom Form and use that.
PIEBALDconsult
21-Nov-23 21:21pm
View
We won't do your homework for you.
PIEBALDconsult
14-Nov-23 18:26pm
View
I'm _assuming_ the first integer is how many integers to expect.
PIEBALDconsult
14-Nov-23 18:25pm
View
We won't do your homework for you.
PIEBALDconsult
9-Nov-23 10:12am
View
I doubt you need to use the Convert class; please don't. Try using a cast instead. You also don't need the local variable
prop
.
Do you want to maybe fill a
List<string>
with the values?
PIEBALDconsult
8-Nov-23 10:31am
View
I'd use a text editor.
PIEBALDconsult
6-Nov-23 13:55pm
View
Rename it.
PIEBALDconsult
2-Nov-23 15:32pm
View
You can test for NULL.
I recommend never using the Getxxx methods.
PIEBALDconsult
25-Oct-23 19:16pm
View
I can't even figure out what exactly is being described here.
PIEBALDconsult
25-Oct-23 14:49pm
View
Glad to be of service.
PIEBALDconsult
25-Oct-23 10:05am
View
Maybe re-think your life choices.
PIEBALDconsult
6-Oct-23 10:09am
View
Do not try to include a database system in the install of your application.
Just make sure to state in the documentation that it requires some database system. The user can then choose how and where to install it. The user may already have a suitable database system available.
PIEBALDconsult
2-Oct-23 21:56pm
View
Yeah, it's not an matter of "or". Just use ADO.net and cut out the middleman.
PIEBALDconsult
29-Sep-23 19:41pm
View
Is it RESTful? Does it use basic authentication?
PIEBALDconsult
13-Sep-23 11:19am
View
Writing Excel is not an easy task. I know of no way to do it with SSIS itself. At best, you could write a C# procedure to do it, but then why involve SSIS at all?
Excel can read CSV, so frequently we write CSV instead.
PIEBALDconsult
12-Sep-23 11:31am
View
How will it know which Explorer window to look at? Or all of them?
PIEBALDconsult
12-Sep-23 11:17am
View
You mean right-click and select something like "Open with MyApp" ?
Doesn't that still require setting the app up as a file association with the Open or Edit or whatever verb ?
PIEBALDconsult
11-Sep-23 19:08pm
View
Other than associating the file extension with your app? So your app runs when the file is opened via Explorer?
PIEBALDconsult
11-Sep-23 10:05am
View
One hopes not.
More detail is required.
PIEBALDconsult
7-Sep-23 16:45pm
View
Please don't try to answer your own question, just use the Improve question button at add detail.
But seriously, may I bother you with something which is causing me some trouble?
PIEBALDconsult
7-Sep-23 14:01pm
View
Maybe use INSTR() to find the backslashes, but I think you would then have to loop until there are none.
PIEBALDconsult
1-Sep-23 10:31am
View
Push is evil, do not do it. Pull is the way to go.
PIEBALDconsult
29-Aug-23 20:26pm
View
So, use the Improve question button and add that to the question.
PIEBALDconsult
29-Aug-23 19:27pm
View
Rule one: Do not store dates as strings.
PIEBALDconsult
24-Aug-23 10:08am
View
We won't do your homework for you.
The maximum beauty would be to sit in the hotel cafe watching people walk past.
PIEBALDconsult
19-Aug-23 12:15pm
View
0) Don't use a DataGridView -- define your own custom Form. Usage of a DataGridView is a cry for help.
1) A DataGridView is usually backed by a DataTable, access the DataTable or whatever backing source it is.
2) Don't call ToString on a value which is already a string, just cast it.
PIEBALDconsult
18-Aug-23 20:10pm
View
Glad to be of service. You may be using HashSets all the time without knowing. They were added to support Linq.
PIEBALDconsult
18-Aug-23 19:40pm
View
For what purpose?
PIEBALDconsult
18-Aug-23 19:39pm
View
You can provide a case-insensitive comparer to the HashSet.
PIEBALDconsult
18-Aug-23 19:35pm
View
Please don't try to answer your own question; just use the Improve question button to add detail.
PIEBALDconsult
17-Aug-23 0:18am
View
Basically as I showed in one of my responses to your earlier question.
Intersect is done with sets, so it's best to make a set.
PIEBALDconsult
16-Aug-23 10:22am
View
Also, rather than using a Dictionary for your SQL keyword list, use a HashSet.
PIEBALDconsult
16-Aug-23 10:15am
View
It's good to see that you have now begun using JSON.
For what reason are you trying to detect SQL keywords in your JSON data?
PIEBALDconsult
15-Aug-23 12:31pm
View
I would assume that a string with multiple name/value pairs would be more like this, but the OP needs to provide such detail:
string str = "{ Text = Banana, Value = 81}, { Text = Apple, Value = 11}, { Text = Orange, Value = 21 }";
PIEBALDconsult
15-Aug-23 11:05am
View
I must assume that you are concerned about the values being SQL injection attacks. You are right to be concerned, but the correct solution is to use a parameterized SQL statement.
If, on the other hand, you wish to flag suspicious input for review, rather than blindly insert it, then maybe this technique has merit.
However, you should still be aware that some good data values may contain what appear to be SQL keywords. For instance: "OUTER BANKS", "DROP SHIPMENT", "ROUND TABLE". It may still be worthwhile to insert all the data (with a parameterized SQL statement) and then perform a search for SQL injection attempts for review.
Basically, do not attempt to detect SQL injection then adjust for it in order to use string concatenation to create the INSERT statement -- it's not even very efficient.
Does your database system not support parameters?
PIEBALDconsult
15-Aug-23 10:30am
View
Maybe. We would need to know how additional name/value pairs may be specified.
Is there no way to use a proper JSON format instead?
PIEBALDconsult
15-Aug-23 10:28am
View
It is very inefficient.
PIEBALDconsult
14-Aug-23 12:16pm
View
Regular Expressions.
Using a Regular Expression yields a MatchCollection, after which you can then access the Groups by name.
As to: "should convert to some object and get value by key word" -- that really just restates the problem and maybe even moves the goal post.
If possible, use a better-supported format, such as JSON or XML.
PIEBALDconsult
13-Aug-23 11:20am
View
Please don't try to answer your own question; use the Improve question button to add detail.
PIEBALDconsult
12-Aug-23 12:05pm
View
Save it locally and then move it to where you want it if it succeeds.
PIEBALDconsult
10-Aug-23 11:04am
View
Hard-coding the namespace is unnecessary and not a good idea.
PIEBALDconsult
10-Aug-23 9:38am
View
I hope you're not planning on using string concatenation to form SQL statements from the data in the JSON file like that.
I recommend you rethink what you are planning to do as it is unlikely to be a very good solution.
Step back and think about the high-level process you are trying to develop.
PIEBALDconsult
9-Aug-23 16:48pm
View
Hmmm... as long as inserting the searchFor value doesn't produce an invalid RegEx.
PIEBALDconsult
9-Aug-23 12:25pm
View
What foreach loop? I don't think that will even compile, you must have mis-pasted the code.
OK, that looks better. I think the issue is that there is a default namespace [ xmlns="http://schemas.datacontract.org/2004/07/Xata.Ignition.WebServiceAPI.Contracts.DataContract.StatusAndEvents" ] which you need to resolve.
P.S. I have been trying to see how to do that, but I don't use XDocument, so I don't know how. I use XmlDocument so I can probably give an example using that.
You'll need to add the namespace to the namespace manager and specify it in [ doc.Descendants("VehicleBreadcrumb") ]
PIEBALDconsult
7-Aug-23 19:44pm
View
Visual Studio is not a compiler anyway.
PIEBALDconsult
6-Aug-23 20:24pm
View
Please don't try to answer your own question; use the Improve question button to add detail.
PIEBALDconsult
6-Aug-23 16:31pm
View
Please don't try to answer your own question, just use the Improve question button to add detail.
PIEBALDconsult
5-Aug-23 11:12am
View
If the string is XML, use XPath.
PIEBALDconsult
5-Aug-23 11:04am
View
Don't use the Convert class when a cast will suffice.
PIEBALDconsult
3-Aug-23 21:14pm
View
Well, for one thing, don't keep instantiating and throwing away the connection and command.
Create each once, use them many times, then let them Dispose (use
using
statements) for them.
Also, don't use the Convert class when a cast will do.
PIEBALDconsult
27-Jul-23 1:11am
View
0) I would use the ACE Engine and ADO.net, but it's not a straight-forward proposition.
1) Always look for ways to break a task into smaller sub-tasks:
1.1) Read XML
1.2) Write to Excel
PIEBALDconsult
26-Jul-23 23:46pm
View
Please don't try to answer your own question, just use the Improve question button.
PIEBALDconsult
26-Jul-23 23:43pm
View
Please don't try to answer your own question, just use the Improve question button.
PIEBALDconsult
26-Jul-23 8:57am
View
I've had those symptoms, but I don't recall the cause or cure.
PIEBALDconsult
20-Jul-23 13:23pm
View
Deleted
That definitely sounds like something you need to be doing inside the database.
PIEBALDconsult
20-Jul-23 13:23pm
View
That definitely sounds like something you need to be doing inside the database.
PIEBALDconsult
20-Jul-23 11:48am
View
You should include a link to the original you copied from.
PIEBALDconsult
20-Jul-23 10:41am
View
So does the Address class simply contain a list (collection) of strings?
PIEBALDconsult
20-Jul-23 9:00am
View
Ah, OK, I thought you might not. Your best choice may be to write an Extension Method to do it.
PIEBALDconsult
19-Jul-23 9:06am
View
Yeah, OK, so if the Address is a class, can you add a comparison method to it?
PIEBALDconsult
19-Jul-23 8:52am
View
The question isn't clear.
Can you add a comparison method to the class?
PIEBALDconsult
15-Jul-23 13:58pm
View
Well, I mean, you'll _have_ to use some built-in methods no matter what you do.
But have a look at a
for
loop.
PIEBALDconsult
14-Jul-23 19:44pm
View
You're welcome.
PIEBALDconsult
14-Jul-23 9:25am
View
I would not use such a system and I would not go to a shop which insisted that I do.
Don't waste your time.
PIEBALDconsult
13-Jul-23 15:17pm
View
It's optional there, but I always use it anyway.
PIEBALDconsult
12-Jul-23 9:27am
View
Still have to think of anyone who comes along and reads this in the future.
PIEBALDconsult
12-Jul-23 8:56am
View
Well, that was definitely not what you have in the question. Please use the Improve question button to update the question.
PIEBALDconsult
11-Jul-23 16:24pm
View
Oh, and what is the expected result of
f ( { 1 , 1 , 2 , 2 } , { 1 , 2 } )
and why?
PIEBALDconsult
11-Jul-23 14:06pm
View
Not going to. It looks like it will not return what I expect.
PIEBALDconsult
11-Jul-23 13:37pm
View
What does yours do with the inputs { 2 , 1 , 1 } and { 1 , 2 } ?
PIEBALDconsult
11-Jul-23 12:28pm
View
I disagree, I think he wants to remove the _sequence_ { 1 , 2 } from { 1 , 1 , 2 }
PIEBALDconsult
11-Jul-23 11:54am
View
Unsure that's actually what is desired, because the question isn't clear enough.
PIEBALDconsult
11-Jul-23 11:17am
View
I think you need to improve the question to add more detail, such as what you want to have happen when the lists are { 2 , 1 , 1 } and { 1 , 2 } ? The second sequence does not appear in the first sequence.
PIEBALDconsult
11-Jul-23 10:36am
View
Won't that have the same effect?
He doesn't want to remove all 1s and 2s.
PIEBALDconsult
11-Jul-23 9:36am
View
Aaaaand... what do you get?
PIEBALDconsult
10-Jul-23 12:09pm
View
Regular Expressions
PIEBALDconsult
10-Jul-23 11:41am
View
What's it worth to you?
PIEBALDconsult
9-Jul-23 10:41am
View
42
PIEBALDconsult
6-Jul-23 10:27am
View
RegularExpressions.
PIEBALDconsult
16-Jun-23 13:18pm
View
I think you'll need to make an array which contains the List.
classMethod.Invoke ( classObject , new object[] { parameterValues } ) ;
PIEBALDconsult
15-Jun-23 9:24am
View
Please don't try to answer your own question. Just use the Improve Question button to add it there.
PIEBALDconsult
14-Jun-23 12:05pm
View
Don't forget
https://www.codeproject.com/Articles/17474/Timer-surprises-and-how-to-avoid-them
PIEBALDconsult
13-Jun-23 14:53pm
View
And nasal fitment?
PIEBALDconsult
13-Jun-23 14:52pm
View
My understanding is that they use a Quick Sort.
PIEBALDconsult
8-Jun-23 10:07am
View
Create it locally and then move it.
PIEBALDconsult
7-Jun-23 19:02pm
View
I'm confused. Do you have things backward there?
PIEBALDconsult
7-Jun-23 11:22am
View
The only way is for the child to be told who its parent is.
The best way is for the child's constructor to take the parent as a parameter and if you don't want to do that, then maybe you can use a property and set it after instantiating the child.
Also, have you considered something along the lines of child = parent.CreateChild() so the parent can set the child's Parent property?
PIEBALDconsult
6-Jun-23 19:29pm
View
Dunno. I think something is truncating it along the way. Could be the query or something.
PIEBALDconsult
6-Jun-23 16:13pm
View
In part, yes. As in the solution I posted. But I discovered the SqlConnectionStringBuilder class only a few months ago.
Ever since I began learning ADO.net in 2002 (?) I have cobbled my own connection strings for whichever database I was using -- SQL Server (including CE), Oracle, MySQL, Teradata, Cache, Ingres, Excel via JET or ACE, etc. I don't know that all providers include a connection string builder.
PIEBALDconsult
4-Jun-23 11:40am
View
Don't store connection strings.
Allow the user to specify the server and database names and possibly store those in a config file, but not the whole connection string.
I found recently that .net has a built-in facility which allows you to provide the values and it will dynamically create the connection string at run-time.
I will have to refresh my memory and get back to you.
PIEBALDconsult
4-Jun-23 9:12am
View
Remove the prerequisite.
PIEBALDconsult
1-Jun-23 13:22pm
View
Use the RowFilter property of the DataTable's DefaultView ( DataView ).
dataset.Tables [ " ... " ].DefaultView.RowFilter = " ... " ;
PIEBALDconsult
31-May-23 16:36pm
View
Uhhh... that's already built into the .net framework, sooo... maaaybe just read the documentation perhaps?
PIEBALDconsult
28-May-23 20:20pm
View
Yeah, and? It's your homework you do it.
PIEBALDconsult
25-May-23 19:24pm
View
Don't try to answer your own question. Use Improve question add detail and clarification.
PIEBALDconsult
25-May-23 8:34am
View
Don't waste your time, it's not worth the effort. Reduce your scope.
Most files, especially text files (including CSV, XML, and JSON), cannot be password protected.
If someone wants to protect files, generally they will Zip them up with a password. So look at Zip files as a first step.
Modern Word (DOCX) and Excel (XLSX) files are really just Zip files containing XML files, so they fall into that category as well.
That should cover nearly everything you need.
Other than that, I can think of database files, but I doubt you need to check those, even if it's possible.
PIEBALDconsult
23-May-23 22:03pm
View
Please don't try to answer your own question. Just use the Improve question button to add detail and such.
PIEBALDconsult
21-May-23 17:05pm
View
OUTER JOIN ?
PIEBALDconsult
9-May-23 12:46pm
View
We won't do your homework for you.
PIEBALDconsult
8-May-23 12:48pm
View
As you should, if you can't do your own work.
PIEBALDconsult
8-May-23 12:44pm
View
We won't do your homework for you.
PIEBALDconsult
24-Apr-23 10:13am
View
That may be what the OP needs, but it doesn't answer the question he asked.
PIEBALDconsult
24-Apr-23 9:31am
View
The dot doesn't match linefeeds by default. A bit inconvenient that it does match carriage return. Use the Singleline option.
Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except \n).
PIEBALDconsult
21-Apr-23 15:37pm
View
Is it Course? Or Courses?
PIEBALDconsult
20-Apr-23 10:35am
View
I don't have any examples handy (at the office), but what simple examples I have use the Process class to find the GUI application window, then use API calls to find a specific button (such as the OK button), and then click it. Maybe someone else will respond, otherwise I'll have a look when I get home.
PIEBALDconsult
20-Apr-23 8:57am
View
But you stated that it was a console app in the question!
Automating a GUI app is a whole different matter.
PIEBALDconsult
19-Apr-23 21:43pm
View
Seek ye the Process and ProcessStart classes (in System.Diagnostics I think).
You will have to redirect the standard input and probably standard output to interact with the process.
Much of what you want can be found in -- https://www.codeproject.com/Articles/70864/ProcessCommunicator
PIEBALDconsult
18-Apr-23 14:38pm
View
If you are using a DataTable as the backing store, it should be simple.
PIEBALDconsult
17-Apr-23 14:49pm
View
I have no idea what concept you are trying to convey. I'm hoping you mean 16 bit. What makes you think you need 6 bits?
Use the Improve question button to edit your question to add detail and clarity. Maybe an example of input and output.
PIEBALDconsult
15-Apr-23 21:37pm
View
We won't do your homework for you.
PIEBALDconsult
12-Apr-23 11:49am
View
Use a Regular Expression.
PIEBALDconsult
12-Apr-23 11:48am
View
Use a Regular Expression.
PIEBALDconsult
12-Apr-23 11:46am
View
Use a Regular Expression.
PIEBALDconsult
6-Apr-23 10:50am
View
Testify!
PIEBALDconsult
5-Apr-23 20:57pm
View
I would use a Regular Expression.
PIEBALDconsult
5-Apr-23 10:46am
View
Sigh of relief.
PIEBALDconsult
5-Apr-23 10:26am
View
Ew :: makes the sign of the Cross at "GetElementsByTagName" ::
PIEBALDconsult
5-Apr-23 10:18am
View
Yes, well, I may be able to assist in a bit.
Do you have no control over the format of the XML file?
PIEBALDconsult
5-Apr-23 10:17am
View
XPath and Regular Expressions are my bread and butter. :D
PIEBALDconsult
5-Apr-23 10:03am
View
or xml.SelectNodes("//Etichetta")
or xml.SelectNodes("*/Etichetta") (maybe?)
PIEBALDconsult
4-Apr-23 8:36am
View
Load them into a database and compare there.
PIEBALDconsult
30-Mar-23 10:17am
View
Then it's a problem in your form code.
PIEBALDconsult
30-Mar-23 8:47am
View
It's called a command line for a reason.
PIEBALDconsult
29-Mar-23 19:09pm
View
I'm not convinced that's where it's missing.
By the time you receive that error it's too late.
You'll need to write your own reader/parser which can do that as it reads in the file.
I had to do something similar for some broken HTML -- to restructure it as XHTML.
But if you were capable of doing that, you would done it already.
PIEBALDconsult
29-Mar-23 12:23pm
View
Don't search the grid, search the backing data.
PIEBALDconsult
28-Mar-23 21:05pm
View
It's your homework, you do it.
PIEBALDconsult
27-Mar-23 18:32pm
View
First, see -- https://datatracker.ietf.org/doc/rfc4180/ . Send that URL to your colleague and see if he sees sense.
Second, if the sender refuses to format the file properly, then you may need to resort to desperate measures... Regular Expressions.
PIEBALDconsult
27-Mar-23 18:30pm
View
Please do not make a comment as a solution.
Reply to the post or use use the Improve question button.
PIEBALDconsult
27-Mar-23 9:21am
View
Seek ye the Master File Update algorithm.
PIEBALDconsult
24-Mar-23 22:21pm
View
Very likely, but waiting for another shoe to drop.
PIEBALDconsult
24-Mar-23 19:08pm
View
Whatever are you talking about? OSHA?
What does it have to do with Oculus?
Show More