Help with a year planner.

Hi there,
I've been trying to create a year planner and been advised to use zellers algorithm to ensure the correct date is placed in each cell of the planner.
the algorithm given was:
IF M is january or M is february
add 12 onto the M
subtract 1 from the year
that confused me..could anyone shed some light
then this
W=D+int(((M+1)*26)\10+y+Int(Y/4)+Int(C/4)+5*C
WD=( W MOD 7)
where:
D = day
M = month
Y = right two digits of the year
C = left two digits of the year
WD= week day (the remainder of (the modulus) of W divided by 7
it should return a value like:
0 for sat
1 for sunday
2 for monday etc
but what i dont understand is how to use that to create the cells and ensure the correct date is in each. Especially since months are shown at once.
can anyone shed some light on this?

I don't know what zellers algorithm is, but this is a display of the full year (with back/forward buttons for other years), if that is what you're after (needs testing).
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Calendar;
class YearPlanner extends JFrame implements ActionListener
  int year = Calendar.getInstance().get(Calendar.YEAR);
  JLabel days[][] = new JLabel[12][49];
  String weekdays[] = {"S","M","T","W","T","F","S"};
  JButton back = new JButton("<<< Back 1 Year");
  JButton forward = new JButton("Forward 1 Year >>>");
  JLabel lblYear;
  String sMonths[] = {"January","February","March","April","May","June","July",
                      "August","September","October","November","December"};
  public YearPlanner()
    super("Year Planner");
    setSize(900,485);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container frame = getContentPane();
    frame.setLayout(new BorderLayout());
    JPanel monthHolder = new JPanel(new GridLayout(2,6));
    JPanel month[] = new JPanel[12];
    for(int i = 0; i < month.length; i++) month[i] = new JPanel(new BorderLayout());
    JPanel monthName[] = new JPanel[12];
    for(int i = 0; i < monthName.length; i++) monthName[i] = new JPanel(new FlowLayout());
    JPanel monthDays[] = new JPanel[12];
    for(int i = 0; i < monthDays.length; i++) monthDays[i] = new JPanel(new GridLayout(7,7));
    JLabel lblMonths[] = new JLabel[12];
    for(int i = 0; i < days.length; i++)
      for(int ii = 0; ii < days.length; ii++)
days[i][ii] = new JLabel();
days[i][ii].setFont(new Font("Ariel",Font.BOLD,10));
days[i][ii].setPreferredSize(new Dimension(25,25));
if(ii < 7) days[i][ii].setText(" "+weekdays[ii]);
monthDays[i].add(days[i][ii]);
for(int i = 0; i < lblMonths.length; i++)
lblMonths[i] = new JLabel(sMonths[i]);
monthName[i].add(lblMonths[i]);
month[i].add(monthName[i],BorderLayout.NORTH);
month[i].add(monthDays[i],BorderLayout.SOUTH);
month[i].setBorder(BorderFactory.createEtchedBorder());
monthHolder.add(month[i]);
back.addActionListener(this);
forward.addActionListener(this);
JPanel lower = new JPanel();
lower.add(back);
lblYear = new JLabel(" Year Planner for "+year+" ");
lower.add(lblYear);
lower.add(forward);
frame.add(monthHolder,BorderLayout.NORTH);
frame.add(lower,BorderLayout.SOUTH);
setDates();
setLocation(100,100);
setVisible(true);
public void setDates()
Calendar cal = Calendar.getInstance();
for(int x = 0; x < days.length; x++)
for(int i = 7; i < days[x].length; i++)
days[x][i].setText("");
cal.set(year,x,1);
int firstDay = cal.get(cal.DAY_OF_WEEK)-1+7;
int ii = 1;
for(int i = firstDay; i<firstDay+31; i++)
if(ii < 10) days[x][i].setText(" "+ii);
else days[x][i].setText(""+ii);
ii++;
cal.add(cal.DATE,1);
if(ii > 27 && cal.get(Calendar.MONTH) != x) break;
lblYear.setText(" Year Planner for "+year+" ");
public void actionPerformed(ActionEvent ae)
if(ae.getSource() == back) year--;
else year++;
setDates();
public static void main(String args[]){new YearPlanner();}

Similar Messages

  • Be grateful for your help with Photoshop Elements which I have been using for several years.

    Be grateful for your help with Photoshop Elements which I have been using for several years.  Does Elements need to have access to ‘My Pictures’ on Windows as when I remove Photos from ‘My Pictures’, Elements later, when backing up, gives a message that it is unable to ‘reconnect’ to the same picture on elements.  On other occasions when removing a photo from Elements catalogue I also get a similar message when backing up saying ‘unable to reconnect’.  1. Is there a relationship between Elements and My Pictures and is Elements dependant on    the Windows ‘My Pictures’? 2. Why does some photos in Elements in some cases cause them to multiply e.g. double; triple; quadruple; and on occasions even more?  Is there something I need to do to stop this or an easy way I can remove the multiples without spending hours doing it manually one by one?  Am I doing something wrong? My O/S is Windows XP SP2 and windows Vista on my Laptop.  I have been using Elements 5 and have just purchased Photoshop Elements 8.0. (Upgrade) and about to install it. Be grateful for any advice as I do enjoy using the program if only I can resolve this issue.  I am not a PC wiz and mainly use Elements to catalogue photos from which I compile collections and from them slide shows with music.  Any advice appreciated Sonny.t PS Have tried to post this previously but without success so hoping to see message appear and a +response

    The organizer doesn't care where you send your photos when you download them via the downloader or where they happen to be when you first bring them in if you use the Get Photos command, but once your pics are in the Organizer, you *must* move them from within organizer or it can't find them. You don't have to use My Pictures at all if you don't want to, but regardless of the folder where you put your photos, if you want them someplace else, you use organizer to do it.

  • I need advise and help with this problem . First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product . At the present time I'm having lots of problems with the router so I was looking in to

    I need advise and help with this problem .
    First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product .
    At the present time I'm having lots of problems with the router so I was looking in to some info , and come across one web site regarding : port forwarding , IP addresses .
    In my frustration , amongst lots of open web pages tutorials and other useless information , I come across innocent looking link and software to installed called Genieo , which suppose to help with any router .
    Software ask for permission to install , and about 30 % in , my instinct was telling me , there is something not right . I stop installation . Delete everything , look for any
    trace in Spotlight , Library . Nothing could be find .
    Now , every time I open Safari , Firefox or Chrome , it will open in my home page , but when I start looking for something in steed of Google page , there is
    ''search.genieo.com'' page acting like a Google . I try again to get raid of this but I can not find solution .
    With more research , again using genieo.com search eng. there is lots of articles and warnings . From that I learn do not use uninstall software , because doing this will install more things where it come from.
    I do have AppleCare support but its to late to phone them , so maybe there some people with knowledge , how to get this of my computer
    Any help is welcome , English is my learned language , you may notice this , so I'm not that quick with the respond

    Genieo definitely doesn't help with your router. It's just adware, and has no benefit to you at all. They scammed you so that they could display their ads on your computer.
    To remove it, see:
    http://www.thesafemac.com/arg-genieo/
    Do not use the Genieo uninstaller!

  • I want to add new songs to my ipod.  When I set it up with itunes years ago I had a different computer that I no longer have.  Now it will not let me add new songs to my ipod shuffle without erasing everything that is already on it.  Help!!!

    I want to add new songs to my ipod.  When I set it up with itunes years ago I had a different computer that I no longer have.  Now it will not let me add new songs to my ipod shuffle without erasing everything that is already on it.  Help!!!  Is there any way around this?

    Yes, I was aware of this but the phrase "Any items imported from audio CDs or acquired from other sources will not copy from your device to the iTunes library." is what worries me.  Will this eliminate my Notes, Calendar Events, etc or will it apply mostly just to the music?

  • I have problem with my iphone 4s my battery is not keeping charge. how can I get help with this one. it is less than a year that I purchased this cell.

    I have problem with my iphone 4s my battery is not keeping charge. how can I get help with this one? it is less than a year that I purchased this cell.

    I would like to know the answer to that one.  I realized this was happening just after upgradeing my iOS to 6.  Then when I looked up my purchase date, I was about 5 days past my one year warranty.  So I'm dead in the water.  Apple will replace the battery, but it will be about $80+.  I took it to the Apple store, and they checked a bunch of stuff, but said that it seemed ok.  I'm debating getting a battery for a more reasonable price off of ebay.  But if it's the iOS thats draining the battery, then I'm not going to be able to help it.  I wish I knew a better way to tell if its the battery, the phone, or the iOS.

  • HELP. 3 years ago I purchased cs3. I had troubles with registering the serial number and used my university's suite instead, and (stupidly) did not sort it out. I am now wanting to subscribe to the online creative cloud with my cs3 discount. Is there any

    HELP. 3 years ago I purchased cs3. I had troubles with registering the serial number and used my university's suite instead, and (stupidly) did not sort it out. I am now wanting to subscribe to the online creative cloud with my cs3 discount. Is there any way to find / prove that I had purchased cs3 and locate a serial number? On my Adobe account it does not show my purchase of cs3 (I am guessing because of the trouble with registering my serial number). I have moved house 3 times since the purchase and am unable to locate the packaging or disk. Is there any way to prove my purchase without any serial number or showing under my Adobe account? Please help! Thanks

    The CS3 discount offer is only for retail online product, it does not include education or volume license purchases. Refer to Terms and Conditions | Adobe
    To check whether you had retail CS3 purchase, we need proof of purchase as well as serial number, without which the issue can not be resolved.
    Regards
    Rajshree

  • Having trouble with image size on new HP2311x display with 4 year old MacBook. Image too small. Do I have to stay in mirror mode? I have messed with OSD and Image Control menus on display and have gotten nowhere. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

  • YEAR PLANNER!

    After months of searching for a simple year planner (The guys in Aberdeen Apple Store wouldn't believe there wasn't such a thing - until they tried to find it!) I've just discovered that iCal in Lion does include a year view.
    So I've just upgraded my Snow Leopard to Lion, only to find that while iCal does now include a 'Year View' - it is not a year planner!
    You cannot select a colour to represent an event - event colours seem to be allocated according to how long they run - so if I'm on a business trip for 2 weeks it will not be the same colour as a repeat trip for 6 weeks! Nor can I view the title of the event without opening it up.
    After repeated searches I have learnt that many others out there have been looking for the same thing for many years - like me too they seem to be prepared to pay for it - OSX not able to run such a thing?!

    Thanks, this looked good on first glance, but it seems to be templates that are created on a computer, printed out and then filled in by hand. I may be wrong but it is not a software based planner that can be printed out as needed with all the info already there.
    Seems I'll have to keep lotus organizer and a spare computer just to do the one job.

  • Help with HP Laser Printer 1200se

    HP Support Line,
    Really need your assistance.  I have tried both contacting HP by phone (told they no longer support our printer via phone help), the tech told me that I needed to contact HP by e-mail for assistance.   I then sent an e-mail for assistance and got that reply today, the reply is as follows  "Randall, unfortunately, HP does not offer support via e-mail for your product.  However many resources are available on the HP web site that may provide the answer to your inquiry.  Support is also available via telephone.  A list of technical support numbers can be round at the following URL........."  The phone numbers listed are the ones I called and the ones that told me I needed to contact the e-mail support for help.
    So here I am looking for your help with my issue.
    We just bought a new HP Pavillion Slimline Desk Top PC (as our 6 year old HP Pavillion PC died on us).  We have 2 HP printers, one (an all-in-one type printer, used maily for copying and printing color, when needed) is connected and it is working fine with the exception of the scanning option (not supported by Windows 7).  However we use our Laser Printer for all of our regular prining needs.  This is the HP LaserPrinter 1200se, which is about 6 years old but works really well.  For this printer we currently only have a parallel connection type cord and there is not a parallel port on the Slimline HP PC.  The printer also has the option to connedt a USB cable (we do not currently have this type of cable).
    We posed the following two questions:
    1.  Is the Laser Jet 1200se compatible with Windows 7?
    and if this is the case
    2.  Can we purchase either a) a USC connection cord (generic or do we need a printer specific cord)? or b) is there there a printer cable converter adapater to attach to our parallel cable to convert to a USB connection?
    We do not want to purchase the USB cable if Windows 7 will not accept the connection, or if doing this will harm the PC.
    We really would appreciate any assitance that you might give us.
    Thank you,
    Randy and Leslie Gibson

    Sorry, both cannot be enabled by design.  That said, devices on a network do not care how others are connected.  You can print from a wireless connection to a wired (Ethernet) printer and v/v.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • WRT310N: Help with DMZ/settings (firmware 1.0.09) for wired connection

    Hello. I have a WRT310N and have been having a somewhat difficult time with my xbox 360's connection. I have forwarded all the necessary ports (53, 80, 88, 3074) for it to run, and tried changing MTU and what-not.
    I don't know if I have DMZ setup incorrectly, or if it's my settings.
    Setup as follows:
    PCX2200 modem connected via ethernet to WRT310N. 
    The WRT310N has into ethernet port 1 a WAP54G, and then upstairs (so that my Mother's computer can get a strong signal) I have another WAP54G that I believe receives its signal from the downstairs 54G. 
    In the back of the WRT310N, I have my computer connected via ethernet port 3, and my Xbox 360 connected via ethernet port 4.
    Now, I first figured I just have so many connections tied to the router and that is the reason for being so slow. However, when I unplug all the other ethernet cords and nothing is connected wirelessly, except for my Xbox connected to ethernet port 4, it is still poor. Also, with everything connected (WAP54G and other devices wirelessly) I get on my PC and run a speedtest.  For the sake of advice, my speedtests I am running on my PC are (after 5 tests) averagely 8.5 Mbps download, and 1.00 Mbps upload, with a ping of  82ms.
    Here is an image of the results:
    http://www.speedtest.net][IMG]http://www.speedtest.net/result/721106714.png
    Let me add a little more detail of my (192.168.1.1) settings for WRT310N.
    For starters, my Father's IT guy at his workplace set up this WRT310N and WAP54G's. So some of these settings may be his doing. I just don't know which.
    "Setup" as Auto-configurations DHCP. I've added my Xbox's IP address to the DHCP reservation the IP of 192.168.1.104. This has (from what I've noticed) stayed the same for days.
    MTU: Auto, which stays at 1500 when I check under status.
    Advanced Routing: NAT routing enabled, Dynamic Routing disabled. 
    Security: Disabled SPI firewall, UNchecked these: Filter Anonymous Internet Requests, Multicast, and Internet NAT redirection.
    VPN passthrough: All 3 options are enabled (IPSec, PPTP, L2TP)
    Access Restrictions: None.
    Applications and Gaming: Single port forwarding has no entries. Port Range Forwarding I have the ports 53 UDP/TCP, 88 UDP, 3074 UDP/TCP, and 80 TCP forwarded to IP 192.168.1.104 enabled. (192.168.1.104 is the IP for my xbox connected via ethernet wired that is in DHCP reserved list)
    Port Range Triggering: It does not allow me to change anything in this page.
    DMZ: I have it Enabled. This is where I am a bit confused. It says "Source IP Address" and it has me select either "Any IP address" or to put entries to the XXX.XXX.XXX.XXX to XXX fields. I have selected use any IP address. Then the source IP area, it says "Destination:"  I can do either "IP address: 192.168.1.XXX" or "MAC address:" Also, under MAC Address, it says DHCP Client Table and I went there and saw my Xbox under the DHCP client list (It shows up only when the Xbox is on) and selected it.  
    Under QoS: WMM Enabled, No acknowledgement disabled.
    Internet Access Priority: Enabled. Upstream Bandwith I set it to Manual and put 6000 Kbps. I had it set on Auto before, but I changed it. I have no idea what to put there so I just put a higher number. 
    Then I added for Internet Access Priority a Medium Priority for Ethernet Port 4 (the port my xbox is plugged into).
    Administration: Management: Web utility access: I have checked HTTP, unchecked HTTPS.
    Web utility access via Wireless: Enabled. Remote Access: Disabled.
    UPnp: Enabled.
    Allow Users to Configure: Enabled.
    Allow users to Disable Internet Access: Enabled.
    Under Diagnostics, when I try and Ping test 192.168.1.104 (xbox when on and connected to LIVE), I get:
    PING 192.168.1.104 (192.168.1.104): 24 data bytes
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    --- 192.168.1.104 data statistics ---
    5 Packets transmitted, 0 Packets received, 100% Packet loss
    Also, when I do Traceroute Test for my Xbox's IP, I just keep getting: 
    traceroute to 192.168.1.104 (192.168.1.104), 30 hops max, 40 byte packets
    1 * * * 192.168.1.1 Request timed out.
    2 * * * 192.168.1.1 Request timed out.
     As for the Wireless Settings, it is all on the default settings with Wi-Fi Protected setup Enabled.
    To add, I have tried connecting my modem directly to the Xbox and my connection is much improved. I have no difficulty getting the NAT open, for it seems my settings are working for that. Any help with these settings would be VERY much appreciated. 
    Message Edited by CroftBond on 02-18-2010 01:09 PM

    I own 2 of these routers (one is a spare) with the latest firmware and I have been having trouble with them for over a year.  In my case the connection speed goes to a crawl and the only way to get it back is to disable the SPI firewall.  Rebooting helps for a few minutes, but the problem returns.  All of the other fixes recommended on these forums did not help.  I found out the hard way that disabling the SPI Firewall also closes all open ports ignoring your port forwarding settings.  If you have SPI Firewall disabled, you will never be able to ping your IP from an external address.  Turn your SPI Firewall back on and test your Ping. 
    John

  • Help with query calculations (recursive)

    Hi All,
    I want some help with a query using a base rate and the result use in the next calculation year.
    Here an example:
    create table rate_type(
    rate_type_id    number,
    rate_desc       nvarchar2(50),
    rate_base_year  number
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (1, 'Desc1', 4.6590);
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (2, 'Desc2', 4.6590);
    create table rates (
    rate_type_id number
    rate_year    number,
    rate_value   number
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2014, 1.4);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2014, 1.4);The calculation for the first year should be the base rate of the rate type. The next year should use the result of the previous year and so on.
    The result of my sample data is:
    2012 = 4.659 + 1.2 + 4.659 * (1.2 * 0.01) = 5.9149
    2013 = 5.9149 + 1.3 + 5.9149 * (1.3 * 0.01) = 7.1859
    2014 = 7.1859 + 1.4 + 7.1859 * (1.4 * 0.01) = 8.4721Query result:
    NAME 2012 2013 2014
    Desc1 5.9149 7.1859 8.4721
    Desc2 XXXX XXX XXXX
    How can I do this in one select statement? Any ideas?
    Thanks!

    Assuming you are on 11.2:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  *
      from  (
             select  rate_desc name,
                     rate_year,
                     result
               from  r
               where rn <= cnt
      pivot (sum(result) for rate_year in (2012,2013,2014))
      order by name
    NAME             2012       2013       2014
    Desc1        5.914908  7.2918018 8.79388703
    Desc2        5.914908  7.2918018 8.79388703
    SQL> Obviously pivoting assumes you know rate_year values upfront. If not, then without pivoting:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  rate_desc name,
            rate_year,
            result
      from  r
      where rn <= cnt
      order by name,
               rate_year
    NAME        RATE_YEAR     RESULT
    Desc1            2012   5.914908
    Desc1            2013  7.2918018
    Desc1            2014 8.79388703
    Desc2            2012   5.914908
    Desc2            2013  7.2918018
    Desc2            2014 8.79388703
    6 rows selected.
    SQL> SY.

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Help with encapsulation and a specific case of design

    Hello all. I have been playing with Java (my first real language and first OOP language) for a couple months now. Right now I am trying to write my first real application, but I want to design it right and I am smashing my head against the wall with my data structure, specifically with encapsulation.
    I go into detail about my app below, but it gets long so for those who don't want to read that far, let me just put these two questions up front:
    1) How do principles of encapsulation change when members are complex objects rather than primitives? If the member objects themselves have only primitive members and show good encapsulation, does it make sense to pass a reference to them? Or does good encapsulation demand that I deep-clone all the way to the bottom of my data structure and pass only cloned objects through my top level accessors? Does the analysis change when the structure gets three or four levels deep? Don't DOM structures built of walkable nodes violate basic principles of encapsulation?
    2) "Encapsulation" is sometimes used to mean no public members, othertimes to mean no public members AND no setter methods. The reasons for the first are obvious, but why go to the extreme of the latter? More importantly HOW do you go to the extreme of the latter? Would an "updatePrices" method that updates encapsulated member prices based on calculations, taking a single argument of say the time of year be considered a "setter" method that violates the stricter vision of encapsulation?
    Even help with just those two questions would be great. For the masochistic, on to my app... The present code is at
    http://www.immortalcoil.org/drake/Code.zip
    The most basic form of the application is statistics driven flash card software for Japanese Kanji (Chinese characters). For those who do not know, these are ideographic characters that represent concepts rather than sounds. There are a few thousand. In abstract terms, my data structure needs to represent the following.
    -  There are a bunch of kanji.
       Each kanji is defined by:
       -  a single character (the kanji itself); and
       -  multiple readings which fall into two categories of "on" and "kun".
          Each reading is defined by:
          -  A string of hiragana or katakana (Japanese phoenetic characters); and
          -  Statistics that I keep to represent knowledge of that reading/kanji pair.Ideally the structure should be extensible. Later I might want to add statistics associated with the character itself rather than individual readings, for example. Right now I am thinking of building a data structure like so:
    -  A Vector that holds:
       -  custom KanjiEntry objects that each hold
          -  a kanji in a primitive char value; and
          -  two (on, kun) arrays or Vectors of custom Reading objects that hold
             -  the reading in a String; and
             -  statistics of some sort, probably in primitive valuesFirst of all, is this approach sensible in the rough outlines?
    Now, I need to be able to do the obvious things... save to and load from file, generate tables and views, and edit values. The quesiton of editting values raises the questions I identified above as (1) and (2). Say I want to pull up a reading, quiz the user on it, and update its statistics based on whether the user got it right or wrong. I could do all this through the KanjiEntry object with a setter method that takes a zillion arguments like:
    theKanjiEntry.setStatistic(
    "on",   // which set of readings
    2,      // which element in that array or Vector
    "score", // which statistic
    98);      // the valueOr I could pass a clone of the Reading object out, work with that, then tell the KanjiEntry to replace the original with my modified clone.
    My instincts balk at the first approach, and a little at the second. Doesn't it make more sense to work with a reference to the Reading object? Or is that bad encapsulation?
    A second point. When running flash cards, I do not care about the subtlties of the structure, like whether a reading is an on or a kun (although this is important when browsing a table representing the entire structure). All I really care about is kanij/reading pairings. And I should be able to quickly poll the Reading objects to see which ones need quizzing the most, based on their statistics. I was thinking of making a nice neat Hashtable with the keys being the kanji characters in Strings (not the KanjiEntry objects) and the values being the Reading objects. The result would be two indeces to the Reading objects... the basic structure and my ad hoc hashtable for runninq quizzes. Then I would just make sure that they stay in sync in terms of the higher level structure (like if a whole new KanjiEntry got added). Is this bad form, or even downright dangerous?
    Apart from good form, the other consideration bouncing around in my head is that if I get all crazy with deep cloning and filling the bottom level guys with instance methods then this puppy is going to get bloated or lag when there are several thousand kanji in memory at once.
    Any help would be appreciated.
    Drake

    Usually by better design. Move methods that use the
    getters inside the class that actually has the data....
    As a basic rule of thumb:
    The one who has the data is the one using it. If
    another class needs that data, wonder what for and
    consider moving that operation away from that class.
    Or move from pull to push: instead of A getting
    something from B, have B give it to A as a method
    call argument.Thanks for the response. I think I see what you are saying.. in my case it is something like this.
    Solution 1 (disfavored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              char theKanji = currentKanjiEntry.getKanji();
              String theReading = currentKanjiEntry.getReading();
              // build and show a flashcard based on theKanji and theReading
              // use a setter to change currentKanji's data based on whether the user answers correctly;
    }Solution 2 (favored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              currentKanji.buildAndShowFlashcard(); // method includes updating stats
    }I can definitely see the advantages to this, but two potential reasons to think hard about it occur to me right away. First, if this process is carried out to a sufficient extreme the objects that hold my data end up sucking in all the functionality of my program and my objects stop resembling natural concepts.
    In your shopping example, say you want to generate price tags for the items. The price tags can be generated with ONLY the raw price, because we do not want the VAT on them. They are simple GIF graphics that have the price printed on a an irregular polygon. Should all that graphics generating code really go into the item objects, or should we just get the price out of the object with a simple getter method and then make the tags?
    My second concern is that the more instance methods I put into my bottom level data objects the bigger they get, and I intend to have thousands of these things in memory. Is there a balance to strike at some point?
    It's not really a setter. Outsiders are not setting
    the items price - it's rather updating its own price
    given an argument. This is exactly how it should be,
    see my above point. A breach of encapsulation would
    be: another object gets the item price, re-calculates
    it using a date it knows, and sets the price again.
    You can see yourself that pushing the date into the
    item's method is much beter than breaching
    encapsulation and getting and setting the price.So the point is not "don't allow access to the members" (which after all you are still doing, albeit less directly) so much as "make sure that any functionality implicated in working with the members is handled within the object," right? Take your shopping example. Say we live in a country where there is no VAT and the app will never be used internationally. Then we would resort to a simple setter/getter scheme, right? Or is the answer that if the object really is pure data are almost so, then it should be turned into a standard java.util collection instead of a custom class?
    Thanks for the help.
    Drake

  • I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in?

    I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in? When I try to press online the same thing pops up and I have no way of logging in or asking for help.

    Hi,
    iChat (it would help to know which version) can accept Apple IDs as valid AIM Screen Names.
    However if you have iChat 5 or earlier you cannot use ones ending in @me.com or @icloud.com issued by iCloud. (they can be used in iChat 6 or Messages as these versions make a double login to AIM and Apple to allow the use of the password).
    In addition if you are using an Apple ID for an AIM Screen Name the password still needs to keep to the 16 character limit that AIM has.
    AN @mac.com name can be used on any version of iChat  (Until the 30th June 2014)
    As it does not need a double check with Apple you can use it to log in to the AIM Web pages
    Login here with an AIM Name registered at AIM or and @mac.com name and see if you get any suspended account messages.
    Sometimes account can be suspended. Usually because something has triggered the "Unusual Activity" item.
    About a year ago many @mac.com users that travelled out of their own country found themselves suspended when they got home.
    If the Name checks out of if an Apple ID the password in known to be 16 characters or Less then do this:-
    In Lion upwards open a Finder Window and use the Go Menu whilst holding down the ALT key.
    Select the Library that appears in the menu list.
    Navigate to Preferences.
    (If you have version earlier than Lion the just navigate to ~/Library/Preferences (that's the Library in you Home - Little House icon - folder)
    Fnd com.apple.ichat.aim.plist (even if you are using Messages)
    Drag the file to the Trash and Restart the app.
    7:39 pm      Thursday; May 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

Maybe you are looking for

  • Loading slide show takes too long - want play to start earlier

    I made a long slideshow with perhaps 80 smallish (700x500) images. It is just a simple timeline with fade ins with varying durations for displaying the images. Most images are shown for a second or more. It takes quite a while to load sometimes. One

  • Services purchase order: flag 'delivery completed'

    hello experts, i'm working in SAP with R3 4.7 for developing funtion / BAPI for a mobile web application for services purchase order. i have a big problem: is it possibile to set the DELIVERY COMPLETED indicator (ELIKZ) in services purchase order via

  • Movie Clips in sequence

    Hello everyone, Question, If you want to play serval movie clips in a row how do you set that up on the time line? Do you use one frame for each movie clip or do you need the same number of frams in the main timeline as there is in the movie clip. Wh

  • In material master costing 1 tab i want to maintain by default as origin

    Hello, i want to maintain in material master costing 1 tab  by default material orgin field has been check where  i do these settings to mainatin sudarshan

  • How to create sine wave?

    How do you create a simple sine wave in Logic, and how do you change the frequency? Logic noob deluxe