Click here to Skip to main content

Comments by PIEBALDconsult (Top 200 by date)

PIEBALDconsult at yesterday View
Have you considered a DateTimePicker instead?
PIEBALDconsult at 3 days ago View
"my requirement is to perform crud operations" Then you work for an idiot; find a better job.
PIEBALDconsult at 5 days ago View
Split is too limiting, it's not very useful. Try a RegularExpression. Also, the ToCharArray is needless, you can foreach the string characters directly.
PIEBALDconsult at 5 days ago View
That's all you asked it for. If the Enabled belongs to the Address, then I would make it an Attribute (or a sub item if you prefer). Then alter the XPath to "/SharedSettings/eMail/eMailAddress" to get each eMailAddress item.
PIEBALDconsult at 5 days ago View
Use a DateTimePicker for date/time values; not a TextBox. Are you expecting the user to keep the application running constantly?
PIEBALDconsult at 5 days ago View
Servers don't push; clients pull.
PIEBALDconsult at 5 days ago View
With SQL Server you could use the ROW_NUMBER() function.
PIEBALDconsult at 11-Apr-14 21:59pm View
I strongly advise against using Substring.
PIEBALDconsult at 11-Apr-14 21:02pm View
Perhaps a Regular Expression? Judging by your code, you should not be writing a compiler.
PIEBALDconsult at 11-Apr-14 20:05pm View
That's a very bad idea.
PIEBALDconsult at 10-Apr-14 23:46pm View
Do you think your users will like that?
PIEBALDconsult at 9-Apr-14 11:01am View
What's a folder?
PIEBALDconsult at 9-Apr-14 10:11am View
I'm guessing some sort of Control that displays Data in a Grid for Viewing.
PIEBALDconsult at 9-Apr-14 9:17am View
Other than getting ride of all the procedures, I have no idea.
PIEBALDconsult at 8-Apr-14 23:40pm View
We can't help without seeing the code. And I hope you are storing the values as DATE or DATETIME and not as character.
PIEBALDconsult at 8-Apr-14 9:33am View
And how does that make you feel?
PIEBALDconsult at 7-Apr-14 22:13pm View
You could use a Regular Expression to capture the sequences of digits. Then iterate the Matches, Parse, etc. In fact, what you have could be done with a Regular Expression.
PIEBALDconsult at 7-Apr-14 20:21pm View
And have a look at this too:
PIEBALDconsult at 7-Apr-14 18:07pm View
You might want to know the word "Invoke".
PIEBALDconsult at 7-Apr-14 17:57pm View
Then you don't want us to just tell you. What you have is on the right track.
PIEBALDconsult at 7-Apr-14 17:01pm View
I wouldn't use Reflection to get it, especially if there are only a few specific types you want to support. Consider using is or as instead.
PIEBALDconsult at 7-Apr-14 0:34am View
What does your code look like now?
PIEBALDconsult at 5-Apr-14 21:23pm View
Sooo... where's the code?
PIEBALDconsult at 5-Apr-14 11:43am View
PIEBALDconsult at 5-Apr-14 1:23am View
Any reason not to use one query with UNION ALL?
PIEBALDconsult at 5-Apr-14 1:00am View
"Don't use a link" comes to mind, but I'm no Web developer.
PIEBALDconsult at 4-Apr-14 21:02pm View
That looks like reading code, not adding code. As far as the statement you point out, check it for DBNull.Value before trying to cast it. But if the problem is that none of the images are stored, then you'll need to show the code that does the storing.
PIEBALDconsult at 4-Apr-14 16:11pm View
Could need the port, I suspect they didn't provide it simply for the fun of it.
PIEBALDconsult at 2-Apr-14 20:59pm View
Save it to the database first, maybe make sure it also has a time limit, and can only be used once.
PIEBALDconsult at 2-Apr-14 15:26pm View
I have no idea; I'm not going to read those.
PIEBALDconsult at 2-Apr-14 14:35pm View
If that's what you need to do, I'd have a separate mapping of text to Node.
PIEBALDconsult at 1-Apr-14 19:35pm View
Sure, ask that after I leave the office.
PIEBALDconsult at 31-Mar-14 23:51pm View
There's got to be a better book. Making PI a member field is ridiculous. Even MSDN is probably better:
PIEBALDconsult at 31-Mar-14 23:18pm View
That's not even a good example; find a better one.
PIEBALDconsult at 31-Mar-14 19:44pm View
As others have said, use SUM ; then use ExecuteScalar. Other than that... For one thing, your code requires braces around the statements that should be in the while loop. For another, don't use ToString on the returned value when you know it's an integer -- just cast it -- this avoids the Parse. For yet another, AddAge + getAge; does nothing even if it compiles at all. Avoid using SELECT * when you don't actually want all the values. And finally, you should be using a parameterized query.
PIEBALDconsult at 31-Mar-14 19:35pm View
Use a parameterized query.
PIEBALDconsult at 31-Mar-14 19:35pm View
Except do it in the database, not in the code.
PIEBALDconsult at 29-Mar-14 17:00pm View
Frack no.
PIEBALDconsult at 29-Mar-14 16:00pm View
"dragging the section to be undone back to the source area" I don't see how one would do that in a RichTextBox.
PIEBALDconsult at 29-Mar-14 15:59pm View
"GenericDbConnection.html" I don't see how one would do that in a RichTextBox
PIEBALDconsult at 29-Mar-14 14:29pm View
How do you implement undo? Or otherwise allow the user to change his mind?
PIEBALDconsult at 29-Mar-14 13:30pm View
Would all the sections be used?
PIEBALDconsult at 29-Mar-14 12:26pm View
Blow air across the mouth and hear what pitch it makes.
PIEBALDconsult at 28-Mar-14 15:56pm View
Where's the up-vote button for comments?
PIEBALDconsult at 28-Mar-14 15:21pm View
Richard's answer is better in the long run.
PIEBALDconsult at 28-Mar-14 12:48pm View
Yeah, that's not SQL.
PIEBALDconsult at 27-Mar-14 9:10am View
No. Every time. It's not just about SQL injection; there are actions that can be performed only with parameters, and parameters can improve performance as well. Concatenation should be avoided except for when parameters won't work -- for example specifying the table name, or a TOP value. Parameters should always be your first choice, not your last.
PIEBALDconsult at 26-Mar-14 16:07pm View
OK, then, what populates @vc_bottom_content ? What is the definition of the parameter for the procedure?
PIEBALDconsult at 26-Mar-14 15:54pm View
I understand that part, but what process/code causes data to be inserted?
PIEBALDconsult at 26-Mar-14 15:51pm View
How does the data get into the table?
PIEBALDconsult at 26-Mar-14 15:50pm View
No it isn't.
PIEBALDconsult at 24-Mar-14 15:07pm View
Now you've mangled your operators with HTML.
PIEBALDconsult at 24-Mar-14 12:28pm View
Except make the rand a static field of the class; don't keep instantiating a new one each time.
PIEBALDconsult at 22-Mar-14 21:34pm View
Sounds like homework. -- From the 80s!
PIEBALDconsult at 22-Mar-14 12:18pm View
Or it could be in "ConnectionStrings["hospitalmanagementdb"].ToString());" -- if the config entry doesn't exist, and remember that XML is case-sensitive.
PIEBALDconsult at 21-Mar-14 23:58pm View
Who votes these down? It's begoming ridiculous.
PIEBALDconsult at 21-Mar-14 16:00pm View
Yes, but eliminate the Interface; it's a false-start.
PIEBALDconsult at 21-Mar-14 15:08pm View
For that particular example you might want to try the ?? operator. string Name = i ?? string.Empty ;
PIEBALDconsult at 8-Mar-14 9:09am View
I suspect that the problem can be solved by using a parameterized query. In particular, the UserName and md5pass aren't strings, yet you are trying to concatenate them into a string. This is bad on several levels. Use parameters.
PIEBALDconsult at 6-Mar-14 23:03pm View
Why not compare them in the database?
PIEBALDconsult at 6-Mar-14 22:15pm View
no yes no
PIEBALDconsult at 4-Mar-14 23:44pm View
I see that when I try to load an x86 assembly from an AnyCPU assembly. Check the target type of your project and see whether or not changing it to x64 solves it.
PIEBALDconsult at 4-Mar-14 22:45pm View
Probably not so good. "Bid gata" doesn't just mean "a lot of data".
PIEBALDconsult at 2-Mar-14 1:22am View
I doubt your example is very good. It is quite likely that you only need one table -- Fruit -- and something to indicate Type -- Apple, Orange, etc. Or, if Apple and Orange are too dissimilar, then you might have an Apple table and an Orange table.
PIEBALDconsult at 28-Feb-14 15:54pm View
UTC? Local? Local with offset?
PIEBALDconsult at 28-Feb-14 10:49am View
Can you examine the type with a debugger?
PIEBALDconsult at 26-Feb-14 0:12am View
Is that the verb or the adjective? :D
PIEBALDconsult at 25-Feb-14 23:41pm View
Most likely, though he hasn't clarified, until then all we can do is guess. It could that he has the wrong name of the server or database or no access.
PIEBALDconsult at 25-Feb-14 23:36pm View
He hasn't even told us what the error is! The code he shows is OK. How can it be straight forward?
PIEBALDconsult at 25-Feb-14 23:30pm View
He knows he needs to Open the Connection, but he seems to be having trouble doing so.
PIEBALDconsult at 25-Feb-14 23:28pm View
Yes, you have, but even the MSDN example shows Opening the Connection after instantiating the Command.
PIEBALDconsult at 25-Feb-14 23:26pm View
Yes, but not until you try to Execute it.
PIEBALDconsult at 25-Feb-14 23:20pm View
I never Open a Connection until after I assign the CommandText and set the Parameters.
PIEBALDconsult at 25-Feb-14 23:15pm View
No it doesn't.
PIEBALDconsult at 25-Feb-14 23:04pm View
Well? What's the error?
PIEBALDconsult at 25-Feb-14 21:21pm View
Ah, well if you want to be database-agnostic (and you should), then I'm your guy. The great thing about is that agnosticism is built right in; you just have to embrace it. The most important thing is to think in terms of the Interfaces: IDbConnection , IDbCommand , IDataParameter , IDataReader rather than the concrete classes SqlConnection, etc. And I suggest you stay away from DataAdapters; they're nothing but trouble.
PIEBALDconsult at 25-Feb-14 20:31pm View
Glad to be of service. "Need"? If it works and you like it, you don't need to change the others things I pointed out, but if you want to improve you should consider them. (And if this is a class assignment, I strongly urge you to make improvements.)
PIEBALDconsult at 25-Feb-14 19:40pm View
Exactly. But there are very similar classes in System.Data.OracleClient -- hint hint. (And it already doesn't work.) :D
PIEBALDconsult at 25-Feb-14 19:26pm View
"same way as sql" Yes, but you need to use the correct classes. Start by removing the using System.Data.SqlClient;
PIEBALDconsult at 22-Feb-14 20:33pm View
Class1.con is static, but the Connection method is never called.
PIEBALDconsult at 20-Feb-14 18:17pm View
How would you like them to work?
PIEBALDconsult at 19-Feb-14 14:07pm View
If you simply wanted to post some code you wrote you could have posted it as a Tip -- not that it would be any better received there either.
PIEBALDconsult at 2-Feb-14 20:18pm View
Probably means "configure" -- create a DSN.
PIEBALDconsult at 2-Feb-14 19:47pm View
"I have MS Access in mind" Get it out of your mind. Consider SQL Server CE. And why use ODBC when with OleDb will do Access?
PIEBALDconsult at 31-Jan-14 23:17pm View
"keeping the same exact size" I fill the final sector so the exact original size is lost.
PIEBALDconsult at 27-Jan-14 12:21pm View
This is your chance to improve things at your company. Parameterized commands are all kinds of better than what you show. Have a look at this beauty:
PIEBALDconsult at 27-Jan-14 11:39am View
Using a parameterized command will fix that.
PIEBALDconsult at 27-Jan-14 9:58am View
No, I mean to store a hash of the value, not the actual value.
PIEBALDconsult at 26-Jan-14 12:58pm View
PIEBALDconsult at 25-Jan-14 23:33pm View
Yes, but the decimal point still doesn't need to float, so it's overkill.
PIEBALDconsult at 25-Jan-14 20:01pm View
"Item Price - Double" No! Integer! Don't use floating point types for non-floating point values.
PIEBALDconsult at 24-Jan-14 21:46pm View
And the user's settings handle that very well. Don't override the user's preferences.
PIEBALDconsult at 20-Jan-14 20:01pm View
Why? If this is for installation on system you control, it's OK, but you should not do this for software you distribute to others. Many other will already have an instance of SQL Server they want to use and you should allow them to do that. Or maybe someone won't install your software until the next version is out and they'll want that, or even an older version of SQL Server (for whatever reason). Basically, don't try to install third-party software for others; allow them to install it where and how they choose. In your documentation, simply state that the software requires a minimum of some version of the software. And be truthful; don't say it requires version y when version y works just as well.
PIEBALDconsult at 20-Jan-14 18:35pm View
Run it on a different computer?
PIEBALDconsult at 17-Jan-14 15:58pm View
What operating system? In the file? Or just in the name? You may need to write your own utility or use Perl (or similar).
PIEBALDconsult at 15-Jan-14 19:25pm View
I would have said Hashset too.
PIEBALDconsult at 15-Jan-14 11:23am View
Right, there is that too, but it doesn't look like you posted the fixed code.
PIEBALDconsult at 14-Jan-14 23:35pm View
Then don't do that. Have you tried setting a semaphore that tells the thread to stop on its own?
PIEBALDconsult at 14-Jan-14 18:45pm View
Someone will always say you're doing it wrong. Just do as you think best and don't woory about the Pattern du jour.
PIEBALDconsult at 14-Jan-14 15:30pm View
Sounds like homework. A number has no remainder; you'll have to be more specific.
PIEBALDconsult at 9-Jan-14 10:35am View
Wouldn't you need to redirect the input as well? I do things about the way you have it, but I allow the user to respond to the prompts rather than trying to automate it.
PIEBALDconsult at 9-Jan-14 9:59am View
You haven't shown us what your database table looks like, but I suspect it's the main cause of your trouble and you should rethink it. Other things to consider include using a parameterized query to pass in the selected shift and trty not to use the sa user.
PIEBALDconsult at 9-Jan-14 9:55am View
Yes, he shouldn't use CheckBoxes, but RadioButtons still hinder extensibility. A ListBox seems more appropriate.
PIEBALDconsult at 7-Jan-14 10:25am View
It should have nice sharp pointy corners, a soothing grey pallor, and menus.
PIEBALDconsult at 7-Jan-14 9:47am View
"looking for outlines that are somewhat ovoid" Maybe that's why we men never look at a woman's eyes -- we think we already are! :D
PIEBALDconsult at 6-Jan-14 23:25pm View
That's a difficult task; just look at how bad the experts at Facebook are at it:
PIEBALDconsult at 2-Jan-14 22:04pm View
Are you really using Turbo C++ ? Not a more recent Borland product? I just used the Borland C/C++ 5.5 "Free Command Line Tools" to compile a simple console app on Win7 32-bit and ran it on Win7 64-bit with no trouble. "Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland"
PIEBALDconsult at 20-Dec-13 23:34pm View
Did it wind up in the Master database?
PIEBALDconsult at 20-Dec-13 12:50pm View
Try it to at least get a baseline of how long it takes.
PIEBALDconsult at 19-Dec-13 18:16pm View
"insert the new value to the top of the list and move every other value down one" You have that backward for one thing.
PIEBALDconsult at 17-Dec-13 12:48pm View
Why would you do that to your friends? You should give it free to your friends and let them beta test it. You shouldn't even think about charging for it until you see whether or not others think it's worth anything. If your friends, and their friends, don't like it, would you give back their money? Are you willing to lose friends over a few bucks? As to licensing, that would depend greatly on whether or not you are providing source code, and it doesn't sound like you are.
PIEBALDconsult at 16-Dec-13 17:36pm View
Sounds like homework. Read the assignment a few more times then tackle each part separately.
PIEBALDconsult at 15-Dec-13 1:32am View
You can't trust computers.
PIEBALDconsult at 14-Dec-13 18:01pm View
From the VAX/DEC/Compaq/HP C documentation: "In relaxed ANSI C mode, the first clause of the for statement can be a declaration whose scope includes the remaining clauses of the for header and the entire loop body." /STANDARD=RELAXED (equivalent to /NOSTANDARD) The compiler accepts ANSI/ISO C Standard C89 and C99 features, as well as nearly all language extensions "Placing a declaration in a for loop is a new feature in the C99 standard. Other C compilers may not support this extension." It's odd though, that the ANSIC99 PDF I have says: " The for statement The statement for ( clause-1 ; expression-2 ; expression-3 ) statement behaves as follows: The expression expression-2 is the controlling expression that is evaluated before each execution of the loop body. The expression expression-3 is evaluated as a void expression after each execution of the loop body. If clause-1 is a declaration, the scope of any variables it declares is the remainder of the declaration and the entire loop, including the other two expressions; it is reached in the order of execution before the first evaluation of the controlling expression. If clause-1 is an expression, it is evaluated as a void expression before the first evaluation of the controlling expression.134) " So if it's been in the standard for nearly fifteen years, why is there still so little adoption?
PIEBALDconsult at 14-Dec-13 17:20pm View
Me too, but I have become so used to declaring things willy-nilly in C# that it's just natural to me now. It also eliminates a pair of braces in this case. :D I also like preprocessors that allow the inclusion of a header file from the command line so I can remove them from the code. But, yeah, if it only compiles on only one of the four compilers I tried, it can't be a good thing.
PIEBALDconsult at 14-Dec-13 15:02pm View
Huh, maybe it will change its mind again.
PIEBALDconsult at 14-Dec-13 15:00pm View
I don't know, but what the heck is this: Convert.ToInt32(pData.Length))
PIEBALDconsult at 14-Dec-13 14:57pm View
Post in Bugs&Sugs
PIEBALDconsult at 14-Dec-13 14:54pm View
I see a 3. Is a 3 a downvote now? Sounds like the car dealer we bought from recently saying that anything less than the top rating was a failure. I told him that anything less than us coming back is a failure.
PIEBALDconsult at 14-Dec-13 14:37pm View
No converting or even casting is necessary.
PIEBALDconsult at 14-Dec-13 14:35pm View
Visual Studio, p'shaw. :rolleyes: The Microsoft C/C++ I have on my work laptop is one I tried -- but I used my own simple IDE. I am mildly surprised that it doesn't support for ( int i = 0 ; ... -- the newer of the HP C compilers I have for OpenVMS supports that. Borland's C/C++ also doesn't, and I've never gotten the MinGW gcc to work (I only use the pre-compiler).
PIEBALDconsult at 14-Dec-13 12:13pm View
At least it gave me an excuse to look at some of the C compilers I have available.
PIEBALDconsult at 14-Dec-13 11:42am View
It's even asimpler than that -- especially accepting the input as a parameter.
PIEBALDconsult at 14-Dec-13 9:35am View
That sounds like homework. Break the problem down into smaller tasks and work on one at time.
PIEBALDconsult at 13-Dec-13 21:57pm View
P.S. You may want to look into DbConnection.GetSchema Method (String) which is more database-agnostic.
PIEBALDconsult at 13-Dec-13 21:55pm View
I don't understand the problem, I use that for Excel all the time and have no trouble with it listing all sheets. You can't add data to it -- other than adding more sheets to the book.
PIEBALDconsult at 13-Dec-13 18:22pm View
If you are using SQL Server, then an inline table valued function would do that. But a view might be better.
PIEBALDconsult at 11-Dec-13 12:32pm View
Thanks. Very good, but still doesn't address Report Services and SSISDB. Not to mention third-party databases -- we just started using BiXpress and it creates a database.
PIEBALDconsult at 11-Dec-13 12:28pm View
Yeah, so maybe if the DBA ensures that only "system" databases (which we can consider to include Report Services and SSISDB) are owned by sa, then that could work.
PIEBALDconsult at 11-Dec-13 7:21am View
Sure, but it doesn't seem definitive; I think checking the owner is more accurate, they could add more "system" databases in the future. Actually, looking at one of my databases, I see that 5 and 6 are for Report Services*, but on another server, where that isn't installed, my first "user" database is number 5. * And they're not listed under "System databases" (and not owned by sa), but I wish they were. Same with SSISDB, but I see that that one is owned by our DBA rather than sa. This may be a more difficult question than I thought. Ha ha ha! I just set my Junk database to be owned by sa so it breaks my test. As to yours, I guess the best you can do is use <=4 rather than 6.
PIEBALDconsult at 10-Dec-13 22:57pm View
No problem; not getting any other bites.
PIEBALDconsult at 10-Dec-13 21:23pm View
Just as it says.
PIEBALDconsult at 10-Dec-13 0:35am View
You don't actually need a variable; look at the available properties of the ListBox.
PIEBALDconsult at 9-Dec-13 22:07pm View
"selectedCustomer i set as a global variable" Bad idea. "selected item in the listbox" Think about those words.
PIEBALDconsult at 9-Dec-13 20:55pm View
if (selectedCustomer != -1) I do wonder where you set selectedCustomer.
PIEBALDconsult at 9-Dec-13 20:19pm View
So then about 90% of the code you posted is irrelevent to the problem?
PIEBALDconsult at 9-Dec-13 19:40pm View
I can't tell what lanbguage that is, but it ain't english.
PIEBALDconsult at 9-Dec-13 19:35pm View
And where in your code does that happen?
PIEBALDconsult at 9-Dec-13 19:04pm View
I'm not digging through all that. Could you post only the code that has the problem please? "I have CRUD created" is likely your problem.
PIEBALDconsult at 8-Dec-13 23:49pm View
Don't; it's a bad idea, find a better solution.
PIEBALDconsult at 8-Dec-13 11:14am View
Strt by rmvng th vwls.
PIEBALDconsult at 8-Dec-13 10:28am View
If you know C# you may be able to learn Java easily (not that I have). Java is the more popular language for developing for Android. Books like "Teach Yourself Android Application Development" have sections on how to set up a development environment (Eclipse). It's so easy, even I can do it.
PIEBALDconsult at 7-Dec-13 17:38pm View
You can't explain the complex with simple.
PIEBALDconsult at 6-Dec-13 10:14am View
Oooohhh... that runs into money.
PIEBALDconsult at 6-Dec-13 10:09am View
How many polka dots? They cost extra, and you just missed the CyberMonday deal.
PIEBALDconsult at 6-Dec-13 9:51am View
What color?
PIEBALDconsult at 6-Dec-13 1:21am View
You probably need to test for >100 before testing for >17 . And you can nest CASEs if you need to. And use s=s+t . In fact, try s = s + CASE ... END
PIEBALDconsult at 4-Dec-13 8:46am View
Sure, if you don't know what you're doing.
PIEBALDconsult at 1-Dec-13 10:27am View
I'd also like to point out that a delete isn't a query.
PIEBALDconsult at 1-Dec-13 10:24am View
It would be one statement.
PIEBALDconsult at 1-Dec-13 0:59am View
No way to know without seeing your code.
PIEBALDconsult at 29-Nov-13 13:35pm View
What language is: Console.WriteLine(endl<<"3:tue"<<endl; Console.WriteLine(endl<<"4:wed"<<endl; Console.WriteLine(endl<<"5:thu"<<endl; Console.WriteLine(endl<<"6:Quit"<<endl; ?
PIEBALDconsult at 25-Nov-13 23:43pm View ? What does that have to do with SQL Server?
PIEBALDconsult at 24-Nov-13 11:50am View
Have some homework, do we?
PIEBALDconsult at 23-Nov-13 23:18pm View
I agree with Rohan, and would add that the Open should be outside the try/catch. Better would be to move the data access code into a separate class (Data Access Layer).
PIEBALDconsult at 23-Nov-13 23:13pm View
What is the 5th record? How would you know it's the 5th record? Does it matter? Can you return just any record and say it's the 5th?
PIEBALDconsult at 23-Nov-13 15:31pm View
"the database adds several (?) characters to it " That is probably only when it is displayed (in SSMS?), try accessing the values with a program. Also, you should probably show us the code you are using to store and retrieve the values; it may help.
PIEBALDconsult at 23-Nov-13 12:09pm View
Ensure that you have apostophes around the path.
PIEBALDconsult at 23-Nov-13 11:41am View
I'll take a look, but if the process doesn't start I don't think it can help.
PIEBALDconsult at 21-Nov-13 8:52am View
" , SqlDbType.VarChar); " -- setting the type is pointless; it will just be overwritten when you set the value.
PIEBALDconsult at 19-Nov-13 8:54am View
Sounds user-hostile.
PIEBALDconsult at 18-Nov-13 21:44pm View
Possible; but not recommended.
PIEBALDconsult at 18-Nov-13 18:25pm View
The question said to ignore that.
PIEBALDconsult at 18-Nov-13 18:24pm View
Didn't waste my time and I don't care about yours.
PIEBALDconsult at 15-Nov-13 16:09pm View
PIEBALDconsult at 15-Nov-13 15:53pm View
I trust you've written generic classes before?
PIEBALDconsult at 15-Nov-13 15:40pm View
Or generic: new DataDownloader<EuMetSat>()
PIEBALDconsult at 15-Nov-13 14:38pm View
I would have suggested something, but you said "M$" so I won't.
PIEBALDconsult at 13-Nov-13 23:47pm View
"UserAgent &3 =4" would never be true.
PIEBALDconsult at 12-Nov-13 22:55pm View
Why would I do that?
PIEBALDconsult at 12-Nov-13 8:55am View
We don't do homework. We're unlikely to read that much code with no explanation. You don't say whether you are having a problem, or just trying to show off your new-found skills.
PIEBALDconsult at 10-Nov-13 11:43am View
Why? Sounds user-hostile.
PIEBALDconsult at 10-Nov-13 10:26am View
You wouldn't happen to have a debugger handy would you? If so, use it.
PIEBALDconsult at 29-Oct-13 0:39am View
I assume it would take just as long unless you used a number of threads, and even that would likely make no difference. If there is no other reason to consider multiple files, I'd stick with one. On the other hand, reading the data may be a factor in how you write.
PIEBALDconsult at 29-Oct-13 0:35am View
XML namespaces are rather tricky and I've had a bit of trouble working with them. One thing I would cauthion is not to use the default (empty) namespace. It looks like what you have should work. Can you add a snippet of the generated XML? Come to think of it, I suppose the Attribute you create doesn't get interpreted as a namespace until it's read in -- that could be the issue, but I don't know the solution.
PIEBALDconsult at 27-Oct-13 11:53am View
"i store connection string in presentation layer" Wrong, only the Data Access Layer needs that; no other layer should have access to it.
PIEBALDconsult at 27-Oct-13 1:35am View
There is no need to differentiate; which is why C-like languages don't.
PIEBALDconsult at 27-Oct-13 1:24am View
No, you weren't.
PIEBALDconsult at 27-Oct-13 1:24am View
Virtual 5.
PIEBALDconsult at 26-Oct-13 11:29am View
But that is incorrect.
PIEBALDconsult at 26-Oct-13 11:19am View
Adjust as needed. The basic algorithm reamins the same.
PIEBALDconsult at 24-Oct-13 17:15pm View
Looks good to me, and one second is awesome. Don't mess with it.
PIEBALDconsult at 20-Oct-13 12:25pm View
Ummm... what?
PIEBALDconsult at 18-Oct-13 0:15am View
Maybe it's your Regular Expression? What is it trying to do? But if it's a "binary file" why are you using it as a "text file"?
PIEBALDconsult at 17-Oct-13 10:45am View
I suggest always specifying the access level (in this case use protected) and never accepting the default. Don't expect the reader to know what the defaults are in every situation. Also, you should probably mark the methods in the abstract class as either abstract or virtual.
PIEBALDconsult at 17-Oct-13 10:41am View
"can be error-prone" -- certainly not future-proof, but "error-prone" may be overstating the problem. "has bad performance" -- only the first time; cache the info and reuse it.
PIEBALDconsult at 16-Oct-13 22:03pm View
Don't use DateTime.MinValue - particularly if you want to store in SQL Server, Oracle, or another database that can't handle it.
PIEBALDconsult at 16-Oct-13 21:28pm View
Yes; use the right tool for the right job.
PIEBALDconsult at 11-Oct-13 0:41am View
I'm fairly sure that "root element" is not strictly an XML concept, but rather it only applies to a Document Object Model.
PIEBALDconsult at 6-Oct-13 1:00am View
Yet the code he presented finds all. " you usually assume prime factorization" No I don't.
PIEBALDconsult at 5-Oct-13 18:06pm View
Are they?
PIEBALDconsult at 5-Oct-13 13:52pm View
I assume he wants all factors; not just the prime factors.
PIEBALDconsult at 5-Oct-13 13:24pm View
You only need to go as far as the square root. Also, other than the square root, when you find one you've found two, so print both.
PIEBALDconsult at 4-Oct-13 9:49am View
If there are 50 cats, 40 dogs, and 60 elephants, you want to return the top 20 cats, the top 20 dogs, and the top 20 elephants? Look into ROW_NUMBER().
PIEBALDconsult at 4-Oct-13 0:34am View
So? What's stopping you?
PIEBALDconsult at 3-Oct-13 23:53pm View
I use OleDb and the ACE engine to write to Excel and I haven't noticed any rounding. Do you have any examples?
PIEBALDconsult at 3-Oct-13 1:34am View
What the heck is #incluede ?
PIEBALDconsult at 3-Oct-13 1:22am View
Possible, but not recommended.
PIEBALDconsult at 1-Oct-13 10:03am View
That sounds backward.
PIEBALDconsult at 29-Sep-13 22:13pm View
That doesn't look like a job for Split. Have you tried a Regular Expression?

Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid