15,899,313 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 kbrandwijk (Top 90 by date)
kbrandwijk
16-Aug-15 9:52am
View
As I guess you are using a DataReader to fill a DataTable, add a column to your DataTable with an Expression, see http://www.codeproject.com/Articles/447249/Calculated-Columns-in-NET-DataTables-Csharp for an example. Then bind that column as any other column.
kbrandwijk
16-Aug-15 9:43am
View
I have already described that in my comment above as well. Please try it out yourself, and if you get stuck somewhere, please post back here with a specific question.
kbrandwijk
16-Aug-15 9:24am
View
That really depends on the situation. I would use ToString() if what you're after is a simple human readable representation of your class (as the documentation states) for either GUI or dev/debug purposes. In your case, you want all properties of a class presented in a certain way, so I would use a separate method, and not use the ToString() override. But it all comes down to personal preference.
kbrandwijk
16-Aug-15 7:35am
View
That is possible, or again, create an abstract method for this in the base class (ExecuteSpecificMethods()) and override this method in the inherited classes. Then, you can just always call the ExecuteSpecificMethods method on every item in the list without type checking etc. Again, knowledge about the implementation should be put as close as possible to the implementation, in this case, in the inherited classes themselves, and preferably not where you process the list.
If this approach works for you, then please accept my solution as the answer to your question.
kbrandwijk
15-Aug-15 21:05pm
View
Duplicate of http://www.codeproject.com/Questions/1018520/How-do-I-pass-this-total-to-textblock-in-another-x
kbrandwijk
15-Aug-15 20:09pm
View
Deleted
I suppose that when spending most on the summer on your code base, you would have some kind of source control mechanism in place? Then again, from you asking this question, I guess you don't. Your best option is checking if autorecovery information is saved. By default, the location is \...\My Documents\Visual Studio <version>\Backup Files\<projectname>. Check Tools-Options-Environment-AutoRecover.
kbrandwijk
15-Aug-15 20:06pm
View
Please pay attention to the readability of your question, by using code blocks and proper indenting etc. Better readability leads to more answers.
kbrandwijk
18-Sep-14 11:13am
View
You can use the AT Command Tester, a Java app at http://m2msupport.net/m2msupport/module-tester/ to see the AT commands and responses needed for SMS and other functions.
kbrandwijk
13-Sep-14 13:04pm
View
That really depends on which control you are using. Some calendar controls allow you to disable dates, all calendar controls allow initial selection (because that's the value that the control is bound to). All calendar controls have different events, for example DateChanged, to allow you to respond to the selection of a different date. You can also use the Validating events for example. Please provide some more information.
kbrandwijk
13-Sep-14 12:37pm
View
What have you tried? Is the processTextPosition method called? What's the result value of string test during debug? Did you put a watch on text to see the properties during debug? Also, you have cut and paste pieces of your code. Normally, there is no virtual method called processTextPosition in the regular Program.cs class that contains Main, because it is not derived from some base class.
kbrandwijk
12-Sep-14 10:38am
View
I have updated the solution. Your error was probably caused by the fact that the attachmentdata also contains filename information, that you have to strip from it first.
kbrandwijk
11-Sep-14 14:00pm
View
Deleted
send it to my username, followed by 82, then to gmail
kbrandwijk
11-Sep-14 12:28pm
View
I think you can use DeflateStream(stream, CompressionMode.NoCompression) but I'm not 100% sure because I don't have a working example of an Infopath form with xlsx attachment. I'll try to set something up later.
kbrandwijk
11-Sep-14 11:02am
View
You're spot on, right until the point where you see that you get the zipped file back (as byte stream). This needs to be the input for the call to unzip the contents.
kbrandwijk
11-Sep-14 9:19am
View
Why is a working solution downvoted...
kbrandwijk
11-Sep-14 5:54am
View
I have updated my solution to include the next step in our troubleshooting. We have confirmed the data in the DB is correct, know we focus on how we retrieve the correct set of data. The select query is wrong.
kbrandwijk
11-Sep-14 5:30am
View
So you're actually suggesting performing a cross join on the two tables first, producing m * n rows, and then select the one that happens to join the selected course to the selected semester. That's just terrible.
kbrandwijk
11-Sep-14 5:22am
View
What a meaningless comment... Did you actually try anything I suggested? You're not answering any of my questions, so how do you expect me to help you at this point?
kbrandwijk
11-Sep-14 5:06am
View
I have read your reply five times, and I still have no idea what you mean. You said in your question that you needed code to save the current page as HTML. I have shown you that the GeckoBrowser can navigate to the source, which you can then save yourself. I have now updated the solution to include another option. You have to show the save dialog yourself, and then call SaveDocument with the full path of the file you got from the save dialog.
kbrandwijk
10-Sep-14 21:34pm
View
Have you consider looking into Microsoft Monitoring Agent to gather Intellitrace data from a production environment, which serves the same purpose: being able to 'replay' in Visual Studio? http://msdn.microsoft.com/en-us/library/hh398365.aspx
kbrandwijk
10-Sep-14 16:11pm
View
If this solution fits your needs, please mark it as accepted solution to your question. Thank you.
kbrandwijk
10-Sep-14 16:05pm
View
I like this approach, because it split the logic that defines the actions from the logic to apply one. The Dictionary schould be of type Dictionary<string,func<string,form>> however. And for this specific case, it seems to violate the KISS principle.
kbrandwijk
10-Sep-14 9:56am
View
http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx contains sample code for creating a bindingcollection, and binding it to a gridview, using INotifyPropertyChanged. Try to use this as a starting point for your own code. You can update your question with your progress, so myself or others can help you further when you have additional questions.
kbrandwijk
10-Sep-14 9:18am
View
We don't do homework assignments.
kbrandwijk
10-Sep-14 9:16am
View
I think LoadStyle overrides the previous LoadStyle, look into LoadTagStyle. You can apply that multiple times to the same object (pdf in this case). However, using LoadStyle like this is deprecated by now. You should consider moving to XMLWorker (http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html)
kbrandwijk
9-Sep-14 20:53pm
View
@Sherif Adely: Have you actually tried the method that I proposed in my solution? What results did you get? What's your current code? Where do you run into problems? We are not here to do your work, we're here to help you if you get stuck.
kbrandwijk
8-Sep-14 19:05pm
View
Closed
http://www.dhgate.com/store/product/led-countdown-clock-led-countdown-timer/162285087.html
kbrandwijk
8-Sep-14 19:01pm
View
I have updated the solution. Also notice my remark about rounding. If this works for you, please accept it as solution to your question.
kbrandwijk
8-Sep-14 18:45pm
View
The result is exactly the same. So you can leave it like it is, but seeing that you have trouble understanding the formula you are using, maybe itxtVal * 0.8 and itxtVal * 1.2 is easier for you to read and understand.
kbrandwijk
8-Sep-14 18:33pm
View
Easier notation would be: minval = itxtVal * 0.8, maxval = itxtVal * 1.2. Because: x + (x / 20 * 100) = x + (x * .20) = 1.2x
kbrandwijk
8-Sep-14 17:54pm
View
Can you clarify your question? What is a Linq Database File, and what does 'like a Windows Forms Application' mean? Do you have any existing code? What are you trying to achieve? Reading data from CSV and displaying it on screen? Performing CRUD operations on data from a CSV file in a console application?
kbrandwijk
8-Sep-14 17:14pm
View
Deleted
Why are you reposting this? http://www.codeproject.com/Questions/814892/Range-Validator-that-can-get
kbrandwijk
8-Sep-14 10:44am
View
Did you update your SP definition to include the new @response parameter?
kbrandwijk
8-Sep-14 10:42am
View
I have provided you with a way to implement a solution to your problem. However, I'm not here to write your code. Please use the resources available to you to find out how to implement the steps described, and if you have additional questions please update your question with the code you have written. Then myself and others can see if we can help you further. This link contains sample code for querying the event log: http://msdn.microsoft.com/en-us/library/bb671200.aspx. This link contains sample code of how to read event information from the result of your query: http://msdn.microsoft.com/en-us/library/bb671197.aspx
kbrandwijk
8-Sep-14 6:30am
View
@SA: Please review http://www.mono-project.com/docs/gui/winforms/. It says: "Support for Winforms 1.1 and 2.0 has been completed, and is now in a maintenance/bug fixing state.". My remark was specifically about the WinForms version supported by Mono. So yes, WinForms support is up to 2.0. Other aspects of WinForms are also not implemented as described on the same page.
kbrandwijk
7-Sep-14 19:23pm
View
How would 20 buttons fit inside a 4 x 4 grid...
kbrandwijk
7-Sep-14 15:02pm
View
I have no idea what you're asking. Can you please explain? You want to generate something based on this class definition? What dialog box do you want to access?
kbrandwijk
7-Sep-14 15:00pm
View
Have you tried to convert it yourself? What is the problem you run into trying to convert it? What have you already tried yourself?
kbrandwijk
7-Sep-14 14:55pm
View
There are a lot of issues with SQL Deployment for LightSwitch applications. If using SQL 2014, Microsoft has confirmed it doesn't work. Try SQL 2012 or earlier.
Also, sometimes the user that the publish target tries to create causes an issue, if that user already exists in the database, or is owner. How is your publishing configured?
kbrandwijk
7-Sep-14 7:44am
View
Please clarify your question. There is no LIKE in the WHERE clause in the code you show us. Also, I don't really understand your question.
kbrandwijk
7-Sep-14 4:43am
View
Just for future reference, you are NOT using SQL Server 2008 R2 already, if you're getting that error message. Also in your own 'solution', you mention that you have now updated your SQL Server version. So this makes no sense at all.
kbrandwijk
6-Sep-14 7:16am
View
Can you also post the GetForegroundWindow method?
kbrandwijk
6-Sep-14 7:07am
View
Solution does not give the desired result. Result would be stage 2,4,6,7.
kbrandwijk
5-Sep-14 18:13pm
View
Which one was it?
kbrandwijk
5-Sep-14 17:49pm
View
I'm not sure about your question, but shouldn't the check before the alert look like: if (value != null) instead of (value === null)?
kbrandwijk
5-Sep-14 17:39pm
View
I never understood how unbound grids, or not using the underlying datasource to read the data, got so popular so fast...
kbrandwijk
5-Sep-14 17:33pm
View
If you start the Workflow using something similar to workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, itemId, inputParameters); then you can pass the inputparameters as dictionary. You have to find out what the input parameters are exactly for an approval workflow. If you can debug, you can check what is inside the workflowAssocation.AssociationData, since that's what you're passing is as inputParameters normally.
kbrandwijk
5-Sep-14 17:29pm
View
How is this different from Solution 2?
kbrandwijk
5-Sep-14 11:01am
View
You are right. Insert a whitespace before the Name: LIKE '% ' + t1.Name to only get full last names.
kbrandwijk
5-Sep-14 9:52am
View
What's the query you currently have? Where's the bottleneck? Which part needs rewriting? What's the table structure? Please post more information if you want a meaningful answer.
kbrandwijk
5-Sep-14 9:50am
View
What's the problem? Error occurs, wrong output, doesn't compile? Please enlighten us...
kbrandwijk
5-Sep-14 8:59am
View
Possible reasons found on the internet include: run setup as administrator, check for running virusscanners that may block registry access, check you pc for malware/adware that may block registry access.
kbrandwijk
4-Sep-14 21:20pm
View
Seems to be no longer support by Facebook. Only URL, FB grabs the rest of the info all by itself...
kbrandwijk
4-Sep-14 20:18pm
View
What's your question?
kbrandwijk
4-Sep-14 19:54pm
View
Always nice to see a repost, with a solution, just after answering your original question... Too bad users don't get bans for reposting on this site.
kbrandwijk
4-Sep-14 19:51pm
View
Post some code. What have you tried? Where do you get stuck? What are the symptoms, errors, exceptions?
kbrandwijk
4-Sep-14 19:46pm
View
This is an ASP.NET question, please tag it as such to improve visibility of your question to the right audience.
kbrandwijk
4-Sep-14 19:30pm
View
I would add HTML5, and Web Storage tags to make this question easier to find.
kbrandwijk
4-Sep-14 19:08pm
View
I have updated my solution to include information about the EXIF fields and the way to store the GPS information in the right format.
kbrandwijk
4-Sep-14 18:50pm
View
I don't think you need any material from the original link. Have you actually tried the method specified. Have you looked up the correct EXIF field identifiers for the information that you are trying to add? Have you actually tried to use the WriteEXIFField() method to add an EXIF field to one of your existing images? If you need additional help, at least share with us what code you currently have, and if there are any concrete issues you might still have. The solution I linked to, and the method I point to, contains all the implementation details you need.
kbrandwijk
4-Sep-14 14:46pm
View
This querystring would only work if myvalue2.ToString() is actually an equation sign, like = or <>. Is that true?
kbrandwijk
4-Sep-14 14:41pm
View
What have you tried? Do you get an exception? What is actually going wrong? We can't help you like this...
kbrandwijk
4-Sep-14 11:43am
View
You could either clear the dropdown in the beginning of the method, while(element.options.length) { element.remove(0) }; or check if the dropdown already contains options before adding the options , if (!element.options.length)
kbrandwijk
4-Sep-14 6:51am
View
Providing the right tags helps a lot in getting the right answers. This is a HTML / Javascript question, that has nothing to do with C#. Please update tags accordingly.
kbrandwijk
4-Sep-14 5:53am
View
Please check http://www.freelancer.com or some place similar. If you're trying to build something yourself, and you run into performance issues, kindly post the relevant source code and ask a specific question about it
kbrandwijk
4-Sep-14 5:35am
View
Need help? Post code...
kbrandwijk
4-Sep-14 4:53am
View
I don't understand your problem. It doesn't matter if the existing password was encrypted in Java. If you use the same algorithm in .NET, the same strength, the same salt, the same number of iterations, then you should also end up with the same password, and you can also decrypt it.
kbrandwijk
4-Sep-14 4:47am
View
The SGML specification for HTML 4 states the following about attribute values: "By default, SGML requires that all attribute values be delimited using either double quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39). Single quote marks can be included within the attribute value when the value is delimited by double quote marks, and vice versa. Authors may also use numeric character references to represent double quotes (") and single quotes ('). For double quotes authors can also use the character entity reference ".
In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them."
However, the XHTML specification is more strict, saying: "All attribute values must be quoted, even those which appear to be numeric."
So it doesn't really matter what you do. However, using double quotes for the attribute value when there are already double quotes inside the server tag, will always cause your tag to be NOT well formed.
kbrandwijk
3-Sep-14 13:30pm
View
No tags makes the question hard to find...
kbrandwijk
3-Sep-14 11:00am
View
Because the Custom Properties available on, for example, a Serie or a DataPoint, depend on the Chart type chosen and other related settings. Not all custom properties are relevant in every context, so that's why they decided to implement them like this, instead of creating 'real' properties for every possible custom property in every possible scenario. There are around 100 of them, if I'm not mistaken.
kbrandwijk
3-Sep-14 10:35am
View
The general answer is simple. Store that flag somewhere. Can be a registry setting, ini file, database, whatever suits your needs.
kbrandwijk
3-Sep-14 9:38am
View
The problem described does not correspond to the title, or I'm misunderstanding your problem
kbrandwijk
3-Sep-14 9:35am
View
Have you looked at the sample application provided by Microsoft here: http://msdn.microsoft.com/en-us/library/office/dn495337(v=office.15).aspx
kbrandwijk
3-Sep-14 9:30am
View
I have updated the solution to include the C# translation, but I seriously doubt if you could not have translated one single if-statement from VB.NET to C# yourself...
kbrandwijk
3-Sep-14 7:51am
View
In that case please add the relevant tags to the question to reflect this.
kbrandwijk
3-Sep-14 7:50am
View
I assume the data is actually coming from somewhere. In that case, I think this is the type of check that you want to do on the underlying datasource, and not on the grid itself.
kbrandwijk
2-Sep-14 18:42pm
View
It's a custom property, so it is only accessible by indexer (I think) or by using the CustomProperties property. I don't have VS available right now, but one of the two (or both) should work.
kbrandwijk
2-Sep-14 17:58pm
View
Why are you reposting part of your original question as new question here?
kbrandwijk
31-Aug-14 14:57pm
View
This problem has been mentioned a zillion times on this and other websites.
- Ensure on which thread you actually are when the error occurs. Are you doing something with BackgroundWorker, other Thread or anything?
- Ensure that the [STAThread] attribute is on your application entry point. Make sure that the method you think is actually your entry point (check project properties for startup object, look for overloads of the Main method)
- Make sure that the actual thread is in STA 'mode', by checking it using a breakpoint, and by setting ApartmentState on it if necessary
kbrandwijk
31-Aug-14 14:42pm
View
From what I have read, all events starting with MediaPlayer... are currently not firing, only playing, paused and stopped.
kbrandwijk
30-Aug-14 10:55am
View
Your answers makes quite a few assumptions. All child forms should be instantiated from the main form (which isn't always true). You have the same event handler for all child forms (maybe different child forms need different confirmation messages, or no confirmation at all). Closing any child form will always close the main form (maybe that only needs to happen for one specific child form). I think keeping the logic as close as possible to where it's actually needed (in this case, one specific child form) is best. I have done so in my proposed solution.
kbrandwijk
30-Aug-14 10:51am
View
I have updated my solution to check the CloseReason to prevent a double confirmation. Application.Exit fires Closing Event again.
kbrandwijk
30-Aug-14 10:50am
View
Deleted
I have updated my solution to check the CloseReason to prevent a double confirmation. Application.Exit fires Closing Event again.
kbrandwijk
30-Aug-14 10:14am
View
I can imagine you might have that problem when using Application.Exit, because Application.Exit would trigger the FormClosing event that you were already in. Do you also have that problem using the solution form @ProgramFOX?
kbrandwijk
30-Aug-14 10:12am
View
What is the problem?
kbrandwijk
30-Aug-14 9:40am
View
I don't know of any 'ready to fly' examples, but it's something that is very easy to implement using a gridview with an editor template. This page (from DevExpress) shows you a working examples using their controls: https://demos.devexpress.com/MVCxGridViewDemos/Editing/EditFormTemplate
kbrandwijk
30-Aug-14 9:36am
View
From the code snippets in the provided link, it's clear that 'server' can be a server name or ip address, 'user name' is the username to logon to the server and 'password' is the cleartext password for the username.
kbrandwijk
30-Aug-14 8:56am
View
Can you please explain what you are trying to achieve?
kbrandwijk
29-Aug-14 11:48am
View
Shouldn't the Designer attribute on the custom ToolstripButton be typeof(ComponentDesigner)?
kbrandwijk
29-Aug-14 11:42am
View
Have a look at
how to make a dropdownlist contains a treeview in a web?
[
^
]. Does that suit your needs?
Show More