Monitoring the Progress of a BufferedImageOp
I just spent a couple of minutes figuring out how to do this and thought I might
share it with anyone who's interested.
Feel free to comment on, criticise, or improve on my approach.
java.awt.image.BufferedImage sourceImage = ...;
java.awt.image.BufferedImage targetImage = ...;
targetImage.getSource().addConsumer(new java.awt.image.ImageConsumer() {
private int pixelsDrawn = 0;
public void setPixels(...) {
// Update the number of pixels drawn so far:
pixelsDrawn += width * height;
// TODO: Tell other objects (e.g. a JProgressBar) about the update.
java.awt.image.BufferedImageOp imageOp = ...;
imageOp.filter(sourceImage, targetImage);NOTES:
There are two setPixels() methods.
Though it is not clear in the Javadoc, I assume only one will ever be called for
a particular image source. Both still need to be implemented, however, on the
assumption that you don't know which one will be called for this source.
The Consumer seems to be notified one row at a time (with ConvolveOp, at least).
hi
I tried a similar approach, but i must tell you:
1. usually one line is scanned in each setPixel say line 1, then line 2.....
But for many filters these scanning is repeated several times, i.e. after all the lines has been scanned, the scanning is one again, i.e. line 1 is scanned again followed by the others. and this process is repeated 2-5 times depending on the filter.
So i don't think we can get the progress the filter that way.
If anyone got any good way to find the progress of a filter, please do let me know. my mailid is [email protected]
Tanveer
Similar Messages
-
Monitoring the progress of an HTTP File Request
Hi,
I've written a little applet used to sending Files to a PHP-Application. Everything works fine. Now I try to monitor the progress of the upload and I have a little problem. This are the main functions:
public void addFile (String name, File file) throws IOException {
this.bytesComplete = file.length();
addFile(name, file.getPath(), new FileInputStream(file));
public void addFile (String name, String filename, InputStream is) throws IOException {
writeBoundary();
writeName(name);
write("; filename=\"");
write(filename);
write('"');
newline();
write("Content-Type: ");
String type = connection.guessContentTypeFromName(filename);
if (type == null) {
type = "application/octet-stream";
writeln(type);
newline();
pipe(is, os);
newline();
private void pipe(InputStream in, OutputStream out) throws IOException {
this.bytesWritten = 0;
byte[] buf = new byte[4096];
int nread;
int navailable;
int total = 0;
synchronized (in) {
while((nread = in.read(buf, 0, buf.length)) >= 0) {
out.write(buf, 0, nread);
out.flush();
total += nread;
this.bytesWritten += nread;
out.flush();
buf = null;
}Somewhere else the function is called
addFile ("file", filelist.get(i));Works fine, but now I've tried to monitor the actual progress by adding the following line between out.write and out.flush in the pipe-method
int actualStatus = Math.round (this.bytesWritten / this.bytesComplete * 100);
addProgress (actualStatus); // this method sets a JProgressBarAnd now something strange happens. It seems that all the data first is read so my progress goes to 100% in half a second and then is written later. I understand that os.flush only suggests (!) to write the data but not forces to do so.
Is there a way to monitor the progress in real-time, so I can show a user how many data already is transferred? To do a real forced flush? Thanks for your helpMaybe it's a bug: just found this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745
Does maybe anybody know a work-around?
Edited by: thomwiesel on 23.03.2010 13:44
Edited by: thomwiesel on 23.03.2010 13:45 -
How to monitor the progress of an ORDER Number
Hi,
How can I Monitor the progress of an order from the EBS.
Thanks
AsisI assume you mean sales order.
You can open the order header and go to tools > workflow status.
It will show you when the order was entered , was booked and closed.
You can also see details of all lines for the order.
If you want to see status of a line, You can also go to line and go to tools > workflow status
It will show you when it was entered, when booked, when it was progressed to next stages, and closed.
Hope this helps,
Sandeep Gandhi -
Monitoring the progress of a delete operation
Hello All ,
I am deleting a table with 80M records based on rowid . But it appears that its running for so long .
around 12 hrs . I can see an active session with delete statement . But no entry for that session id in v$long_ops .
How can i find out the total percentage of completetion for session ? Please help me with the query
Version Ora10gR2
Thanks
AneeshHi, if you're deleting much more than you keep i suggest you to:
- create a "twin table"
- insert the rows you want to to keep in the twin table
- truncate the original table
- re-insert the copied rows
- commit
- drop the copy table.
The truncate table is much more faster than a delete the complete table (this is a DDL operation while the Delete is a DML operation)
Sorry someoneElse i didn't see you last proposal (it's the same)
Edited by: user11268895 on Jul 10, 2010 3:19 PM
Another way to monitor this operation (if you are in PL/SQL) is to usethe dbms_Application_info package, here is an example:
DECLARE
i NUMBER := 0;
f BOOLEAN := FALSE;
BEGIN
WHILE NOT (f)
LOOP
DELETE FROM t1
WHERE rwonum <= 20000;
i := i + SQL%ROWCOUNT;
DBMS_APPLICATION_INFO.set_client_info ( i
|| ' record have been deleted...'
COMMIT;
IF SQL%ROWCOUNT < 20000
THEN
f := TRUE;
END IF;
END LOOP;
END;then you'll be able to see how many rows were deleted at "any" time:
SELECT client_info,v.*
FROM SYS.v_$session vEdited by: user11268895 on Jul 10, 2010 3:20 PM -
need help
If you had closed Creative Cloud application .
Restart the computer once and check.
If the Creative Cloud desktop app is launched ,
Before starting installation of InDesign cc app.
Clear temp folder.
Please press Windows+R button together and you will get a run command window, please type-in %temp% and hit enter.
Delete all contents present inside temp folder.
You may skip the files which cannot be deleted.
Then start the installation process for Indesign cc 2014. -
How do you monitor backup progress
How can you monitor the progress of a backup? I use timemachine and an external drive to do my backups on my 09 Macbook pro. I want to be able to see the amount of files transferred and time remaining or any other pertinent info. Not just a spinning wheel.
I don't know, I use bootable clones myself and it shows me the progress of the backup and updating of files.
However I can point you to this guy who is the local TM guru
All about Time Machine
If you want to learn more about all sorts of backups to diversify your restore options (TM can fail to restore properly), including bootable clones etc. then read my UT here on the subject.
Most commonly used backup methods explained
I personally don't use TimeMachine, preferring the more advanced bootable clone options. -
Select the progress of an another sql statement
What I want to do is to monitor the progress of a sql statement which takes a long time. How many percent of the statement is already done.
I know there is the possibility to do this with a query.
But I can' t remember how to do this exactly.
Can somebody help me?
Thanks a lot!Here is a SELECT that I usually run:
COLUMN MODULE FOR A20
COLUMN OPNAME FOR A20
COLUMN SOFAR FOR 999999999999
COLUMN TOTALWORK FOR 999999999999
COLUMN UNITS FOR A20
COLUMN REMAINING FOR 999999999
COLUMN ELAPSED FOR 999999999
SELECT
S.SID
,S.AUDSID
,S.OSUSER
,S.MODULE
,L.OPNAME
-- ,TARGET
-- ,TARGET_DESC
-- ,CONTEXT
,L.SOFAR
,L.TOTALWORK
,L.UNITS
,L.START_TIME
,L.LAST_UPDATE_TIME
,L.TIME_REMAINING REMAINING
,L.ELAPSED_SECONDS ELAPSED
-- ,MESSAGE
-- ,USERNAME
,L.SQL_ADDRESS
-- ,SQL_HASH_VALUE
-- ,QCSID
-- ,A.SQL_TEXT
FROM V$SESSION_LONGOPS L
,V$SESSION S
-- , V$SQLAREA A
WHERE L.TIME_REMAINING <> 0
AND L.SID = S.SID
AND L.SERIAL# = S.SERIAL#
;Note that V$SESSION_LONGOPS as a rule does not show long operations which take a lot of index range scans - this is not a "long operation" -
How to check the progress of a BPM process I started ?
Hi,
I used to build workflow with Guided Procedure, and there is a GP Runtime Workcenter where a user can find the processes he/she started, or being as an admin/overseer/owner. For GP, it is much more powerful than UWL.
Now I'm testing BPM with the following secnario, but I don't know how the user starting a process to monitor the progress with UWL ? (I do not think NWA is a good tool for BPM user, correct me if I'm wrong )
My scenario is : User fill in a leave-request data form built with Web Dynpro iView (not part of BPM task), and click submit, the iView start a BPM process. This process will go through the approvers. The user need to check the progress.....how can he/she find the process in UWL ? (He/She has no working items)
I really want to know the best practice to present the process prgress to a user who is relative to the process instances (as initiator, admin, or participant)
ThanksHi,
You can do it several ways.
1> a) After starting the process, go to NWA [http://<hostname>:<port>/nwa]
b) Go to 'Operations' -> Processes and Tasks' -> 'Manage Process'.
c) Choose the Process instance you started and click on the 'Process flow'.
This will show you a page with the process digram with a grenn 'token' beside the active step.
2> The other way ( dificult to achieve, easier to use)
a> During process design, for every human activity UI, write down the process steps on task UI.
b> Highlight the step for every human task.
c> When the user opens the tak UI from UWL, then can see the process step at which they are stuck.
This method wont work if the process is stuck at any 'automated activity' or sub-process.
Hope these help.
Edited by: Subhra Jyoti Saha on Jul 6, 2010 7:04 AM -
How to check the progress of statistics gathering on a table?
Hi,
I have started the statistics gathering on a few big tables in my database.
How to check the progress of statistics gathering on a table? Is there any data dictionary views or tables to monitor the progress of stats gathering.
Regds,
KunwarHi all
you can check with this small script.
it lists the sid details for long running session like
when it started
when last update
how much time still left
session status "ACTIVE/INACTIVE". etc.
-- Author : Syed Kaleemuddin_
-- Script_name : sid_long_ops.sql
-- Description : list the sid details for long running session like when it started when last update how much time still left.
set lines 200
col OPNAME for a25
Select
a.sid,
a.serial#,
b.status,
a.opname,
to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
a.time_remaining as "Time Remaining Sec" ,
a.time_remaining/60 as "Time Remaining Min",
a.time_remaining/60/60 as "Time Remaining HR"
From v$session_longops a, v$session b
where a.sid = b.sid
and a.sid =&sid
And time_remaining > 0;
Sample output:
SQL> @sid_long_ops
Enter value for sid: 474
old 13: and a.sid =&sid
new 13: and a.sid =474
SID SERIAL# STATUS OPNAME START_TIME LAST_UPDATE_TIME Time Remaining Sec Time Remaining Min Time Remaining HR
474 2033 ACTIVE Gather Schema Statistics 06-Jun-2012 20:10:49 07-Jun-2012 01:35:24 572 9.53333333 .158888889
Thanks & Regards
Syed Kaleemuddin.
Oracle Apps DBA
Mobile: +91 9966270072
Email: [email protected] -
I have written large files for a report. When I open the files in the VI by pushing a button I want to view the progress of the file being opened. My first thought was to get the file size, some how measure the number of bytes comming out and monitor it on the progress bar. I am unsure about how to do this. If you know of a better way to monitor and disply the progress of an opeing file please let me know.
If I understand you correct the progress bar is not the problem, it's to get a numeric value indicating the progress...right?
If so then you could read the file size, preallocate a byte array to hold the file, then read it in chunks and put the chunks into the array using replace array elements...(you could concatinate strings, but that would easily become very memory and speed expensive...)until you have read the entire file. If the file is 20 MB and you want the progress bar to have a resolution of about 1% read it in chunks of 256 KB...For each chunk read, increment the progress bar...
MTO -
Monitor the online backup progress in Oracle 11g (RMAN)
Hi,
is there a simple way to see the progress of the online backp for oracle?
We are using oracle 11g and using RMAN td level-0 and level-1 backups in the SAP environment(SAP Netweaver 7.01)
Regards,
RakeshThanks Siva!
I was looking for something like a script which tells me the running backup progress.
Like the following script which tells the status of RMAN backup (completed/failed):
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
regards,
Rakesh -
'setProgress is not a function' error while setting the progress of a progress bar manually
I want to set value of a progress bar in an accordian but I am encountering 'setProgress is not a function' error. Any idea what's wrong with following code.
Observation:
If I move the progress bar out of the Accordian then the error goes away and the progress bar appears fine.
I want to set the progress bar eventually to {repMonitor.currentItem.threatLevel} but for now I am just testing with hypothetical threat value i.e 60
<mx:Accordion id="monAccordian" includeIn="Monitoring" x="10" y="10" width="554" height="242" change="monAccordianChange()" >
<mx:Repeater id="repMonitor" dataProvider="{monitoringArray}">
<mx:Canvas width="100%" height="100%" label="{repMonitor.currentItem.firstName+' '+ repMonitor.currentItem.lastName}" >
<mx:Image x="10" y="10" source="{repMonitor.currentItem.imageName}" width="175" height="118"/>
<s:Label x="200" y="14" text="Threat Level:"/>
<mx:ProgressBar x="200" y="30" mode="manual" label="" id="bar" width="200" creationComplete="bar.setProgress(60,100);" />
</mx:Canvas>
</mx:Repeater>
</mx:Accordion>Okay.. Thanks.
On another forum I ve been told that I need to use getRepeaterItem. How can I use it to set my progress bar such the value of progress may be taken from repMonitor.currentItem.threatLevel? -
Monitor streaming progress on client
After thinking and taking in consideration suggestions on forum I decided not to use appv client gui on the machine.
I have some debate about streaming time monitoring.
Example O2013 takes about 15 minutes to finish streaming. Then when clicking Word icon the CHARGING bar appears.
Personally. I don't see big inconvenience... I suggested to open Task manager after first login to machine added to OU with appropriate GPO and see processor activity. But at this time Windows also start to download Windows updates from the WSUS.
I just got the answer to the question about placing a shortcut of the package elements on the desktop automatically from APPVMAN console... This could be a real solution. The icon could be an indicator that streaming is started... and the app could
be opened in 15 minutes.
I guess it would right approach.
What do you think?
--- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davissorry, didn't mention what GPO I mean in my initial post. Sure it is APPV admx. And I publish Globally.
See below a screenshot. I have only Publishing configured. No items in Streaming node touched.
In my environment after adding the machine to AD, to the OU with APPV client configuration GPO applied, Office package is accessible about in 15 minutes. It is OK for a package of 2GB. Since we do not sequence Office package, it is configured for streaming
and caching on local machine I guess.
I just messed a bit with a term caching. After reading your post I believe I got it right. I thought that Streaming does placing the package on local machine and called it "copy". And when we first launch the app it will create some
cache. I thought that the progress bar that runs some 15 seconds and appears just on first launch of Word creates the cache. My bad... Didn't read enough because have few projects at the same time.
But my Appv system is clean and functioning well. Forum is a great help...
In reality: the cache is fully streamed package. And in case of heavy APP like Office it not make sense to run the app from the network. So it is fully pushed into the machine's cache.
I don't have autoload enabled but couple of small apps are loaded in cache without noticible delay from first start.
Probably enable Autoload in Streaming node will be a good idea.
When package is fully cached what Charging bar means (what process is on background) during app's first start?
Thanks for your time.
--- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis -
The progress of gather_schema_stats
hello,
database version oracle 10.2.4.0 hpux
we use following options of gather_schema_stats to gather statistics for a huge schema:
DBMS_STATS.gather_schema_stats ( ownname => '<SCHEMA>', -
estimate_percent =>DBMS_STATS.AUTO_SAMPLE_SIZE, -
cascade => true, -
granularity => 'ALL' );
how can i determine the progress of gather_schema_stats ? does a internal table exists to monitor this ?
we want / must now the status of progress ?
regards,You can query the V$SESSION_LONGOPS table. Something like
SELECT *
FROM v$session_longops
WHERE time_remaining > 0will show you all the sessions that have long-running operations. GATHER_SCHEMA_STATS will populate this view, as will other Oracle operations that take more than a few seconds (i.e. a full scan of a large table).
Justin -
I've read on these boards that there are problems submitting batches in 10.5 with compressor 3.0.2 - which is what I'm running. My problem is slightly different...I am able to submit a batch and call up the batch monitor, where the job is listed as "processing" - but the progress bar never updates - and I've let it run on a short clip for WAY over the time that it should take and it never completes...I've already deleted compressor, trashed the prefs. and re-installed...any ideas or am I seriously just stuck until Apple gets their act together and fixes this?
For the most part Apple doesn't monitor these discussions. Report the problem to the feedback page:
http://www.apple.com/feedback/compressor.html
Maybe you are looking for
-
New to flash remoting... need help!
Hello all, I just started with Flash 8 on my own, I am intermediate level, and I am studying Action Script 2.0. I need some suggestions on what books to use, and what to study to accomplish connecting SQL or MS-Access to Flash. I will be working on a
-
Cannot save service hook for Slack (Database error when saving)
When trying to set up a service hook for Slack, saving the new service hook fails at the end of the process. The Message is "Cannos ave the value NULL into column 'ActionDescription', table 'ServiceHooks_...........hooks.tbl_Subscription'; column doe
-
Our customers system is local (CDN), but most of their sales are done in US, they must present their Customer receivables aging to the bank in US dollars. now here is the situation, you must balance with something of course. as per November 5/08
-
Firefox will not open page from a link in an email since updating windows messenger
i use microsoft outlook for email which requires Windows Messenger to make connection with my MSN account. I was forced to update Messenger. Since updating links in emails to web sites will only open my firefox homepage, and will not open the page th
-
Is iPhohe 5 going to have slow motion and burst mode camera?
Hello friends, I am actually a little concern about whether iPhone 5 with iOS 7 is going to take slow motion video as well as burst mode pictures or not. Thank you