|
Well then, YOU better get to studying how it works otherwise YOU are not going to be able to explain it.
Nobody here can hit you with a magic wand to implant the knowledge in your head. This is where YOU start studying whatever you can find on it and start making your own diagrams. Searching the net for somoe premade video that may not even exist is just wasting your time.
|
|
|
|
|
Oh. It's your homework.
I see now - you want us to point you at a video you can fast forward through, writing down random words in the hope it might get you a passing grade?
It won't. You need to understand it.
Start here: https://en.wikipedia.org/wiki/ID3_algorithm[^]
But don't just copy it: your tutor will notice. You need to learn, understand and describe it in your own words...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
dear respectabls i m developing a project in which i need to retrieve data on click event from same row where dynamic picture is located...
keep in mind at every click event there may b different number of dynamic pictures, each have different detail in d.b/ plzzzz ans me as well as soon..
|
|
|
|
|
Do not post the same question in multiple places: you already have this in QA, and have for nearly an hour, so leave it there. Posting the same thing in multiple places duplicates work, and that wastes our time and annoys people.
And read my comments on your question there - you have just posted the same text here and hoped we would magically divine what you need.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Member 12082707 wrote: dear respectabls I'm neither
Member 12082707 wrote: i need to retrieve data on click event from same row where dynamic picture is
located... So, you hook up the click event of the control you generated.
Member 12082707 wrote: keep in mind at every click event there may b different number of dynamic
pictures, each have different detail in d.b Also keep in mind that the db might move, or get renamed; that info has to be updated easily without the need of a recompile. I'm sorry, but this is not even an assignment; it is a rough outline of a users' wishes. It is also not a complicated request, so I'm wondering what your question is.
Member 12082707 wrote: ans me as well as soon Each person pays the same as the rest here, and each question is equally important.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello guys , how are you? i hope everything's fine
I'm coding a small program and i don't want the final user to install anything on his computer
-for database i'm using SQLite instead of SQL-Server
-i won't deploy the project i'll only send the files in debug folder.
the problem is with Crystal Report files , is there anyway to open them without downloading the full crystal report engine?
like a 2mb software or a small tool..
i will appreciate your suggestions and answers , thank you.
|
|
|
|
|
Member 11579490 wrote: i won't deploy the project i'll only send the files in debug folder. Not correct, you should deploy from the Release folder. If you do not install the crystal Reports libraries then how will you get the reports created?
|
|
|
|
|
thanks for your reply , i actually decided to make reports in word , almost every windows user have word installed 
|
|
|
|
|
And what will happen if they do not? You should never create an application that assumes your users will have some software package installed.
|
|
|
|
|
--->0-9
10-19
--->20-29
30-39
--->40-49
50-59
--->60-69
70-79
Lets assume we got a series of numbers like this. It's basically 0 to N, segmented by a limit size 10.
On the code, I just want to filter out the set that goes like 0-9,20-29,40-49.. etc.Please note I've ignored 10-19,30-39,50-59, 70-79 etc.
Switch case is not affordable. A simple math based generic condition check should do. I'm getting back to code after a long time, I'm left with a bad blush I couldnt figure this out soon. Mod (%) function could be of any help?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
modified 12-Dec-15 9:53am.
|
|
|
|
|
Vunic wrote: I just want to filter out the set that goes like 0-10,20-29,40-49
Are you sure?
Don't you want
0-9,20-29,40-49 To be consistent?
If you do, then it's relatively trivial: a divide by 10, and a check if the result is even via the lowest remaining bit will do it, won't it?
Or am I missing something?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Yes it's consistent.
I had made a typo, glad you picked it up. it was 0-9, not 0-10, to start with.
Better put this way :
Series A : 0-9, 20-29 40-49 .....
Series B : 10-19 30-39 50-59 ......
I just need to check for either A series or B series. Then its a matter of switching the IF and ELSE blocks.
As you see divide by 10 will not help. Take this case : 23 , this comes from A series. 33, comes from B series. How would you differentiate ?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Damn. You are right. the brain just kicked back to life. I was just focusing on the reminder part
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
I have whole weeks like that!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
It happens. Actually this module what I'm doing is fairly complex, if the folks around me come to know I had stuck over this trivia, for sure they'd be puzzled, how I'm going to do the rest of the stuff. They wouldn't understand this phenomena!
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
I can keep a secret if you can!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If you divide these by 10, you map the range 0-9 to 0, 10-19 to 1, etc.
Then just check if that's even.
if ((x / 10 & 1) == 0)
else
|
|
|
|
|
Yup I've done the same way thanks
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
for natural numbers just use: bool OK=number%20<10;
|
|
|
|
|
Wow another good thought! Feels great I wasn't a fool to think about a way through mod fn.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Why is it that in this code which is in a button, when I click in the button to fill a row that is empty, instead of sending the message "Fill the empty cells", it selects the previous row and add it as a new line (it copies the row with the previous Id)? Thank you.
if (grid_lic.CurrentRow.Cells[1].Value.ToString() == "" || grid_lic.CurrentRow.Cells[2].Value.ToString() == "" || grid_lic.CurrentRow.Cells[6].Value.ToString() == "")
MessageBox.Show("Fill the empty cells");
else
{
dbcCommand Command = new OdbcCommand("insert into lojas (NIF, Loja, bloqueado, DataFim, lastupdate, Nome) values (?, ?, ?, ?, ?, ?)", connection);
Command.CommandType = CommandType.Text;
Command.Parameters.AddWithValue("@NIF", grid_lic.CurrentRow.Cells[1].Value);
Command.Parameters.AddWithValue("@Loja", grid_lic.CurrentRow.Cells[2].Value);
Command.Parameters.AddWithValue("@Bloqueado", checkBox_bloq.Checked);
Command.Parameters.AddWithValue("@DataFim", grid_lic.CurrentRow.Cells[4].Value);
Command.Parameters.AddWithValue("@lastupdate", grid_lic.CurrentRow.Cells[5].Value);
Command.Parameters.AddWithValue("@Nome", grid_lic.CurrentRow.Cells[6].Value);
connection.Open();
Command.ExecuteNonQuery();
modified 10-Dec-15 7:47am.
|
|
|
|
|
That would suggest that the empty row is not the current row.
Debug your code and check the CurrentRow property. Then work out why it's not pointing to the empty row.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That´s exactly the problem I described with other words. It is selecting the previous row, not the one where the mouse is clicked. But this only happens if the cell selected is empty, because if I write in the cell and click the button, that same row is the current row, not the previous one. That´s what the following code is telling:
MessageBox.Show(grid_lic.CurrentCell.ColumnIndex.ToString()); MessageBox.Show(grid_lic.CurrentCell.RowIndex.ToString());
I don't know where is the source of the problem. Any clue?
|
|
|
|
|
Sounds like the empty row doesn't become "current" until you start editing it.
Try checking the Selected property of the CurrentRow , which will probably be false . Also, check the SelectedRows collection to see if it contains the empty row.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
The empty row belongs to the collection of SelectedRows, as this code which I ran selecting an empty row with index #4, confirms:
DataGridViewRow emptyrow = grid_lic.Rows[4];
if (grid_lic.SelectedRows.Contains(emptyrow))
MessageBox.Show("The row is empty!");
The Selected property of the CurrentRow is false:
if (grid_lic.Rows[4].Selected == false)
MessageBox.Show("False");
else
MessageBox.Show("True");
The problem was identified, I just don't know why it happens nor how to solve it. Any ideas?
Thank you.
|
|
|
|