Search Results

Showing results 1 to 39 of 39
Search took 0.01 seconds.
Search: Posts Made By: nvmobius
Forum: C# Aug 12th, 2008
Replies: 5
Views: 1,831
Posted By nvmobius
The downside of StringBuilder (and secretly String.Format) is that the allocation/release cost is several times that of the base String class. I'll see if I can find the MS developers' post, but if I...
Forum: C# Aug 12th, 2008
Replies: 5
Views: 1,831
Posted By nvmobius
This is better, unless you do it often. Remeber each + used allocates and floats another copy of the string.
Forum: C# Aug 12th, 2008
Replies: 4
Views: 2,409
Posted By nvmobius
A dynamic count of threads isn't always a good idea, in fact it's often a bad idea. Since you have a quad core machine you should start with 4 threads (one per core), then try 8, 16, 20, etc until...
Forum: C# Aug 12th, 2008
Replies: 2
Views: 4,658
Posted By nvmobius
You're asking for a lot here. Why is it you want to do this in C# and not Flash or some easy to animate platform?
Forum: C# Aug 12th, 2008
Replies: 2
Views: 408
Posted By nvmobius
I recommend using HTML + JavaScript. That is exactly what they were designed for.
Forum: C# Aug 12th, 2008
Replies: 1
Views: 3,970
Posted By nvmobius
I don't see where you Timer is declared. It's quite possible that it's losing scope and being garbage collected.
Forum: C# Aug 12th, 2008
Replies: 1
Views: 327
Posted By nvmobius
Well first thing I see the lines


// Display tax
Console.Write("$");
Console.Write(dectax);

// Keep window open
...
Forum: C# Aug 12th, 2008
Replies: 5
Views: 6,070
Posted By nvmobius
Personally, I'd make an interface... let's call it IFilterable with a required method let's call Filter.


public interface {
bool Filter( );
}


The each object in the collection could...
Forum: C# Aug 12th, 2008
Replies: 3
Views: 703
Posted By nvmobius
Um...

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Or in the case of one system I work on:

Data Source=HQNVSQL07;Initial...
Forum: C# Aug 11th, 2008
Replies: 1
Views: 4,912
Posted By nvmobius
This is a problem with your use of public, protected, and private. Probably somewhere in your inheritance chain. Most likely forgot to add public infront of a class declaration somewhere.
Forum: C# Aug 11th, 2008
Replies: 1
Views: 625
Posted By nvmobius
You're looking for DRM software - online... from people willing to give free help... yeah, makes total sense...
Forum: C# Aug 11th, 2008
Replies: 3
Views: 703
Posted By nvmobius
www.connectionstrings.com

use it, love it.
Forum: C# Aug 11th, 2008
Replies: 2
Views: 2,112
Posted By nvmobius
Code looks fine, might be a NTFS security issue.
Forum: C# Aug 11th, 2008
Replies: 1
Views: 302
Posted By nvmobius
huh?

I'm gonna guess what the heck you mean here, and hand you an answer.


List<string> a = new List<string>();
List<string> b = new List<string>();

...
Forum: C# Aug 11th, 2008
Replies: 2
Views: 595
Posted By nvmobius
My guess:

