|
Hexadecimal rox. I think in hexadecimal
I'm sorry if I confused you.
i'm only pointer to myself
|
|
|
|
|
Here's an article[^] (which I wrote ) which does just this thing. I wrapped the int in a struct which made it much easier to get at the bits.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
I suggest a Flagged Enum too. Else just use bitwise operators if you are feeling comfortable with them.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
You can use System.Collections.BitArray. Also, in Systems.Collections.Specialized, there is a 32-bit vector, which is essentially an integer wrapped in a struct.
|
|
|
|
|
Hey.
I'm developing a system, where multible smartsclients (thin winform programs) is using a webservice. I want to validate user input on the webservice and thorw an exception back to the clients if the input is badly formattet (it must be an exception, and i made my own ServiceException).
However when i throw my ServiceException from the server, all my clients get back is a SOAPException containing one long string with the serviceexception and its inner exceptions. I am not able to retrieve that it was a service ekception that was thrown, and much less what the message of the exception was (fx "Input Error").
Can anyone tell me how to retrieve exceptiontypes and their messages thrown from a webservice?
//Troels
|
|
|
|
|
Hi,
this has got a bug that I cannot fathom, it is happily traversing through all the folders that it finds and checks all the files that it comes across with what is stored in the list. Unfortunately, the only files stored in the list, come from the working directory rather than the whole path.
As I step through it, I can see it checking all the files, but I cannot see why it stops collecting filenames after completing a scan of the first folder !
public class MainForm : System.Windows.Forms.Form
{
public void DirSearch(string path)
{
try
{
foreach(string file in Directory.GetFiles(path))
{
Original original = new Original(new FileInfo(file));
original.CheckDirectory(new DirectoryInfo(path));
if(original.HasDuplicates())
{
listViewResult.Items.Add(file);
foreach(string duplicate in original.GetDuplicates())
{
listViewResult.Items.Add(duplicate);
}
}
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
public class Duplicate
{
private FileInfo _info;
public Duplicate(FileInfo info)
{
this._info = info;
}
public bool IsDuplicate(FileInfo info)
{
return (_info.Name == info.Name) &&
(_info.Length == info.Length) &&
(_info.LastWriteTime == info.LastWriteTime) &&
(_info.DirectoryName != info.DirectoryName);
}
}
public class Original : Duplicate
{
private ArrayList _list = new ArrayList();
public Original(FileInfo info) : base(info) {}
public void CheckFile(FileInfo info)
{
if(base.IsDuplicate(info))
{
this._list.Add(info.FullName);
}
}
public void CheckDirectory(DirectoryInfo dirInfo)
{
foreach(FileInfo fileInfo in dirInfo.GetFiles())
{
CheckFile(fileInfo);
}
foreach(DirectoryInfo subDirInfo in dirInfo.GetDirectories())
{
CheckDirectory(subDirInfo);
}
}
public IList GetDuplicates()
{
return this._list;
}
public bool HasDuplicates()
{
return (this._list.Count > 0);
}
}
tia,
|
|
|
|
|
It's okay now, I have added another loop to traverse the rest of the directories
public void DirSearch(string path)
{
string[] directories;
try
{
directories = Directory.GetDirectories(path);
foreach(string file in Directory.GetFiles(path))
{
Original original = new Original(new FileInfo(file));
original.CheckDirectory(new DirectoryInfo(path));
if(original.HasDuplicates())
{
listViewResult.Items.Add(file);
foreach(string duplicate in original.GetDuplicates())
{
listViewResult.Items.Add(duplicate);
}
}
}
foreach(string directory in directories)
{
DirSearch(directory);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
|
|
|
|
|
... Nevermind.
I had the attributes above the XML comments and that kept them from working properly. I'm all set now, thanks!
|
|
|
|
|
Does anyone out there know how to update the contents of a datagrid control? For example, I'm populating a datagrid control with all the information from an access database table. Then the user changes some of the data in the datagrid; how do I take the new updated data from the datagrid and update the access table in the database?
Thanks, Manster
|
|
|
|
|
is tehre some ocx'es that can display the different parts of Outlook?
im pretty sure i saw some sample where the inbox was displayed from outlook in a webpage some time back (it was an ocx from outlook that was just inserted in the page)
anyone know what where that ocx might be located?
what i want it to display the inbox and if possible the appointments view in a vb app (the machine have outlook installed , the customer just want to have those views in the app im making)
//Roger
|
|
|
|
|
Hi, does anybody here know how to make the main form of the application "always on top" i.e floating over other windows even if it's not selected ?
|
|
|
|
|
If you have application (with main form formMain ) and you want to set formTool as tool window (it will be always above main form) use this:
formMain.AddOwnedForm(formTool);
i'm only pointer to myself
|
|
|
|
|
Just set the form property (TopMostWindow i think)
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
It seems that here isn't any diferent, am I right ?
Same case is None - HighSpeed.
Wiizi
|
|
|
|
|
I don't know. There might be. AntiAliasing, in case you didn't know, involves blurring the edges just right to avoid the graininess caused by very small type on a low-res pixel screen. MS's definition of high-quality may or may not involve this. BTW, did you try MSDN or the Platform SDK?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
HighQuality and AntiAlias are the same constants -- no difference
likewise, for HighSpeed
They are alternative names.
Thanks,
Wes
|
|
|
|
|
hi
i would like to get code to listen to my incoming packet on port 80 (HTTP).
is there a way to select which packet will apear on the web browser and which will not?
thanks in advance
Aviyam
|
|
|
|
|
Hi,
I have below string sequence:
'John' , 'Joe' , 'Al''ex' , 'Philip' , 'Ja,coup' , 'Dan'
and I want to define quote separated names same as below:
'John'
'Joe'
'Al''ex'
'Philip'
'Ja,coup'
'Dan'
Can I do it using Match and Regular Expression?
Mehdi
|
|
|
|
|
Let me to made some changes in problem. I want to match quoted strings, using \' as an escape to place quotes in the string.
Valid strings:
'Alex'
'John\' Burg'
'\''
Invalid strings:
'test\'
'not'Valid'
Is it possible to define a Regular Expression to this situation?
Mehdi
|
|
|
|
|
I have searched UDDI and yahoo, but with no luck...
What I am looking for is a web service that will supply information on current baseball games (when someone hits, scores, etc.) and one that can report weather by zip code. Does anybody know of one?
I have a feeling that I missed something obvious. That would'nt be the first time that happened
|
|
|
|
|
|
Thanks. That is not exactly what I was looking for - but the search engine helped a lot.
Ideally, I want a web service that can retreive the current status of a game in progress - ie. who is batting, current score, who is on base, etc. I searched for it, but with no luck.
PS. I found a weather web service through the search engine. It seems like it will work fine.
|
|
|
|
|
Mike_V wrote:
PS. I found a weather web service through the search engine. It seems like it will work fine
The one I'm using is weather.interceptvector.com[^]. It has xml weather feeds for cities all over the world, and the cities/states/countries are listed in XML, too.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Ok, so I have this program... and the person clicks on the button, "buttonExplorer" then that will launch the program, "explorer.exe" located at "C:\windows\".
private void buttonExplorer_Click(object sender, System.EventArgs e)
{
}
How do I do this?
/\ |_ E X E GG
|
|
|
|
|
Well actually I figured it out...
private void buttonExplorer_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process.Start("C:/windows/explorer.exe");
}
Is this the "correct" way? Or is there a better, more efficent way to do it??
/\ |_ E X E GG
|
|
|
|