Flip rows in JTextEditor
how can i horizontal flip each line in JTextEditor ?
Edited by: 799367 on 01.10.2010 06:13
799367 wrote:
Sorry i mean JEditorPane, i want to change write direction in JEditorPane top to down and left to right.( or left to right and bottom to up), i tried through graphics2d rotate and flip text was in right position but mirrored.
i found this site.
http://java-sl.com/vertical.html
Did you download the source code and work with it? Did you experience specific problems? What were these problems?
>
this my second program with GUI. please help meI can tell you from experience that what you intend to undertake is not trivial. So my best advice is: first learn to program with GUI's in a a more classical way. When you feel comfortable with GUI's in general, you will be better equipped to deal with features like flipping or whatever.
To show that I know what I'm talking about, you may have a look at http://www.pbjar.org/blogs/jxlayer/jxlayer40/index.html
where some demonstrations can be found on top of JXLayer, including transformations (flipping, mirroring, rotation, shearing and scaling).
Piet
Similar Messages
-
Hello!
Oracle 9i, NT
I have 2 tables Fact table and Dimension table.
Fact Table has a column called amount. Dimension Table has a column called amount_type which stores the type of amount.
When I write the following SQL statement:
select amount from fact, dimension where fact.key = dimension.key and dimension.amount_type = 'credit' or dimension.amount_type = 'debit';
My results are:
Row 1 : Credit $10
Row 2: Debit $5
What I really want is one row to be returned with credit and debit in that row.
Credit Debit
Row 1: $10 $5
How do I accomplish this? Please help!
Thanks!!!Hello
Couldn't you just use DECODE to avoid having to rejoin the table.
select
DECODE(d.amount_type, 'Credit',f.amount, NULL) as credit,
DECODE(d.amount_type, 'Debit',f.amount, NULL) as debit
from
fact f,
dim d
where
f.key = d.key
and
d.amount_type IN( 'Credit', 'Debit');Will give you something like
CREDIT DEBIT
100
100
100
100
100
100
100HTH -
Greetings,
When I create a keyword tag in the Places category, it doesn't allow me to input the GPS coordinates.
I have some pictures that have GPS coordinates in the metadata. Is it possible to create keyword tags from the pictures, so that the new tags will have the proper lattitude and longitude?
I'm using PSE9 on Windows.
Thanks,
Shane.If you want to transform rows to columns in your tag queries, you can use the predefined XSLT "RowToColumnTransform.xsl". You can find in MII in folder "/XMII/Stylesheets/". After flipping rows and columns, you can use a repeater to go through the rows. Use the [SAP Help link: XSL Transformation action|http://help.sap.com/saphelp_mii121/helpdata/en/43/e80b59ad40719ae10000000a1553f6/frameset.htm] to process the XSLT.
Use XPath to pick the query values and link them to your Data Item values. Also see the [XPath help|http://www.w3schools.com/xpath/default.asp].
Michael -
Front Row Flip-Album-Art-every 30-seconds-distraction really *****!
I know there have been some posts about this, but I want my name added to the list of people who complained about it!
Apple-Feedback has been submitted.
I have 2 questions:
1) Why is it, that all the other threads about this issue are closed (archived) although unanswered? Can someone explain that to me?
2) Anybody with the Snow Leopard Golden Master on his system already: Is this s*-feature still present in 10.6?I know. I tried Plex once but it's pretty hard to setup/use. I don't find it too user friendly.
-> Snow Leopard still very buggy atm
-> when browsing my iTunes Artists category there was no way to jump to an alphabet letter. I had to scroll through the whole library, which is pretty annoying when it's big
-> I never figuered how to display the song lyrics. It has a lyrics button, but when I clicked that while playing a song that had lyrics nothing happened.
Actually I like that app, but got very frustrated using it, because it comes with many many plug-ins but basic features still need soom tweaking and some more usability would be great. IMHO.
HEY, I just reinstalled Plex. And wow, they have a similar "one title" view to front row. And wow, it does NOT flip. Horray. I'm happy Guess I'll give it another try. Also I noticed a lot of changes. I think the last verion I used was like 7.9... 8.2 makes a good impression. -
Flip text vertically in top row
I need to have the top row (banner) text run vertically because the data below is only 2 o3 digits wide. I can't seem to find the area where I can either flip or change the text direction of that row.
Please advise.AFAIK, this feature is unsupported. However, a workaround is to label narrow columns with text boxes instead of in a header row. Text boxes can be rotated as needed.
-
Front Row flipping back and forth
Is there a way to prevent front row from flipping the artwork and the progress bar back and forth every so often. I find it distracting when I am playing music. It catches my eye every time it makes the switch.
My understanding for Apple TV and Front Row 2 having this 'flipping' feature, is to avoid screen burn in. As one can imagine, over the life of the product one is likely to be playing music for a fair amount of total time and a static image would potentially burn in on a Plasma screen (while this is supposed to be practically impossible on an LCD I have seen it happen on really old ones as well).
As a large HDTV can cost thousands, Apple are trying to be helpful (and avoiding future blame).
However while the principal behind this feature is good, and the implementation novel, I don't think it is the most aesthetically pleasing (it is too distracting).
TVs displaying stations which have a 'DOG' (Digitally Originated Graphic) i.e. a permanent station logo on screen are an even bigger problem (as the Apple TV and Front Row currently cannot display TV it is not directly related to them). A different method some TVs have built in themselves is to subtly move the picture down a pixel, left a pixel, up a pixel, right a pixel so as to move the fixed image around the screen. However the movement is so small it only helps a minute bit, at least it is far less distracting.
Note: Stations with 'DOGs' are loathed by AV aficionados.
Considering Apple have picked up other iTunes related features from external developers (e.g. Coverflow), perhaps they should pickup JewelCase from Optical Alchemy see http://www.opticalalchemy.com/products.html this can in iTunes display a rotating CD jewel case with the iTunes artwork and the list of tracks showing. Something along these lines would thinks to its movement avoid burn in and look far more attractive and less distracting. -
Urgent SQL question : how to flip vertical row values to horizontal ?
Hello, Oracle people !
I have an urgent SQL question : (simple for you)
using SELECT statement, how to convert vertical row values to horizontal ?
For example :
(Given result-set)
MANAGER COLUMN1 COLUMN2 COLUMN3
K. Smith ......1
K. Smith ...............1
K. Smith ........................1
(Needed result-set)
MANAGER COLUMN1 COLUMN2 COLUMN3
K. Smith ......1 .......1 .......1
I know you can, just don't remeber how and can't find exactly answer I'm looking for. Probably using some analytic SQL function (CAST OVER, PARTITION BY, etc.)
Please Help !!!
Thanx !
Steve.scott@ORA92> column vice_president format a30
scott@ORA92> SELECT f.VICE_PRESIDENT, A.DAYS_5, B.DAYS_10, C.DAYS_20, D.DAYS_30, E.DAYS_40
2 FROM (select t2.*,
3 row_number () over
4 (partition by vice_president
5 order by days_5, days_10, days_20, days_30, days_40) rn
6 from t2) f,
7 (SELECT T2.*,
8 row_number () over (partition by vice_president order by days_5) RN
9 FROM T2 WHERE DAYS_5 IS NOT NULL) A,
10 (SELECT T2.*,
11 row_number () over (partition by vice_president order by days_10) RN
12 FROM T2 WHERE DAYS_10 IS NOT NULL) B,
13 (SELECT T2.*,
14 row_number () over (partition by vice_president order by days_20) RN
15 FROM T2 WHERE DAYS_20 IS NOT NULL) C,
16 (SELECT T2.*,
17 row_number () over (partition by vice_president order by days_30) RN
18 FROM T2 WHERE DAYS_30 IS NOT NULL) D,
19 (SELECT T2.*,
20 row_number () over (partition by vice_president order by days_40) RN
21 FROM T2 WHERE DAYS_40 IS NOT NULL) E
22 WHERE f.VICE_PRESIDENT = A.VICE_PRESIDENT (+)
23 AND f.VICE_PRESIDENT = B.VICE_PRESIDENT (+)
24 AND f.VICE_PRESIDENT = C.VICE_PRESIDENT (+)
25 AND f.VICE_PRESIDENT = D.VICE_PRESIDENT (+)
26 AND f.VICE_PRESIDENT = E.VICE_PRESIDENT (+)
27 AND f.RN = A.RN (+)
28 AND f.RN = B.RN (+)
29 AND f.RN = C.RN (+)
30 AND f.RN = D.RN (+)
31 AND f.RN = E.RN (+)
32 and (a.days_5 is not null
33 or b.days_10 is not null
34 or c.days_20 is not null
35 or d.days_30 is not null
36 or e.days_40 is not null)
37 /
VICE_PRESIDENT DAYS_5 DAYS_10 DAYS_20 DAYS_30 DAYS_40
Fedele Mark 35473 35209
Fedele Mark 35479 35258
Schultz Christine 35700
South John 35253
Stack Kevin 35701 35604 35402 35115
Stack Kevin 35705 35635 35415 35156
Stack Kevin 35706 35642 35472 35295
Stack Kevin 35707 35666 35477
Stack Kevin 35667 35480
Stack Kevin 35686
Unknown 35817 35698 35596 35363 35006
Unknown 35702 35597 35365 35149
Unknown 35724 35599 35370 35155
Unknown 35600 35413 35344
Unknown 35601 35451 35345
Unknown 35602 35467
Unknown 35603 35468
Unknown 35607 35475
Unknown 35643 35508
Unknown 35644
Unknown 35669
Unknown 35684
Walmsley Brian 35725 35598
23 rows selected. -
I have a table that has many rows, and I need to flip it
upside down. What I mean by that, is that I want to take a table
like this: (the one I really need to switch is much longer)
http://upload3.postimage.org/342361/photo_hosting.html
and make it go from bottom to top, like 10,9,8,7,6,5,4,3,2,1.
Is there a way I can do this without cutting and pasting each row
manually?There is no way to do something like this within Dreamweaver.
Perhaps you
could invert the table by taking it into Excel, and then
exporting it as a
CSV file back into DW.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"AFJ786" <[email protected]> wrote in
message
news:fdo2fv$ckn$[email protected]..
>I have a table that has many rows, and I need to switch
it upside down.
>What I
> mean by that, is that I want to take a table like this:
(the one I really
> need
> to switch is much longer)
>
http://upload3.postimage.org/342361/photo_hosting.html
>
> and make it go from bottom to top, like
10,9,8,7,6,5,4,3,2,1. Is there a
> way I
> can do this without cutting and pasting each row
manually?
> -
I have read 118 files from a directory using the list.vi. Each file has 2 cols with 2088rows. Now I have the data in a 2 D array with 2cols and 246384rows (118files * 2088rows). However I want to put each file in the same array but each file in separate columns. then I would have 236 columns (2cols for each of the 118 files) by 2088 rows. thank you very much in advance.
Hiya,
here's a couple of .vi's that might help out. I've taken a minimum manipulation approach by using replace array subset, and I'm not bothering to strip out the 1D array before inserting it. Instead I flip the array of filenames, and from this fill in the end 2-D array from the right, overwriting the column that will eventually become the "X" data values (same for each file) and appear on the right.
The second .vi is a sub.vi I posted elsewhere on the discussion group to get the number of lines in a file. If you're sure that you know the number of data points is always going to be 2088, then replace this sub vi with a constant to speed up the program. (by about 2 seconds!)
I've also updated the .vi to work as a sub.vi if you wa
nt it to, complete with error handling.
Hope this helps.
S.
// it takes almost no time to rate an answer
Attachments:
read_files_updated.vi 81 KB
Num_Lines_in_File.vi 62 KB -
Hi,
I currently using v2.25 mac bookflip. The problem I am facing is that the onMouseDown and onMouseUp works well in swf. However, when the I upload to the web server and localhost. The chances for them to work are 50-50.
The truth is I was unable to drag the pages and I have no ideas what to do, and where to the start from can anyone tell me. what to do next?
To call the MouseUp. Basically, One swf (preloader)> load another swf (main menu and selection of books) > load another swf to read the book flip which my mouseDown is here.
Here is all the codes from mac v2.25 bookflip function. I only change the setPages function to make it load dynamically.
Notes, the problem is not sometimes. It many times.
//do not change these values: ----------------------------------------------------------------------------------------- ----------------------------
_global.mcnt = 0; //counter (used on a page where is an animation)
var gpage:Number= 0; //gotoPage No
var gflip:Boolean= false; //gotoPage flip
var gdir:Number= 0; //goto direction
var gskip:Boolean= false; //skip pages
var gtarget:Number= 0; //target when skipping
var aflip:Boolean= false; //auto flip
var flip:Boolean= false; //pageflip
var flipOff:Boolean= false; //terminateflip
var flipOK:Boolean= false; //good flip
var hflip:Boolean= false; //hardflip (the cover of the book)
var rotz:Number= -30; //hardflip max y difference
var preflip:Boolean= false; //corner flip status
var ctear:Boolean= false; //actual page status
var tear:Boolean= false;
var teard:Number= 0;
var tlimit:Number= 80;
var removedPages:Array= new Array(); //list of removed pages!
mpx = 0, mpy = 0; //mousepos at click
sx = sy = 0; //startpoint when flipping
var x:Number= 0; //mouse x,y
var y:Number= 0;
var ax:Number= 0; //auto x,y
var ay:Number= 0;
var acnt:Number= 0;
var aadd:Number= 0;
var aamp:Number= 0;
AM= Math.PI/180;
//initializing pages
function reset()
pages.p4.page._x = -pw;
pages.p4._x = pw;
pages.p1.page._x = -pw;
pages.p1._x = 0;
pages.flip.p2.page._x = -pw;
pages.flip.p2._x = pw;
pages.flip.p3.page._x = -pw;
pages.flip.p3._x = 0;
pages.p0.page._x = -pw;
pages.p0._x = 0;
pages.p5.page._x = -pw;
pages.p5._x = pw;
pages.pLL.page._x = -pw;
pages.pLL._x = 0;
pages.pLR.page._x = -pw;
pages.pLR._x = pw;
pages._visible= true;
pages.p1.page.pf.ph.mask._width= pages.flip.p2.page.pf.ph.mask._width= pages.flip.p3.page.pf.ph.mask._width= pages.p4.page.pf.ph.mask._width= pw;
pages.p1.page.pf.ph.mask._height= pages.flip.p2.page.pf.ph.mask._height= pages.flip.p3.page.pf.ph.mask._height= pages.p4.page.pf.ph.mask._height= ph;
//NEW THEORY UNPROVEN
/* pages.p1.page.pf.ph.attachMovie("pagesPreloader_mc", "pagesPreloader_mc", 0, {_visible:false});
pages.p4.page.pf.ph.attachMovie("pagesPreloader_mc", "pagesPreloader_mc", 0, {_visible:false});*/
pages.p1.page.pf.ph.pagesPreloader_mc._x= pages.p4.page.pf.ph.pagesPreloader_mc._x = pw/2;
pages.p1.page.pf.ph.pagesPreloader_mc._y= pages.p4.page.pf.ph.pagesPreloader_mc._y= ph/2;
pages.p0.page.pf.ph.mask._width= pages.p5.page.pf.ph.mask._width= pw;
pages.p0.page.pf.ph.mask._height= pages.p5.page.pf.ph.mask._height= ph;
pages.pgrad._visible = pages.mask._visible = pages.flip._visible = false;
pages.flip.p3mask._width = pages.pgmask._width = pw*2;
pages.flip.p3mask._height = pages.pgmask._height = ph;
pages.center._height = ph+2*lcaddy;
pages.flip.fmask.page.pf._width = pw;
pages.center._width = 6;
pages.flip.fmask.page.pf._height = ph;
pages.mask._width = pages.mask._height = pages.pgrad._height = pages.flip.p3shadow._height = pages.flip.flipgrad._height = 2*Math.sqrt(ph*ph+pw*pw);
pageNumber = new Array();
for(i=0;i<=(maxpage+1);i++) pageNumber[i] = i;
//////////////////////////////////////////////////////////////////////////////////MouseUP
//initializing mouse click handler
mousecontroll = new Object();
mousecontroll.onMouseDown = function()
if(flip && !aflip)
flipOK = false;
if(sx<0 && pages._xmouse>0) flipOK = true;
if(sx>0 && pages._xmouse<0) flipOK = true;
flipOff = true;
flip = false;
else if((flipOff || aflip || !canflip) && !preflip)
else if(!preflip)
var oox = ox;
var ooy = oy;
var osx = sx;
var osy = sy;
hit = hittest(); //hittest
if(hit)
startsnd(1); //Sound
flip = true;
flipOff = false;
tear = false; //not tearing yet
ox = sx = hit*pw;
pages.flip.setMask(pages.mask);
mpx = pages._xmouse, mpy = pages._ymouse;
oef();
//_quality = "MEDIUM"; //it is the place to degrade image quality while turning pages if the performance is too low.
else
{ //if preflipping
startsnd(1); //Sound
flip = true;
flipOff = false;
tear = false; //not tearing yet
aflip = preflip = false;
mpx = pages._xmouse, mpy = pages._ymouse;
oef();
mousecontroll.onMouseUp = function()
if(flip && !tear)
if((Math.abs(pages._xmouse)>(pw-afa) && Math.abs(pages._ymouse)>(ph/2-afa) && Math.abs(pages._xmouse-mpx)<afa) || preflip)
flip = false;
preflip = false;
autoflip();
startsnd(2); //sound
else if(!preflip)
preflip = false;
flipOK = false;
if(sx<0 && pages._xmouse>0) flipOK = true;
if(sx>0 && pages._xmouse<0) flipOK = true;
flipOff = true;
flip = false;
if(flipOK) startsnd(2); //sound
function hittest()
{ //hittest at mouse clicks, if click is over the book -> determining turning direction
var x=pages._xmouse;
var y=pages._ymouse;
var pmh = ph/2;
if(y<=pmh && y>=-pmh && x<=pw && x>=-pw)
var r = Math.sqrt(x*x+y*y);
var a = Math.asin(y/r);
var y = Math.tan(a)*pw;
if(y>0 && y>ph/2) y = ph/2;
if(y<0 && y<-ph/2) y = - ph/2;
oy = sy = y;
r0 = Math.sqrt((sy+ph/2)*(sy+ph/2)+pw*pw);
r1 = Math.sqrt((ph/2-sy)*(ph/2-sy)+pw*pw);
pageN = eval("pages.flip.p2.page");
pageO = eval("pages.flip.p3");
offs = -pw;
pages.flip.fmask._x = pw;
if(x<-(pw-clickarea) && page>0)
{ //>-----> flip backward
pages.flip.p3._x = 0;
hflip = checkCover(page,-1);
setPages(page-2,page-1,page,page+1);
ctear = pageCanTear[page];
return -1;
if(x>(pw-clickarea) && page<maxpage)
{ //<-----< flip forward
pages.flip.p3._x = pw;
hflip = checkCover(page,1);
setPages(page,page+2,page+1,page+3);
ctear = pageCanTear[page+1];
return 1;
} else return 0; //wrong click
function checkCover(p,dir)
if(hcover)
if(dir>0)
if(p==(maxpage-2) || p==0) return true;
else
if(p==maxpage || p==2) return true;
return false;
function corner()
var x = Math.abs(pages._xmouse);
var y = Math.abs(pages._ymouse);
if(x>(pw-afa) && x<pw && y>(ph/2-afa) && y<(ph/2))
return true;
return false;
function oef()
_global.mcnt++; //main counter incrase (need for some page effect);
if(!flip && corner()) //corner mouseover
preflip = true;
if(!autoflip()) preflip = false;
if(preflip && !corner())
preflip = false;
flip = false;
flipOK = false;
flipOff = true;
getm();
if(aflip && !preflip)
y = (ay += (sy-ay)/(gflip? gs: ps ));
acnt += aadd;
ax -= aadd;
if(Math.abs(acnt)>pw)
flipOK = true;
flipOff = true;
flip = false;
aflip = false;
if(flip) //page turning is in progress
if(tear) {
x = tox;
y = (toy += teard);
teard *= 1.2;
if(Math.abs(teard)>1200) {
flipOff = true;
flip = false;
} else {
x = (ox += (x-ox)/(gflip? gs: ps ));
y = (oy += (y-oy)/(gflip? gs: ps ));
calc(x,y); //positioning pages and shadows
if(flipOff)
{ //terminating page turning effect... (comlplete turning... dropped on the other side)
if(flipOK || tear)
x = (ox += (-sx-ox)/(gflip? gs: es ));
y = (oy += (sy-oy)/(gflip? gs: es ));
calc(x,y);
if(x/-sx > 0.99 || tear) //we are done with turning, so stop all turning issue
flip = false;
flipOK = flipOff = false;
pages.pgrad._visible = pages.flip._visible = false;
//_quality = "BEST"; //if quality is decrased during turning effect, you must reset its default value
if(tear) //if tear: remove page
removePage((sx<0)? page: page+1);
page += (sx<0)? -2: 0;
else
page += (sx<0)? -2: 2; //and tourning pages at pagenumber level...
if(gskip) page = gtarget;
setPages(page,0,0,page+1);
tear = false;
if(gpage>0 && !gskip) //gotoflip active -> is there another flipping left?
gpage--;
autoflip();
startsnd(0); //sound
else gflip = gskip = false;
else //terminating page turning effect... (incomlplete turning... dropped on the dragged side)
x = (ox += (sx-ox)/3);
y = (oy += (sy-oy)/3);
calc(x,y);
if(x/sx > 0.99) //we are done with turning, so stop all turning issue
flip = false;
flipOff = false;
aflip = false;
pages.pgrad._visible = pages.flip._visible = false;
//_quality = "HIGH"; //if quality is decrased during turning effect, you must reset its default value
setPages(page,0,0,page+1); //no change at pagenumbers
function calc(x,y) //positioning pages and shadows by x,y reference points
if(hflip)
{ //hardflip
var xp = (sx<0)? -x: x;
if(xp>0)
sp2._visible = false;
sp3._visible = true;
scalc(sp3,x);
else
sp3._visible = false;
sp2._visible = true;
scalc(sp2,x);
pages.flip.setMask(null);
pages.flip._visible = true;
pages.flip.fgrad._visible = false;
pages.flip.p2._visible = pages.flip.p3._visible = false;
return;
} else pages.flip.fgrad._visible = true;
//normal flipping process
rr0 = Math.sqrt((y+ph/2)*(y+ph/2)+x*x);
rr1 = Math.sqrt((ph/2-y)*(ph/2-y)+x*x);
if((rr0>r0 || rr1>r1) && !tear)
{ // we can tear off pages now
// so reference points must be recalculated
if(y<sy)
var a = Math.asin((ph/2-y)/rr1);
y = (ph/2-Math.sin(a)*r1);
x = (x<0)? -Math.cos(a)*r1: Math.cos(a)*r1;
if(y>sy)
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
if((rr1-r1)>tlimit && ctear)
teard = -5;
tear = true;
tox = ox = x;
toy = oy = y;
else
var a = Math.asin((y+ph/2)/rr0);
y = Math.sin(a)*r0-ph/2;
x = (x<0)? -Math.cos(a)*r0: Math.cos(a)*r0;
if(y<sy)
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
if((rr0-r0)>tlimit && ctear)
teard = 5;
tear = true;
tox = ox = x;
toy = oy = y;
if((sx<0 && (x-sx)<10) || (sx>0 && (sx-x)<10))
if(sx<0) x = -pw+10;
if(sx>0) x = pw-10;
//calculating flipping process
pages.flip._visible = true;
pages.flip.p3shadow._visible = pages.pgrad._visible = !tear;
pages.flip.p2._visible = pages.flip.p3._visible = true;
//equation of the line
var vx = x-sx;
var vy = y-sy;
var a1 = vy/vx;
var a2 = -vy/vx;
cx = sx+(vx/2);
cy = sy+(vy/2);
//trigonometriai szamitasok
//calculating rotation of the page, and the masks
var r = Math.sqrt((sx-x)*(sx-x)+(sy-y)*(sy-y));
var a = Math.asin((sy-y)/r);
if(sx<0) a = -a;
ad = a/AM; //in degree
pageN._rotation = ad*2;
r = Math.sqrt((sx-x)*(sx-x)+(sy-y)*(sy-y));
rl = (pw*2);
if(sx>0)
{//flip forward
pages.mask._xscale = 100;
nx = cx-Math.tan(a)*(ph/2-cy);
ny = ph/2;
if(nx>pw)
nx = pw;
ny = cy+Math.tan(Math.PI/2+a)*(pw-cx);
pageN.pf._x = -(pw-nx);
pages.flip.fgrad._xscale = (r/rl/2)*pw;
pages.pgrad._xscale = -(r/rl/2)*pw;
pages.flip.p3shadow._xscale = (r/rl/2)*pw;
else //flip backward
pages.mask._xscale = -100;
nx = cx-Math.tan(a)*(ph/2-cy);
ny = ph/2;
if(nx<-pw)
nx = -pw;
ny = cy+Math.tan(Math.PI/2+a)*(-pw-cx);
pageN.pf._x = -(pw-(pw+nx));
pages.flip.fgrad._xscale = -(r/rl/2)*pw;
pages.pgrad._xscale = (r/rl/2)*pw;
pages.flip.p3shadow._xscale = -(r/rl/2)*pw;
pages.mask._x = cx;
pages.mask._y = cy;
pages.mask._rotation = ad;
pageN.pf._y = -ny;
pageN._x = nx+offs;
pageN._y = ny;
pages.flip.fgrad._x = cx;
pages.flip.fgrad._y = cy;
pages.flip.fgrad._rotation = ad;
pages.flip.fgrad._alpha = (r>(rl-50))? 100-(r-(rl-50))*2: 100;
pages.flip.p3shadow._x = cx;
pages.flip.p3shadow._y = cy;
pages.flip.p3shadow._rotation = ad;
pages.flip.p3shadow._alpha = (r>(rl-50))? 100-(r-(rl-50))*2: 100;
pages.pgrad._x = cx;
pages.pgrad._y = cy;
pages.pgrad._rotation = ad+180;
pages.pgrad._alpha = (r>(rl-100))? 100-(r-(rl-100)): 100;
pages.flip.fmask.page._x = pageN._x;
pages.flip.fmask.page._y = pageN._y;
pages.flip.fmask.page.pf._x = pageN.pf._x;
pages.flip.fmask.page.pf._y = pageN.pf._y;
pages.flip.fmask.page._rotation = pageN._rotation;
function scalc(obj,x) //hardflip calc
if(x<-pw) x=-pw;
if(x>pw) x=pw;
var a = Math.asin( x/pw );
var rot = a/AM/2;
var xs = 100;
var ss = 100*Math.sin( rotz*AM );
x = x/2;
var y = Math.cos(a)*(pw/2)*(ss/100);
placeImg(obj, rot, ss, x, y)
pages.pgrad._visible = pages.flip._visible = true;
pages.pgrad._xscale = x;
pages.pgrad._alpha = pages.flip.p3shadow._alpha = 100;
pages.flip.p3shadow._xscale = -x;
pages.flip.p3shadow._x = 0;
pages.flip.p3shadow._y = 0;
pages.flip.p3shadow._rotation = 0;
pages.pgrad._x = 0;
pages.pgrad._y = 0;
pages.pgrad._rotation = 0;
function placeImg(j, rot, ss, x, y)
var m = Math.tan( rot*AM );
var f = Math.SQRT2/Math.sqrt(m*m+1);
var phxs = 100*m;
var phRot = -rot;
var xs = 100*f;
var ys = 100*f;
j.ph.pic._rotation = 45;
j.ph.pic._xscale = (phxs<0)? - xs: xs;
j.ph.pic._yscale = ys*(100/ss);
j.ph._rotation = phRot;
j.ph._xscale = phxs;
j._yscale = ss;
j._x = x;
j._y = y;
j._visible = true;
function setPages(p1,p2,p3,p4)
//attach the right page "image" at the right place
p0 = p1-2; //pages for transparency...
p5 = p4+2;
if(p0<0) p0=0;
if(p5>maxpage) p5=0;
if(p1<0) p1=0; //visible pages
if(p2<0) p2=0;
if(p3<0) p3=0;
if(p4<0) p4=0;
globalP1= p1;
globalP2= p2;
globalP3= p3;
globalP4= p4;
if(checkPageLoaded[globalP1-1] == false && checkPageLoaded[globalP4-1] == false)
trace("Preloader 3");
checkPageLoaded[globalP1-1]= true;
checkPageLoaded[globalP4-1]= true;
var cCounterTwo:Number= globalP1- (canPreLoadNumber+ 1);
var cTwoPerPage:Number= cCounterTwo+ 2;
cCountPage(cCounterTwo, cTwoPerPage, globalP1, globalP4);
pages.p1.page.pf.ph.pic._x = -(p1-1)*pw;
pages.p1.page.pf.ph._y = -ph/2;
if(hflip) //hardflip pages are specials!!!
pages.flip.hfliph.sp2._visible = true;
pages.flip.hfliph.sp3._visible = true;
sp2 = eval("pages.flip.hfliph.sp2");
sp2.ph.pic.pic._x = -(p2-1)*pw - pw/2;
sp3 = eval("pages.flip.hfliph.sp3");
sp3.ph.pic.pic._x = -(p3-1)*pw - pw/2;
else
pages.flip.hfliph.sp2._visible = false;
pages.flip.hfliph.sp3._visible = false;
sp2 = eval("pages.flip.p2.page.pf.ph.pic");
pages.flip.p2.page.pf.ph.pic._x = -(p2-1)*pw;
pages.flip.p2.page.pf.ph._y = -ph/2;
sp3 = eval("pages.flip.p3.page.pf.ph.pic");
pages.flip.p3.page.pf.ph.pic._x = -(p3-1)*pw;
pages.flip.p3.page.pf.ph._y = -ph/2;
pages.p4.page.pf.ph.pic._x = -(p4-1)*pw;
pages.p4.page.pf.ph._y = -ph/2;
soundDuration = containerArray[page+1].voice.duration/1000;
checkPage(p4,p2,p3,containerArray[arrayCounter].voice,buttonName,dotName,txtName);
transcript_mc.removeMovieClip();
function resetPages()
setPages(page,0,0,page+1);
function autoflip()
{ //start auto flip!
if(!aflip && !flip && !flipOff && canflip)
{ //only when all conditions fits our needs
acnt = 0
var pmh = ph/2;
aamp = Math.random()*pmh-(ph/4);
var x= gflip? (gdir*pw)/2: ((pages._xmouse<0)? -pw/2: pw/2);
var y= pages._ymouse;
if(y>0 && y>pmh) y = pmh;
if(y<0 && y<-pmh) y = - pmh;
oy = sy = y;
ax = (pages._xmouse<0)? -pmh: pmh;
ay = y*Math.random(); //page turnig style randomizing
offs = -pw;
var hit = 0;
if(x<0 && page>0)
pages.flip.p3._x = 0;
hflip = (hcover && gskip)? (page==maxpage || gtarget==0): checkCover(page,-1);
ctear = pageCanTear[page];
if(!(preflip && hflip)) {
if(gskip) setPages(gtarget,gtarget+1,page,page+1);
else setPages(page-2,page-1,page,page+1);
hit = -1;
if(x>0 && page<maxpage)
pages.flip.p3._x = pw;
hflip = (hcover && gskip)? (page==0 || gtarget==maxpage): checkCover(page,1);
ctear = pageCanTear[page+1];
if(!(preflip && hflip))
if(gskip) setPages(page,gtarget,page+1,gtarget+1);
else setPages(page,page+2,page+1,page+3);
hit = 1;
if(hflip && preflip)
hit = 0;
preflip = false;
return false;
if(hit)
anim._visible = false;
flip = true;
flipOff = false;
ox = sx = hit*pw;
pages.flip.setMask(pages.mask);
aadd = hit*(pw/(gflip? 5:10 )); //autoflip takes 10 frames to be done!!!
aflip = true;
pages.flip.fmask._x = pw;
if(preflip)
oy = sy = (pages._ymouse<0)? -(ph/2): (ph/2);
r0 = Math.sqrt((sy+ph/2)*(sy+ph/2)+pw*pw);
r1 = Math.sqrt((ph/2-sy)*(ph/2-sy)+pw*pw);
pageN = eval("pages.flip.p2.page");
pageO = eval("pages.flip.p3");
oef();
return true;
} else return false;
function getm()
{ //get x,y reference points depending of turning style: manual/auto
if(aflip && !preflip)
x = ax;
y = ay;
else
x = pages._xmouse;
y = pages._ymouse;
function getPN(i)
{//get the right page number
if(i==0) return 0;
var find = false;
for(j=1;j<=maxpage;j++)
if(i==pageNumber[j])
i=j;
find = true;
break;
if(find) return i;
else return -1;
function removePage(i)
i = (Math.floor((i-1)/2)*2)+1;
removedPages.push(pageNumber[i], pageNumber[i+1]);
for(j=(i+2);j<=(maxpage+1);j++)
pageOrder[j-2]=pageOrder[j];
pageCanTear[j-2]=pageCanTear[j];
pageNumber[j-2]=pageNumber[j];
maxpage -= 2;Do you mean it's firing when you click Edit?. I've replicated your code as below and it worked, try to remove the OnRowCommand run a build and then add the it again:
protected void Page_Load(object sender, EventArgs e)
BindGridwithDummy();
protected void GridMainCat_RowCommand(object sender, GridViewCommandEventArgs e)
string catID = e.CommandArgument.ToString();
if (e.CommandName == "Edt" && e.CommandArgument != null)
if (e.CommandName == "Dlt")
private void BindGridwithDummy()
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(new System.Data.DataColumn("Test", typeof(String)));
dr = dt.NewRow();
dr[0] = "A dummy Data"; //Adds the Dummy Data in the Row
dt.Rows.Add(dr);
// Show the DataTable values in the GridView
GridView1.DataSource = dt;
GridView1.DataBind();
<asp:GridView ID="GridView1" runat="server" OnRowCommand="GridMainCat_RowCommand">
<Columns>
<asp:BoundField DataField="Test" />
<asp:TemplateField>
<HeaderTemplate>
Button</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton Style="padding: 4px;" ID="lnkDel" CommandName="Dlt" runat="server"
CausesValidation="false" Text="Delete" CommandArgument="1" OnClientClick="javascript:return('Are you sure, do you want to delete Record??')"></asp:LinkButton><br />
<asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CausesValidation="false"
CommandName="Edt" CommandArgument="2" Style="padding: 4px;"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView> -
How to display ID and Type in a row instead of column
I have a table A with ID_NO, TYPE, PUBID(foreign key).
The type can be CAT, ISBN, ISSN. I also have another table B with PUB_ID (primary key) and a lot of other details.
The requirements are to display the results as rows like this:
PUB_NO | CAT | ISBN | ISSN
222 | abc | qwe | zxc
I know it would be easy to display like this:
ID_NO | TYPE | PUB_NO
abc | CAT | 222
qwe | ISBN | 222
zxc | ISSN | 222
But I need it in a row instead. I was thinking of getting all PUB_NOs and looping through each to get the rest in a PL/SQL procedure but is this the best approach?
I can't wrap my head around this. I'm not a DB expert and I haven't done any PL/SQL in a very long time.
Thanks for your help
MarcelJohn:
<quote>
I did point out the need for unique types in my original post with the MAX/DECODE solution.
</quote>
Indeed, you did. Sorry about that ... I looked closely only at your last post with the two SQLs and missed the caveat you had included in the first post.
:o) ... couldn't stop myself ... one last loose [but reasonable?!?!] thing [I can think of] to keep those 2 sql different:
insert into pubDetail values (333,'333');
â¦
flip@FLOP> select * from pubDetail;
Â
PUB_NO PUB_DATA
111 111
222 222
333 333
Â
flip@FLOP> select * from test_a;
Â
ID_NO TYPE PUB_NO
abc CAT 111
def CAT 222
qwe ISBN 111
xyz ISSN 222
Â
flip@FLOP> SELECT d.pub_no, a.cat, b.isbn, c.issn
2 FROM pubDetail d,
3 (SELECT pub_no, id_no cat
4 FROM test_a
5 WHERE type = 'CAT') a,
6 (SELECT pub_no, id_no isbn
7 FROM test_a
8 WHERE type = 'ISBN') b,
9 (SELECT pub_no, id_no issn
10 FROM test_a
11 WHERE type = 'ISSN') c
12 WHERE d.pub_no = a.pub_no(+) AND
13 d.pub_no = b.pub_no(+) AND
14 d.pub_no = c.pub_no(+)
15 ;
Â
PUB_NO CAT ISBN ISSN
111 abc qwe
222 def xyz
333
Â
flip@FLOP> SELECT d.pub_no
2 ,MAX(DECODE(a.type, 'CAT' , id_no)) cat
3 ,MAX(DECODE(a.type, 'ISBN', id_no)) isbn
4 ,MAX(DECODE(a.type, 'ISSN', id_no)) issn
5 FROM pubDetail d, test_a a
6 WHERE d.pub_no = a.pub_no
7 AND a.type IN ('CAT', 'ISBN', 'ISSN')
8 GROUP BY d.pub_no
9 ;
Â
PUB_NO CAT ISBN ISSN
111 abc qwe
222 def xyzHope you take this only as a bit of humor [about incomplete requirements] ⦠I like your stuff! -
Transfer multiple rows to function module
Hi Friends,
I have th following requirement.
In Visula composer I have 1 Input table.
Here I read rows from material master and I have a checkbox and a button transfer.
And I have a second table view with similar fields.
In the first table view I check several rows and when I press transfer.
Now I want all the checked rows of table view 1 to appear in table view 2.
For this reason I want to create a FM to keep the data in a table I have created.
In fact, I want to transfer the rows from table view 1 in a temp table and from there into table view 2.
But how can I transfer multiple rows from visual composer into the temp table by means of FM.
Many thanks for your help.
RG. JimbobConnect your table view 1 to your FM (make sure you flip the table on your FM to a input port).
Select the connector you just created and configure element. Set mapping scope to 'Selected Data Rows'. -
Which is the pratical limit on how many rows compose a report ?
Hi guys,
I've a report which could contain a very big number of rows (probably 500k).
When I work with "normal" number (10 - 20000) it works correctly (of course it's not very fast in the last case :-) but when the number of rows goes more up (200k/500k) the report never compair!
Which components are "stressed" during this operation?
Can I tune something?
So, I know that there's not a limit theorically but which is the pratical limit (if there's it)?
King regards
MauroMauro,
All the rows of a report will be fetched, up to the maximum number you specify.
In my opinion, there is no logical reason to provide pagination controls for 200K rows, or even 10K rows. The typical end user is never going to want to flip through that many results - they'll refine their query.
I say - use common sense and give an upper bound as low as possible. You should not use the pagination controls to determine the total row count - that is extraordinarily inefficient.
Joel -
Urgent: row level security with VPD
Has any one implemented the row level security in Virtual private database(VPD) for Discoverer.
Please let me know how well does it work with discoverer and are there any flip sides that one needs to be aware of.
Thanksauthenticating / authorizing part is take care by weblogic and then USER variable initialized and you may use it for any initblocks for security.
Init block for authenticating / authorizing and session variables are different, i guess you are mixing both. -
What is the flip or scroll view i have seen on firefox
when a image search comes up, the images are all in a row and flip or scroll left to right, al on a black back ground
Where does that happen?
The site may be using a lightbox or similar script to achieve this.
*http://en.wikipedia.org/wiki/Lightbox_%28JavaScript%29
Maybe you are looking for
-
Not enough memory to manipulate image
I created a report to print out 10 graphs(control image). But the program gives error:not enough memory to manipulate image. I did the same in other programs, I have the same number of graphs, there was no problem. what's the real reason of this erro
-
IDVD how to deal with films presented in "letterbox format"?
I have two of them, and on my TV I can choose the setting that allows me to watch with the picture occupying the entire screen. However, when watching on my laptop, I have to go with the stupid "letterbox" format. Is there a setting that fixes the is
-
Cisco 2504 Capability Question
Hello, I need to replace a 4402 with a 2504 controller and put a 2504 controller in the DMZ for guest access. This would be the setup: The 4402 would be replaced at a remote site (not hreap) and support a couple of wlans, one of those would not be l
-
What is the workbench request and customizing request.
can anybody explain what is workbench request and what is customizing request.
-
I am working on medical office in which they have a RAID 1 for the operating system (Windows Server 2008 R2) and a solo drive for the databases (2). The second drive does not have any RAID and I was going to to buy a new HDD to do another RAID 1, but