Windows Server uses much better security modeling than Winows XP does. You really should develop on Windows Vista with UAC turned on (make sure you never trip the UAC dialog with your...
Forum: C# Aug 11th, 2008
Replies: 4
Views: 4,187
Posted By nvmobius
I think you're asking about the System.Security.Principal namespace.
Forum: C# Aug 11th, 2008
Replies: 4
Views: 640
Posted By nvmobius
Define "an interface for a C# program". I have to assume you don't mean an interface like IEnumerable, so I'm not sure what you mean.
Forum: C# Aug 11th, 2008
Replies: 2
Views: 861
Posted By nvmobius
A standard piece of code I find myself using and reusing, time and time again...


using ( FileStream fileStream = File.OpenRead(CONFIG_PATH) ) {
Regex entryRegex = new...
Forum: C# Aug 11th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
You still need to set up your methods accordingly, but I find using C/C++ LoadLibrary and GetProcAddress to get the other native code and then calling the calling code with C++/CLI is much easier way...
Forum: C# Aug 8th, 2008
Replies: 2
Views: 525
Posted By nvmobius
You can do it, but it's not recommended. Usually people who want to do their own scheduling set up a Windows Service to do so. You can create one easily with Visual Studio in C#.

AFAIK .Net cannot...
Forum: C# Aug 8th, 2008
Replies: 2
Views: 5,952
Posted By nvmobius
Use a System.Text.RegularExpressions.Regex object.


Regex linkRegex = new Regex(@"<link>\s*(?<link>[^<]+)\s*</link>", System.Text.RegularExpressions.RegexOptions.Compiled);
Regex...
Forum: C# Aug 8th, 2008
Replies: 3
Views: 678
Posted By nvmobius
You'll have to trust me on this, but you really DO NOT WANT to store the image in your database. Instead store a file path or Uri to the image in your database and read it from disk when you want to...
Forum: C# Aug 8th, 2008
Replies: 7
Views: 3,562
Posted By nvmobius
Good news, and the code doesn't look bad at all. Job well done. :-)
Forum: C# Aug 4th, 2008
Replies: 7
Views: 3,562
Posted By nvmobius
Assuming the user your running as has access to the remote server via a windows share, you can just use System.IO.File.Copy to move files. It's really that easy.
If you need to do FTP, it could be...
Forum: C# Aug 4th, 2008
Replies: 2
Views: 4,821
Posted By nvmobius
Check the way your decimal columnis defined in SQL server. It's possible you've defined it to not allow values >= 1.0. Use MSDN to reference how to properly specify the column.

Do the same check...
Forum: C# Aug 4th, 2008
Replies: 1
Views: 990
Posted By nvmobius
if youjustneed the fast lookup ability of the dictionary, I believe the compact framework supports the System.Collections namespace, so you can just use a HashTable object which is even faster.
Forum: C# Aug 4th, 2008
Replies: 7
Views: 3,562
Posted By nvmobius
How are you doing the file compare, it is entirely based on path + filename?
Forum: C# Jul 29th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
CLR Managed code can call methods in another DLL via P/Invoke, but I recommend not doing that and instead having the native portion of you code handle dealing with other unmanaged code blocks.
...
Forum: C# Jul 29th, 2008
Replies: 2
Views: 1,425
Posted By nvmobius
http://www.connectionstrings.com/ for the win!
Forum: C# Jul 29th, 2008
Replies: 7
Views: 3,562
Posted By nvmobius
The basics are there but a few suggestions for you:


using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public class Program {
Forum: C# Jul 29th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
Is createMATLABThread managed or native? If it's managed, you need to create a delegate to pass.

Delegates are manage codes version of function pointers. So, I don't think you're getting from...
Forum: C# Jul 29th, 2008
Replies: 2
Views: 667
Posted By nvmobius
What the...?! Logical AND is a CPU operator that flips bits, how could you possibly do that to a System::String object?

You're looking for either a System::Text::RegularExpressions::Regex or &&.
...
Forum: C# Jul 29th, 2008
Replies: 3
Views: 2,133
Posted By nvmobius
Are you using web controls or realy code? :-P

As a developer who started in C then migrated to C++ then to C# I tend to avoid as many of the built in controls MSFT offers with the .Net runtime. My...
Forum: C# Jul 29th, 2008
Replies: 4
Views: 588
Posted By nvmobius
... Just compile it as C++/CLI and change all the * to ^, and all the cout to System::Console::WriteLine() calls. Then fix the compiler complaints.
Forum: C# Jul 29th, 2008
Replies: 3
Views: 694
Posted By nvmobius
Yup, it's a parse error. VC8+ goes right to the line and complains.
Forum: C# Jul 29th, 2008
Replies: 2
Views: 2,154
Posted By nvmobius
If you're only trying to emulate a click of the back button, don't use C# use Javascript. Add this code to you page:


<button onlick="window.history.go(-1)">Back</button>
Forum: C# Jul 29th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
Good catch on the .lib file, after using C# for a while you tend to forget about stuff like that.

I don't have any where to point you for C++/CLI information other than MSDN. I've learned mostly...
Forum: C# Jul 29th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
Look at these two pieces of code, they mix managed and unmanaged just fine. More than likely you've not included a header file that you need in order to compile with managed code. make sure that you...
Forum: C# Jul 28th, 2008
Replies: 14
Views: 7,598
Posted By nvmobius
You'd be better off (if possible) creating a mixed managed/native DLL in C++/CLI (http://msdn.microsoft.com/en-us/magazine/cc163681.aspx) and adding that DLL as a reference to your C# project.
Showing results 1 to 39 of 39

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC