|
thats cool. but it doesnt make them rounded.
Can I create a clip region based on 4 lines and 4 curves? ( a rounded rectangle drawn piece by piece )
The problem is that doesn't draw curves.
Nevermind. I figured it out with GraphicsPath.
Thanks tho
Nick
1 line of code equals many bugs. So don't write any!!
-- modified at 12:04 Friday 26th May, 2006
|
|
|
|
|
hi all,
is there something important to do that i dont know when inserting password fields into database ?
i have a password textbox on my form and have a masked field on database.
look at this :
string query = "insert into users(username,password,status,logintime,lastlogintime) values('" + txtuser.Text + "' , '" + txtpassword.Text + "' , '" + cmbstatus.Text + "','" + lblLoginTime.Text + "','" + lblLoginTime.Text + "')"; gives insert into error.
but this :
string query = "insert into users(username,status,logintime,lastlogintime) values('" + txtuser.Text + "' , '" + cmbstatus.Text + "','" + lblLoginTime.Text + "','" + lblLoginTime.Text + "')";
doesnt give an error ;( [password field removed when inserting data to database.]
so i dont know why that masked password field causes an error when inserting data ?
help please ...
thanks in advance,
bye.
|
|
|
|
|
Password word is keyword in SQL too and probably this is the problem. but make google-ing and sure u gonna understand reason.
|
|
|
|
|
I have my static RegistryAccess class which reads and sets values in the registry. I want to be able to set/get the value that contains the space (Default) in the registry. However if I access it with key="(Default)" it creates another registry entry with that key value instead of accessing the default registry key.
(In otherwords this is what I see in regedit:
(Default) REG_SZ (value not set)
(Default) REG_SZ true
Do I access it with key = string.Empty ???
Thanks.
|
|
|
|
|
How can i make my program to loop for .5 second before moving on to next line of code.
Is it the same as using Thread.Sleep(500)?
Yes, it's running on a thread but i don't know doing that how it's gonna affect other threads.
Appreciate
Donkaiser
|
|
|
|
|
The whole point of threads is that doing something in one does not affect any others.
So you are right, Thread.Sleep(500) will wait for half a second.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Is there some kind of code to delay .5 seconds instead of using thread.sleep()?
Donkaiser
|
|
|
|
|
What's wrong with Thread.Sleep?
How about this (untested code):
DateTime start = DateTime.Now;
TimeSpan ts = DateTime.Now - start;
while (ts.TotalMilliseconds < 500)
{
ts = DateTime.Now - start;
}
But that would be silly. Use Thread.Sleep.
|
|
|
|
|
Thread.Sleep(500) has only effect on the current thread.
It doesn't have any effect on the other threads.
|
|
|
|
|
string query = "Insert Into Users(username,password) values(' + "\"" txtusername.Text "\" ','"\" txtpassword.Text"\"')";
adp1 = new OleDbDataAdapter(query, conn); > firstly, is this correct ?
secondly: how should i change this values(' + "\"" txtusername.Text "\" ','"\" txtpassword.Text"\"') ? it gives error ;( dont know how to modify ?
|
|
|
|
|
string query = "Insert Into Users(username,password) values('" + txtusername.Text +"','"+ txtpassword.Text+"')";
|
|
|
|
|
Message Closed
modified 27-Apr-15 10:59am.
|
|
|
|
|
string baglan = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=veritabani.mdb";<br />
conn = new OleDbConnection(baglan);<br />
conn.Open();<br />
string query = "Insert Into Users(username,password) values('" + txtusername.Text +"','"+ txtpassword.Text+"')";<br />
OleDbDataAdapter da = new OleDbDataAdapter(query ,conn );<br />
DataSet ds = new DataSet();<br />
da.Fill(ds);<br />
conn.Close();<br />
|
|
|
|
|
Message Closed
modified 27-Apr-15 10:59am.
|
|
|
|
|
Once you get it working you really should make a method to go through the textboxes and strip out some characters. Right now you are vulnerable to a sql injection attack.
If I put: bob'; delete * from user; --
I just deleted everything in the user table.
|
|
|
|
|
eggsovereasy wrote: Once you get it working you really should make a method to go through the textboxes and strip out some characters.
You should never strip out and limit the user´s possibilities. You should escape the characters instead.
|
|
|
|
|
Hi,
Does anybody know how to calculate/extract the Pitch values from a Wave (*.wav) file?
Thanks,
Gidon
|
|
|
|
|
Hi!
For this you'll have to perform a fourier transformation.
Basically, your try to approximate the wave form you have by adding many sinus waves. That way you get the volume (amplitude) at certain frequencies, which will ultimately give you the pitch.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks for the explanation.
|
|
|
|
|
Hi ,
I succeeded in performing the FFT on my wave file and even printed the results into a nice Spectogram.
But I don't know how to extract the pitch from these values. Do you have any pointers at to what function I need to perform on the FFT data?
Thanks
Gidon
|
|
|
|
|
Hi!
I'm afraid I don't have any further pointers on how to calculate the pitch value.
You should be able to get a pitch value by multipyling each frequency with the amplitude for this frequency and summing up the values.
That way you'd get a high value if you have many loud, high-frequency bands and a low value if there are more low-frequency bands.
But I must admit I don't know if that'll suite your needs.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Dear All,
How do i findout list of all the SQLServer Names or Data Sources in a domain ?
Please send me the code if anybody have
Urgent from Shiv
With Regards,
Siva
|
|
|
|
|
Hi all
How i can to get access to default value or MinValue of an system type.
Or constuct byself an MinValue (or default value) value for each type.
I understand this is possible to make with switch\case but i wont know is exist more convinet way.In run time.
Exmpl:
<br />
<br />
object GetDefaultValue(object SysTypeValue)<br />
{<br />
object defVal;<br />
<br />
......<br />
<br />
return defVal;<br />
}<br />
<br />
void Main()<br />
{<br />
System.Date dt = System.Date.Now();<br />
int i = 100;<br />
char c = 'a';<br />
byte b = 8;<br />
<br />
System.Console.WriteLine(GetDefaultValue(i).ToString());<br />
System.Console.WriteLine(GetDefaultValue(c).ToString());<br />
System.Console.WriteLine(GetDefaultValue(b).ToString());<br />
System.Console.WriteLine(GetDefaultValue(dt).ToString());<br />
<br />
<br />
}<br />
<br />
console:
0
0
0
01.01.0001 0:00:00
THANK
|
|
|
|
|
Not sure if the following works, but it should create an instance of passed type by using its default constructor.
object GetDefaultValue(object SysTypeValue)
{
return Activator.CreateInstance(SysTypeValue.GetType());
}
"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." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Hi,
i want to check the existence of an integer value in the textbox control with the following code:
if (Convert.ToInt16(tbStockTypeId.Text) <= 0)
works fine when an intger value is entered. but when i enter 'abc' it raises FormatException "Input string was not in a correct format."
Need help for its correction.
With Thanx
|
|
|
|