|
Hi,
i am using a tool freely available on net called as IMacros.
It's a plugin which gets available as a toolbutton upon installation.
I want to create such application.
So i would be glad if anyone can provide me with how that can be achievable.
Thanx in advance
|
|
|
|
|
Please read this
http://www.codeproject.com/KB/security/encryption_decryption.aspx
What should I pass to the public methods as Source and Key.
I am just trying to encrypt the password
please let me know
Happy Programming!
Regards,
ctrlnick !
|
|
|
|
|
Why not post your question in response to that article? Then the author can help you out directly.
Life, family, faith: Give me a visit.
From my latest post: "We are Christian, resistance is futile. Your Jewish traits will be assimilated into the Church collective."
Judah Himango
|
|
|
|
|
What is the best object in C# to create a board game (like chess, colonization, civilization)?
Datagridview? (i only use it to get sql data)
Panel?
400 PictureBoxes?
|
|
|
|
|
Use a 2d drawing API and do the board yourself in those constructs. I'd recommend Microsoft's XNA framework.
Life, family, faith: Give me a visit.
From my latest post: "We are Christian, resistance is futile. Your Jewish traits will be assimilated into the Church collective."
Judah Himango
|
|
|
|
|
I use a big bunch of buttons... kinda like MineSweeper. But only when appropriate; chess or checkers could be done that way.
|
|
|
|
|
Hello, All!
How can I get standart Windows XP Time Zone map? Is it COM-object? How can I use it? Or I must implement it custom?
Thanks, for help...
|
|
|
|
|
Hi all,
I do have lots of dlls saved in one folder and the new dll will be added to the same folder frequetly.
I also have a program, myProgram, that needs to reference all dlls in that folder.
Inorder to use the functions/methods of a dll, we have to
1) add Reference to myProgram,
2) using mydll;
3) create the instance and call the appropriate function.
So how can I add the reference and import the dlls as the program click on Button so I can use functions from those dlls.
or is there any other ways that myProgram to find out if there is new dll in the folder and start using it without recompliing myProgram.
|
|
|
|
|
Hi,
if your source code is referring to managed code that resides in some DLL, then you need to add
a reference, and you may choose to (or not to) use a using statement, in order to tell the compiler
how to find the types you are using.
if on the other hand you want to use types from some DLL files using reflection only, then no
reference and no using statement is needed pointing to these DLL files; with the right code
you can discover and use any managed DLL you can reach. Look for "reflection" on CodeProject or Google.
|
|
|
|
|
|
Yes, as when using add-ins. I've done a few.
1 + 2) Those concepts don't apply to runtime, only to development and compile time.
Your app can browse the directory for DLLs, load the assemblies they contain, and it can then instantiate and use the classes therein.
But it has to know what sorts of things it can do with the classes.
For doing add-ins, I define an Interface (or abstract class) that the app knows about.
After the app loads the assembly it browses the classes contained and instantiates any it finds that implement the Interface.
See System.Reflection.Assembly
|
|
|
|
|
Hi,
I spent a bit of time yesterday debugging a previously working app and eventually traced my problem down to the default handling of command line arguments.
So, assume a console app using the standard Main method of
static int Main(string[] args).
If I format a command line argument as say
"\DataFiles"
then I get the expected args[0] of \DataFiles which has had the quotation marks stripped off.
If I pass \ then I get args[0] of \ , again as expected.
However if my command line is quoted and has a final backslash then it all goes a bit wrong.
So "\DataFiles\" turns up in args[0] as \DataFiles" from which it appears that the \ is being interpreted as an escape character.
Just for a bit of fun I passed in the command line argument "\"\"" to confirm the hypothesis and got "" in args[0] as predicted.
I know there are plenty of command line parser classes which will do the job properly but can anyone explain the rules for the inbuilt parsing as I can't find any reference to the rather odd action that I have found.
Alan.
|
|
|
|
|
Alan N wrote: "\DataFiles\" turns up in args[0] as \DataFiles"
Hi,
\" is the way to include a double quote inside a string literal in C/C++/Jave/C#
If you intend for "\DataFiles\" to be a C# literal, then it fails twice:
the \D is an invalid escape sequence,
and the string literal is not closed on the line, since the \" is a valid escape sequence which
translates to a double quote (and hence does not terminate the literal)
BTW: don't get fooled by some debugger output in Visual Studio, they are known to mangle the quotes
a bit.
Hope this helps.
|
|
|
|
|
Hi Luc,
Thanks for the response, however I've not sure you understood what I
was getting at.
You are absolutely correct about escape sequences, but surely this
behaviour only applies to literals defined within code, i.e. those that
will be parsed by the compiler. I was referring to quoted strings
entered on the command line and parsed into the args array by the C#
startup routines. Here the \ acts as an escape specifically for the
double quote character. It is not a general escape as, for example, I
do not have to write \\DataFiles\\file1.txt to get \DataFiles\file1.txt
into the args array.
As I was writing this I realised that the startup routine that does the
parsing for C# will be the Environment.GetCommandLineArgs method and the
online help for that does at least document the behaviour.
and I quote...
If a double quotation mark follows two or an even number of
backslashes, each proceeding backslash pair is replaced with one
backslash and the double quotation mark is removed. If a double quotation
mark follows an odd number of backslashes, including just one, each
preceding pair is replaced with one backslash and the remaining backslash
is removed; however, in this case the double quotation mark is not
removed.
A bit more research on this odd behaviour has revealed that it is present
in the win32 function CommandLineToArgvW. It is a pity that Microsoft
didn't choose to implement something a little more logical in the
Framework library.
References
http://msdn.microsoft.com/en-us/library/system.environment.getcommandlineargs.aspx[^]
http://msdn.microsoft.com/en-us/library/bb776391(VS.85).aspx[^]
http://weblogs.asp.net/jgalloway/archive/2006/09/13/Command-Line-Confusion.aspx[^]
Alan.
|
|
|
|
|
Hi Alan,
I wasn't sure you meant C/C# literals or not, that's why I started with "If...".
I now understand the documentation is adequate, it describes the behavior, which does not
really correspond what you, and I for that matter, would hope to get.
I do recall a strange Dr.GUI article that stated something like: in a path where more than
one subfolder name contains one or more spaces, it is not sufficient to enclose everything with
double quotes, instead each spaced subfolder needs its own pair of double quotes. Which I now
understand is one valid way of coping with the specs.
And which
1) I did not care to test,
2) did not like at all,
and 3) made me put a lot of files not in "Program Files" (I use "PF"), and certainly not
in "Documents and Settings" (not relevant any more in Vista).
Thanks for the clarification on CommandLine stuff!
|
|
|
|
|
I need to build a program that can take any number of letters and find all the legitimate words in that list of words.
I need an algorith to find words from the list of letters, and a way of comparing that to a dictionary or something.
Where do I start? I don't want an anagram program, since I want to find all words, regardless of length.
DAM.
|
|
|
|
|
What do you have done so far?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Is it a word or letters search? i builded in sql some store procedures to acomplish that. Is it a database + windows project?
|
|
|
|
|
I haven't started it yet. I want to do it in Visual Studio 2008, with C#. I'm not sure if I really want to do a database, unless there's an easy way to import a huge dictionary or something. I don't want to be responsible for building the dictionary, there's gotta be one out there somewhere.
Here is a more detailed breakdown of what I think I need:
1. Take input of letters ( say, up to 16 ).
2. Allow user to select the minimu letter-length of the resultant words ( i.e. discard all words that are less than that number of letters ).
3. Generate a list of all possible words that can be spelled from the list of letters provided, with each letter being used once and only once. Now, if a letter appears more than once in the list, then that letter can appear exactly that number of times in a resultant word.
4. Allow the list to be ordered any way the user wants it to be.
I'm sure there's more things I'd like to add eventually, but I'll start here for now.
DAM.
|
|
|
|
|
Hi,
I´am not an advanced programmer.
I think you should start doing that and ask here then.
I code searches in sql server and trigger it in c#, but if you have some kind of users that add/edit "words" to your dictionary it looks like a web application and you have to use sql databases! where would you store the data? Ask other opinions
Good Luck!
|
|
|
|
|
Hi All,
I've beenconverting some java classes to C# and am getting buffeted by headwinds with the network code conversion. Here is a block of code that has me at a loss for now:
try {
Enumeration<networkinterface>; interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
Enumeration<inetaddress> addresses = interfaces.nextElement().getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress addr = addresses.nextElement();
if (!addr.isLoopbackAddress()) {
address = addr.getAddress();
}
}
}
}</inetaddress></networkinterface>
I've interpreted the statement:
Enumeration<NetworkInterface>; interfaces = NetworkInterface.getNetworkInterfaces();
as:
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
...which return a list of network interfaces on the host. However, the statement:
Enumeration<InetAddress> addresses = interfaces.nextElement().getInetAddresses();
...is giving me more trouble. I know the type that I want to create (IPHostEntry - I believe that's correct) but I can see no way to identify the IP Addresses associated with a given network interface (when the host is multi-homed). The C# classes that I have seen all seem to generically assume that the host has 1 interface which may have more than 1 IP Address.
So my questions is, in a nutshell, if a host has multiple network interfaces how does one identify the ip addresses associated with each interface?
All suggestions warmly welcomed...
Regards,
Dave
|
|
|
|
|
DwR wrote: So my questions is, in a nutshell, if a host has multiple network interfaces how does one identify the ip addresses associated with each interface?
Well your question does not seem to reflect the block of Java you posted but the NetworkInterface [^]and IPInterfaceProperties [^] examples in their documentation seem to answer your question.
led mike
|
|
|
|
|
As I'm not a java developer what is your interpretation of what that block of code is doing? That's one the problems I have. I'm trying to convert the code without being able to interactively debug it to see what it does.
Regards,
Dave
|
|
|
|
|
DwR wrote: what is your interpretation of what that block of code is doing?
It is looping through all of the network adapters and all of the addresses in each adapter and filtering out the loopback address/adapter. Finally the last ( well each one in turn without any exiting of the loops therefore the last one) adapter.address in the enumerations that is NOT the loopback adapter is assigned to the variable address , which is not declared in the code you posted so I have no idea what it is.
address = addr.getAddress();
led mike
|
|
|
|
|