Need help with 'post link to facebook' button in php

hi guys,
thanks for the interest in my post...
i want to have a button at the bottom of my main page layout (main.php) of the facebook logo where visitors can click on it to submit the page as a link to facebook.
how can i set the button so it will post the link to whichever page the visitor is viewing i.e. when they are reading a news article the button action will post main.php?id=news and when they are on home, main.php?id=home.
thank you very much and i hope to hear form you.
m

Quote from: tigers71 on 14-December-14, 00:47:36
If anyone can link the customerchecklist.doc on the MSI website I would greatly appreciate it.  I need to RMA my laptop, and while I printed out the RMA form, I didn't print out the customer checklist document that goes with it.
And as the original email was in my spam folder, I must have deleted it, so I don't have the link to the page the checklist is on.       I had an old link to the checklist from when I had to RMA my laptop last year, but that is no longer valid.   So if anyone has had a recent RMA of their laptop, if you can post the link, or send it to me in PM, many thanks.
if you bought laptop from local store then you can just go to local store and RMA it there they will then pack it in and send it away to a MSI service in your country or maybe nearby country that can do repairs.

Similar Messages

  • I need help with circular linked list

    Hi,
    I need help with my code. when I run it I only get the 3 showing and this is what Im supposed to ouput
    -> 9 -> 3 -> 7
    empty false
    9
    empty false
    3
    -> 7
    empty false
    Can someone take a look at it and tell me what I'm doing wrong. I could nto figure it out.
    Thanks.This is my code
    / A circular linked list class with a dummy tail
    public class CLL{
         CLLNode tail;
         public CLL( ){
              tail = new CLLNode(0,null); // node to be dummy tail
              tail.next = tail;
         public String toString( ){
         // fill this in. It should print in a format like
         // -> 3 -> 5 -> 7
    if(tail==null)return "( )";
    CLLNode temp = tail.next;
    String retval = "-> ";
         for(int i = 0; i < -999; i++)
    do{
    retval = (retval + temp.toString() + " ");
    temp = temp.next;
    }while(temp!=tail.next);
    retval+= "";}
    return retval;
         public boolean isEmpty( ){
         // fill in here
         if(tail.next == null)
              return true;
         else{
         return false;
         // insert Token tok at end of list. Old dummy becomes last real node
         // and new dummy created
         public void addAtTail(int num){
         // fill in here
         if (tail == null)
                   tail.data = num;
              else
                   CLLNode n = new CLLNode(num, null);
                   n.next = tail.next;
                   tail.next = n;
                   tail = n;
         public void addAtHead(int num){
         // fill in here
         if(tail == null)
              CLLNode l = new CLLNode(num, null);
              l.next = tail;
              tail =l;
         if(tail!=null)
              CLLNode l = new CLLNode(num, null);
              tail.next = l;
              l.next = tail;
              tail = l;
         public int removeHead( ){
         // fill in here
         int num;
         if(tail.next!= null)
              tail = tail.next.next;
              //removeHead(tail.next);
              tail.next.next = tail.next;
         return tail.next.data;
         public static void main(String args[ ]){
              CLL cll = new CLL ( );
              cll.addAtTail(9);
              cll.addAtTail(3);
              cll.addAtTail(7);
              System.out.println(cll);          
              System.out.println("empty " + cll.isEmpty( ));
              System.out.println(cll.removeHead( ));          
              System.out.println("empty " + cll.isEmpty( ));
              System.out.println(cll.removeHead( ));          
              System.out.println(cll);          
              System.out.println("empty " + cll.isEmpty( ));
    class CLLNode{
         int data;
         CLLNode next;
         public CLLNode(int dta, CLLNode nxt){
              data = dta;
              next = nxt;
    }

    I'm not going thru all the code to just "fix it for you". But I do see one glaringly obvious mistake:
    for(int i = 0; i < -999; i++)That says:
    1) Initialize i to 0
    2) while i is less than -999, do something
    Since it is initially 0, it will never enter that loop body.

  • No Qualified People Here?   Need Help with Contact - Linking Email

    I have two pages - XML, I'll post photos . Just need to link it to my email and also I page to link social buttons.

    It is getting late here, nearly 3:00 am.
    I'll get back to you later on. But I am still in a quandary regarding the question. What I have now is
    you post photos, presumably to the website
    you send an email to yourself with a link to the image
    somewhere (please state where) you want social media images with their relative links
    I just want to link it to my own email - probably refers to point 2 above
    so when someone sends it to me - someone sends what to you. Do you post the iphoto or does it get uploaded by someone else.
    we need to disregard the XML-file

  • Need help with href link that submits

    I need some help. I dynamically create HTML that displays a horizontal row of page numbers in Position 8. Although they look like page numbers to the use, are not true Apex pages, but rather "logical" pages that change the content in a single Apex physical page. The URL that gets returned from the HREF sets a variable in the page. Then I need a submit to occur so that all my "after submit" processes run, and the page re-renders. Is this even possible? I've been unsuccessful so far.
    Thanks.

    Martin,
    Two things...
    1. Be careful about "hard coding" values in a link. I don't know if you've already done this, but the link should use substitution variables as so...
    f?p=&app_id.:&app_page_id.:&app_session.::NO::P94000_LOGICAL_PAGE_NUM:2
    When the page renders each substitution variable will be replaced with the correct value.
    2. Not that it really matters, but you named your variable starting with P94000. Typically this would indicate the variable appears on page 94000. Is this the case?
    The problem with what you want to do is that it can be done so many different ways. Each way is not necessarily better than the other. Number 1 above is using a link in the traditional sense. It's a link to the same page (achieved by using app_page_id). It will not submit the page but it contains enough information to set the value of a variable and you can code off of that variable's value.
    You could use a JavaScript trick, but I wouldn't bother for this. In addition, you could use the request value over a variable value to feed off of but since you already started with the variable I'd stick with that.
    The first thing you need to do is figure out if your variables value is being set with the link... Let me know if you have more questions.
    Regards,
    Dan

  • Need help with different link styles on same page

    Hello,
    I'm using Dreamweaver CS4 on a PC.
    I have searched through a lot of posts over the last couple of days, I've tried the projectseven.com tutorial, google'd, etc. but still can't figure it out.....
    All I want to do is apply a different link colour to some links in the footer of my page. Elsewhere through the site I have set the colour to blue (for the link) and orange (for the hover) - for the footer links I want the link to be white and the hover colour to stay orange.
    The problem with the projectseven tutorial is that it doesn't seem to apply to CS4 and I kept getting error messages when trying to apply a new CSS rule - there's no Class|Tag|Advanced options as per the instructions ....
    I've copied the code of my page to this. The links which I want to apply a different style to are contained in the Div Tag called "Footer-Navigation-Bar" .
    Could someone please give me some instructions or point me in the right direction please??
    Many thanks,
    Vickie
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Subscribe to Family Australia - it's free!</title>
    <!-- TemplateEndEditable -->
    <link href="../family-subscribe.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    a:link {
    color: #30C;
    text-decoration: none;
    a:hover {
    color: #F30;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    a:active {
    text-decoration: none;
    -->
    </style></head>
    <body>
    <div id="container">
      <div id="banner">
        <ul id="family-subscribe-menu" class="MenuBarHorizontal">
          <li><a href="../index.html">Home</a>      </li>
          <li><a href="../subscribe.html">Subscribe</a></li>
          <li><a href="../family-advertise.html">Advertise</a>      </li>
          <li><a href="../family-articles.html">Articles</a></li>
    <li><a href="../family-sign-in.html">Issues</a></li>
          <li><a href="../family-contribute.html">Contribute</a></li>
    <li><a href="../family-contact.html">Contact</a></li>
        </ul>
    </div>
        <div id="sidebar"><a href="../family-sign-in.html"><img src="../images/launch-issue.jpg" alt="launch-issue" width="220" height="380" hspace="4" /></a>
          <div id="sidebar-image2">
            <p><img src="../images/Sleeping bag for web.jpg" width="220" height="151" alt="sleeping-bag" /></p>
            <p>Kozy Koala™ Pillow Sleeper is ideal for those  summer nights when the kids want to sleep out or when you go camping. The  all-in-one pillow camper consists of …. [MORE]</p>
          </div>
          <div id="sidebar-image3">
            <p><img src="../images/solrx for web.jpg" width="220" height="164" alt="sunscreen" /></p>
          SolRX® Sunscreens are very sweat and water  resistant – ideal for anyone who leads an active outdoor lifestyle … whether  you’re in the water or not! [MORE]</div>
      </div>
        <!-- TemplateBeginEditable name="main-content-region" -->
        <div id="main-content">main content</div>
        <!-- TemplateEndEditable -->
      <div id="footer">
    <div id="footer-navigation-bar"><a href="../family-about.html">about</a> | <a href="../family-advertise.html">advertise</a> | <a href="../family-contribute.html">contribute</a> | <a href="../family-contact.html">contact</a> | <a href="../family-unsubscribe.html">unsubscribe</a></div>
          <div id="footer-text">Family Australia | ABN 33150685385 | For all advertising enquiries please contact <a href="mailto:[email protected]">[email protected]</a><br />
    Copyright © 2010 Family Australia. All rights reserved.
    </div>
      </div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("family-subscribe-menu", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

    The links which I want to apply a different style to are contained in the Div Tag called "Footer-Navigation-Bar" .
    a:link {
    color: #30C;
    text-decoration: none;
    a:hover {
    color: #F30;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    a:active {
    text-decoration: none;
    Hello
    You can see above the CSS that applies to your links.  If you have links that you want to style in a diferent way, just write the rule Like this:
    #Footer-Navigation-Bar a:link {
    color: red;
    text-decoration: none;
    Or whatever.  There are other ways but this will do you as you already have those links you want styled differently in a div with its own ID.  The new rule should come after the other rules in your CSS I think to make sure of the cascade although thinking about it,  there's something called specificity in CSS which means that the rule that I suggest will win out anyway.  All that you are doing in my suggestion is selecting the a:link that is a descendant of an element with that particular ID.
    I hope that helps.  I'm a bit of a novice and might have got a bit jumbled with the cascade/specficity thing but hey, I reckon that will get you where you want to go....
    Martin.

  • Need help with connected / linked pop-up menus

    I want to select a preset.
    What I did is create 2 pop-up menus. The first with the preset folders and the second with the presets from that folder.
    Each pop-up group has a pop-up and a static field with the current choise.
    After selecting a different value from the first pop-up menu I want to have the second popup menu filled with the new, right presets of that folder.
    The first time everything works correct.
    However when selecting a different folder I see that the "preset table"  is filled with the correct new preset of that folder. Also the static field below the second pop-up menu shows the first value of the correct new presets. But the second pop-up menu itself still contains the presets of the first folder and not the new folder.
    Yet in the Observer I see that the preset table contains the right and new presets.
    My code is below.
    I based it on the sample in the SDK manual.
    Question: How can I update the second pop-up menu so that the pop-up menu shows the right presets.
    Code below
    local LrApplication = import 'LrApplication'
    local LrPathUtils = import 'LrPathUtils'
    local LrFileUtils = import 'LrFileUtils'
    local LrBinding = import "LrBinding"
    local LrDialogs = import "LrDialogs"local LrFunctionContext = import "LrFunctionContext"
    local LrView = import "LrView"
    local bind = LrView.bind -- shortcut for bind() method
    --     https://github.com/kikito/inspect.lua
    local inspect = require 'inspect'
    local logFilename = 'PresetList'
    local myLogger = import 'LrLogger'( logFilename )
    myLogger:enable( "logfile" )
    local logPath
    Name          emptyLogFile
    Purpose          Clears the existing log file.
    From cookbook: http://cookbooks.adobe.com/post_Clearing_your_logfile_automatically-19677.html
    function emptyLogFile()
    --local myLogger = import 'LrLogger'( 'Stash' )
    myLogger:disable()
    logPath = LrPathUtils.child(LrPathUtils.getStandardFilePath('documents'), logFilename .. ".log")
    if LrFileUtils.exists( logPath ) then
    local success, reason = LrFileUtils.delete( logPath )
    if not success then
    logger:error("Error deleting existing logfile!" .. reason)
    end
    end
    myLogger:enable( "logfile" )
    end
    Name          getLocationLogFile.
    Purpose          Returns the full path of the current log file.
    function getLocationLogFile()
    return logPath
    end
    local function getPresetFolders()
    -- Get all folders with presets
        local lrPresetFolders = LrApplication.developPresetFolders()
        local presetFolderCache = {}
    local record = {}
        for i, fo in ipairs( lrPresetFolders ) do
    record = {title = fo:getName(), value = fo }
    --record = {title = fo:getName(), value = fo:getName() }
    --myLogger:info( "folder name = " .. fo:getName() )
    table.insert ( presetFolderCache, record )
    end
    --     myLogger:info("Voor de listing")
    --     myLogger:info("preset Folders : " .. inspect (  presetFolderCache ) )
    return presetFolderCache
    end
    local function getPresets ( folderObject )
    local presets = folderObject:getDevelopPresets()
    local presetCache = {}
    local record = {}
    for j, p in ipairs( presets ) do
    record = {title = p:getName(), value = p:getName() }
    --record = {title = p:getName(), value = p:getName() }
    myLogger:info( "getPresets = " .. p:getName() )
    table.insert ( presetCache, record )
    end
    myLogger:info("presets : " .. inspect (  presetCache ) )
    return presetCache
    end
    local function ChoosePreset()
    emptyLogFile()
    local presetFolders = getPresetFolders()
    local currentPresetFolder = presetFolders[1]["value"]
    local presets = getPresets ( currentPresetFolder )
    myLogger:info(presets)
    --     myLogger:info("preset Folders : " .. inspect (  presetFolders ) )
    LrFunctionContext.callWithContext( 'Pop-up example', function( context )
    local f = LrView.osFactory() -- obtain view factory
    local properties = LrBinding.makePropertyTable( context ) -- make prop table
    -- create some keys with initial values
    properties.presetFolder = presetFolders[1]["value"] -- for radio buttons and pop-up menu
    properties.preset = presets[1]["value"]
    properties:addObserver( 'presetFolder', function( properties, key, newValue )
    myLogger:info("Observer - get preset list" )
    currentPresetFolder = properties.presetFolder
    presets = getPresets ( currentPresetFolder )
    myLogger:info(presets)
    myLogger:info("Observer - Preset table: " .. inspect ( presets ) )
    --     Set the new value
    properties.preset = presets[1]["value"]
    myLogger:info("Observer: " .. presets[1]["title"] )
    end )
    --     myLogger:info("presetFolder = " .. properties.presetFolder )
    --     myLogger:info("preset = " .. properties.preset )
    local contents = f:column { -- create view hierarchy
    fill_horizontal = 1,
    spacing = f:control_spacing(),
    bind_to_object = properties, -- default bound table is the one we made
    f:group_box {
    title = "Preset folders",
    fill_horizontal = 1,
    spacing = f:control_spacing(),
    f:popup_menu {
    value = bind 'presetFolder', -- current value bound to same key as static text
    items = presetFolders
    f:static_text {
    fill_horizontal = 1,
    title = bind 'presetFolder', -- bound to same key as current selection
    f:group_box {
    title = "Presets",
    fill_horizontal = 1,
    spacing = f:control_spacing(),
    f:popup_menu {
    value = bind 'preset', -- current value bound to same key as static text
    items = presets
    --     items = getPresets ( currentPresetFolder )
    f:static_text {
    fill_horizontal = 1,
    title = bind 'preset', -- bound to same key as current selection
    local result = LrDialogs.presentModalDialog( -- invoke the dialog
    title = "Select preset",
    contents = contents,
    end
    end
    -- Now display the dialogs
    ChoosePreset()

    That should work because you are likely to be creating a new table each time computeNewItems() executes..
    Sometime the bind function doesn't recognise whether the contents of a table bound to a property changes. So if you use something like this:
    local myItems = computeNewItems() -- compute array of tables with title and value members
    properties['myPresetItems'] = myItems --  assign to bound member of property table.
    it will work the first time. If you then do this:
    myItems = computeNewItems() -- compute array of tables with title and value members but using existing variable
    properties['myPresetItems'] = myItems --  assign to bound member of property table. Change might not be noticed by bind.
    In this instance you would need to reassign the same value again. i.e.
    properties['myPresetItems'] = myItems --  assign to bound member of property table again to force bind to check for table values.
    Setting a property with the same value twice seems to trick bind into checking to see whether you have bound a table. I'm not sure whether this trick is only required on some versions of LR (e.g. LR 2) or only on one of the platforms, but even if it isn't required in LR 5 it will help improve your backwards compatibility and it shouldn't cause any harm to continue using it in LR 5.
    Matt

  • Cocoa: Need help with binding a pop-up button to array

    I am having the hardest time doing something that seems like it should be really easy... I'm not sure this is the right place for something as basic as this but I can't find any other active Cocoa development forums... any recommendations there as well?
    I'm creating a simple address book-like app to help clarify my knowledge on IB and bindings and core data. I want to have an NSPopUpButton to hold a list of states, which I've created in an NSMutableArray in the window controller. (Maybe this is the wrong place to put it?) I actually managed to get the array values to show up in the window BUT I can't get the value out! When I save the Person data object, it shows as nil.
    It's very very likely I'm binding it incorrectly. Right now, all I've done is bound "Content Values" to File's Owner.states. The "Content" binding indicates it's supposed to be an array controller, but do I really need an array controller for a static array? That seems like overkill. And then, even if all I need to do is bind the value, how do I get the value OUT when I go back to my XCode controller to save the values??
    I've been browsing the usual suspects Cocoa/XCode books in Safari/Oreilly but I can't seem to find the answers. Any help or points in the right direction is much appreciated

    Jennifer Mitchell1 wrote:
    So, here's what I've done and it seems to work. Can anybody suggest improvements?
    - I have a NewPersonController which has an NSMutableArray *states and NSPopUpButton *stateDropdown
    - The *states array is generated with NSStrings of all the state abbreviations
    - In the NIB window, I bind the NSPopUpButton to the File's Owner states object. (File's Owner is the controller class.)
    Your fundamental problem is that you are trying to use bindings incorrectly. You don't have to use them at all. You can use an NSPopUpButton without bindings. But if you want to use bindings, you can't take shortcuts. It will just die with an incomprehensible error or just not work.
    I wish I could put the initialization of the states array in the awakeFromNib method but when I did that, for some reason the window wouldn't open when I clicked the button.
    Are you saying the awakeFromNib fails and the window cannot be displayed?
    Or are you saying the button does not get initialized properly and/or does not work properly?
    If I put it in the states function (which returns the array), it works fine, even though I know it's really inefficient there. Anybody know why it won't load in the awakeFromNib method?
    What are you doing in awakeFromNib? One problem with bindings and Interface Builder is that it is very hard to explain (drag the line from the little plus thingy to the the little line of blocks with the blue sphere around them, etc.) Code is much easier to diagnose and treat.

  • Need help with Post Process Event

    Hi all:
    I need to implement user login generation thru a post process event. I read lots of posts about this and followed the steps described. So this is what I did:
    - Created a java class that implements PostProcessHandler and implemented the execute method. I added in both execute methods (EventResult and BulkEventResult) a statement to log message to a tmp file.
    - Created the plugin.xml
    - create a zip file with class and plugin.xml.
    - Put zip file in plugins directory.
    - Registered the plugin.
    - Created the EventHandler.xml file to define the postprocess event on User Entity CREATE operation.
    - Imported the Event metadata.
    Everything went well. Until I ran a reconciliation, and nothing is being called.
    Am I missing any steps?? I read that people successfully implemented this. Is there something I should do for lib folder or classpath...
    I cannot figure this out..
    Thank you

    I think this is what I am missing.
    I created my EventHandlers.xml in a temp folder with a space name:
    The temp folder: /tmp
    and under tmp folder I have the following:
    /metadata/user/custom/CustomPostProcessEvent/EventHandlers.xml
    I am going to change the EventHandlers.xml location:
    keep /tmp directory but
    Remove the metadata tree
    and create /db/EventHandlers.xml
    I will let you know...
    Thanks again for your feedback. It is very appreciated..

  • Need help with post-installation

    Hello,
    I just installed APEX 3.0 over Oracle 10g on windows. Do I need to install http server and configure the port etc or can I just enable the embedded plsql gateway by running apex_epg_config11? any help is appreciated.

    Hello,
    Please tell us your first name. It's easier that way.
    The embedded pl/sql gateway will be officially supported only with the next – 11g – database version, so for now you should install and configure the HTTP server.
    Having said that, if you can't wait for the next db version, and you think that the embeded pl/sql gateway is the preferred solution for you, the following might help you - http://wiki.shellprompt.net/bin/view/Apex/XmlDbHttpServer .
    Regards,
    Arie.

  • Need help with WebHelp skins - top nav button padding

    RH8 HTML
    hi all
    I'm working on a csutom skin for a client, and I'm running into a couple prioblems.
    The top nav area, Contents, Index etc etc has been made but between the buttons I get spacing. All around them infact, above, below and between. The main issue is the spacing between the buttons, its causing me problem because the buttons when all joined have a banner of text reading across them, with this spacing it of course looks broken and seperated.. Im sure I've taken it out before, but I cant seem to do it.
    Any help greatly appreciated!!!
    ~Nick

    Hi,
    There are two approaches. You'll have to check which one works for you:
    1. position the buttons only
    2. position the entire table with the buttons.
    1. If you only position the buttons, you’ll leave the rest of the rendering intact. Open whtbar.js and go to line 278, the function getImage. On line 290 there’s a line sI+=”border=0 align=\”absmiddle\”>”;. Replace this line with:
          sI+=" border=0 align=\"absmiddle\" ";
          if(gbIE == false)//Not Internet Explorer
                sI+="style=\"position: relative; top: -1px; ";
          sI+=">";
    Replace the value -1px until it renders correct.
    2. The second option is to completely move the table. In whtbar.js, go to line 148, the function writeStyle. On line 247, replace sStyle+="margin:2px;}\n"; with:
    sStyle+="margin:2px;";
          if(gbIE == false)//Not Internet Explorer
                sStyle+="position: relative; top: -1px;";
          sStyle+="}\n";
    Two notes:
    ·         Both modifications target all browsers other than Internet Explorer. To target specific browsers, check the variables you can use in whver.js.
    ·         Changing either one of these functions will also change the minibar! So double check for the desired result! Hope this helps.
    Greet,
    Willam
    This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

  • Need help with multiple links in one Flash file

    Hi, I have to do a banner which is basically 4 different
    slides that fade up and down, but the client wants each slide to
    link to a different place when the user clicks on it. I know how to
    create an invisible button to link the whole ad, but how would I
    link each slide? Thanks in advance!

    Am I getting no replies because this can't be done in Flash?
    Is there a better way to do it? Actionscripts perhaps?
    BTW, I'll have no access to the html page that the client
    will be putting the swf file on so I wouldn't be able to put any
    code around the file for linking, like if I did a bunch of jpg's
    and found a script on the web somewhere that would fade them up and
    down and link them. They want the linking built right into the swf,
    is this even possible? Thanks in advance!

  • Need help with the rotate and zoom button...

    hi, i create a Jpanel code that use for zoom in and rotate image, the rotate button work fine but the zoom in is not work by the following code, can any one tell me how to fix this?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.util.Hashtable;
    import javax.imageio.ImageIO;
    import javax.swing.event.*;
    public class RotatePanel extends JPanel {
    private double m_zoom = 1.0;
    private double m_zoomPercentage;
    private Image image;
    private double currentAngle;
    private Button rotate1, rotate2, rotate3,zoom;
    public RotatePanel(Image image) {
    this.image = image;
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(image, 0);
    try {
    mt.waitForID(0);
    catch (Exception e) {
    e.printStackTrace();
    public void rotate() {
    //rotate 5 degrees at a time
    currentAngle+=90.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    public void setZoomPercentage(int zoomPercentage)
                m_zoomPercentage = ((double)zoomPercentage) / 100;    
    public void originalSize()
                m_zoom = 1; 
    public void zoomIn()
                m_zoom += m_zoomPercentage;
    public void zoomOut()
                m_zoom -= m_zoomPercentage;
                if(m_zoom < m_zoomPercentage)
                    if(m_zoomPercentage > 1.0)
                        m_zoom = 1.0;
                    else
                        zoomIn();
    public double getZoomedTo()
                return m_zoom * 100; 
    public void rotate1() {
    //rotate 5 degrees at a time
    currentAngle+=180.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    public void rotate2() {
    //rotate 5 degrees at a time
    currentAngle+=270.0;
    if (currentAngle >= 360.0) {
    currentAngle = 0;
    repaint();
    protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2d = (Graphics2D)g;
    AffineTransform origXform = g2d.getTransform();
    AffineTransform newXform = (AffineTransform)(origXform.clone());
    //center of rotation is center of the panel
    int xRot = this.getWidth()/2;
    int yRot = this.getHeight()/2;
    newXform.rotate(Math.toRadians(currentAngle), xRot, yRot);
    g2d.setTransform(newXform);
    //draw image centered in panel
    int x = (getWidth() - image.getWidth(this))/2;
    int y = (getHeight() - image.getHeight(this))/2;
    g2d.scale(m_zoom, m_zoom);
    g2d.drawImage(image, x, y, this);
    g2d.setTransform(origXform);
    public Dimension getPreferredSize() {
    return new Dimension((int)(image.getWidth(this) + 
                                          (image.getWidth(this) * (m_zoom - 1))),
                                     (int)(image.getHeight(this) + 
                                          (image.getHeight(this) * (m_zoom -1 ))));
    public static void main(String[] args)  throws IOException{
    JFrame f = new JFrame();
    Container cp = f.getContentPane();
    cp.setLayout(new BorderLayout());
    Image testImage =
    Toolkit.getDefaultToolkit().getImage("clouds.jpg");
    final RotatePanel rotatePanel = new RotatePanel(testImage);
    final RotatePanel zomePanel = new RotatePanel(testImage);
    JButton b = new JButton ("90 degree");
    JButton c = new JButton ("180 degree");
    JButton d = new JButton ("270 degree");
    JButton e = new JButton ("zoom in");
    c.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate1();
    d.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate2();
    b.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    rotatePanel.rotate();
    e.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    zomePanel.zoomIn();
    cp.add(rotatePanel, BorderLayout.NORTH);
    cp.add(b, BorderLayout.WEST);
    cp.add(c, BorderLayout.CENTER);
    cp.add(d, BorderLayout.EAST);
    cp.add(e, BorderLayout.SOUTH);
    // f.pack();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setSize(500,500);
    f.setVisible(true);
    }

    TRIPLE CROSS POSTED
    [_http://forum.java.sun.com/thread.jspa?threadID=5314687&messageID=10342105#10342105_|http://forum.java.sun.com/thread.jspa?threadID=5314687&messageID=10342105#10342105]
    Stop posting this question over and over in multiple forums please.

  • Need help with data link

    I have done data links where I linked from one sql to another
    on some id.
    Now I would like to link based on the month (mm),year,district_id and code_id
    How do I do this. When I link it it links based on one thing and generally the primary key displays.
    Do I need to create my on concatenated key and then tell it to use that.
    for example month || year || district_id || code_id
    then go in the property inspector and change the where to reflect this
    Howard

    I have done data links where I linked from one sql to another
    on some id.
    Now I would like to link based on the month (mm),year,district_id and code_id
    How do I do this. When I link it it links based on one thing and generally the primary key displays.
    Do I need to create my on concatenated key and then tell it to use that.
    for example month || year || district_id || code_id
    then go in the property inspector and change the where to reflect this
    Howard

  • Hi i need help with my linked list

    hello
    im having trouble with my list
    this is where i create the studentlinked list. within my constructor for my college.
    public class MyCollege {
         private int capacity;
         public MyCollege(){
              StudentLinkedList studentList = new StudentLinkedList();
         }now my problem is in my add student method
    here it is.
    at the end of the method where i add the student to the linked list (studentList.add(aStudent);)is my problem. it says that studentList cannot be resolved.
    i understand that it cant find studentList. but i am creating it.
    why isnt it working???????????????????
    public static void main(String[] args) {
              MyCollege mc1 = new MyCollege();
         public void addStudent(int i){
              try{
                   Student aStudent = new Student();
                   String name,studentNumber, programmeCode;
                   int yearBegan;
                   if(i < capacity){
                        // this defines the buffer that will hold the data to be input
                        BufferedReader theDataStream;
                        theDataStream = new BufferedReader(new InputStreamReader(System.in));
                        //enter the details of the student
                        System.out.println("Enter in the name of the student followed by their student number");
                        System.out.println("followed by the year they began in the college a and then the course code");
                        System.out.println(" hit enter after each one");
                        name = theDataStream.readLine();
                        studentNumber = theDataStream.readLine();
                        yearBegan = Integer.parseInt(theDataStream.readLine());
                        programmeCode = theDataStream.readLine();
                        aStudent.setName(name);
                        aStudent.setStudentNumber(studentNumber);
                        aStudent.setYearBegan(yearBegan);
                        aStudent.setProgrammeCode(programmeCode);
                        studentList.add(aStudent);
                   }//end if
              }//end try
              catch(IOException e) {
                   System.out.println(e.getMessage());
         }

    cheers got it striaght away
         private int capacity;
         private StudentLinkedList studentList;
         

  • Need help with javascript for an attachment button in a pdf built in LiveCycle

    what is the javascript to add an button for an attachment to a pdf

    [discussion moved to LiveCycle Forms forum.]

Maybe you are looking for

  • How can I import my Google Contacts to use with Apple Mail?

    Google's GMail user interface has become impossible to use. Its most important and useful features are either hidden or have been removed. I want to change to use Apple Mail to retrieve email from my Google account, to answer that email, and to compo

  • HP Laserjet 4si - only prints the first time

    I have an iMac with OS X and an old HP Laserjet 4si. I connected with a USB-parallel cable and in System Preferences selected the generic Gutenprint PCL 5 driver. I restarted the OS and printed 5 pages of a 59 page document. Worked great (a little sl

  • My 128gig ipad air is crackling at mid to high volume

    Just got the air on Friday at 8am. Watched three episodes of TV on it, ready to return it! The speaker is crackling horribly at mid to high volume levels.  Any ideas?  Never had a problem with my other 3 iPads.  I'm really dismayed. If yours has this

  • LG VS980 (LG G2) for Verzion Wireless

    The model LG VS980 will be released as LG G2 by Verzion Wireless. Is shipping date means release date?  A leaked document suggests that LG VS980 for Verzion's shipping date is Auguest 29, 2013 Is that means Verizon wireless will make the LG G2 availa

  • 2-Bit Quadrature Encoder without counters

    I've noticed that the internal help in LabVIEW only mentioned Quadrature Encoders in terms of reading them with the counter inputs of a device that supports that type of reading. In case your DAQ does not support those counter inputs, such as the NI