Graphics question
I've read how to draw lines and such, but how do you set the color of an individual pixel? Thanks.
Thanks, zadok. I guess what I'm asking is: what is the method I call? drawLine takes a pair of co-ordinates. I just want to set a pixel at (75,105) to Red, then set another pixel at (80,129) to Red...or Green...or whatever color.
Similar Messages
-
MP 1.1 graphics question
Mac Pro 1.1 graphics question
I know this question has probably been posted to death but is it true that in a MP 1.1 we can't use the EVGA GeForce GTX 285? and if not.. what is the best upgrade option? this what I currently have..
NVIDIA GeForce 7300 GT:
Chipset Model: NVIDIA GeForce 7300 GT
Type: GPU
Bus: PCIe
Slot: Slot-1
PCIe Lane Width: x16
VRAM (Total): 256 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x0393
Revision ID: 0x00a1
ROM Revision: 3011
Displays:
Model Name: Mac Pro
Model Identifier: MacPro1,1
Processor Name: Dual-Core Intel Xeon
Processor Speed: 2.66 GHz
Number Of Processors: 2
Total Number Of Cores: 4
I really appreciate the help.. looking for at least 512 memory but was hoping for 1 gig...For what its worth, the NVIDIA GT 120 card will NOT work on the MAC PRO 1,1
As I understand it, the newer mac pros use a 64 bit EFI boot prom, while our older 1,1 machines use a 32 bit EFI. The proms on most newer graphics cards won't initialize right at boot. Some ATI cards supposedly have both 32 and 64 bit firmware on the proms.
I had hoped that if I put both NVIDIA cards in, I might still get the EFI to boot on my old 7300 GT card and then have OS-X recognize the newer card for an additional monitor and/or an openCL GPU. It was relatively cheap, but I never got it to work.
Given the number of web posts that had incorrectly implied the NVIDIA should have worked in my machine, I decided not to try again on one of the more expensive ATI cards. -
Two questions about graphics, which aren't related to each
other:
- I'd like to add vector graphic objects to one of my slides
(some arrows). Captivate seems to have no "draw" module like the
one in Word. There are several less-cool solutions, one of which I
used. But graphic objects right in Captivate would be nice. Any way
to do it? (What I did was copy the background to MS Paint and draw
in some arrows, which have jagged edges because they're diagonal.)
- When I'm documenting the use of input boxes and pull-down
lists, the outline on the box or list is often incomplete, as if
someone erased some random segments. Even a small bitmap image
superimposed to complete the broken line doesn't work-- something
seems to be "on top of" the whole slide and causing this. Any idea
what of the cause?Hi Chris
You said RH and this is posted in the Captivate forums. Do
you really mean RH or is that a mistype?
If you really do mean Captivate, you might find that you
achieve better results by editing the image in TechSmith SnagIt
(assuming you have it available).
Cheers... Rick -
Java2D graphics question ?
hi,
i had to tell that i have absolutely no experience with 2D features, and i would like to embellish my interface without having to read a lot of docs and tutorial, so my question is simple for swing's guru
I would like to apply the GradiantPaint(say form blue to white) to the backgournd color of a
JPanel object, can anyone tell me how to do it ?
thanks for your helpI have never tried this so i cannot tell you for definate extend JPanel similar to this and use JPanelGrad in the exact same way you would JPanel
public class JPanelGrad extends JPanel
GradientPaint gp;
public JPanelGrad(GradientPaint gp)
super();
this.gp=gp;
public JPanelGrad(GradientPaint gp, LayoutManager layout, boolean isDoubleBuffered)
super(layout, isDoubleBuffered);
this.gp=gp;
public void paint(Graphics _g)
super(_g);//this statment will slow down painting and i think it is will make no difference to remove it...
//i think that in JPanel it simply calls paintComponent(g); paintBorder(g); paintChildren(g);
//try it both ways - preferablely remove it
Graphics2D g=(Graphics2D)_g;
g.fill(new Rectangle(0, 0, getWidth(), getHeight()));
g.setPaint(gp);
paintComponent(g);
paintBorder(g);
paintChildren(g);
//these three methods r to be in this order;
JPanelGrad panel=new JPanelGrad(new GradientPaint(0, 0, Color.blue, 10, 0, Color.white));
Simple as. Bamkin -
J2me newbie graphics questions
Hi all.
I've been messing with J2SE for a while but now I'm looking at J2ME for games on mobile phones.
I've got a few questions which I'd appreciate any input on.
1) Could you please point me towards somewhere I can get a comparison of screen dimensions/colour depth of current common mobile phones. E.g. what is the minimum/maxiumum dimensions I could expect to find on current devices capable of using java MIDlets (I'm currently looking at Nokia's N-Gage at 176x208,12bpp and 7210 at 128x128 but I've seen res low as 96x65 mono so any help is much appreciated).
2) As far as I'm aware, I can't scale Graphics image draw function so I'd have to pre-calculate it in code if required. Is this right?
3) I haven't found any way to draw an area of an image (only the entire image) in the basic Graphics class. Is there any way to do this, or even to make a new Image which references the same source data but uses a different stride?
4) I understand that there is no support for translucency, but does punch through transparency work OK? If so then is there any significant hit for using it (in general, as it could vary dramatically with different hardware).
Thanks in advance.
-nmkP.S: Any comparisions of memory size and screen latency would also be helpful. thanks!
-
Graphics question. paint(), repaint(), update()
Hi
I have a GUI which consists of swing components and I want to paint onto them. For example if somebody select a component I want to paint a rectangle around it.
The select event stores the component in a variable and calls repaint(). This shoul call paint() which looks like this:
public void paint( graphics g){
draw the rectangle
super.paint(g);
The rectangle is actually painted for half a second. Then it is gone again. I want to have it painted permanentely. Why is the rectangle erased after that? Is it because of the update() method?
I tried to overwrite the update method with a plain method:
public void update(graphics g) { }
it didnt do anything.
Another question. I have to paint differnt stuff regarding what events are thrown. Is it a good programming style to put all the draw stuff into the paint method and look what happend like:
if(event a)
else if(event b)
...Have you tried putting super.paint(g) before the code to draw the rectangle? I think what's happening is that the super's paint is drawing the component, thus erasing your rectangle.
You may want to check the API for other options. There may be a property that indicates the size and color of a border. It would be easier and probably look better to adjust that, if it exists.
I believe that update() draws a background (just a square of background color) and then calls paint(). If you override it with an empty method, I'd expect that nothing would be drawn. -
Quick graphics question (again)
I'm trying to display a string (and an image) on my applet but I don't want to put the code in the paint() method. The reason is that paint() is called every time the display is refreshed and I just want to display some text (g.drawString) one time only.
So, what is wrong with this code: (from inside my JApplet class)
public void drawTest() {
Graphics g = getContentPane().getGraphics();
g.drawString("My string", 20, 20);
g.dispose();
}I've also tried using:
Graphics g = this.getGraphics();But that doesn't seem to work either.
What am I doing wrong?Getting back to your original question, here's a demo of two of the many ways of combining a string with an image. Your original post mentioned this, but was sketchy...
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import javax.imageio.*;
import javax.swing.*;
public class X {
public static void main(String[] args) throws IOException {
BufferedImage image = ImageIO.read(new URL("http://today.java.net/jag/Image1-large.jpeg"));
String title = "James Gosling";
Font font = new Font("Lucida Sans", Font.PLAIN, 12);
Color foreground = Color.WHITE;
JLabel label = new JLabel(new ImageIcon(labelIt(image, title, font, foreground)));
JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(Color.BLACK);
panel.add(new JLabel(new ImageIcon(image)));
JLabel titleLabel = new JLabel(title, SwingConstants.CENTER);
titleLabel.setForeground(foreground);
panel.add(titleLabel, BorderLayout.NORTH);
JFrame f = new JFrame(title);
Container cp = f.getContentPane();
cp.setLayout(new FlowLayout());
cp.add(label);
cp.add(panel);
f.pack();
f.setLocationRelativeTo(null);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
public static BufferedImage labelIt(BufferedImage image, String text, Font font, Color color) {
BufferedImage result = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g = result.createGraphics();
g.drawRenderedImage(image, null);
Rectangle2D bounds = font.getStringBounds(text, g.getFontRenderContext());
float x = (float)(image.getWidth() - bounds.getWidth())/2;
float y = (float)bounds.getHeight();
g.setColor(color);
g.setFont(font);
g.drawString(text, x, y);
g.dispose();
return result;
} -
Lenovo g505s graphics questions
I just bought a G505s and its a model without the dual graphics, so I was wondering if there is a way for me to add a dedicated card in an expansion slot or does it have an Expansion slot?
Moderator comment: New thread created. Subject edited foe clarity.Hi Nekomayata,
Welcome to Lenovo forums
As I understood that you are looking for additional graphics for your G505s.
As per the specification this model does not have dual graphics card slot.
I would also like to inform you that the graphic card cannot be added to expansion slot as there is no expansion slot present in this model.
Hope this helps! Do post us back for further queries.
Best regards,
Ashwin.S
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
Large trade show graphics - question on laying one graphic all across
Hi I am using PSCS4 and I am on XP.
I thought I would ask this before I began my project.
I have a job to create a trade show booth display. There are 13 wall panels graphics set up. I normally design each one by one in Photoshop. 11 are the same size, one is half the size and one doesn't really apply to this question as it is small and above a door.
I have been instructed to apply a background image of a map of the world to these graphics, but not on each separate graphic, but acorss the whole area of panels. (might be splitting it up in half because there is one side and then other, like an L shape. Here is a photo of a drawing I received with no artwork on it yet.
I wanted to know if there was a way to do this as I think it would get tricky with bleeds involved and such. There are also slats inbetween each panel (as you can see from the photo) and I guess I kinda want things to line it up right. I could do it the way I normally would, just making sure I crop in the right places, but wondered if there was a way to lay it all out somehow differently.
Thank you.Hi Stella.
I'm a little confused about whether you are talking about making the full sized panels for the booth or panels for a perspective view rendering. MTSTUNER has addressed the second possibility. Here's some more info you might find useful either way.
There are 13 wall panels graphics set up. ...11 are the same size, one is half the size and one doesn't really apply to this question as it is small and above a door. ...I have been instructed to apply a background image of a map of the world to these graphics, but not on each separate graphic, but acorss the whole area of panels. (might be splitting it up in half because there is one side and then other, like an L shape.
If I understand you correctly, you are asking how to create the something like below. Except that there will be additional graphics on each panel over the map.
Here is one way.
Make a front view of the walls: First create a rectangle the same aspect ratio as the panels. Size it appropriately. Then copy it and move it to the right the width of the panel. Repeat the process until you have made 13 panels. I have marked the corners with yellow. The door is black (duh!) Now scale the panel to the left of the right inside corner to width 50% to make it a half panel. Now move the panels on the right left until everything lines up again.
Now paste your map in and transform it to match your wall view.
Now split the map into two parts. We need to split it over the door. Thanks to the miracle of plate tectonics we have a convenient place to split the map there. The Atlantic Ocean on a line east of New Foundland and west of Africa. With the Marquee Tool set to Show transform controls, I selected the left half and dragged the right handle to the corner (yellow line). Then did the same thing with the right half, aligning the left edge with the right side of the door. (To avoid resampling the map twice, you could split it before you add it, then transform each half to fit.)
Below is the result. Now you can create your individual panels.
To create the first panel on the left, Ctrl+Click on the panel layer's thumbnail. Select the map layer.
Now copy the selection to a new layer (Ctrl+J). I would name this layer Map Panel 1 (brilliant!). It is now the background for the additional graphics. Repeat for each panel, including the half panel.
Below are the first five panels, comprising the left wall (I would group them). I added a stroke to the outside of the panels to simulate the panel frames.Then nudged each of them right to realign them. Now you may select each panel and add the additional graphics over the map. You will work on one panel at a time, but you can see how the wall looks as a whole. Repeat for the remaining three walls. (Or you could consider the three panels right of the door going aroud the corner as one.)
Whether you are creating full size panels or a perspective view, the above method could work for you. At least conceptually.
To apply the finished artwork to a rendering of the booth, create a perspective view of the room as described by MTSTUNER. Then merge a copy of each wall group into a new wall layer. Apply each new wall layer to the perspective grid. Below, you can see the result. The artwork has been forshortened and skewed to the proper perspective.
(The following Screenshot is presented in DogVision)
FWIW.
Peace,
Lee -
Radeon Graphics Question!
I have acquired (bought) a nice Radeon 7000 graphics card, on eBay several months ago. Though, I am not having problems with it, I am wondering, if this is an actual Mac card, or if it is a "Flashed" PC card, or if it's just compatible with both? (Which I doubt!??!)
Could somebody enlighten me, and tell me what I have?
The specs on the card, are as follows:
Card # - 109-85500-00
Card Model - ATY,RV100
Vendor ID: - $1002 (4098)
ROM Name: - ATY,RV100ad_A
ROM # - 113-85501-226
FCode Version - 1.94
NDRV Version - 1.1.0f53
VRAM Size - 64 MB
It did not come in the original box, just the card alone.
Thanks in advance!!
Powermac G3 MT 333 Mac OS X (10.3.9) Overclckd @ 375 Mhz w/75 Mhz SystmBs w/Fan, 80 GB WesternDGTL HD, 512 RAM, Radeon 7000 64MB, OrangeMicro Firewire/USB card
Powermac G3 MT 375 o'clocked Mac OS X (10.3.9)Thank you for confirming this baffling question I've had for a while.
Now, was this card also known as Radeon 7000 VE? Research from the ATI site points to this.
Another confirmation would be appreciated, but not totally important.
Thank you for your time!!! -
Alpha Channel Graphics question
OK, I'm new to KN; I've used Powerpoint for years. I just got iWork (more for pages than KN but. . . ).
Can I not re-size the picture holders on the templates?
If not, then this is rather annoying. On one template page, the picture is basically all that is there, with a text box for a title. Yet, the holder is so small that it barely fills 1/3rd of the page. Perhaps that is a design preference for someone, but I would much rather have my picture larger.
I use powerpoint in the college classroom and often show maps. I don't want to have some tiny picture with lots of empty space around it.
I did note that I can create my own object area and then resize that, but what's the point of using the cool templates then? When I tried to create my own, I assumed that the neat look (like tape on the chalkboard or push pin on the board) would just show up, and then I could resize.
Nope. In that case all I got was the picture.
Please tell me I am missing something obvious and that if I go to X place I'll find the easy way to resize the "Alpha Channel Graphics" (yes, I did go read the PDF guide to see if there was an answer there).Carl, to stretch the hole, you will need to stretch the entire background graphic. To do this, first set the slide to the master that has the cutout. The cutout is actually a graphic that is covering the entire master, and it is "locked" so that it can't be moved or changed. Click anywhere on the master background (outside of the cutout hole) to select that graphic, and then in the Arrange menu choose "Unlock". Now the cutout image can be freely manipulated, including stretched larger in either or both directions (using either the control handles at the edges and corners of the image, or the Metrics Inspector).
The above procedure will change the master, and so will affect any slide using that master. You are better off to unlock the cutout image on the master, copy it, and then paste it on a separate blank slide. That way, changes that you make to the cutout will only affect that one slide.
I hope this is what you're looking for. As Kyn says, masks give you much more flexibility, and are much easier to use (although admittedly they won't easily give you the borders that some cutouts do). -
Background graphic question?
Hello, I'm very new to using Dreamwaeaver and I'd like to create a background graphic that has text across it so that it is basically in the background at all times on my main web page. I've been looking at inserting the image file and playing with the transparecy feature in the properties of the file but I don't yet understand what I need to do to create this image file for the overall background of the page. Any help is greatly appreciated. Thanks!
Using CSS code either in your external stylesheet (preferred) or between the <style> and </style> tags in your HTML document, you can repeat or tile the image across your page like so.
body {
background: url(some-bg-image.jpg) repeat;
Or if you don't want the image to repeat, you can center the background image and add color to fill in the empty areas around it like this:
body {
background: #FFF url(some-bg-image.jpg) no-repeat center center;
More on Background Images:
http://alt-web.com/Backgrounds.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
Basic graphical question (actionscript/flashbuilder)
I'm a totally newbie trying to create a library of graphical components that I can reuse in applications. I've created two projects in my workspace, one for the widgets and one for the application. When I draw the components onto the design screen, they now paint themselves as opposed to just being empty rectangles, great. They is something I'm missing however in the graphical heirarchy, b/c when I resize them they don't clear. Below is my class hierarchy:
public class WidgetBase extends Canvas
public function WidgetBase()
super();
override protected function commitProperties():void
// The idea here is that since this is a graphical object, all of its properties are probably
// going to cause a redraw
this.invalidateDisplayList();
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
draw(unscaledWidth, unscaledHeight);
protected function draw(unscaledWidth:Number, unscaledHeight:Number):void
graphics.clear();
public class MyWidget extends WidgetBase
public function BreakerWidget()
super();
protected override function draw(unscaledWidth:Number, unscaledHeight:Number):void
super.draw(unscaledWidth, unscaledHeight);
graphics.beginFill(0xee0000, 0.9);
graphics.drawRect(1, 1, unscaledWidth-1, unscaledHeight-1);
What do I have to add to get MyWidget to clear properly?Hi Bob, thanks for getting back to me.
quote:
Originally posted by:
Bob Pierce
"_root.goRandom(this.slideshow_rand_mc.topslide_mc);"
There's a typo in that line - if it's in your code, it won't
work!
Ah, true. The typo actually happened when I was re-writing
the code in post. The actual code in the movie is
_root.goRandom(this.topslide_mc);
This is attached to a keyframe of the container movie-clip
containing the slides MC.
I've put the fla file on our server.
slideshow_random.fla.zip
If you, or someone else could download it and help me find
out what I'm doing wrong, I'd be ever-so grateful. I'm sure it's
something really obvious. Without being very familiar with Flash
and Actionscript, it's hard to explain things, and much easier to
show you the actual Flash file.
The 2 functions are on a keyframe on frame 1 of the root
timeline. The 'goRandom' function is supposed to be called from a
keyframe in 'slideshowRand_MC'. I envisaged calling the random
pause function from another keyframe in the same movieclip.
Thanks again,
Alex -
I'm developing a webdynpro application using a Pie chart. In the chart designer, you can tell it to show the labels. I have this check on. Underneath that there is a field call label format which has "$Label" as a default, if I get rid of this value, my values show in my pie chart. They problem is is that I want to have a "%" sign and the end of the value. For example, the chart shows 95.1, I want it to show as 95.1% This is defined as a string field, so in my code, I tried putting the "%" sign manually, it didn't work. I have a feeling that the "Label Format" field in the chart designer can maybe help me, but I have no clue what to put in the field. Has anyone ever ran across this.
Any reply would be appreciated. Thanks.
Regards,
Rich Heilman
Bump
Message was edited by: Rich Heilman
Message was edited by: Rich HeilmanHI Rich,
check this Doc
http://help.sap.com/saphelp_nw04/helpdata/en/a1/d9883672d57c73e10000009b38f889/plain.htm
it mentions all about the following
Axes and Gridlines
Formatting Axes
Displaying Tick Marks
Displaying or Hiding Axes in a Chart
Changing Number Formats for Axes
Defining the Intersection of Axes
Changing the Scale Style of an Axis
Making Time Scale Settings
Specifying Gap Between Axis and Graphic
Specifying the Width of a Day
Specifying the Date at which the View Starts
Specifying Fill Attributes for Time Axis
Defining a Time Interval Value
Defining a Time Interval Format
Defining an Interval for the Value Axis
Setting Value Ranges
Formatting Value Ranges
Changing Minimum/Maximum Values
Displaying or Hiding Gridlines in a Chart
Data Series and Data Points
Reversing Order of Categories or Values
Changing Values of Data Points
Formatting Data Series and Data Points
Smoothing the Angles of Line Charts
Titles, Data Labels and Legends
Maintaining Chart or Axis Titles
Formatting Chart and Axis Titles
Changing Text of a Text Chart Element
Specifying Position of Axis Labels
Editing and Formatting Data Labels
Adding Data Labels to a Chart
Changing the Position of Data Labels
Adding and Deleting Legends
Formatting Legend Index/Key
hope this solves your problem
Regards,
RK -
I will try to show you what graphics objects i need to create.
I want to show 2 lists (like 1-dimensional arrays ) like this :
xxxxxx|
xxxxxx|
xxxxxx|
(where x is only for formatting reasons because the browser cancels spaces).
Let's say a column of buttons...
1)The number of cells is defined at runtime.
2)I have to set the color of a particular cell to green for example ,showing it also
(colorize for example the n-th cell)
3)But the most difficult part is that, every cell is reppresenting an array of integers
To be more concise this is the animation part of a cache memory simulator.
A direct Mapped cache (like this) is a 1-dimensional array where each cell contains
a varying number of fields ( dynamically created).
It has a fixed number of 3 integers and a number of longs varying from 1 to 32.
The functionality requested is this:
The user sees only this 1-dimensional list (with no contents, just like buttons with no labels) interacting with the other
list (also visible )and when he presses on one of these cells
opens up a horizontal array (Contents)containing:
Contents
Label1----------Label2 ----------Label2---------Label3-------.........---Labeln
------int----|-------(int)--------|-----(long)------|------(long)----- .......|-----(long)---|
( " ----" for formatting only) ).
2 rows:the first with labels and the second with the corresponding content
Which components shoud i use?Any ideas on how to do?Jlists?Tabbed Panes?
How to connect the models ?Can i use create a Jlist of components(for example a Jlist of buttons)?
Thank you very much,
Chris1)Obviously,Jtabbed pane cant help at all.
I confused it with JTABLE which can fit in.
2)if you need snippets of the model here it is:
private class cells {
private short validBit;
private int tagData;
private short deadBit;
protected long[] data;
block = new cells[numLines];
//and also i need the following object
sblock = new cells[sets][numWays];
//where numLines,sets,numWays,number of data, are integers selected at runtime by the user
//(cachesize).To be precise i create: 1) an N x1 array (block)
2)an Nx2 array (sblock) or
3)an Nx4 array (sblock)
of cells -
Ye olde G505s dual graphics question.
Hi, I have seen this topic a couple of times but for higher models than mine - 20255 AMD A8-4500M - as to why there is a dual graphics sticker on the laptop. The other machines do appear to have a discreet GPU linked with Crossfire that was difficult to find. After removing the back cover of my machine I am pretty sure the empty gap on the motherboard to the left of the fan is why myself or Crossfire is never going to find a second graphics processor. Just for peace of mind, so I can stop looking, do Lenovo just stick this sticker on all laptops regardless of capabilities or is the graphics card hidden somewhere really clever?
Thanks in advance to anyone with an answer.If in the device manager you don't see any unknown device than you don't have a discreet graphics card installed.
If you do see an unrecognized device, than apply the solution from this post:
http://forums.lenovo.com/t5/Lenovo-3000-and-Essential/G505s-Windows-7-brightness-issue/td-p/1311281
essentially you need to install the latest AMD Mobility BETA driver (not the regular one). the solution is shown for Win7. Modify it to match your Windows version
Maybe you are looking for
-
SAP Business One Speed problem
Hello All We are using a SAP B1 2007 PL12 and facing a very big problem of performance or Speed currently our database size is more than 50gb and now our consultant recommend us to upgrade 2007 to 8.8. can this upgrade resolve our problem or not?
-
I want to learn how to create an app. Where do I begin?
I want to learn how to create an app. Where do I begin?
-
What's with the CLICKING noise after every edit?
In the latest version of GB, whenever I make a simple splice to a voice track, there's a CLICK artifact at the tail of every edit. In order to remove it, I have to zoom in and really play with the length of the clip to get rid of the click. This is R
-
i have upgrade os 6 on my iphone 4 but now in map application i cant found direction from location to location , message appear direction not found so please tell me solution for that
-
Frequency SQL and Ratio Report
on 10G I have a query that goes something like this (all are VARCHAR, no number fields here). Create Table dnd_freq_dist As SELECT CREDIT_CARD, COUNT(CREDIT_CARD) OVER (PARTITION BY CREDIT_CARD) as CREDIT_CARDfreq, LOYALTY,