15,798,278 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 Python questions
View PHP 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 Ron Beyer (Top 200 by date)
Ron Beyer
27-Jan-14 10:03am
View
+5
Ron Beyer
27-Jan-14 9:45am
View
"In contrast, "==" returns true as long as they are equal even they are of different type e.g. 2 == "2" return true"
Maybe in Java or PHP, but not in C#, you may want to clarify that.
Ron Beyer
26-Jan-14 21:15pm
View
Even the concept of zero was adopted quite late, however there is a good reason finance "morons" use parens rather than a - sign. The reason is that when doing ledger sheets, debits are positive, credits are positive, and the balance is also positive. In order to quickly scan a very big list for a negative balance, its put in parenthesis to make it stand out more. In handwriting, a small - can be hard to spot quickly.
With the advent of computers its just a hold-over from "the old way".
+5 :)
Ron Beyer
26-Jan-14 19:03pm
View
Is there anything in between the lines string Notes = ... and string Refund = ... ? Sounds like you have an extra } somewhere.
Ron Beyer
26-Jan-14 12:31pm
View
One of those 5000's should have a >= by it, otherwise a salary of exactly 5000 will fall through the if's.
Ron Beyer
26-Jan-14 9:17am
View
This would be a security hole, so browsers don't allow it. There are tricks using ActiveX but most modern browsers will have it disabled by default.
Ron Beyer
26-Jan-14 9:06am
View
Convert.ToString(12) is a valid and workable piece of code that doesn't throw an exception.
Ron Beyer
26-Jan-14 8:48am
View
Thanks Rahul!
Ron Beyer
26-Jan-14 8:48am
View
Thanks Bill!
Ron Beyer
26-Jan-14 1:09am
View
See my updated solution, its a 100% working sample so I'm not sure what you are doing to test if its working or not, you can copy/paste the code into a console application to see it work.
Ron Beyer
26-Jan-14 0:41am
View
What is the problem? Do you get an error? What does "not set up in ... windows xp" mean exactly?
Ron Beyer
25-Jan-14 22:44pm
View
+5, notifications are good for smaller systems but they don't scale well. I've been trying to find the point at which they become less effective. Nobody says at what scale they deteriorate they just say its not for "larger" scale systems.
Ron Beyer
25-Jan-14 22:31pm
View
+5, thats about all you can do, unless the images are tagged or have metadata, but classifying them on what the images contain (party, Cancun, Joe in underwear, etc) is not really feasible using code.
Ron Beyer
25-Jan-14 22:00pm
View
Unfortunately you are using an obsoleted mail component, it is recommended for .NET 2.0 and up to change over to the
Ron Beyer
25-Jan-14 20:57pm
View
Grouped by what? File name, metadata? What is in the picture?
Ron Beyer
25-Jan-14 9:52am
View
Unfortunately to run this code you will have to run the program with administrative permissions.
Ron Beyer
25-Jan-14 9:01am
View
5, nice breakdown of it.
Ron Beyer
25-Jan-14 8:46am
View
If I changed all the variables to doubles then yeah it will give a different answer. But if he did pass a double in for delay for the code above, it shouldn't produce a floating point number since the double will be converted to an integer at days = delay. It will round to the nearest whole number, which may still give an inaccurate answer.
Ron Beyer
25-Jan-14 0:46am
View
I just updated it to show you. I ran a test with this and 400 as your example and addition produced a value of 155...
Ron Beyer
25-Jan-14 0:35am
View
I really don't understand what "calculate the addition for these days by given value" means exactly. The purpose of your formula is not clear in your code.
Ron Beyer
25-Jan-14 0:28am
View
So you have a variable that is the number of days, and you want the number of years, months, weeks, and days from that?
Ron Beyer
24-Jan-14 23:32pm
View
Well if anything we are consistent!
Ron Beyer
24-Jan-14 23:30pm
View
Ok, a vague title and a code dump do not a question make. Please tell us what you need or what you are trying to accomplish.
Ron Beyer
24-Jan-14 21:11pm
View
Good explanation Bill, +5!
Ron Beyer
24-Jan-14 17:29pm
View
Glad you got it solved!
Ron Beyer
24-Jan-14 16:30pm
View
Yes, its possible to do anything in the code behind that it is in the XAML, but a lot harder. Can I ask where you put this style? In the Themes\Generic.xaml file or a different xaml file? I'd help with the code but I'm a lot better at the xaml side than the code side, and I don't think you can inherit it like you can with xaml.
Ron Beyer
24-Jan-14 15:54pm
View
Do you have something like this in the static constructor on your control?
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyUserControl), new FrameworkPropertyMetadata(typeof(MyUserControl)));
?
Ron Beyer
24-Jan-14 15:37pm
View
Please note there is a bug in the CodeProject box that when submitting XML/XAML it removes all capitalization. I reported this bug.
Ron Beyer
24-Jan-14 14:22pm
View
You need to have somebody on that computer give you rights, either create an administrative account for you, or give you the username/password for an existing admin account.
I think you should explain what the purpose of these files are and maybe a little more detail about why you need to this without the user knowing. Right now its starting to sound like you want to hack into other computers and put malicious things on them and we won't help you do that.
Ron Beyer
24-Jan-14 13:32pm
View
See my answer below.
Ron Beyer
24-Jan-14 13:29pm
View
Some compilers are pretty smart, and remember that they compile to generate the EXE, what you do later has no effect on how the compiler optimizes it. Some compilers are so smart that they will remove entire loops or inline functions without you explicitly setting them to.
Ron Beyer
24-Jan-14 13:04pm
View
If you have administrative rights and/or the receiver computers are part of a domain this should not be too big of a problem, what is the network configuration? Are these computers on a domain? Do you have administrative rights to them?
Ron Beyer
24-Jan-14 8:56am
View
Typically silent installations are for installing files from other installers. Is this your goal? How are you going to have the user initiate the installation?
Ron Beyer
24-Jan-14 8:27am
View
You found a rather annoying feature. Selected text doesn't mean your selected item, it literally means if you take the mouse and highlight the text in the box, that would be the "SelectedText". You should use SelectedItem instead, its an object so you will have to cast it to a string, but it means the currently selected item. SelectedText really gets confusing since it doesn't do what you think it does.
Ron Beyer
23-Jan-14 23:54pm
View
Both parameters must be converted to integers then, not just one (same method as my answer, just repeat for other one).
Ron Beyer
23-Jan-14 23:50pm
View
It would have to be:
UPDATE COMP SET COMPN = 'A' WHERE COMPC = 14
When setting a text value you have to use the quotes around the data.
Ron Beyer
23-Jan-14 23:23pm
View
The only thing you have to change is the declaration of toys, it should read:
int[] toys = new int[4, 5]
That is the easiest way to fix it, I wouldn't monkey around with the loops since they are in a good logical order.
Ron Beyer
23-Jan-14 22:55pm
View
"What ever you think this does, you are wildly mistaken." Ha! Love it. +5.
Ron Beyer
23-Jan-14 22:18pm
View
Thanks Bill! :)
Ron Beyer
23-Jan-14 22:17pm
View
You are using the array in the loops like [week, day] so you need to define it the same way. Since there are 5 days and 4 weeks, it should be int[5, 4]. Otherwise in all your loops you have to swap the indicies for week and day so that it is toys[day, week].
Ron Beyer
23-Jan-14 22:11pm
View
Ahh, you have days and weeks reversed in the definition, it should be int[,] toys = new int[4,5], not sure how you aren't getting the out of bounds error in the first loop...
Ron Beyer
23-Jan-14 21:52pm
View
You are missing toys[week, 4] after toys[week, 3] in the format string.
Ron Beyer
23-Jan-14 21:36pm
View
Just change week to week+1 inside the for loop and that will fix it.
Like : ...string..Format(lineFormat,
week + 1, toys[week, 0] ...
Ron Beyer
23-Jan-14 21:17pm
View
Just remove the "int" part in front of week in the for loop.
Ron Beyer
23-Jan-14 20:48pm
View
I can answer this, but you should open a new question since I can't post it as an answer to a solution.
Ron Beyer
23-Jan-14 18:03pm
View
Why not just create a file-share on the Unix machine and map the drive on your windows machine?
Ron Beyer
23-Jan-14 17:03pm
View
This is completely wrong, please ignore it.
Ron Beyer
23-Jan-14 16:57pm
View
This is homework, and we won't do your homework. You need to try doing this yourself, and don't delete your old questions and keep asking.
Ron Beyer
23-Jan-14 16:28pm
View
If you read my post I say not to download it unless you are using Internet Explorer, Chrome and Firefox (or other browsers) don't download it right. If you continue donwloading, just rename it to something like Setup.msi, the file is right but the name is wrong. Its somewhere around 150mb.
Ron Beyer
23-Jan-14 16:17pm
View
I see... you downloaded the debugging symbols instead of the sources, you need to click on the .NET framework link, here is the page you get the actual source files from
http://referencesource.microsoft.com/netframework.aspx
The link I posted was the landing page.
Ron Beyer
23-Jan-14 16:01pm
View
Its just the place to install the sources to, pick a folder you want a lot of source files extracted to.
Ron Beyer
23-Jan-14 16:01pm
View
Either way, the link is there, you can download the sources and do whatever you need with them.
Ron Beyer
23-Jan-14 15:42pm
View
I gave the link to download the source, so why the single star down-vote? Does it matter
why
you need the source? I (and others) gave you the link to download it!
Ron Beyer
23-Jan-14 15:07pm
View
I would try to see exactly what command is being run on the database, copy it, and then run it in SQL Management Studio. It should be able to give you more information on why its not inserting. Is it that your page isn't updating, or is it really not inserting data?
Ron Beyer
23-Jan-14 14:53pm
View
If its varchar then it wouldn't work this way, I'm not much of a VB guy, I think Integer is the actual term in VB. You could try specifying that its an nvarchar using
this overload, you would just have to change the varchar to nvarchar, see the example below the documentation.
Ron Beyer
23-Jan-14 14:22pm
View
What do you need it to do that the OpenFileDialog can't?
Ron Beyer
23-Jan-14 11:27am
View
Are these windows that are owned by your application, or windows that are from other software? Judging by your code you are displaying video cameras or something like a video wall, correct?
Ron Beyer
23-Jan-14 11:23am
View
Its a link, click it and learn.
Ron Beyer
23-Jan-14 11:21am
View
Compilers are not typically DLL's, although they can be called from a command line. Some compilers (not any for C that I know) can be called with an API, like MSBuild.
Ron Beyer
23-Jan-14 11:13am
View
ANTLR, that was the term I was looking for, I kept looking up ANT :) +5
Ron Beyer
23-Jan-14 11:13am
View
Thanks!
Ron Beyer
23-Jan-14 11:12am
View
Probably the easy way I said to do it, they actually compile it in the background and read the intermediate files from gcc. They even say that they use gcc in the title!
Ron Beyer
23-Jan-14 11:04am
View
Doesn't matter if its "Hello World" or Duke Nukem, the process is the same unfortunately. It has nothing to do with how complicated the C code is, but how complicated the
language itself
is.
Ron Beyer
22-Jan-14 23:55pm
View
You may need to add it to the toolbox explicitly. Right click in the toolbox and click "Choose Items", then there is an option to browse for a DLL file, select the one from the article and it should add it to a new tab.
Ron Beyer
22-Jan-14 23:37pm
View
Then it should be drag and drop. Take a look at the demo application that came with the control in the article.
Ron Beyer
22-Jan-14 23:36pm
View
Good luck!
Ron Beyer
22-Jan-14 23:20pm
View
Please note, there is a bug with the CodeProject XML pre tags that removes capitalization. Please look up the proper capitalization for this setting before using it otherwise it won't work. Configuration settings names in XML are case sensitive.
Ron Beyer
22-Jan-14 19:41pm
View
No, single quotes for string values, no quotes for things that are integers/numbers. The time I think still uses single quotes but it has to be in a format that the database can parse.
Ron Beyer
22-Jan-14 19:40pm
View
Deleted
No, single quotes for string values, no quotes for things that are integers/numbers. The time I think still uses single quotes but it has to be in a format that the database can parse.
Ron Beyer
22-Jan-14 19:04pm
View
Can you post the table structure?
Ron Beyer
22-Jan-14 13:52pm
View
Thanks Matt... Dictionaries are great for things like this, what I think people forget is that TValue can be a generic itself, so you can store dictionaries of lists (like this instance) or dictionaries of dictionaries, etc.
Ron Beyer
22-Jan-14 12:46pm
View
Thanks Bill.
Ron Beyer
22-Jan-14 12:30pm
View
Wow, so you just admitted to a federal crime on a site that has your personal information.
Smart.
Ron Beyer
22-Jan-14 9:28am
View
You will have to ask the author. There is a place at the bottom of the article to ask questions, that author is very active and should respond quickly.
Ron Beyer
22-Jan-14 9:27am
View
I use the chart control in a SCADA/HMI software that has hundreds of distributions on factory floors, I don't have a single report of losing all the desktop items on any machine.
You may want to set up a virtual machine and run some tests, I very highly doubt that your problem is being caused by the chart control. Do you do any logging? Have you checked that?
Ron Beyer
22-Jan-14 1:33am
View
I don't think I can explain it any other way, these are end-user apps, you would just have to change the symbols to be specific to what you need it to do. The only reason they are developer apps is because they use developer symbols, if you put other symbols in it, it can be for other types of users...
Ron Beyer
22-Jan-14 1:26am
View
Yes, I know what you mean, and just because the articles I linked are for developers, you should read them, it outlines how to create a diagramming tool. You should be able to modify them to create end-user diagrams (they are just different symbols after all).
Ron Beyer
22-Jan-14 1:14am
View
Its all the same concepts, you want to create a diagramming program, the links I posted have diagramming programs, you just need to change/modify them or pick out the pieces you need and add others that give different diagram shapes.
Ron Beyer
22-Jan-14 1:13am
View
You need to add your dynamic button to the controls collection, like:
Button btn = new Button();
this.Controls.Add(btn);
...
Ron Beyer
22-Jan-14 1:04am
View
Did you add all the code from the article into your project? Resizing controls at runtime is not a simple setting, its actually quite complicated. Please thoroughly read the article I linked that includes all the extra code you need to put in place to be able to resize controls at runtime.
Again, this is
not a simple property setting it requires a lot of extra code to do
!
Ron Beyer
22-Jan-14 0:57am
View
Yes, I understand, see the solution 2 I posted, it shows exactly how to do this.
Ron Beyer
22-Jan-14 0:39am
View
You want to learn how to use SQL Server from C#, or you want to learn both SQL Server and C#?
Ron Beyer
22-Jan-14 0:35am
View
+5 for answering what he asked, even though he didn't mean what he meant :)
Ron Beyer
22-Jan-14 0:32am
View
This is different than what your question eludes to. What you are asking is runtime resizing of controls, not changing the size of dynamically created controls. See my solution.
Ron Beyer
22-Jan-14 0:14am
View
You should Mark Karthik's answer as the solution, not your comment.
Ron Beyer
22-Jan-14 0:13am
View
Or a hybrid approach for fast retrieval. Store the name/path of the image so you can relate it to other data, but put the actual file itself in the file system. +5
Ron Beyer
21-Jan-14 23:35pm
View
Windows Forms, WPF? ASP? Mono?
Ron Beyer
21-Jan-14 23:25pm
View
Showing us the service configuration isn't going to help here, there is a hard limit on the depth of an object graph when serializing, and it seems that you have hit that limit.
This means something on your server side is very large and should be broken up into smaller pieces. See the answer below.
Ron Beyer
21-Jan-14 23:05pm
View
Hands are on FIRE :)
Ron Beyer
21-Jan-14 22:50pm
View
What chart control are you using?
Ron Beyer
21-Jan-14 22:18pm
View
I gave the solution below.
Ron Beyer
21-Jan-14 22:05pm
View
I understand, but I could recommend a way to do this without regex's, using regex makes it much more complicated...
Ron Beyer
21-Jan-14 21:46pm
View
Are you hell bent on using a regex for this? I'm part of the club that believes any person who thinks they have a problem that can be solved with a RegEx typically ends up with two problems...
Ron Beyer
21-Jan-14 21:14pm
View
Thanks Matt!
Ron Beyer
21-Jan-14 20:58pm
View
Thanks
Ron Beyer
21-Jan-14 20:40pm
View
I added additional information for title casing the text.
Ron Beyer
21-Jan-14 20:35pm
View
Its not even that complicated:
http://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase(v=vs.110).aspx
Ron Beyer
21-Jan-14 18:35pm
View
Uh, what? Mind rephrasing that?
Ron Beyer
21-Jan-14 17:55pm
View
Try surrounding group in square brackets, like [group]=$group, I think group is a reserved keyword even without the "by", so that may be doing it for you.
Ron Beyer
21-Jan-14 17:53pm
View
System.Net.Mail is not available in VS2003, it wasn't introduced until .NET 2.0 or VS2005. VS2003 only works with .NET 1.1
Ron Beyer
21-Jan-14 17:24pm
View
Have you tried running the raw query text in a MySql management tool?
Ron Beyer
21-Jan-14 16:51pm
View
Thanks!
Ron Beyer
21-Jan-14 16:50pm
View
Done!
Ron Beyer
21-Jan-14 16:46pm
View
Doesn't matter what it is, just use your string and the replace function that I outlined above. If you actually show your code, I could help more but I can't see your computer.
Ron Beyer
21-Jan-14 16:40pm
View
Is "id" a string or a number, shouldn't it be something like: id=$user_id without the single quotes?
Ron Beyer
21-Jan-14 16:37pm
View
Trim only removes spaces from the start or end of the string, not the middle of it. See my Solution 2.
Ron Beyer
21-Jan-14 15:26pm
View
You could add .ToList at the end of your query, or in your for-each like:
For Each PC in Query.ToList
Ron Beyer
21-Jan-14 13:16pm
View
Have you searched for any of this on Google?
Ron Beyer
21-Jan-14 9:56am
View
When you run the query from the query designer do you give it the parameters @ColumnName and @Criteria?
Ron Beyer
21-Jan-14 1:22am
View
Do you have administrative rights on that machine?
Ron Beyer
21-Jan-14 0:54am
View
This looks like your homework, and we don't "give code" for homework. We can help you where you are stuck, but you need to show us your effort and ask specific questions.
Ron Beyer
21-Jan-14 0:41am
View
And I work on DSL :)
Ron Beyer
20-Jan-14 23:18pm
View
Please clarify your question as soon as possible. You want to know how many databases you can connect to in one report, or how many connections one database can handle?
Ron Beyer
20-Jan-14 22:59pm
View
What are the errors it is giving you? I can tell you one of the problems is you didn't provide enough parameters for the insert...
Ron Beyer
20-Jan-14 22:56pm
View
You are going to have to be a lot more specific than that. What database? Is it on the same computer? How are you connecting to it? What have you tried? What errors are you getting?
How can we help if your question is "please help me"?
Ron Beyer
20-Jan-14 22:38pm
View
The best way to do it would be to draw it three times. First with a really thick stroke in the outline color, then again with a slightly thinner stroke in the background color, and last your segment in its normal color. This would give the appearance of an outline around the stroke. As far as I know there is no built-in way to outline a geometry path, just a bounding box.
Ron Beyer
20-Jan-14 22:23pm
View
Is there some way to give us a picture of what you want? The Border control in WPF is a square border around the bounding box of the control, and I don't think thats what you want. Are you wanting an outline around the arc segment?
Ron Beyer
20-Jan-14 19:57pm
View
Could you imagine the power savings in the world if we could get tasks to run when the computer is powered down? I'll start on the patent...
Ron Beyer
20-Jan-14 18:13pm
View
How do you expect the macro to run if your PC is off? If your BIOS supports a wake timer you can use that to wake your PC up, but other than that I don't think this will work.
Ron Beyer
20-Jan-14 14:16pm
View
+5!
Ron Beyer
20-Jan-14 10:55am
View
What UI platform are you using? WPF? Windows Forms? Web?
Ron Beyer
20-Jan-14 8:38am
View
Marco, you could also use a DockPanel or a grid inside the image. Maybe something like this? http://stackoverflow.com/questions/14085164/grid-with-background-image-and-color
Ron Beyer
19-Jan-14 21:18pm
View
Don't let something that looks complicated hold you back. Threads are a fundamental part of programming, and this is a really good opportunity to get your feet wet!
Ron Beyer
19-Jan-14 21:01pm
View
BTW, I edited it a little to add a property for knowing if its finished or not.
Ron Beyer
19-Jan-14 20:59pm
View
Almost all of it is "real", you will need a little more code to create the thread, but other than that it should almost work out of the box.
Ron Beyer
19-Jan-14 20:46pm
View
LoadCompleted won't say that its playing or not, it only identifies that the file is loaded into memory.
Ron Beyer
19-Jan-14 20:30pm
View
I'd report that as a bug. I know I (and a lot of other people) have had issues with the file upload utility. On top of that there seems to be a hamster issue tonight, takes me 3-4 times to post comments.
Ron Beyer
19-Jan-14 20:22pm
View
Deleted
Can you post the code on how you play the file? We need to know what API's you are using. What platform is this for, Windows or XBox?
Ron Beyer
19-Jan-14 20:22pm
View
Can you post the code on how you play the file? We need to know what API's you are using. What platform is this for, Windows or XBox?
Ron Beyer
19-Jan-14 19:22pm
View
Well said, +5
Ron Beyer
19-Jan-14 17:11pm
View
Commentary? Are you asking us to explain it? Or comment it? or what?
Ron Beyer
19-Jan-14 12:29pm
View
Use ExecuteNonQuery for things like creating tables, inserting records, and updating records. Use ExecuteScalar for things like counting in a select or to get the first occurrence of something in the database.
Ron Beyer
18-Jan-14 16:42pm
View
http://developer.android.com/guide/topics/ui/declaring-layout.html
Ron Beyer
17-Jan-14 18:30pm
View
I would remove the try/catch and try running again, it may help clear things up. Also run outside of the debugger (open the Bin\Debug folder and double click the application).
Ron Beyer
17-Jan-14 18:24pm
View
Have you tried putting a breakpoint in the catch and see if you are getting an exception? I'm guessing its an illegal cross thread exception, probably because the UI thread has more service work when you try to set the image.
Ron Beyer
17-Jan-14 18:09pm
View
Is this done in a separate thread? Timer?
Ron Beyer
17-Jan-14 18:00pm
View
You need to post code about how you are using the picturebox so we can see what you are doing to cause problems. From your description it will be difficult to figure out what is going on.
Ron Beyer
17-Jan-14 17:32pm
View
The link http://support.microsoft.com/kb/279765 (same as above) shows how to enable it.
Ron Beyer
17-Jan-14 17:21pm
View
Enabling FUS on XP
Ron Beyer
17-Jan-14 16:59pm
View
If you wanted to run another test, I believe in order to create global mutexes on XP you need to have Fast User Switching turned on. It deals with the differences in process isolation for services that changed in Vista and above. Obviously the file lock is a better solution instead of requiring users to turn on FUS...
Ron Beyer
17-Jan-14 16:35pm
View
As long as you have permissions to access the file from the other processes that's a method you can use. Microsoft used that for years (and still does) with MS Access, its what the
ldb files are
, it shows who has the database open and what kind of lock they have on it.
Ron Beyer
17-Jan-14 16:21pm
View
Try CreateMutex for XP, I don't think you have to use the Ex version.
Ron Beyer
17-Jan-14 15:50pm
View
Can you post the code on how you create the Mutex? It should be as simple as adding Global\ to the front of the name of the mutex...
Ron Beyer
17-Jan-14 15:49pm
View
Did you copy/paste this code from your editor into here? What you have above would never compile, you are missing closing braces on the for loop...
Ron Beyer
17-Jan-14 15:42pm
View
Thanks, I fixed it, for some reason selecting the word I want to link and pasting the link usually creates the right link, but it was mangling it in this case. I just posted the whole link, which is the same one you posted anyway.
Ron Beyer
17-Jan-14 15:41pm
View
I fixed it, for some reason pasting it as a text link was mangling it.
Ron Beyer
17-Jan-14 15:32pm
View
Por favor, intente utilizar Inglés, ya que es un foro principalmente de habla Inglés. Además, es necesario que nos diga cuál es el problema y en qué parte del código que están experimentando. Puedes usar
Google Translate
para traducir al Inglés.
Ron Beyer
17-Jan-14 15:20pm
View
+5, good advice!
Ron Beyer
17-Jan-14 13:59pm
View
This only works if the person is a member of a domain with AD services.
Ron Beyer
17-Jan-14 13:45pm
View
If this isn't working, in the receiver just check that Form1.IsHandleCreated is true before calling invoke.
Ron Beyer
17-Jan-14 12:03pm
View
Its not, and its because of the aggregate in the select statement, otherwise it would be. Thanks to @Wombaticus for assisting in figuring this out.
Ron Beyer
17-Jan-14 11:54am
View
Try replacing if (cs.ExecuteScalar() == null) with if (cs.ExecuteScalar() == DBNull.Value) and see, I think MySql aggregate operator returns DBNull not null, since there is a result, but the result is null.
Ron Beyer
17-Jan-14 11:44am
View
I think its because of the aggregate in this case. If you ran the same code above but using just "select ID from some_table_with_no_records" you should get a null (Nothing) value in return.
Ron Beyer
17-Jan-14 11:28am
View
If you put a watch (or mouse hover over scalarVal) what is its type? If its not null it should be something like an integer, there really isn't a "blank" type...
Ron Beyer
17-Jan-14 11:27am
View
MSDN DBCommand.ExecuteScalar
take a look at the remarks. This is the class all providers implement for the commands, its the standard of how no results versus a null result in the first row is handled.
Ron Beyer
17-Jan-14 11:10am
View
Please show your code, we won't just do it for you, but we can help you where you are stuck.
Ron Beyer
17-Jan-14 11:07am
View
This isn't clear, you want to give the client the database schema only, or the entire database with data? What database? SQL Server? MySQL, SQLite?
Ron Beyer
17-Jan-14 10:53am
View
So what is the value that is actually being returned from ExecuteScalar? The value of scalarVal in my suggestion? This will help narrow it down... Have you also tried your SQL in a simple query window for MySql? To see what is really returned?
Ron Beyer
17-Jan-14 10:38am
View
I don't believe MessageBox is available in an ASP application, you would have to register an alert script.
Ron Beyer
17-Jan-14 10:33am
View
+5, exceptions are things that the current set of code can't handle so it tells the application to pass it up until something can handle it. If nothing does, it presents it to the user. I also would not use an exception where you can handle it easily in a more friendly way.
Ron Beyer
17-Jan-14 10:20am
View
The best language is the one you know that works on Windows. The libraries are the ones that work with said language.
This is difficult to answer without knowing what skills you have, what languages you know, etc.
Ron Beyer
17-Jan-14 10:00am
View
Thats not true in this case. ExecuteScalar should return null if there are no results from the query, it will return DBNull.Value if there is a result, but its value is null.
Ron Beyer
17-Jan-14 0:52am
View
Can you tell us what directory the executable is stored in? If its the Program Files directory you may not have permission to write to the file. Typically for user settings you want to create a Settings file and it gets stored in the user profile.
Ron Beyer
17-Jan-14 0:49am
View
Is it a lot of code? If it isn't too much you can just paste it into your question.
Ron Beyer
17-Jan-14 0:44am
View
I don't see why not. I would open another question and post your SMO code and ask how to achieve the same using ADO.NET classes.
Ron Beyer
17-Jan-14 0:40am
View
Really the wrong site to ask that kind of question.
Ron Beyer
17-Jan-14 0:38am
View
When a .NET 2 application (or DLL in this case) is loaded it uses a different runtime than the .NET 4 system. In order for the two to work together it has to do something called side-by-side loading. That means that both runtimes are loaded at the same time and (I think) in the same appdomain. The reason it may work with the WPF application is that it runs at a higher trust level than your WCF service, or there may be extra restrictions on side-by-side loading for WCF services. I'm not completely sure on that.
Ron Beyer
17-Jan-14 0:33am
View
If you are just running a simple database creation script, have you tried using the ADO.NET classes (SQLConnection, SQLCommand) to run it? You shouldn't need SMO just to run an SQL script.
Ron Beyer
17-Jan-14 0:28am
View
After a little more research it seems that SMO is not available for .NET 4, even though Microsoft says the above will work, people are saying it doesn't. Looks like the only reliable fix is to downgrade your application to use 3.5. You can use PasteBin to paste your code, what are you needing SMO for?
Ron Beyer
16-Jan-14 21:48pm
View
5! Much nicer!
Ron Beyer
16-Jan-14 21:36pm
View
Plus, you don't need the list, just use an int and += the parse, no need to use Linq at all in this problem, which I'm sure is way beyond where his class is.
Ron Beyer
16-Jan-14 21:29pm
View
string.Join("", input.Skip(i * 2).Take(2).Select(k => k.ToString()).ToArray()
Super complicated way to say:
input.Substring(i*2, 2)
Ron Beyer
16-Jan-14 21:16pm
View
You need to post the code including the line that the error occurs on. We cannot help you from just an error message.
Ron Beyer
16-Jan-14 15:16pm
View
What is the problem with the .NET SAP connector?
Ron Beyer
16-Jan-14 15:12pm
View
I 5'd, its a bit odd to call "sender" the value but you are right that you can use a custom event args object. Keeping with the standard EventHandler<t> pattern though, there will always be a sender, you just have to set it to null. There aren't really any "gotcha's" other than the sender being null, so you can't really use the same handler for both static and instance events of the same type.
Ron Beyer
16-Jan-14 14:48pm
View
Yes, you are right, you have to replace this with null. I will edit my solution.
Ron Beyer
16-Jan-14 12:57pm
View
There is no "your", there are 10 million members of this site, each one is welcome to contribute articles. This is a site to share knowledge, like Wikipedia kinda, not a single company providing articles and code. We are all volunteers just participating in a community.
Ron Beyer
16-Jan-14 11:56am
View
Why don't you bind the textblock text to the objects position in XAML?
Ron Beyer
16-Jan-14 10:54am
View
Its still not really going to help him, since you are demonstrating reading a single node of a non-RSS XML file, not looping through all the nodes of an RSS file. I don't want to sound like an ass, but if you post an example, it should be specific to what they need to do, I think this is going to confuse more than help.
Ron Beyer
16-Jan-14 10:44am
View
nodes should be xnlNodes, and inside the for loop xndNode should just be node, not sure where he got the code above from but its not right.
Ron Beyer
16-Jan-14 10:35am
View
My post has the definitive book on GOF patterns, and ironically the book is called Design Patterns.
Ron Beyer
16-Jan-14 10:33am
View
It doesn't work like that here, you need to show some effort and then tell us where you are stuck. Improve your question with what you have written and what parts you are stuck on and we can help, but we won't do your work for you.
Ron Beyer
16-Jan-14 10:28am
View
Instead of reading from whatever the user enters by the keyboard (which at the rate of 1 per second would take 70 hours to enter 250,000 numbers), I'm asking if you have a file on the disk that you read the numbers from.
Ron Beyer
16-Jan-14 10:25am
View
Which doesn't answer my question...
Ron Beyer
16-Jan-14 10:17am
View
Do you really expect to enter 50*50*100, or 250,000 numbers by hand? Or are you reading from a file?
Ron Beyer
16-Jan-14 0:44am
View
On the server, go to start>run>cmd then type "ipconfig", whatever it says there in ipv4, thats the address you use. Don't use your router address.
Ron Beyer
16-Jan-14 0:03am
View
Somehow I doubt your IP address is the same as the one in the article. You will need to change the IP address in the client to match the ip address of the server.
Ron Beyer
15-Jan-14 23:41pm
View
Ok, so you have a problem, can you narrow it down? What does it do? What doesn't it do? What is it supposed to do?
Ron Beyer
15-Jan-14 22:52pm
View
I can't see the code for your page, so I really can't tell you how to remove it from the page state. If you improve your question with the code, I can probably give you some better advice.
Ron Beyer
15-Jan-14 19:18pm
View
+5!
Ron Beyer
15-Jan-14 18:37pm
View
Search for the file, find out what software package it belongs to, and contact them for a fix.
Ron Beyer
15-Jan-14 18:07pm
View
Please be specific about your operating system and what type of application (WPF, Metro, Win Forms, console). There are certain restrictions on some operating systems about what type of application can access from where (Metro can't access c:\ I believe).
Ron Beyer
15-Jan-14 16:07pm
View
You still need to post the code from Class1... also you should use the "Improve Question" link below your question instead of posting solutions as this will probably get flagged and removed.
Ron Beyer
15-Jan-14 15:49pm
View
Please post your code for "Class1" and the lines you are getting this error on. Use the Improve Question link at the bottom right of your question to add it.
Ron Beyer
15-Jan-14 14:41pm
View
Unclear, the setup runs slow, or the application runs slow?
Ron Beyer
15-Jan-14 11:08am
View
Proxy servers don't hand out IP addresses... is your "proxy" server and client on the same network? If so, two devices can't have the same IP.
Ron Beyer
14-Jan-14 15:03pm
View
Please do not shout. All caps is shouting. Also, please show your effort, we aren't a drive through window.
Ron Beyer
14-Jan-14 14:17pm
View
How do you expect silverlight isolated storage to work if the user doesn't have silverlight installed? Would you skip using any of your silverlight components/storage? Need more information about what you want the alternative action to be.
Ron Beyer
14-Jan-14 13:46pm
View
Sounds like homework to me, you need to show some effort, we won't do your work for you.
Ron Beyer
14-Jan-14 13:37pm
View
Good catch.
Show More