|
|
Hi All,
How can I insert a text into a clob datatype column in oracle through c#.
To my understanding, first we have to insert the data to all the columns expect the clob datatype column, then open the newly inserted row in "for update" and then only we have to write the clob column with the value. please corret me also in this regard. Sample code will be of more useful.
Thanks n Regards,
Umashanker.K
|
|
|
|
|
|
Hello Everyone,
I am currently developing my Univeristy final project and i got into something that i don't know how to do it but i have some ideas.
I want to develop an application to run as a Kiosk mode because it is important that users cannot do anything else but to use this application but i don't know to kill processes only from the current user and not the system itself. Now i think that by replacing explorer.exe by my application name i get some sort of kiosk mode but not completely. But if i can block upon verification any inputs(mouse or "keyboard" only) and kill all new processes i can get it but here relies my problem.
I think i can do it by looking at the computer system processes and check them one by one but I think they should be a more efficient way to accomplish this plus i don't know if all computers load the same processes.
Would it be possible to do?
Any additional info that you might need please ask and i would gladly answer. So far i can get the list of all processes currently running but nothing more.
Thanks in advance,
Regards
Luis
|
|
|
|
|
kingletas wrote: to run as a Kiosk mode
This is the second time you posted this. Don't start new threads for the same subject.
kingletas wrote: I am currently developing my Univeristy final project
"run as Kiosk mode" Were you absent the day they covered "Requirements"? That doesn't tell us anything useful.
To solve your problem you should 1) Define Kiosk Mode 2) Create two or more scenarios that depict typical use model for the Kiosk 3) Create Use Cases to cover all uses of the system.
That's just a start, after that you still have plenty of work to do before you get anywhere near something like "Killing Processes".
|
|
|
|
|
Sorry about double Posting. I think i just got into the desperate state. I will do my best to avoid doing it in the future.
Kiosk mode in this case would be my application only running and stopping any new process that the user would like to start if it is not a Windows process and it does not provoke windows to be unstable. Now when i refer to Kiosk mode I mean that the user only can the window of my application nothing more and depending on what privilege the user has it cannot start any new application. The privilege verfication would be done with a fingerprint reader and it case it fails i would like to have a keyboard keys combination to unlock the application or simply pressing the mouse for any amount of time.
led mike wrote: Create Use Cases to cover all uses of the system.
Now this part i think i don't quite understand it, would you mind telling me what do you mean please?
led mike wrote: That's just a start, after that you still have plenty of work to do before you get anywhere near something like "Killing Processes".
I do know how to kill process, like getting the name of the process and comparing it to the Image name but that would be kind of hard to code in a effienct way.
What i would like to know is if there is any possible way to get all of the System, Network and Local Processes at once and kill all others?
Thanks in advance and once more my apologies for double posting.
Best regards,
Luis
|
|
|
|
|
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
|
|
|
|