|
Do you realise you posted to a 4.5 year old question?
|
|
|
|
|
I thought other people might like to know this.
|
|
|
|
|
No need to rant
By the way, you should use unchecked syntax to do it your way:
string binaryString = Convert.ToString(unchecked((long)ulong.MaxValue), 2);
|
|
|
|
|
how many times a word is used in a sentence,or its frequency
eg:
“this is a dog and that is a pig”
result:
“is”:2
“and”:1
th:2
is:3
i:4
thank you!
|
|
|
|
|
This should get you started.
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
namespace NeedsCode
{
class Program
{
static void Main(string[] args)
{
throw new NotImplementedException("CodeProject is not a free homework service.");
}
}
}
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
flowingsun wrote: how many times a word is used in a sentence,or its frequency
flowingsun wrote: “this is a dog and that is a pig”
result:
“is”:2
“and”:1
th:2
is:3
i:4
You answered your own question.
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
No, that is not correct.
The result should be:
this: 1
is: 2
a: 2
dog: 1
and: 1
that: 1
pig: 1
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
There are three steps:
1. Write a function that goes through your sentence and isolates individual words.
2. For each word, check if it's in a hash table that maps strings to integers (counts). If it is, increment that word's integer and save it in the hash table's entry for that word. If it isn't, insert the word into the hash table with a one count.
3. Go through the hash table and print out each word and the integer associated with it.
You have to write the code yourself, though.
|
|
|
|
|
Hello everyone,
I am looking for some web service tutorials or code samples in depth, especially for the security/performance/scalability. Any reference?
thanks in advance,
George
|
|
|
|
|
google might help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Thanks Vuyiswa,
I always think human or espcially Guru's recommendation like you is more valuable than Google machines.
Do you have any recommendations?
regards,
George
|
|
|
|
|
|
Thanks Vuyiswa!
I like them!
regards,
George
|
|
|
|
|
I've created a datagridview which gets the data from a table whic has 3 columns engineID(Primary Key), engineName, and engineUrl.
what i want to do is i just want to get the engineUrl from the datagridview who's checkbox is selected and then store the engineUrl in a string variable... which i want to manipulate later.
Also if multiple checkbox is selected then all engineUrl field text should be stored in a variable string.
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
lets see what have you done so far,
remember that we cannot do your job for you. show us your code and we will advice
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
OK. That's the wrong code. Now please post the working one.
I.e. Is it so difficult understanding the forum guidelines [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanx for the advice actually i did it by mistake i was entering something and entered the wrong thing
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
You may edit your OP, if you wish.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i am developing application which accesses all my lan machines and output their individual into the text files, but which method is good using Elog class or using wmi.or tell me is there any way to specify username and password in Elog class
|
|
|
|
|
Hi,
Using WMI is the easiest way to access the other machines and fetching the information in the LAN. So I would suggest to go with WMI.
Regards,
Sathish Nadarajan.
|
|
|
|
|
Hi peeps
Does anyone know if I can call code created in VB 6 from C# 2008?
If so, what areas (or keywords) do I need to look up to reaserch this on?
Not quite sure what I should be typing into Google at the mo.
Thanks for any replies
-Dan
|
|
|
|
|
Daniel Fowler wrote: Does anyone know if I can call code created in VB 6 from C# 2008?
Yes, you can.
Daniel Fowler wrote: If so, what areas (or keywords) do I need to look up to reaserch this on?
VB6 dlls use COM. It's called COM interop.
Pretty much all you do is VS is add a reference, go to the COM tab, locate the library you want to use. VS will create an interop assembly. (You can look in this assembly to see the details of how the COM stuff is called, if you fancied doing it manually)
Simon
|
|
|
|
|
Cheers mate, I'll get learning!!
|
|
|
|
|
Can any one Help,
I have create Multiple Thread and Call the function in c#.
The Code as follows
using System;
using System.Threading;
namespace ThreadPool
{
public class Program
{
static void Main(string[] args)
{
Program pa = new Program();
Thread firstThread = new Thread(new ThreadStart(pa.Name));
Thread secondThread = new Thread(new ThreadStart(pa.Name));
Thread thirdThread = new Thread(new ThreadStart(pa.Name));
Thread fourthThread = new Thread(new ThreadStart(pa.Name));
Thread fifthThread = new Thread(new ThreadStart(pa.Name));
firstThread.Start();
secondThread.Start();
thirdThread.Start();
fourthThread.Start();
fifthThread.Start();
Console.ReadLine();
}
public void Name()
{
Console.WriteLine("My Name is Bruze" );
Console.WriteLine("GO!!!!!");
}
}
The above code Multiple Thread (firstThread,secondThread,thirdThread,fifthThread,fifthThread) execute one by one.
I want Multiple Thread execute at Same Time(simultaneously) in c#.
modified on Friday, July 11, 2008 7:26 AM
|
|
|
|