|
Pick something that will give you a sense of accomplishment when it's done. This will motivate you to finish it.
|
|
|
|
|
I lost interest in your message when I saw this:
Dougmeister wrote: Maybe some dif't levels
You abbreviated textspeak with an apostrophe instead of typing out the entire word "different". Why should we take the time to help you if you're not willing to take the time to communicate clearly?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks for taking the time to tell me that.
dif't
dif't
dif't
|
|
|
|
|
Give it a rest John.
Everyone knows what he meant
|
|
|
|
|
Yes evr1 new bt i's h'dr to rd de tx wen u hv to d-cipr it 1st.
Despite everything, the person most likely to be fooling you next is yourself.
modified on Tuesday, November 18, 2008 10:26 AM
|
|
|
|
|
I never rest. I knew what he meant (obviously), but I stand by my assertion that I am apathetic to his question due his lack of respect for those of us with a proper education.
Oh yeah, and who the hell are you, Member 5646867? If you're not willing to use a proper user ID, you haven't earned the right to call me by my first name.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Don't worry about who I am. I'm just another person on the Internet who comes here for help and advice.
If you don't want to answer his question, then that's fine but there was nothing constructive in what you posted. This is despite the fact that you can be a very positive contributor here and I've always had respect for your technical knowledge and experience.
FWIW (you don't mind acronyms do you?), text-speak irritates me too and I don't blame you for not wishing to answer his question. However, it just seems like you enjoy being offended a little too much.
|
|
|
|
|
1) Define "proper education"
2) Who did it, anyway?
|
|
|
|
|
|
hi,
I am developing an application in which i need to implement screen saver ,when ever there is no event takes place in the form like mouse move or key press the screen saver will automatically come after some time.
Thank's
jugal
|
|
|
|
|
And the question is?
Regards
Sebastian
|
|
|
|
|
Why do you need a question? Just send him a working project and he will be glad.
|
|
|
|
|
take a look @ GetLastInputInfo on MSDN
set the bounds according to SystemInformation.VirtualScreen properties and you got the basic idea how to accomplish.
And we really encourage "?" signs here so we know what to answer to
Code? Yeah i love it fried together with a glass of wine.
|
|
|
|
|
I heard that starting in Windows 95, Microsoft actually provided screen savers with the operating system. Maybe you could - oh, I don't know - use the stuff built into the OS and do something more productive with your time.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
If you mean system wide, then develop your own screensaver project and use the system's screensaver settings to set the various delay settings etc.
If you mean you want a screensaver within you application's form only to be activated after your app has been inactive - have a look at my Application Idle[^] article.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi.
I want to get some data from my database... but i get this error. It worked on my other form... but i get an error on this one. What could be wrong?
-------------------------
<br />
string DelalUR="" ;<br />
double ZasluzekUre=0;<br />
string izmena="";<br />
double ZasluzekVsota=0;<br />
string Skener="";<br />
string podstavka="";<br />
<br />
<br />
<br />
if (izbrano)
{<br />
<br />
DateTime start = new DateTime(prihodDat.Value.Year, prihodDat.Value.Month, prihodDat.Value.Day, (int)prihodH.Value, (int)prihodM.Value, 0);<br />
DateTime entry = new DateTime(odhodDat.Value.Year, odhodDat.Value.Month, odhodDat.Value.Day, (int)odhodH.Value, (int)odhodM.Value, 0);<br />
<br />
TimeSpan cas = entry - start;<br />
<br />
DelalUR = cas.Hours.ToString() + ":" + cas.Minutes.ToString();<br />
ZasluzekUre = cas.TotalMinutes / 60;<br />
<br />
if (rDopoldanska.Checked)<br />
izmena = "Dopoldanska";<br />
if (rPopoldanska.Checked)<br />
izmena = "Popoldanska";<br />
if (rNocna.Checked)<br />
izmena = "Nocna";<br />
<br />
if (radioButton1.Checked)<br />
Skener = "OCR";<br />
if (radioButton2.Checked)<br />
Skener = "Skener";<br />
<br />
<br />
<br />
string sqlCommSkeniranje = "SELECT Podstavka FROM Skeniranje WHERE Izmena = '" + izmena + "'";<br />
string sqlCommSkladisce = "SELECT Podstavka FROM Skladisce WHERE Izmena = '" + izmena + "'";<br />
string sqlCommZlaganje = "SELECT Podstavka FROM ZlaganjeDokumentov WHERE Izmena = '" + izmena + "'";<br />
string sqlComm="";<br />
OleDbConnection dbConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + "C:\\baza.mdb");<br />
<br />
if (comboDelovno.Text == "Skeniranje")<br />
sqlComm = sqlCommSkeniranje;<br />
if (comboDelovno.Text == "Skladišče")<br />
sqlComm = sqlCommSkladisce;<br />
if (comboDelovno.Text == "Zlaganje Dokumentov")<br />
sqlComm = sqlCommZlaganje;<br />
<br />
OleDbCommand dbComm = new OleDbCommand(sqlComm, dbConn);<br />
<br />
dbConn.Open();<br />
OleDbDataReader beri = dbComm.ExecuteReader();<br />
beri.Read();
podstavka = Convert.ToString(beri.GetString(0));
dbConn.Close();<br />
----------------------------------
The error report from JIT debugger
************** Exception Text **************
System.InvalidCastException: Specified cast is not valid.
at System.Data.OleDb.ColumnBinding.ValueString()
at System.Data.OleDb.OleDbDataReader.GetString(Int32 ordinal)
at Osnova_za_studentske_ure.frmUporabnik.button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\milos\My Documents\Visual Studio 2008\Projects\Osnova za studentske ure\Osnova za studentske ure\frmUporabnik.cs:line 153
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
Osnova za studentske ure
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:----------------------------------------
System.Data.DataSetExtensions
Assembly Version: 3.5.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase: file:----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase: file:----------------------------------------
Sorry for my bad english... but i hope you understand what i'm trying to say.
Thanks for your answers in advance!
Regards,
Matjaž
Força Barça!
|
|
|
|
|
First of all, use parametrized queries instead of string concatenation: Parametrized Queries VS String Concatenation[^]
Secondly, exception occurs at podstavka = Convert.ToString(beri.GetString(0));
As GetString() returns string calling Convert.ToString() is extra. Check that the value that the datareader hold is really a string or just access it like this:
podstavka = beri[0].ToString();
|
|
|
|
|
Great. It worked! Dont know why it worked like .GetString(0) here, cus it worked on the other form... but i dont care that much
Anyway... about the injections - yes, i'm aware of that... and i'm planing to put some restrictions in the input of the user, so there's no worries. At least not in this project.
Thanks again!
Regards,
Matjaž
Força Barça!
|
|
|
|
|
Glad to help you Injections aren't the only reason to use parametrized queries. Even if you put restriction on input it is still better to have one more mechanism against possible attacks.
|
|
|
|
|
Hi there,
I'm looking to create a small Multiple Choice Exam for a side project of mine. For each question I would like there to be a text question, then a selection of four answers. The user then could submit his answer and after say 10 questions his score could be produced (you get the picture :P).
Anyway I'm actually after some advise as to how to implement this. Which technique do you think I should use to store questions and answers? Database, XML, text files? Could anyone give me any tips on how to do this?
Thanks in advance,
Tim.
|
|
|
|
|
Smells like a homework assignment to me...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
you're half wolf or something?
Code? Yeah i love it fried together with a glass of wine.
|
|
|
|
|
TimmyC1983 wrote: Database, XML, text files?
Whatever you use, I think you should encrypt your file using one of existing Cryptographic algorithms[^].
Life is 5: 3 me, 1 you.
|
|
|
|
|
Hi,
I am trying to bring generic weak reference dictionary in c# 3.0. I have created a class called WeakDictionary<TKey, TValue> which implements IDictionary<TKey,TValue>. This class has a private member as,
private Dictionary<TKey, WeakReference> weakDictionary = new Dictionary<TKey, WeakReference>();
The other methods like Add,Remove, Clear are working fine for the weakDictionary. But I could not work out the TryGetValue method. It shows the error InvalidCastException was unhandled - Unable to cast object of type 'System.WeakReference' to type 'System.String'. on the line
value = (TValue)weakReference.Target;
I don't know how to retrieve the value. Please help me.
CODE
public bool TryGetValue(TKey key, out TValue value) {
WeakReference weakReference;
if (this.weakDictionary.TryGetValue(key, out weakReference) && weakReference.IsAlive) {
value = (TValue)weakReference.Target;
return true;
} else {
weakDictionary.Remove(key);
value = default(TValue);
return false;
}
}
Thank you.
|
|
|
|
|
It seams that your weak reference is referencing another weak reference, not a string.
I would make a WeakReference<T> class to wrap the weak reference in a type safe way. That way you don't get in that kind of situation.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|