|
Interresting solution. I overlooked that one.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
|
There sure are some interresting solutions. Here's an almost completely useless way of doing it:
String.Join(null,number.ToString().ToCharArray().Reverse().Select(c=>c.ToString()).Concat(new int[10].Select(i=>i.ToString())).Take(10).Reverse().ToArray())
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
there are too many ways of doing same thing... cool. are you an assembley language programmer before ?
|
|
|
|
|
Then it would probably have been a more hardcore solution:
char[] c = new char[10];
for (int i = 9; i >= 0; number /= 10) c[i--] = (char)('0' + number % 10);
string result = new String(c);
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
OK. I give up...
Hey you forgot
asm
{
}
|
|
|
|
|
No, that wasn't assembly code. If inline asm was supported, it might look more like this:
string result;
unsafe {
char* p = stackalloc char[10];
asm {
lea esi, number
mov eax, [si]
lea edi, p
add edi, 014
std
mov cx, 0a
.digit
xor edx, edx
div dword 0a
xchg eax, edx
add ax, 030
stosw
xchg eax, edx
loop digit
}
result = new String(c);
}
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Eddy Vluggen wrote: It's been over fifteen years
wow long time huh...
I have started with QBasic.
But I still remember those college days when in exams they ask some silly things like.
*) write a function to swap 2 variables without using 3rd one or references.
*) draw a pascal triangle without using array (recurrsion : damn thing)
|
|
|
|
|
|
try this:
string.format("{0:d10}",345);
|
|
|
|
|
Hello,
When i read the string from BDD, like this :
<br />
oleDbConnection1.ConnectionString = oleconnexion; <br />
this.oleDbDataAdapter1.SelectCommand.CommandText = "SELECT * FROM CSV2 ";<br />
dataSet2.Clear();<br />
oleDbDataAdapter1.Fill(this.dataSet2.Tables["CSV2"]).ToString();<br />
DataTable dataTable1 = dataSet2.Tables[0];<br />
this.oleDbConnection1.Close();<br />
<br />
<br />
String id_client = dataSet2.Tables["CSV2"].Rows[0]["id_client"].ToString();<br />
<br />
the caracters é, à , è shows like square, help me to resolve this problem, thank you verry mutch.
|
|
|
|
|
1. Verify that your database has a correct encoding like utf8 (ie: are the data already fked up?)
2. In your connection string, specify the encoding. It's often some kind of optional parameter.
|
|
|
|
|
In database the caracters are true, thank you verry mutch.
|
|
|
|
|
hi evryone
i have 2 combobox's that fill whit a data
if combo1 is focus and i press [down key] - i whant to focus combo2
(whitout change the selected index place in combo1)
how can i do it ?
thank's for any help
|
|
|
|
|
Catch "Keys.Down" in the appropriate eventhandler, and do a Combo2.Focus();
Enjoy
I are troll
|
|
|
|
|
plus
e.Handled = true; to avoid SelectionChange(I think it may work)
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Good call! I alway notice that I forget that line during the first run ^_^
I are troll
|
|
|
|
|
thank's for the help, but i know this
the problem is when i press the down key the focus get to combo2
but, in combo1 the selected item is change - and i whant him to stay
|
|
|
|
|
Just gave it a try, and you're right - it didn't work. At least, not in the KeyUp event. The KeyDown-event did the trick;
private void comboBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Down)
{
e.Handled = true;
comboBox2.Focus();
}
}
Enjoy
I are troll
|
|
|
|
|
thank's !!!!!
|
|
|
|
|
I are troll
|
|
|
|
|
I'm inheriting Process class and add some of my own methods but there is a problem that is preventing me to do so...
public class XProcess : Process
{
public bool GetProc(string name)
{
Process[] tp = Process.GetProcessesByName(name);
if (tp.Length == 1)
this = tp[0]; <<< Error : Cannot assign to '<this>' because it is read-only
else
return false;
return true;
}
}</this>
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|