|
First fragment the string in multiple string each of them containing the string representation of one number with String.SubString method or maybe more easily with String.Split(" ") as your example implies that string representation are delimited by white spaces.
To convert each string representation into a number use Double.TryParse (.NET 2.0) or Double.Parse (prior versions).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
Hi,
I love coding with a plain text editor and the command
prompt compiler. I have the framework version 1.1 with
service pack installed, and the 1.1 SDK as well.
Just wanted to know if there's anything that cannot be
done without using the IDE. Is there?
If a person is able and has the know-how, anything can
be done using the "stupid" notepad and "painful" command
prompt compiler, right?
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Bulky Fellow wrote: Just wanted to know if there's anything that cannot be done without using the IDE.
No there isn't. You just loose some comfort in doing it.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Bulky Fellow wrote: Just wanted to know if there's anything that cannot be
done without using the IDE. Is there?
Designing a GUI quickly, I guess. But, no, at the end of the day, I doubt that there's anything you can't do, given enough time.
Bulky Fellow wrote: If a person is able and has the know-how, anything can
be done using the "stupid" notepad and "painful" command
prompt compiler, right?
I'm not sure anyone said it was stupid. If you're coding for money, it's a stupid way to write code ( it's slower, and not fair on your employer ), but if you're coding for fun, go for it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi
Does anyone have any idea or any useful links as to how one goes about shifting the focus from one application to a totally different one, that is currently running?
Thanks,
RainFox - cunning, with some cloudy clueless moments, yet cool and fresh
|
|
|
|
|
|
Hello,
I'm working with active directory in asp.net and C# as codebehind and I've used:
directorysearcher search =new...;
search.propertiesToLoad.Add("cn");
That give me the user name. now if I'm also getting the "memberof" property I'm getting alot of groups for the user.
Is there a built in function that tell me if the user is in a specific group instead of writing my own function that will run on all the groups that the user is a member of them and compere?
some thing like:
bool x=isCurrentUserMemberof("myGroupName");
Hope i was clear enough.
Thanks.
|
|
|
|
|
again and again i am stuck with the active directory issues.
Now i am trying to add a user. I am able to do so but with one big problem.
The problem is that the new user is taking a user name different than what i am giving. IT is taking something like that: "$K51000-JA95P8M1QM23" .
The letters and number changes but the same concept.
I am using this methode to add a user:
<br />
DirectoryEntry entry = new DirectoryEntry("LDAP://mainsrv/OU=" + "ITC Users" + ",DC=ITC" + ",DC=local");<br />
<br />
DirectoryEntry user = entry.Children.Add("cn=" + userName, "user");<br />
<br />
user.CommitChanges();<br />
<br />
user.Properties["sAMAccountName"].Value = userName;<br />
<br />
user.CommitChanges();<br />
where userName is a string that i define through a textbox
I am adding the rest of the fields in the same concept:
example:
<br />
user.Properties["displayName"].Value = firstName;<br />
user.CommitChanges();<br />
all the other properties of the user different from the userName are being added succesully with no problem.
Any suggestions??
best regrads,
Jamil Abou Khalil
|
|
|
|
|
Hi.when i make changes in a project server or a sharepoint portal,i need to send alerts to a mobile pc that changes have been made(e.g:document added,deleted,updated etc).is there a way to do this?i am using windows 2000 professional.
thanks in advance
|
|
|
|
|
Sharepoint 2003 offers some pretty good stuff for notifying users of a change. If your mobile device has e-mail, it is doable without much work.
Setup the device to sync with your exchange server and let the sharepoint server send e-mail notifications to the e-mailaddress being synchronized with the server.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
thank u .but how do i get started?i do have sharepoint 2003 and project server installed on my system.can u give me some code structure or any steps to follow for getting this done.your help would be greatly appreciated.
thanks in advance
|
|
|
|
|
You should search on google for a tutorial on how to setup synchronisation with the mobile device, but sharepoint is pretty simple:
1. Logon to the sharepoint server with the desired username/password
2. Go to the document library
3. Select notifications (Somewhere on the left of the page)
4. Enable the notifications for the current user.
And that's about it.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
I'm writing a small project in C#. I decided to convert all of my doubles into floats for performance reasons; I did some primitive test and operations with floats seemed to be faster (can anyone confirm this?).
Anyway, I did a global text replace changing all instances of "double" to "float" within my project. When I tried to build the project, Visual Studio C# Express Edition froze. After shuting it down and reloading it. I changed all floats back into doubles. Builds just fine.
So I'm baffled. I can understand how such a global text and replace operation could introduce bugs or cause the code not to compile. But this change chokes Vistual Studio for some reason. I've tried rebuilding the solution from scratch with the same results.
|
|
|
|
|
I discovered the problem. I had several massive arrays initialized in code as doubles. Something like this:
namespace MusicSynthesizer
{
public partial class Oscillator
{
#region Sawtooth Waveforms
private static readonly double[][] SawtoothWaveforms =
{
new double[]
{
0,
0.99999999999977,
0.765255336254772,
0.90346140078622,
0.804406680287037,
0.880594209485646,
0.817554516488886,
These values are out of range for floats. So when I changed the array type to float without reducing the values of the constants, it caused Visual Studio to freeze.
It would have been nice to have gotten an error message saying, "Hey! These numbers are too big for floats!" instead of it freezing without leaving a clue as to why.
|
|
|
|
|
Leslie Sanford wrote: I did some primitive test and operations with floats seemed to be faster (can anyone confirm this?).
The performance depends on so much more than the data type, so one can not generally say that either of the types are faster.
Internally the processor does all floating point operations using doubles, so all floats has to be converted to double before they can be used. That suggests that doubles would be more effective.
On the other hand, doubles are larger than floats, so if you for example are working with a certain number of numbers, they might all fit in the cache if they are floats, and not if they are doubles.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your response! I've learned something. I will stick with doubles for now and look for other ways to optimize my code.
|
|
|
|
|
Hi,
I am using the webbroser control in winforms and find that during the page load operation, the application itself hangs in some systems. This is not reproducable in all the systems. Here an XML file is being generated and it displayed in the web browser control using XSL. Can anyone help me out in this issue...
Thanks in advance
Thanks and Regards
Madhu
|
|
|
|
|
Hi, currently I make a Login system with MySQL Connector.
My App is a MDI Application.
1. When the program starts, it asks for User login and if success, there will be a Connection Object that I can access in all Forms (MDI Parent Form, and its MDI Child.
How can I save the success connection into an object so that
I can use(access) that object in another MDI Child to make another connection to MySQL?
Thanks for your help.
Enjoy It!
|
|
|
|
|
You don't. Proper database access means you do NOT hold open a connection to the database. You open a connection, do your business, and close it. If you need database access further in your application, create a new connection when you need it and close it when you don't.
Why? Because SQL licenses, not MySQL obviously, are expensive!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I understand that. What I meant is,
What I meant by Success Connection is the correct parameter about the connection.
In other word, I want a global variable that stores the Connection Parameters (like: Server Name, Database Name, Username and Password), and I can access that variable in any Forms (Parent or Child) to make a connection without transfer variable from Parent to Child.
Enjoy It!
|
|
|
|
|
OK. In that case, all you have to do is create a static class that exposes a method to return a connection object. That class can manage the settings on its own, probably getting the settings from the app.config file or some other place.
Static classes and methods don't need an instance to work. You can call them from anywhere in your project, so long as they're public.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Does that(create static class) work for functions or procedure too?
and, thanks that really helps.
Enjoy It!
|
|
|
|
|
Functions and Procedures are no different, and they're actually called "methods".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi dear friends.
I have a problem with the shortcur menus and this is that I want select multiple files with my shortcut menu for adding in my program. now I'm using this registery key :
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\myApp]
@="myApp"
[HKEY_CLASSES_ROOT\*\shell\myApp\command]
@="c:\\myApps\\WindowsApplication2.exe \"%L\""
but my application just show me 1 of the files that I'm selected in explorer.
I think the problem is "%L" , but I don't know What I must do.
in the other language I want to open more than 1 file with the shortcut to my Apploication.
-----------------------------
and another problem that I have with this is this that I wanna select any file type with the shortcut menu. but I can't find better way than this that add "shell" to the "*" key.
what is the true way?
thanks!
public static arraylist OVELISAX(arraylist friendship){
//my life
}
|
|
|
|