Can't see any difference between two code examples
Hi,
I wonder, what is the difference between these two code examples?
In my eyes they do the same thing, or?
protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
dispose();
super.processWindowEvent(e);
public void actionPerformed(ActionEvent e) {
if (e.getSource() == button1) {
dispose();
/A
Where did you learn Swedish? You wrote it right but this sentence: "Mig sj�lv, jag kommer fr�n....." is not quite right. You have to write it like this: "Sj�lv s� kommer jag fr�n ...." or "Jag kommer fr�n....".
When I wrote "or" before, I meant or like in "right or wrong" not like in "eller hur".
I'm born in Poland but i moved to Sweden when I was 6,5 years old.
I have one more question about the window-closing-thing:
In an other file it looks like this:
private class SymWindow extends java.awt.event.WindowAdapter
public SymWindow(){}
public void windowClosing(java.awt.event.WindowEvent event)
jMenuFileExit_actionPerformed();
////////this comes after that one above//////////
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING){
jMenuFileExit_actionPerformed();
In this file you can choose to exit the program by choosing exit from a menu or just click in the upper right corner (the cross). If you have a file open, don't save it and want to exit, a message will appear with a question if you want to save. This worked fine from the beginning but to this message I added a cancel button (before it was only yes and no). This didn't work. I took away the second code example and and added this: "setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE)" to the first one and everything works fine. The three buttons work if I choose exit from the menu or if I click the cross. Is it right?
By the way, thanks for your help
/A
Similar Messages
-
Supposedly OSX Mavericks downloaded. I saw it downloading in launchpad. I left and came back and I guess it was all finished. How do I make sure it downloaded. I can't see any difference. Also, I have a notice that I should upgrade Mac EFI Firmware 2.1. And I got a notice that my ILibrary has changed locations. I don't have an ILibrary.
Look in your Applications folder for Install Mac OS X Mavericks file.
Better be sure you straighten out those peculiarities on your system before you upgrade to Mavericks or you will likely find yourself with a botched system. Be sure to perform the EFI update before upgrading, too. Put all normal OS X applications and files where they belong. Otherwise, erase the drive first. (after the EFI update.) -
We upgraded from the std fois box to the hd fios box QIP6200-2) I flip between the regular tv broadcast and the same broacast on the hd channel and there is just a very suttle difference in the channels. is HD overrated or is something not connected correctly.
I have the cable in and have the HDMI cable from the box to the TV .You do have an HD TV don't you? If not you will never get a true HD picture, although with that STB you can watch HD channels (but not in true HD).
Have you gone into the Menu on the HD STB and set the Video Settings? It may be that the new STB is set to always output 480i or 480p instead of an HD signal.
Menu ==> Settings ==> Video Settings ==> Video Format ==> needs to be 720p or 1080i to get HD picture
I suggest you try both settings and see which looks better on your TV.
You might also want to look at the SD Override options, which take effect when watching SD channels. I prefer Off because switching from HD to SD or SD to HD takes 3-5 seconds if set any other way. But you may prefer some other setting.
Justin
Verizon FiOS TV, Internet, and phone
QIP6416-P1, IMG 1.7C, Build 09.83
Keller, TX 76248 -
Find the difference between two internal table
how can i see the difference between two interal tables?
The requirement is as follows
1. We have a transparent table, which stores the employee data with EMP ID as key.
2. We load the transp table data into a interal table (B).
3. We get data from legecy system as file and it gets loaded into another internal table (A) (this also has the same EMP ID key and this will have latest addition/update to those emplyees).
Now we need to seperate out these data into three interal table Inserted (I), Deleted (D) and Updated (U).
We want to do followign things
I = A - B
D = B - A
Both A and B will have around 40k records. Hence we are trying to avoid the looping.
Please suggest the best option for us.
Thank you in advance.
Raghavendra>
RAGHAV URAL wrote:
> how can i see the difference between two interal tables?
> The requirement is as follows
>
> 1. We have a transparent table, which stores the employee data with EMP ID as key.
> 2. We load the transp table data into a interal table (B).
> 3. We get data from legecy system as file and it gets loaded into another internal table (A) (this also has the same EMP ID key and this will have latest addition/update to those emplyees).
>
> Now we need to seperate out these data into three interal table Inserted (I), Deleted (D) and Updated (U).
>
> We want to do followign things
> I = A - B
> D = B - A
>
> Both A and B will have around 40k records. Hence we are trying to avoid the looping.
>
> Please suggest the best option for us.
>
> Thank you in advance.
> Raghavendra
Hi Raghavendra,
Currently as of my knowledge, these operations are only possible through LOOPs. But LOOPign can be really fast here if you properly utilize the SORTING, READ with BINARY SEARCH and FIELD-SYMBOLS usage. I would say:-
Steps for Insert:-
SORT: A, B.
LOOP AT A ASSIGNING <WA_A>.
READ TABLE B WITH TABLE KEY key = <WA_A>-key BINARY SEARCH.
IF SY-SUBRC NE 0.
APPEND <WA_A> TO I.
ENDIF.
ENDLOOP.
Steps for Delete:-
SORT: A, B.
LOOP AT B ASSIGNING <WA_B>.
READ TABLE A WITH TABLE KEY key = <WA_B>-key BINARY SEARCH.
IF SY-SUBRC NE 0.
APPEND <WA_B> TO D.
ENDIF.
ENDLOOP.
Regards,
Ravi. -
I do not know what tech. s lacking in iphone 4 that prevents it to be able to use turn by turn navi. I do not see any difference between 4 vs 4S and yet 4S is able to support it. I am very disappointed with apple as i was when 4S was released. I will not purchase iphone5 becuase i think its nowhere near what apple calls it "perfect". there are plenty of other phone around. Lumia 920 for example is a much better phone. Just disappointed with apple...
http://www.apple.com/ios/whats-new/
the fine print in the map section states that turn by turn is only available for 4S and up. -
How to find the phase difference between two signals using Hilbert transform
hi,
I am new to LabView.... I am trying to find phase difference between two signals. I sucessfuly found out the phase difference between two predefined waves using single tone measurement. .... But I really want to know how can I measure phase difference between two signals( not predefined... ie we don't know the initial conditions) using hilbert transform or any transformation techniques (without using zero cross detection).. I tried by using hilbert transform based on algorithm... bt I am getting error.... plz help me
Attachments:
phase_differece.vi 66 KByou could try something similar to this, for each table pair that you want to compare:
SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
FROM (
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_A'
MINUS
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_B'
) DIFF
UNION
SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
FROM (
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_B'
MINUS
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_A'
) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on. -
Is there any way .? how can i see. what going on my code
hi jdev experts,
am using jdev 11.1.1.5.0 - adfbc
i have a amimpl classes i want to see the each and every value of the row, while perform each and every for loop
is there any way .? how can i see. what going on my code
can anyone paste simple video link regards this?Hi,
what about debugging ? Just set a break point and run the Debugger (the red run icon). Or you use logging http://blogs.oracle.com/groundside/entry/adventures_in_adf_logging_part to print out for each row whats going on
Frank -
Hi
Is there any difference between DDR3 memory and LPDDR3 memory? As i brought my macbook air 2013 recently and i saw the specifications in the system info that is indicating DDR3, but apple website stated LPDDR3. Anyone can advise on this?Welcome to Apple Support Communities
Read > http://en.wikipedia.org/wiki/Mobile_DDR DDR is the RAM used in computers, and LPDDR is common in mobile computers -
Any difference between this two sql
are there any difference between this two sql
-- table definition : create table test(col varchar2(20) not null)
select * from test where col like '%%'
--and
select * from test
any difference there? please give some detailed analysis. thx.Also take care when there are indexes.
SQL> create unique index testtab_col on testtab( col );
Index created.
SQL> set autotrace on explain
SQL> select * from testtab;
COL
col1
col2
Execution Plan
Plan hash value: 2692415588
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 21 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| TESTTAB | 3 | 21 | 3 (0)| 00:00:01 |
Note
- dynamic sampling used for this statement
SQL> select * from testtab where col like '%%';
COL
col1
col2
Execution Plan
Plan hash value: 2166828774
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 2 | 14 | 1 (0)| 00:00:01 |
|* 1 | INDEX FULL SCAN | TESTTAB_COL | 2 | 14 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("COL" LIKE '%%')
Note
- dynamic sampling used for this statement
SQL>So no - bottom line is that these SQLs are different. They may look superficially the same and even under certain circumstances act the same. But they are not the same. -
Java code to get the difference between two dates in days
Hi ppl,
I need to write a user defined function to get the difference between two date nodes, in days.Please help me out
regards,
PrashanthHi,
have a look at those two:
(How do I calculate the difference between two dates?)
http://joda-time.sourceforge.net/faq.html
Calculating the Difference Between Two Datetime Stamps
http://www.xmission.com/~goodhill/dates/deltaDates.html
Get difference in days
http://javaalmanac.com/egs/java.util/CompDates.html
Regards,
michal -
How to get the difference between two columns in a column group
Hi All,
My first time here and really new to programming. I would like to get the difference between 2 columns that are inside
a column group.
Here is my sample table below: The Column Group is PeriodNumber and can only choose 2. like 1 and 2.. I would like to have a third row which will simply calculate the difference between the amounts in PeriodNumber 1 and 2.
PeriodNumber
Account 1 2
1) Cash 10,000 15,000
2) Receivables 12,000 11,500
3) Equipment 5,000 5,500
Total Assets 27,000 32,000Hi yabgestopa,
From your description, you want to get the difference between two columns in a column group. After testing it in my environment, we can use custom code to achieve your requirement. For more details, you can refer to the following steps:
Copy the custom code below and paste it to your report. (Right-click report>Report Properties>Code)
Dim Shared Num1 As Integer
Dim shared Num2 As Integer
Public Function GetAmount(Amount as Integer, Type as String)
If Type = "1" Then
Num1=Amount
Else
Num2=Amount
End If
Return Amount
End Function
Public Function GetDif()
Return Num1-Num2
End function
Right-click the second column to insert a third column with Outside Group-Right.
Then use the expressions below in the matrix.
=Code.GetAmount(Fields!Amount.Value,Fields!PeriodNumber.Value)
=code.GetAmount(Sum(Fields!Amount.Value),Fields!PeriodNumber.Value)
=Code.GetDif()
The report looks like below.
If you have any questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Better estimation of phase difference between two signals with variable frequency!
Hello LabView Gurus,
Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles.
As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
You can observe that the estimation error increases after you push the button.
All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
I am using LabView 2009 for this task.
The application is for electric machines and the stability/performance of machines under different faults.
Thank you for reading this far!
Regards,
Awais
Attachments:
v603.png 320 KB
v603.vi 186 KBJeff Bohrer wrote:
Basic math gives me a bit of pause on this approach. You are sampling at 50 times the frequency of interest so you get 50 samples per cycle. your phase resolution is 1/50th cycle or 7.2 degrees +/- noise. You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
Jeff- (Hardly Working)
I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency. Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
F. Schubert wrote:
I'm not a signal processing expert, but here my basic understanding.
If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml
An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned. -
Function Module to find the Difference between two times.
Hi All,
Wud you plz let me know the Function Module to find the Difference between two times.
Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
Need Output in Hours:Minutes only . ( No seconds Needed )
Ex :
Input :
06:00 to 18:00 Output : 12:00
and 20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
Thanks,
N.L.Narayanacheck this .
data : p_timel like sy-uzeit,
p_timeh like sy-uzeit,
diff like sy-uzeit,
di(8) type c .
p_timel = '200000'.
p_timeh = '060000'.
diff = p_timeh - p_timel.
concatenate diff+0(2) ':' diff+2(2) into di.
write:/ di.
also check for this.
p_timel = '060000'.
p_timeh = '180000'.
see if this can be implemented in ur code .
or else u can try with Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
hope this helps regards,
vijay -
Are there any difference between fx. the Nvidia FX3800 and GTX 260?
Does anybody understand why I fell frustrated and confused about all this videocard discussions?
Some tells me that the FX3800 is a better card - more pro - stabillity etc. than low-price cards - like GTX 260/285/295 - and some tells me that GTX 260 = FX3800. I read on other webpages about how people are having problems having their GTX 260 recognized as a FX 3800 (not in PPro but by Nvidia software). Other places tells about how to softmod GTX 260 to a FX 3800. Some tells me that there is a big difference between these cards - others they are almost alike - same GPU etc. I read that the difference between GTX 260 and FX 3800 is only the looks of it from outside - inside they are alike - and that apart from that only drivers are different.
I have ordered the FX 3800 - believing it will perform better and more stable and give me really good playback rendering inside PPro CS5 compared to my GTX 260. If I get the same performance and stability by just changing two lines in a textfile with my old GTX 260 I feel cheated...I hope this is not happening.
Someone from Adobe or Nvidida - please tell us - what there is a differnece between fx. the GTX 260 and the FX 3800 besides from the outside look and some drivers? If there is no difference between them - I can not see any other reason for only supporting the FX cards than $$$...If there are a difference in Quadra/FX favour - and I sincerly hope so - I understand why you choose Quadro cards - but if they are just alike inside - I just feel we have all been mislead. I could have saved my money...time will show - I get the FX 3800 in a few days...can´t return it (danish rules when you buy it as a company) - so I´m 1000$ short this month...:(
I would feel much more comfortable in having ordered the FX 3800 if someone from Adobe could tell me excactly how much better FX 3800 is from the GTX 260 - apart from being supported and the GTX is not. And if there is more in it than just changing a simple textfile? Are there any more things going on inside PPro - deep inside - that affects performance with FX cards besides from two lines in a textfile? Who can help answering that question - and I mean really answering it in serious way - not just saying - off course the FX is better - because its more expenssive.
Haven´t we all experienced this in other situations? Like buying a car? Fx. Inside SKODA FABIA is a VW engine like the ones used in much more expensive VW cars. Only difference is the name and the outside look - and some comfort. The engine is the same - and in a way you could say that from an engine-point-of-view - the cars are alike. But you pay for comfort.
Is the same thing going on here? I pay more for FX 3800 for the looks of it from the outside and some software-drivers that makes it more stable - but inside it is just like GTX 260? So from a graphic-performance-GPU-point-of-view I actually have two cards that are alike and I reaaly am paying for software and not hardware?
/MortenYou are right -. and I keep spanking myself in the head with a wet towel.
I will lie in my bed - thinking of the nice new bicycle I could have bought instead of the FX 3800....;-)
No seriously - I know what I have done - and maybe I have done right - I don´t know? Time will show and I will sell or buy.
What I am frustrated about is the fact that I actually just decided to buy FX 3800 because Adobe and Nvidida toold me too - to get support for MPE and now it seems that my old GTX 260 is much like the FX 3800 if not the same inside? And I am frustrated about that it is possible to change a line in a simple textfile and suddenly get support for the GTX 260 to play MPE. This fact only put more lit on the conspiracy-fire about Adobe and Nvidia having made a simple software-trick to make some cards work others not = making a lot of money on fools like me...
You must admitt it is a rather tempting conclusion - if one is in the conspiracy-mood. Well - I try to think good about people. And Adobe convinced me at last that I needed the FX 3800 card. So I did order it eventually - because I need the MPE NOW - Can´t wait - having so bad performance and issues with PPro 4 - been so frustrated about edditting for almost ½ a year now - constantly having issues etc. And I am going to start new big project in 7 days. Have just spend 2000$ on upgrade to Master Collection and have making thoughts about wich card to buy long time ago - the GTX 285 or FX 3800 - to get the MPE support. And same day I order I suddenly see that the softmod makes my old GTX 260 to a FX 3800. And other posts claim that the cards are the same inside. No wonder I get frustrated - others must be the same.
So what I am trying to say is that: I feel like Adobe and Nvidida is not being honest with us. If it turns out that the only thing Adobe has done is making a simple textfile to make cards supported or not by enteringior changing the names of the cards inside the textfile - and nothing else....And if fx. a softmoded GTX 260 turns out to perform excactly the same and be as stable as a FX 3800 to 5-6 x the price - I will feel cheated and feel like a stupid fool.
I certainly do not hope this is what is going on. But it seems no one can help me but myself - testing and trying these cards - and I will try to post my results in this forum - so others might have easier tomake a choice...
I´l be back....
Cheers -
Are there any differences between using Adobe Illustrator on a MAC and on a PC?
Hello,
I'm about go enroll in a class specialized for teaching Adobe Illustrator in order to be able to use the program at work. The company that I work at uses Macintosh computers to deal with clerical work and everything, so I would like to know if there are any differences between using Adobe Ilustrator on a MAC and on a PC. The school that offers training teaches two types of classes, where one uses Illustrator on a MAC, and the other one on a PC. The PC class is able to have an earlier start date, which is why I'm sort of leaning towards choosing that class as I need to be able to use the software as soon as possible, but if there are main differences between the interface that will affect my knowledge of using Illustrator on a MAC after I take the class with Windows systems, then I will most likely be waiting for the class teaching in MAC systems.
Thanks in advance for the help!
Oh and another suggestion- should I take the Illustrator class in CS6 or CS5?Reading through the CS5 vs CS6 performance thread, the Mac version seems to have worse performance than Windows version. From a starter's perspective the differences would most likely never be realized. It will take some time to see differences between even CS5 and CS6 other than the visual aspect of course.
Definitely take the CS6 versionso you can say you have it. CS5 is my preferred version, CS6 is garbage with the bugs it has for the type of work I use it for.
Maybe you are looking for
-
How to acces the filename from Message Header during variable substitution
Hi, We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of Message Header sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_n
-
Problem loading window component more than once
I have a swf with a button that opens a window component (from my library). it loads fine and also closes fine when I click the close button in the window. but when I try to open the window again, it actually loads again, but it stalls and locks up i
-
Hi All, we are facing the Login fails issue . how to resolve the bellow error , could you please suggested the possible ways .. ASAP TITLE: Connect to Server Cannot connect to .. ADDITIONAL INFORMATION: Login failed for user ' domain\name'. (Microso
-
I am running Dreamweaver CS4 on Mac OS X version 10.6.7. When I try to insert an image I get this error: And this is what happens to my code after I push ok: I do have my visual aids on and I also reset my prefrences. Anyone have any solutions for th
-
Behaviour when caching remote reference..
In this application, whose crazy behavior I am trying to fix - there are 2 Message driven beans that process message out of certain queues(say, batch and realtime) There is a util class to which the MDB's onMessage() methods delegate. Util class in t