|
Luis, I don't know what they are teaching you at that university but it's not working very well. Let me see if I can illustrate what I mean.
My solution to your "Kiosk" problem is this. I auto launch my application in full screen mode at system startup. The system uses a touch screen monitor which is the ONLY input source since there is no keyboard or mouse. The system is housed in a container such that none of the ports are accessible.
Since you have not provided any Requirements for your problem I have no reason to believe my solution would not work. I seriously question any CIS courses that lead a student to believe they need to "Kill Processes" before they have any understanding of the Requirements for the project.
|
|
|
|
|
I think i need to apologize for my english. I am not a native speaker.
And yes my university lacks a lot, because they have some programming courses but in Ansi C and Assembler.
There is a semester about Java but that's it one semester.
All of the things about this project i had to be learning them during the process of it or by questions like yours. For example I want my application to run only on certain computers under certain users. I found out that by getting the Windows current Identity i could do it just getting the name and the sid of the user so it would be up to me to know which user can run it.
I understand the requirements but it is kind of hard to explain them in English.
Mike you are Genius. I mean it. Basically you described my project easier that i can even think of it.
And let try to provide you the req as i understand them:
OS: *Windows XP or Windows Server
CPU: Pentium III and above
Network Conection: 2 Mbps if the stream contains large images and 56 kbps if it is only strings.
Security: SSL and SSH(yet to be determined)
Privileges: Administrator to run the server and Clients.
Data: Database containing all the info that was gotten from the users.
I try to get info in English because there is more than Spanish and most of the times it is better organized and works better.
Mike sorry if i got you upset but it was not my intention.
Best regards,
-- modified at 12:18 Thursday 18th October, 2007
Luis E Tineo S
|
|
|
|
|
kingletas wrote: Mike you are Genius.
No actually I am a novice as a Software Developer and will never be anything else. There are actual Geniuses in the field and I urge you to find out who they are and read their books.
One place to start that will reference many of them would be Ward Cunningham's WikiWikiWeb[^].
|
|
|
|
|
Well if you are not a genius you are very close.
Thanks Mike i think this experiece has meant a lot to me because it taught me which things i need to know better before posting!
Thanks for the link i am going to look at it now!
Luis E Tineo S
|
|
|
|
|
use cases are an English Language description of the work flow from the user perspective, along with error and fail paths.
UC1 Start the Computer and ...
1 Push the power button. - the PC turns on and boots to the windows logon screen.
fail states:
BIOS error: goto UC2 Contact Tech Support
Windows boot error: goto UC2 Contact Tech Support
2 At the windows login screen enter your username and password
fail states:
Login rejected. Repeat UC1 step 2.
Multiple failed logins lock computer: goto UC2 Contact Tech Support
...
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
Thanks Dan,
Now i know for future references how to post "use cases".
thank you so much
Luis E Tineo S
|
|
|
|
|
Why would you want to kill processes? Wouldn't you just want to prevent users from starting new ones?
It is quite easy to prevent the task manager (via registry) and Alt-TAB and the Windows keys with a global keyboard hook.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
I do need it because my application will be consuming a lot cpu resources and there will be a lot of Network traffic from the clients to the server.
I think you are right about preventing via the registry but i don't know how to use the registry from C# to be honest, would you mind pointing where to start?
Thanks!
Luis
|
|
|
|
|
you don't need to kill any process. make two applications. one that creates a new desktop and then starts the second application (the kiosk one) within that newly created desktop. THAT's what you need right there. there are examples of this all over codeproject. it's easy to do, too. or you could just email me if you need help
|
|
|
|
|
dears,
I have a text file of about 800 MB 17,000,000 Lines and i have to process it line by line ..
i need a way to start more than one thread to read that file ...
the problem here is that i'm using the streamReader Class ...
the only available method for reading line is StreamReader.ReadLine().. "Sequential Access"
I need away to read a specific line directly... "Random Access"
this will give each thread the ability to read a part of that file
Any Idea .. Any Help ... is really appreciated ...
|
|
|
|
|
|
You could set up two stream readers and seek one of them to the middle of the file and have the second thread start from there. (It would have to move to the start of the next line to ensure it is in a good place). It might have the problem of thrashing the disk as it seeks between the two file locations.
You could have one thread tasked with just reading the file. And worker threads that process bits of the file. The worker threads each contain a queue which the first thread populates in a round robin. The worker threads pull data off their queues until the data processing is complete. (You would need to add a null to the queue to indicate that the end of the file has been reached)
|
|
|
|
|
Colin Angus Mackay wrote: You could set up two stream readers and seek one of them to the middle of the file and have the second thread start from there. (It would have to move to the start of the next line to ensure it is in a good place). It might have the problem of thrashing the disk as it seeks between the two file locations.
The only way I could see this not murdering performance was on a raid where each read thread was always targeting data from a different drive. Unless the data file is a fixed length format that aligns with the raids block size though I can't see any way to implement it.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
dan neely wrote: The only way I could see this not murdering performance was on a raid where each read thread was always targeting data from a different drive
That is why I said it would have the problem of thrashing the disk.
|
|
|
|
|
Hi,
you can use the Position property of streams to skip some of the data, so you could
start a few threads and give them different initial positions; I do have some remarks:
1. each thread will have to open the file in such a way that the others can also read it,
hence readonly and "shared reading"
2. if Position is not zero, the first line read will likely be a partial line, so you may
want to ignore the first line.
3. you will need a way to make each thread stop reading when it reaches the first valid
line another thread has already dealth with.
4. don't expect to gain much from large numbers of threads; two will probably help, and
four or more may well have a negative effect since overhead costs will increase
while the threads in the end may well compete for the same resources (unless processing
includes a lot of waiting on communications, or some other round-trip delays).
An alternative approach would be to have one thread that reads the entire file,
and dispatches the lines to a couple of threads for processing. This would be simpler
to organize, and maybe even better for performance, assuming your processing threads
don't need consecutive lines from the file.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
thanks all for your co-operation ...
but any code sample for the stream position Idea ... ??
Luc Pattyn wrote: you can use the Position property of streams to skip some of the data,
|
|
|
|
|
Sorry I don't have code available, I suggest you look at StreamReader.BaseStream and
Stream.Position
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
They have a library on MS Research to deal with big files and partial access.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
FileStream allows random access. I used it to parse the national do not call database combined with binary search to access elements without parsing the entire file.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
hello, hello
i've encourted here some problem how to extract a table array.
one of the important things when u code an app is the daynamic Aspect.
well i'm trying to do this:
at the moment the app loads it self it load a dataBase without knowing what kind of tables are in the MDB file.
Well, i've been cracking my head using the GetSchema() Method
but it returns only one table, but nothing.
i've tried sql query Like "SELECT Name FROM MSysObjects"
But MSysObjects permisstion = false & still have not a way how to allow the
permisstion (maybe ADOX????) and nothing.
well any suggestion????
Have Fun
Never forget it
|
|
|
|
|
Try this one !!!
SELECT Name
FROM MSysObjects
WHERE Type In (1) AND Left([Name],4)<>"MSYS";
Happy Programming
-----
Abhijit
|
|
|
|
|
YEH
i've found that code from an SQL forum, and it's Version like :
"SELECT Name, Type FROM MSysObjectsWHERE Name Not Like 'MSys*' AND Type IN (1,6);"
but i'm still tring figure out how to solve the
NO Read Permission on 'MSysObjects' Odbc Exception!!!!
Have Fun
Never forget it
|
|
|
|
|
|
Changing your name and asking the same questions doesn't mean you are going to get a different answer!
The GetSchema method returns a DataTable where each row represents the information about each element in the database. You would use this information to create queries for each of the tables - if that is the purpose.
The fact is that there is no "magic" way of getting all of the information from a database because generally this is an AWFUL idea! I have no idea why you want to do this, but i suggest you rethink why you want to do this in the first place.
|
|
|
|
|
You can Change your Name But Your Problem will remain same !!!!!
Happy Programming
-----
Abhijit
|
|
|
|