|
Hey all,
I am a relatively new programmer. Worked in the industry for about a year and a half as a junior and obviously college and uni before that.
I am looking for something fun to do, but also something that I could possibly display to other prospective employers, maybe something that could be of use for the development community. Does anyone have any ideas of what I could write in c# that would..
1. Be quite fun to develop
2. Be interesting an unusual that I could maybe blog about
3. Help me to learn more about fundamental processes and practices
I am basically a bit fed up with the usual run of the mill development I do here and am looking for a project that I could turn around to someone and say "hey, I did that".
Any idea's would be welcome.
Cheers.
|
|
|
|
|
daviiie wrote: 1. Be quite fun to develop
What do you find fun?
daviiie wrote: 2. Be interesting an unusual that I could maybe blog about
What do you regard as interesting?
daviiie wrote: 3. Help me to learn more about fundamental processes and practices
What do you need to learn?
If it is a website you could look at the Web Client Software Factory as it is part of the work by the pattens and practices group in Microsoft (lots of good processes to learn from that). If that doesn't interest you there are other projects from that group that might spark something.
|
|
|
|
|
Hi Colin,
I suppose I should have been more specific. By fun and interesting I would consider projects that use funky data structures or algorithms. I like stuff thats a little bit out of the box. I recently, just for the fun of it, developed an swi-prolog web service (the web service was already pre-written by swi, i'm not that good) to query a topic map database structure to dynamically assert facts which can in turn be queried by prolog and dumped out as xml which is picked up by a flex front end and displayed.
I will eventually get around to making some kind of simple natural language processor and inference engine type thing and get it hosted. As fun as that was though I consider it something that would be seen as a "hobbyist" computing activity that although would be an interesting thing to display at an interview isn't really that relevant when it comes to c# .net jobs.
I'd like something that utalizes c# in perhaps an unusual way, or to write a tool that perhaps would be very useful to other developers. A dll that I could open source and say "you know that thing that always annoys you when you program, well I've done something that sidesteps it...enjoy". I was thinking perhaps about some sort of encoding library because I am always running into problems with encodings and have yet to find something that makes my life easier.
Nice website by the way, I am a fellow Glasweigien although I don't currently live in the uk.
|
|
|
|
|
I have 2 column one textbox and the other is combobox
I want to select from the combo the ID appear in the text column and vis versa.
The data source is data set (not visual) for the combo column
this.column2.datasource= ds.table[0];
this.colomn2.dispalymember=ds.table[0].Rows[0][1];
this.colomn2.valuemember=ds.table[0].Rows[0][1];
merwa
|
|
|
|
|
Hi,
I want to send a mouseclick to a defined window in c#, without moving the cursor. It should just leftclick on a specified (X,Y) position on the screen.
Can i do that without moving the cursor?
And can it work if the target window is hidden/minimized?
Hope someone can give me a code example
|
|
|
|
|
Here you go!
[Flags]
public enum MouseEvent : uint
{
MOUSEEVENTF_MOVE = 0x0001,
MOUSEEVENTF_LEFTDOWN = 0x0002,
MOUSEEVENTF_LEFTUP = 0x0004,
MOUSEEVENTF_RIGHTDOWN = 0x0008,
MOUSEEVENTF_RIGHTUP = 0x0010,
MOUSEEVENTF_MIDDLEDOWN = 0x0020,
MOUSEEVENTF_MIDDLEUP = 0x0040,
MOUSEEVENTF_XDOWN = 0x0080,
MOUSEEVENTF_XUP = 0x0100,
MOUSEEVENTF_WHEEL = 0x0800,
MOUSEEVENTF_VIRTUALDESK = 0x4000,
MOUSEEVENTF_ABSOLUTE = 0x8000
}
public enum InputType : uint
{
INPUT_MOUSE = 0,
INPUT_KEYBOARD = 1,
INPUT_HARDWARE = 2
}
[StructLayout(LayoutKind.Sequential)]
public struct MOUSEINPUT
{
private InputType type;
public UInt32 dx;
public UInt32 dy;
public UInt32 mouseData;
public MouseEvent dwFlags;
public UInt32 time;
public IntPtr dwExtraInfo;
}
public static class MouseInput
{
[DllImport("User32.dll")]
public static extern UInt32 SendInput(UInt32 nInputs, MOUSEINPUT[] pInputs, int cbSize);
private static Point Normalize(Point pt)
{
return new Point((pt.X * 65535) / Screen.PrimaryScreen.Bounds.Width,
(pt.Y * 65535) / Screen.PrimaryScreen.Bounds.Height);
}
public static void Move(Point pt)
{
pt = Normalize(pt);
MOUSEINPUT[] input = new MOUSEINPUT[1];
input[0].dx = Convert.ToUInt32(pt.X);
input[0].dy = Convert.ToUInt32(pt.Y);
input[0].dwFlags = MouseEvent.MOUSEEVENTF_MOVE | MouseEvent.MOUSEEVENTF_ABSOLUTE;
SendInput(1, input, Marshal.SizeOf(input[0]));
}
public static void Click(Point pt)
{
Move(pt);
pt = Normalize(pt);
MOUSEINPUT[] input = new MOUSEINPUT[2];
input[0].dx = Convert.ToUInt32(pt.X);
input[0].dy = Convert.ToUInt32(pt.Y);
input[0].dwFlags = MouseEvent.MOUSEEVENTF_LEFTDOWN | MouseEvent.MOUSEEVENTF_ABSOLUTE;
input[1].dx = Convert.ToUInt32(pt.X);
input[1].dy = Convert.ToUInt32(pt.Y);
input[1].dwFlags = MouseEvent.MOUSEEVENTF_LEFTUP | MouseEvent.MOUSEEVENTF_ABSOLUTE;
SendInput(2, input, Marshal.SizeOf(input[0]));
}
} To simulate a click at 100,100 therefore you'd do this:
MouseInput.Click( new Point( 100, 100 ) ); I don't think you can do it without moving the cursor. You could save the current mouse position, click at the point where you want to click and then move right back to the saved position!
|
|
|
|
|
Hi,
Almost forgot to thank you! So.. Thanks!
Nice code
|
|
|
|
|
Hey all,
I think it is possible to reset windows password through c#, but would it be possible to compare windows password to verify the user identity?
With System.Security.Principal i can get the current windows identity but i just want to verify that the person in front of the comptuter is the real user.
In case it is not possible, just for security concerns how could i approach it?
thanks in advance...
Luis E Tineo S
|
|
|
|
|
Hi,
I guess you should search on Active Directory Services Interface (ADSI).
Regards,
Adeel
|
|
|
|
|
Hi everybody,
it exists seriously a function which stops the current time, or maybe a whole "stopwatch"-class
which calculates the time between a start and a stop...
If not, how can i use the clock() function of C/C++? It's declared into time.h
Big thanks for help
|
|
|
|
|
If your time measurement doesn't require to be very precise then you can do something like this:
<br />
DateTime starttime=DateTime.Now;<br />
DoWork();<br />
DateTime endtime=DateTime.Now;<br />
The difference between endtime and starttime will show you the duration between two moments.
However, if your measurements need to be precise then I suggest you use Stopwatch Class[^]
|
|
|
|
|
Thanks for your reply
I'll test DateTime, simple but effective
Since 1year no more coded in C# and i forgot the basic classes like DateTime ... ouch LOL
|
|
|
|
|
You are welcome
|
|
|
|
|
How can i parse a c# code?
i found "SysyTem.CodeDom.Compiler.CodeDomProvider" class which have method called "Parse" but is gives me an exception that this method is not implemented, this method is what i want.
any help??
Essam
|
|
|
|
|
Ya3sam wrote: How can i parse a c# code?
What do you mean by "parse a c# code?" Are you trying to parse a file full of strings? Are they fixed-width fields, delimited, do they use CR and/or LF?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I think he wants parser of C# language.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
How about you check out the documentation[^]?
Ya3sam wrote: is gives me an exception that this method is not implemented
From the docs: "Provides a base class for CodeDomProvider implementations. This class is abstract." Of course it throws not implemented exception, it's the base class. Follow the provided link, there is example how to parse code.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Where is the link please?
Essam
|
|
|
|
|
It's word "documentation" in first sentence of my previous post. Click on it
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi all,
Is there a C# command for me to insert date into a microsoft access database to record the date down?
I've already set the row to date/time format.
The following is the code I've written:
SQL = "INSERT INTO sent (Date, Message) VALUES ('" + DateTime.Now.Date() + "', '"+strMessage + "')";
However there still seems to be a problem as the Date still could not be recorded down into the database.
Thanks.
|
|
|
|
|
|
Use a parameterised query, then you don't have to format the values yourself:
SQL = "INSERT INTO sent (Date, Message) VALUES (@Date, @Message)";
Now add parameter objects for @Date and @Message to the command object.
If you really want to format the values yourself, you use # around dates in Access, you have to format the date in a way that the database understands (ISO 8601 is an unambigous format), and you have to encode the apostrophes in the string values:
SQL = "INSERT INTO sent (Date, Message) VALUES (#" + DateTime.Today.ToString("yyyy-MM-dd") + "#, '" + strMessage.Replace("'", "''") + "')";
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi there,
Since the final version will be coded in C# I thought I could just post it here. Any answers on others languages would be great too though.
I'm trying to find an algorithm that will calculate how much two Strings differ from eachother. For example, giving a score from 0-100 based on how much they are alike. I did come across the Levenshtein algorithm, but that wasn't realy what I'm looking for.
For example:
Comparing "markAdress" with "adressMark" should return a high score, since they are much alike.
Kind regards,
~Sph
|
|
|
|
|
Hi y'all,
I'm working with a two-dimensional array and i need to randomly select any element from the array at any given time. Is this possible?
Second, from an array of strings, is it possible to randomly select a string value like the System.Random class?
Thanks in advance,
Obinna from Nigeria.
//obinnaaj Eof
|
|
|
|
|
In first case just generate two random numbers which are not more then the dimension of the array and use them for indexes to access an element of the array.
In the second case generate a random number not more then the length of the array and access an element with that index
|
|
|
|