|
At the risk of repeating myself:
Quote: And? What did the debugger show you?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OK. Sit down and listen up.
Your'e trying to get everyone here to debug your code for you. That's not going to happen.
The debugger is there to debug YOU, to give you a tool to understands how your code works, what it's really doing, to increase your understanding.
USE IT.
The problem with the code you have is that you didn't write it and have no idea how it's supposed to work. This is where the debugger is an indispensable tool, to better your understanding of how the code works.
We can't do that for you.
|
|
|
|
|
The amount of time and effort he's putting into avoiding work ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: visit with Mr Debug would have shown the OP
Why bother when you can be a help vampire?
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Maybe we need a special badge for 'em
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: special badge
Good idea....Bob with vampire fangs.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Couldn't find a vampire; will this do?
🦇
🦇 Bat Emoji[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
if (!uzet[l]) s--; -----Index was outside the bounds of the array--------
This error message tells you that your code try to access an element rgat do not exist in the array uzet because uzet us too small.
With the debugger, check the size of uzet .
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
ppolymorphe wrote: rgat
Missed by that much
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, does someone know how to gain exclusive control of a human interface device input stream in c#? I have a keyboard and a magnetic stripe card reader and I don't want the card reader to write outside of my application and the keyboard to write inside.
Thanks
|
|
|
|
|
Neither of these devices write anywhere. Applications that need input data can read from them. And it is up to the user of the system to decide which input device he/she wishes to read from.
|
|
|
|
|
Ok, but if I open a text editor and the card reader sends its output to windows whith a text editor focused, it writes also in the text editor.
|
|
|
|
|
No it does not. The text editor reads from the input stream or device and receives whatever data is available from that device. The actual transfer of the data is handled by Windows responding to a device signalling that it has data available.
|
|
|
|
|
So is this magnetic card reader pretending to be a keyboard? I know barcode scanners etc. sometimes do.
If so, I think it'll be difficult as pretty much any application accepts keyboard input. There probably is a way to discern between the two, but I don't know how.
As an alternative, is there a driver which hooks it up to a virtual COM port or something?
Regards,
Rob Philpott.
|
|
|
|
|
how to randomly the Question from Databse Without repetion
|
|
|
|
|
By using one of the Random methods.
|
|
|
|
|
You really do need to use Random class's function to get a random value in a limit.
var randomValue = new Random().Next(1, 100);
Random.Next Method (Int32, Int32) (System)[^]
You will then use this value in the SELECT query, to select that random question. While doing so, do remember to parametrize your query. Otherwise it may be exposed to SQL Injection.
SqlCommand.Parameters Property (System.Data.SqlClient)[^]
The working of this is clearly explained in the Bakery Sample of ASP.NET web sites template in WebMatrix tool. You can look for an example there, that works well.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
khalid khalidos wrote: Without repetion
For that last part, you'd need a way to remember which numbers you already used. If you request a new number, check, and if already used, request another one until you have a new, unused number.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Seems he did not understand what you were saying or possibly because there was no code and down voted your reply - reversed!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Tx
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
khalid khalidos wrote: how to randomly the Question from Databse Without repetion
Looks like you need to use the same algorithm as the one used to shuffle a deck of cards.
1) make an array the size of your number of questions, fill it with question numbers.
2) draw a position in possible ones, swap with last question, repeat without the last place.
for usage: get questions numbers from array in order.
This way you shuffle 52 questions with 51 draws, no repetition.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
|
What have you tried?
Where are you stuck?
What help do you need?
What environment are you coding for?
To be honest, a question that just has a subject line and one word: "none" isn't really showing us any willingness to help us to help you - or any sign that you've even tried to do this yourself. That doesn't improve your chances of getting a quick solution.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I had try many time to convert .mats file into text file with change utf-8 encoding because it contain Devanagari hind font but it is not visible to readable textual data in c# .net.
|
|
|
|
|