Sun Studio 11 on Linux: newbie needs help playing the Temple of the Sun

Hi!
I've installed Sun Studio 11 on Mandriva 2007.1 Free edition. I would like to play the Temple of the Sun game but the building process fails consistently.
I tried to follow the instructions on the following page
http://developers.sun.com/sunstudio/learning/temple_faq.html#
but still no joy.
The wizards throughout the building process request much more parameters than those indicated on the FAQ page.
This is the makefile
## -- Makefile --
## User: complex
## Time: May 18, 2007 12:00:44 PM
## Makefile created by Sun Studio.
## This file is generated automatically.
#### Compiler and tool definitions shared by all build targets #####
CC = gcc
BASICOPTS = -g
CFLAGS = $(BASICOPTS)
# Define the target directories.
TARGETDIR_String=GNU-i386-Linux
all: $(TARGETDIR_String)/String
## Target: String
OBJS_String = \
     $(TARGETDIR_String)/cEmptyFile.o
# Link or archive
$(TARGETDIR_String)/String: $(TARGETDIR_String) $(OBJS_String) $(DEPLIBS_String)
     $(LINK.c) $(CFLAGS_String) $(CPPFLAGS_String) -o $@ $(OBJS_String) $(LDLIBS_String)
# Compile source files into .o files
$(TARGETDIR_String)/cEmptyFile.o: $(TARGETDIR_String) cEmptyFile.c
     $(COMPILE.c) $(CFLAGS_String) $(CPPFLAGS_String) -o $@ cEmptyFile.c
#### Clean target deletes all generated files ####
clean:
     rm -f \
          $(TARGETDIR_String)/String \
          $(TARGETDIR_String)/cEmptyFile.o
     rm -f -r $(TARGETDIR_String)
# Create the target directory (if needed)
$(TARGETDIR_String):
     mkdir -p $(TARGETDIR_String)
# Enable dependency checking
.KEEP_STATE:
.KEEP_STATE_FILE:.make.state.GNU-i386-Linux
Below is the output of make
dmake -m serial -f "/home/complex/.sunstudio/11-Linux-Intel(R) Pentium(R) 4 CPU 1.50GHz/sampledir/ts.c/Makefile" GNU-i386-Linux/String
mkdir -p GNU-i386-Linux
gcc -g -c -o GNU-i386-Linux/cEmptyFile.o cEmptyFile.c
ts.c/cEmptyFile.c [2] warning: data definition has no type or storage class
cEmptyFile.c: In function �main�:
ts.c/cEmptyFile.c [3] warning: �a� is narrower than values of its type
gcc -g -o GNU-i386-Linux/String GNU-i386-Linux/cEmptyFile.o
Build Successful
Total time: 0 seconds
When I execute, it says "unexpected exception has occurred".
Could someone more successful with this game please provide more detailed instructions on how to proceed?
I should get a string somehow which I should paste into the answer window on the game page.
Thanks a lot in advance.

Hi
CC = gccYou are using gcc. Switch to using the Sun Studio toolset, and all should be well.
Paul

Similar Messages

  • MacBook - Newbie: Need help on printing wirelessly to XP shared printer

    MacBook - Newbie: Need help on printing to XP shared printer
    Bear with me please. I read tons of articles on this but somehow as a newbie to MAC (girlfriends sick daughter), I am missing something. 10.5.2
    Currently, she can print directly if we plug in the HP Deskjet printer directly via USB to the MACBook. No problem.
    When we first got the MACBOOK I tried setting up the MACBOOK wirelessly to recognize the workgroup where the printer was attached via USB to the Windows XP PC. However it printed out garbage since I did not know there was a difference between XP printing and MAC (Gutenberg/gimp printing/drivers).
    Now I know there is a difference.
    But in reading various instructions, I no longer can find how to connect the MAC to the Windows workgroup. Note we do have a printer set up currently as USB-HP Deskjet on the Macbook (not sure I need to delete it yet).
    I went to System Preferences on MACBOOK and clicked on printers, more printers. In the drop down box was CANON, APPLETALK, IP HP printing and Firewire. There was no WINDOWS selection as I saw in other online web instructions.
    So not sure how to proceed to find a way to:
    1. Connect to Windows workgroup (click on what exactly), step by step please!!
    2. Add correct HP Deskjet 5490 printer (perhaps there is one with Gutenberg or perhaps I need Gutenprint-really not sure what I am talking about)
    Thanks so much in advance. Fiancé's kid has had her cancer recur in a different place and someone was nice enough to buy her a MACBOOK as a gift.
    Sincerely
    Peter

    ccarbery wrote:
    OK...I figured it out...no need to reply.  I noticed that there was another Protocol to use to set up the printer on the Mac, I was using LPD, so I switched it to HP Jet Direct-socket, and it prints fine...thanks.  I am curious as to why LPD wouldn't work; if anyone has that answer I would like to know...thanks
    Any chance of posting the Protocol you used to connect to your printer with your laptop?  I'm have the exact same problem printing from my MB.  Same error message "..is busy".

  • Newbie needs help comprehending CSS Password Manager functions

    Hello All:
    I own a TP W500 4062-27U running Windows 7 Ultimate.  The computer is trouble-free.
    I am seeking a solution to the following need:  An application that will securely remember my passwords for various websites, etc. and enable me to log in using the fingerprint reader or similar.
    I am aware that Lenovo provides both Fingerprint Reader software and Client Security Solution software, but I don't know whether or not either one (or both) of these applications will provide the functionality I am seeking.  I have spent a fair bit of time looking around the Lenovo website, but cannot find a document that describes (in a general, overview manner) the functionality that CSS provides.
    I don't need to log into VPNs, or company networks, or anything really fancy like that - I just need something that will enable me to log into about 20 different websites, using a different password for each website.  Right now, I'm generally using the same password for every website (that way, I can remember what it is), and as I think you will agree, that is probably not a very good practice so far as security is concerned.
    If anyone could point me towards a document that explains how I can get CSS to do what I want it to do, I would be very grateful.  If CSS does not have the functionality I am seeking, I would very much appreciate a recommendation of software - possibly non-Lenovo - that does provide the functionality I am seeking.
    Thanks very much for your assistance.
    Michael

    Hi PanEuropean2,
    Welcome to Lenovo Forum!
    In regard to your question, Client Security Solution (CSS) should be the right fit for you.
    I have a T410 with Win 7, and have several passwords to remember which is really killing me. However, by using CSS, Fingerprint software and Password Manager, I need to enter all the passwords only once when access a website or a tool, and let it saved in CSS.
    The next time i turn on the machine and open up a website which needs user ID and password, I just need to swipe the fingerprint that I've enrolled, then viola!
    Just take note that after the first swipe of fingerprint, tools or website that are to be accessed later will automatically show the password in the box directly without having to swipe fingerprint again. You just need to click to log in. I"m not sure if this is the experience you're looking for, however, no harm to give it a try.
    Here's the user guide for CSS. It has
    Client Security Solution components
    Client Security Solution installation considerations
    Client Security Solution features
    Hope this helps
    Cheers,
    Cleo
    WW Social Media
    T61, T410, x240, Z500, Flex 14
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Hi i need help on BAPI to Update the ADRT & ADR6 tables

    hi,
    i need help on BAPI to Update the ADRT & ADR6 tables
    these are the fields to be updated
    ADRT-Remark Table
    ADR6-SMTP_ADDR
    ADR6-DFT_RECEIV
    Please guide me what parameters to be passed to update
    ADR6 & ADRT tables

    Look at this function Group
    <b>BUBA_3                         SAP BP: External BAPI Function Modules     </b>                        
    BAPI_BUPA_ADDRESS_ADD          SAP BP, BAPI: Add Address                                          
    BAPI_BUPA_ADDRESS_CHANGE       SAP BP, BAPI: Change Address                                       
    BAPI_BUPA_ADDRESS_GET_NUMBERS  SAP BP, BAPI: Read Address Numbers                                 
    BAPI_BUPA_ADDRESS_GETDETAIL    SAP BP, BAPI: Read Address                                         
    BAPI_BUPA_ADDRESS_REMOVE       SAP BP, BAPI: Delete Address                                       
    BAPI_BUPA_ADDRESSES_GET        SAP BP, BAPI: Determine All Addresses                              
    BAPI_BUPR_CONTP_ADDR_ADD       SAP BP, BAPI: Add Contact Person Relationship Address              
    BAPI_BUPR_CONTP_ADDR_CHANGE    SAP BP, BAPI: Change Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDR_GETDETAIL SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_CONTP_ADDR_REMOVE    SAP BP, BAPI: Delete Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_EMPLO_ADDR_ADD       SAP BP, BAPI: Add Employee Relationship Address                    
    BAPI_BUPR_EMPLO_ADDR_CHANGE    SAP BP, BAPI: Change Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDR_GETDETAIL SAP BP, BAPI: Read Employee Relationship Address                   
    BAPI_BUPR_EMPLO_ADDR_REMOVE    SAP BP, BAPI: Delete Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    Look also at OSS <a href="https://service.sap.com/sap/support/notes/306275">Note 306275 - Transferring address data</a>
    Regards

  • I have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest from itouch to laptop please??

    i have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest of the songs (from my cd's) from itouch to laptop please??

    See this previous discussion:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Need help to log off iTunes - the tab with the current Apple-iD is "greyed" out.

    Need help to log off iTunes -> the tab with the current Apple-iD is "greyed" out. Can anyone help me?

    Do you have Restrictions turned on?

  • Need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    need help , when we turn on the mac i can hear the fan and there is a picture of the world flashing for about a minute or 2 on start up . But the fan I can hear non stop ?

    A flashing question mark or globe appears when you start your Mac

  • DVD Studio Pro Newbie Needs Help!

    I have a presentation deadline approaching and I need help desperately. I created my presentation using Keynote 3 (800*600 slides) and exported it to a Quicktime movie using H.264 compression at 29.97 fps (high quality settings). I then proceeded to use iDVD 6 and imported the Quicktime movie and created a simple menu using the templates provided.
    I saved the entire project as a disk image and used the DVD player to check the disk image file. The quality of the DVD disk image file looked nothing like the original Quicktime movie. The images and text looked blurry and unprofessional.
    I've spend quite some time on the iDVD and Keynote discussion forums and can't find a solution to my problem. The conclusion I've come is that the mpeg-2 encoder that iDVD 6 uses is problematic.
    I don't want to start using DVD Studio Pro but I will in order to preserve the quality of my original Keynote presentation. So here are my questions...thank you in advance for your help guys....I really need it:
    - I plan on playing the DVD on a 42" Plasma display at a sales office and also distributing it to potential buyers. Are my Keynote export settings optimal for iDVD use? Should I be using H.264 @ 29.97?
    - If I must use DVDSP then what export/compression settings should I use in Keynote to preserve the quality? Keynote doesn't give me an option to use mpeg-2. I have ffmpegX so I can encode different formats...just need to know the correct one.
    - Keynote exports separate audio and video files. I combined them using Quicktime. Is it possible to use the combined file in DVDSP or do they need to be separate.
    Thanks for taking the time to read this post. Any help would be greatly appreciated. Also, if you have any reading material pertaining to this matter please provide link.
    ~Eddie~
    PowerBook G4   Mac OS X (10.4.5)  

    You can use a mov file that contains both audio and video. DVD Studio Pro will compress the mov itself. I am not overly familiar with the codec H.264 but either way its a codec that compresses the video, and if I am right that codec is used for compressing video to web based file sizes, which means heavy compression. When I create DVD material I use M2V format which is what DVD SP wants anyways so it cuts time and drive space in half. If you export an mov and import it into DVD SP, DVD SP compresses the file again which is M2V. Now you have two files, with twice the compression time. When creating M2V the only thing that you need o be aware of is the bit rate, which needs to be adjusted pending the duration of the video. Use 29.97 if you are NTSC and full frame rate, which you should be.
    If you can not create an M2V file with associated aiff audio file, than export your QT file as uncompressed or as a QT Movie. The file itself will be huge but DVD SP will compress it properly.
    I hope this helps

  • Flash CS5 Newbie - Need help adding URL link to animated banner

    I apologize if this is a very basic question, but I am a newbie at designing in Flash. I have created a basic animation in Flash CS5 and I need to add a clickable URL link to it. I've tried a few tutorials that looked promising, but none of them solved my problem. I've tried a number of things including converting parts or all of the images to simple buttons or movies and linking them that way as well as typing in code for ActionScript 2 and 3, none of which were successful. The animation plays correctly when viewed in my browser, but when I click on it, the link does not work. I would prefer that the entire banner be clickable to take viewers to the linked website rather than using hyperlinked text. Also, when I open the Code Snippets window, it is empty, no matter what image or frame I've selected. Do I need to import code snippets from somewhere or am I simply going about things the wrong way? Any help is greatly appreciated!

    It all depends whether you're decisively using AS2.0 or AS3.0 .
    In the latter, you would need to use a URLRequest() method in conjunction with a navigateToUrl() call (not sure the exact syntax for navigate to Url, it might be a capitalized "URL" in the method but the request takes a String argument such as http://www.adobe.com)

  • Newb needs help opening file browser and getting full file name and path.

    Ok, so I'm a TOTAL newb here, but I have managed to get it to open a file browser but all I can seem to get it to do is give me the NAME of the selected file *eg. selectedFile.name* I also need the path of the file as in C:\example\file.mp3.
    The program I'm making plays an MP3 of your choice at a certain time, like an alarm clock. But I got tired of entering the file path of the MP3 EACH time so I wanted to have a browse feature.
    Ideas... help... thanks...
    Nicholas

    you'll need to use air to get the path.

  • Newbie need help with Web BEx setup!

    Out of curiosity, I decided to install Netweaver so I can have a play with it. I am a complete newbie to Netweaver therefore I apologise if this is out of context...
    Here's my question:
    How do one go about getting Web BEx to work?
    Whenever I activate the link in the portal, I get an error about unknown "SWITCH_AXES" command and 0ANALYSIS type 4 error. I search the forum and the few passing mentions of the problem points to OSS notes that is only accessible through service marketplace (which I don't have an ID). I have check the object types in BI content and seems that 0ANALYSIS is already activated. There must be something I am missing. Tried blindly and randomly installed other BI content (mostly Web templates and objects) but to no avail (and encounted a few short dumps).
    Any help is greatly appreciated!
    So far, here're what I did:
    1) Install Netweaver 2004S ABAP and Java on the same machine. Instance 00, 01 and 02 respectively.
    2) Try to run BI-Java template installer, but met with error part way. So some of the steps are done manually.
    3) Set up SLD (both instance are in the landscape), and 'partially' set up SSO. Partially as while JAVA to ABAP seems to work, ABAP to JAVA is not working. Anoying but livable.
    4) Installed TREX (instance 03) and are seen by ABAP and JAVA.
    5) ABAP is seen in the portal and I can create transactional iviews and put them in the Portal (with working SSO).
    6) Did reverse-proxying with Apache, but I don't think it matters as it seems to be a backend module issue.
    7) Business planning/wizard is working (in ABAP and Portal) as is Broadcast. As you can see, Web BEx is the only thing that is not working

    The default link for Web Analyser in EP 7 seems to point to the new template. When opening the analysis template in the new BEx windows tool, the same error is being reported. Using 3.5.x WAD, I can't locate the template.
    More on this issue Although for that case, the meta data is not installed. Is there a way to trace missing component and reinstall the needed BI content in RSA1?
    BTW, these are on JAVA SP9 and ABAP SP11.

  • Repost: Newbie needs help

    please help if you are willing and able.
    There are only 3 blocks, the long strait one and the 2 'S' Blocks the blocks are generated from methods within the class, the methodes simply change the variables of the 'x,y; coords of the smaller rectangle2D's that make up each block
    my teacher and I both realized too late that this was way out of my league so he scaled the project down to 3 blocks and all they have to do is stack, and then I need to make a sound happen somewhere in the program. I realize much of this is shotty code I am still learning.
    thanks in advance
    //This is the Block Class
    package newtetrisproject;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.awt.*;
    import java.awt.Shape.*;
    * Title: a different (newbie) way to make a tetris game
    * Description:
    * Copyright:
    * Company: rcc
    * @author troy
    * @version 1.0
    public class Block extends Rectangle2D.Double
       Rectangle2D.Double sq0;//class variables
       Rectangle2D.Double sq1;//each square is
       Rectangle2D.Double sq2;//part of a block
       Rectangle2D.Double sq3;//an array of 4 squares
       Shape[] currentBlock;  //make one block
       int blockNumber = 0;//number to decide which block to make
       int rotateCount = 0;//number to decide wich rotation method to use
       int sq0X;//variables to hold
       int sq0Y;//the X and Y values
       int sq1X;//of each Square in the block
       int sq1Y;//by the name of the square
       int sq2X;//and X or Y, Note sq is short for square and the number
       int sq2Y;//pertains to which square in the block
       int sq3X;//
       int sq3Y;//
       final int  SQUARE_SIDES = 20;
       public Block()
          getRandomBlock();
       public void moveDown() //moves the blocks 20 units down left or right
          sq0.y += 20;
          sq1.y += 20;
          sq2.y += 20;
          sq3.y += 20;
       public void moveLeft()
          sq0.x -= 20;
          sq1.x -= 20;
          sq2.x -= 20;
          sq3.x -= 20;
       public void moveRight()
          sq0.x += 20;
          sq1.x += 20;
          sq2.x += 20;
          sq3.x += 20;
       public void rotateBlock(int blockNumber , boolean rotated)
          switch(blockNumber)
          case 1:
             rotate_Left_S_Block(rotated);
             break;
          case 2:
             rotate_Right_S_Block(rotated);
             break;
          case 3:
             rotate_Long_Block(rotated);
             break;
       public void rotate_Left_S_Block(boolean rotated)
          if(rotated == false)
             sq1.x = sq0.x;
             sq1.y = sq0.y +21;
             sq2.x = sq1.x -21;
             sq2.y = sq1.y;
             sq3.x = sq2.x;
             sq3.y = sq2.y + 21;
          if(rotated == true)
             sq1.x = sq0.x + 21;
             sq1.y = sq0.y;
             sq2.x = sq1.x ;
             sq2.y = sq1.y +21;
             sq3.x = sq2.x + 21;
             sq3.y = sq2.y;
       public void rotate_Right_S_Block(boolean rotated)
          if(rotated == false)
             sq1.x = sq0.x;
             sq1.y = sq0.y + 21;
             sq2.x = sq1.x + 21;
             sq2.y = sq1.y ;
             sq3.x = sq1.x + 21;
             sq3.y = sq2.y + 21;
          if(rotated == true)
             sq1.x = sq0.x - 21;
             sq1.y = sq0.y;
             sq2.x = sq1.x;
             sq2.y = sq1.y + 21;
             sq3.x = sq2.x - 21;
             sq3.y = sq2.y;
       public void rotate_Long_Block(boolean rotated)
          if(rotated == false)
             sq1.x = sq0.x;
             sq1.y = sq0.y + 21;
             sq2.x = sq0.x;
             sq2.y = sq1.y + 21;
             sq3.x = sq0.x;
             sq3.y = sq2.y + 21;
          if(rotated == true)
             sq1.x = sq0.x + 21;
             sq1.y = sq0.y;
             sq2.x = sq1.x + 21;
             sq2.y = sq0.y;
             sq3.x = sq2.x + 21;
             sq3.y = sq0.y;
            public Shape[] getLeftBlock()
               sq0X = 150;
               sq0Y = 10;
               sq1X = sq0X + 21;
               sq1Y = 10;
               sq2X = sq1X;
               sq2Y = sq1Y + 21;
               sq3X = sq2X + 21;
               sq3Y = sq2Y;
               sq0 = new Rectangle2D.Double(sq0X, sq0Y, SQUARE_SIDES, SQUARE_SIDES);
               sq1 = new Rectangle2D.Double(sq1X, sq1Y, SQUARE_SIDES, SQUARE_SIDES);
               sq2 = new Rectangle2D.Double(sq2X, sq2Y, SQUARE_SIDES, SQUARE_SIDES);
               sq3 = new Rectangle2D.Double(sq3X, sq3Y, SQUARE_SIDES, SQUARE_SIDES);
               currentBlock = new Rectangle2D.Double[] {sq0, sq1, sq2, sq3};
               return currentBlock;
            public Shape[] getLongBlock()
               sq0X = 150;
               sq0Y = 10;
               sq1X = sq0X + 21;
               sq1Y = 10;
               sq2X = sq1X + 21;
               sq2Y = 10;
               sq3X = sq2X + 21;
               sq3Y = 10;
               sq0 = new Rectangle2D.Double(sq0X, sq0Y, SQUARE_SIDES, SQUARE_SIDES);
               sq1 = new Rectangle2D.Double(sq1X, sq1Y, SQUARE_SIDES, SQUARE_SIDES);
               sq2 = new Rectangle2D.Double(sq2X, sq2Y, SQUARE_SIDES, SQUARE_SIDES);
               sq3 = new Rectangle2D.Double(sq3X, sq3Y, SQUARE_SIDES, SQUARE_SIDES);
               currentBlock = new Rectangle2D.Double[] {sq0, sq1, sq2, sq3};
               return currentBlock;
            public Shape[] getRightBlock()
               sq0X = 150;
               sq0Y = 10;
               sq1X = sq0X - 21;
               sq1Y = 10;
               sq2X = sq1X;
               sq2Y = sq1Y + 21;
               sq3X = sq2X - 21;
               sq3Y = sq2Y;
               sq0 = new Rectangle2D.Double(sq0X, sq0Y, SQUARE_SIDES, SQUARE_SIDES);
               sq1 = new Rectangle2D.Double(sq1X, sq1Y, SQUARE_SIDES, SQUARE_SIDES);
               sq2 = new Rectangle2D.Double(sq2X, sq2Y, SQUARE_SIDES, SQUARE_SIDES);
               sq3 = new Rectangle2D.Double(sq3X, sq3Y, SQUARE_SIDES, SQUARE_SIDES);
               currentBlock = new Rectangle2D.Double[] {sq0, sq1, sq2, sq3};
               return currentBlock;
            public Shape[] getRandomBlock(){//generates a random number
       //to decide witch block to instantiate
       int randomBlockType = (int) Math.floor( 1 + Math.random() * (int)Math.ceil(3));
       switch(randomBlockType)
          case 1:
             currentBlock = this.getLeftBlock();
             blockNumber = 1;
             break;
          case 2:
             currentBlock = this.getRightBlock();
             blockNumber = 2;
             break;
          case 3:
             currentBlock = this.getLongBlock();
             blockNumber = 3;
             break;
       System.out.println(randomBlockType);
       return currentBlock;
            public void rotate()
               boolean rotated = false;
               switch(rotateCount){
                  case 0:
                     rotateBlock(blockNumber , rotated);
                rotateCount ++;
                break;
             case 1:
                rotated = true;
                rotateBlock(blockNumber , rotated);
                rotateCount --;
                break;
    Here is my GamePanel class, most of my game logic is here
    note there are some things in here that are not being used they are experimental I tried to flag them or remove them before posting this but I am not sure I got everything, plus I thought it best to leave in some of my mistakes so whoever can help will see what my brain is doing(scary thought)*/
    package newtetrisproject;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Shape.*;
    import java.awt.geom.*;
    import javax.swing.Timer;
    import java.util.ArrayList;
    import javax.sound.*;
    import java.lang.Object.*;
    import java.lang.*;
    * Title: gamePanel
    * Description:This is the eventhandler and painter of the game
    * Copyright:
    * Company: rcc
    * @author troy
    * @version 1.0
    public class GamePanel extends JPanel implements ActionListener,KeyListener,FocusListener{
       Color lineColor;
       Color fillColor;
       Block block;
    /**********EXPERIMENTAL VARIABLES******************/
    Shape[] stackedBlocks ;//to hold the previous blocks
    ArrayList blockList ;//this is along the same thinking as stackedBlocks[]
    Shape[] stackedShapes;//was going to try this to hold the
                                                  //individual squares of each block but
                                                  // I still can't get paintComponent to paint it
    Shape sq0;
    Shape sq1;
    Shape sq2;
    Shape sq3;
       int blockCount = 0;//to count the blocks
       int blockIndex = 0;//to index through the array or arrayList
                                       //(which ever gets used)
       int squareIndex = 0;//same as blockIndex only it would apply to
                                          //the squares instead of the whole block
    /********END EXPERIMENTAL VARIABLES*********************/
    Timer timer = new Timer(1000,this);//calls moveBlockDown()
    Line2D.Double bottomLine;
       public GamePanel()
         bottomLine = new Line2D.Double(0,400,400,400);
         setVisible(true);
         lineColor = Color.BLACK;
         fillColor = Color.YELLOW ;
         setBackground(Color.white);
         addKeyListener(this);
         addFocusListener(this);
         setFocusable(true);
        ArrayList blockList = new ArrayList();//
       }/**********END CONSTRUCTOR****************/
    //these next 2 methods are where I am having the most trouble
    //I am trying to make a method
    //to hold the blocks once they have
    //stopped moving and then repaint
    //them.
    public void stackBlock()
          int listIndex;
          blockList.add(blockCount,block.currentBlock);
          blockCount ++;
       public Shape[] getStackedBlock()
           Shape[] thisBlock;                       
          int sq0x = (int)block.sq0.x;
          int sq0y = (int)block.sq0.y;
          int sq1x = (int)block.sq1.x;
          int sq1y = (int)block.sq1.y;
          int sq2x = (int)block.sq2.x;
          int sq2y = (int)block.sq2.y;
          int sq3x = (int)block.sq3.x;
          int sq3y = (int)block.sq3.y;
          sq0 = new Rectangle2D.Double(sq0x, sq0y);
          sq1 = new Rectangle2D.Double(sq1x ,sq1y );
          sq2 = new Rectangle2D.Double(sq2x,sq2y);
          sq3 = new Rectangle2D.Double(sq3x,sq3y);
    thisBlock = new Rectangle2D.Double[] {sq0,sq1,sq2,sq3};
          thisBlock  = block.currentBlock;
          return thisBlock;
       public void checkBoard()
          if(block.sq0.getBounds2D().intersectsLine(bottomLine)
             ||block.sq1.getBounds2D().intersectsLine(bottomLine)
             ||block.sq2.getBounds2D().intersectsLine(bottomLine)
             ||block.sq3.getBounds2D().intersectsLine(bottomLine))
             timer.stop();
             //getStackedBlock();//this is commented out for now
             repaint();
            getNewBlock();
       public void getNewBlock()
        block = new Block();
        blockCount  ++;
        timer.start();
    public  void startGame()
       block = new Block();
       timer.start();
       repaint();
    public void paintComponent(Graphics g)
       try{
          Graphics2D g2D = (Graphics2D) g;
          super.paintComponent(g);
          g2D.setColor(lineColor);
          g2D.draw(block.currentBlock[0]);
          g2D.draw(block.currentBlock[1]);
          g2D.draw(block.currentBlock[2]);
          g2D.draw(block.currentBlock[3]);
          g2D.draw(bottomLine);
          g2D.setColor(fillColor);
          g2D.fill(block.currentBlock[0]);
          g2D.fill(block.currentBlock[1]);
          g2D.fill(block.currentBlock[2]);
          g2D.fill(block.currentBlock[3]);
          catch (NullPointerException e)
       public void keyPressed(KeyEvent k)
          if (k.getKeyCode() == k.VK_LEFT)
             block.moveLeft();
             repaint();
          if (k.getKeyCode() == k.VK_RIGHT)
             block.moveRight();
             repaint();
          if (k.getKeyCode() == k.VK_UP)
             block.rotate();
             repaint();
          if (k.getKeyCode()==k.VK_DOWN)
             block.moveDown();
             repaint();
       public void drop()
          block.moveDown();
          repaint();
       public void actionPerformed(ActionEvent e)
          drop();
          checkBoard();
    public void keyReleased(KeyEvent k)
       public void keyTyped(KeyEvent k)
       public void focusGained(FocusEvent fe)
       public void focusLost(FocusEvent fe)
       public void loop()
       public void play()
       public void stop()
    My last class is the Class containing my main method
    package newtetrisproject;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Shape.*;
    * Title: a different way to make a tetris game
    * Description:
    * Copyright:
    * Company: rcc
    * @author troy
    * @version 1.0
    public class Game extends JFrame{
       Container contentPane;
       GamePanel gamePanel;
       public Game() {
          this.setLocation(400,100);
          this.setSize(400,600);
          this.setResizable(false);
          gamePanel = new GamePanel();
          contentPane = getContentPane();
          contentPane.setBackground(Color.red);
          contentPane.setLayout(new BorderLayout());
          contentPane.add(gamePanel,BorderLayout.CENTER);
          contentPane.add(new JPanel(),BorderLayout.NORTH);
          contentPane.add(new JPanel(),BorderLayout.EAST);
          contentPane.add(new JPanel(),BorderLayout.WEST);
          contentPane.add(new JPanel(),BorderLayout.SOUTH);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);
          JOptionPane.showMessageDialog(this,"Lets Play Tetris");
          gamePanel.startGame();
       public static void main(String[] args) {
          Game game = new Game();
    }

    these methods change the location variables of the
    smaller squares(eg.Rectagle2D.Double's)
    getLeftBlock,getRightBlock,getLongBlock, are methods that set
    the location variables of the smaller squares and thus create the block.
    example: getLongBlock sets all of the squares in a strait row, creating a long block.It sounds like what you're trying to build is a Block factory, but instead you're doing it by taking an existing Block and changing its values.
    I'd suggest:
    1) Creating a new class, BlockFactory
    2) putting get{Left,Right,Long}Block, and also getRandomBlock, in there, and rename them createLeftBlock, etc.
    3) Try to make Block as tiny as you possibly can. Remove anything duplicate. Don't just remove whitespace, but remove redundant data. I'm really serious about this.

  • Help, new to Linux and need help installing 8i

    I am new to Linux and some of this stuff..
    Yet,I have gotten the JDK116_v5 installed and working on my box.
    I have cut a cd for Oracle8i and need help..
    I have also recopiled my kernal as well...
    Does any one know where I can get help...
    null

    Al Pivonka (guest) wrote:
    : I am new to Linux and some of this stuff..
    : Yet,I have gotten the JDK116_v5 installed and working on
    : my box.
    : I have cut a cd for Oracle8i and need help..
    : I have also recopiled my kernal as well...
    : Does any one know where I can get help...
    Try http://www.akadia.com/html/dod-frame.html for Redhat.
    http://www.suse.de/~mha/oracle/ for SuSE
    Also peruse these
    http://www.akadia.com/html/dod-frame.html
    http://jordan.fortwayne.com/oracle/
    Colin.
    null

  • My Mac keeps crashing--a newbie needs help

    Lately, my Mac keeps crashing.  It's an iMac, with the most recent updates of Yosemite.
    I'll be working, I might have several things open, and then suddenly the screen will go black and I'll have the notification that it shut down and push to restart.
    It has happened more than several times now, and I can't remember if it started doing it before Yosemite or not.
    Not sure how to search out the problems, it's my first Mac.  Are to many things open?  There's no crash report when I restart.
    thanks!

    Mac users often ask whether they should install "anti-virus" software. The answer usually given on ASC is "no." The answer is right, but it may give the wrong impression that there is no threat from what are loosely called "viruses." There  is a threat, and you need to educate yourself about it.
    1. This is a comment on what you should—and should not—do to protect yourself from malicious software ("malware") that circulates on the Internet and gets onto a computer as an unintended consequence of the user's actions. It does not apply to software, such as keystroke loggers, that may be installed deliberately by an intruder who has hands-on access to the computer, or who has been able to take control of it remotely. That threat is in a different category, and there's no easy way to defend against it.
    The comment is long because the issue is complex. The key points are in sections 5, 6, and 10.
    OS X now implements three layers of built-in protection specifically against malware, not counting runtime protections such as execute disable, sandboxing, system library randomization, and address space layout randomization that may also guard against other kinds of exploits.
    2. All versions of OS X since 10.6.7 have been able to detect known Mac malware in downloaded files, and to block insecure web plugins. This feature is transparent to the user. Internally Apple calls it "XProtect."
    The malware recognition database used by XProtect is automatically updated; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders.
    The following caveats apply to XProtect:
    ☞ It can be bypassed by some third-party networking software, such as BitTorrent clients and Java applets.
    ☞ It only applies to software downloaded from the network. Software installed from a CD or other media is not checked.
    As new versions of OS X are released, it's not clear whether Apple will indefinitely continue to maintain the XProtect database of older versions such as 10.6. The security of obsolete system versions may eventually be degraded. Security updates to the code of obsolete systems will stop being released at some point, and that may leave them open to other kinds of attack besides malware.
    3. Starting with OS X 10.7.5, there has been a second layer of built-in malware protection, designated "Gatekeeper" by Apple. By default, applications and Installer packages downloaded from the network will only run if they're digitally signed by a developer with a certificate issued by Apple. Software certified in this way hasn't necessarily been tested by Apple, but you can be reasonably sure that it hasn't been modified by anyone other than the developer. His identity is known to Apple, so he could be held legally responsible if he distributed malware. That may not mean much if the developer lives in a country with a weak legal system (see below.)
    Gatekeeper doesn't depend on a database of known malware. It has, however, the same limitations as XProtect, and in addition the following:
    ☞ It can easily be disabled or overridden by the user.
    ☞ A malware attacker could get control of a code-signing certificate under false pretenses, or could simply ignore the consequences of distributing codesigned malware.
    ☞ An App Store developer could find a way to bypass Apple's oversight, or the oversight could fail due to human error.
    Apple has so far failed to revoke the codesigning certificates of some known abusers, thereby diluting the value of Gatekeeper and the Developer ID program. These failures don't involve App Store products, however.
    For the reasons given, App Store products, and—to a lesser extent—other applications recognized by Gatekeeper as signed, are safer than others, but they can't be considered absolutely safe. "Sandboxed" applications may prompt for access to private data, such as your contacts, or for access to the network. Think before granting that access. Sandbox security is based on user input. Never click through any request for authorization without thinking.
    4. Starting with OS X 10.8.3, a third layer of protection has been added: a "Malware Removal Tool" (MRT). MRT runs automatically in the background when you update the OS. It checks for, and removes, malware that may have evaded the other protections via a Java exploit (see below.) MRT also runs when you install or update the Apple-supplied Java runtime (but not the Oracle runtime.) Like XProtect, MRT is effective against known threats, but not against unknown ones. It notifies you if it finds malware, but otherwise there's no user interface to MRT.
    5. The built-in security features of OS X reduce the risk of malware attack, but they are not, and never will be, complete protection. Malware is a problem of human behavior, not machine behavior, and no technological fix alone is going to solve it. Trusting software to protect you will only make you more vulnerable.
    The best defense is always going to be your own intelligence. With the possible exception of Java exploits, all known malware circulating on the Internet that affects a fully-updated installation of OS X 10.6 or later takes the form of so-called "Trojan horses," which can only have an effect if the victim is duped into running them. The threat therefore amounts to a battle of wits between you and Internet criminals. If you're better informed than they think you are, you'll win. That means, in practice, that you always stay within a safe harbor of computing practices. How do you know when you're leaving the safe harbor? Below are some warning signs of danger.
    Software from an untrustworthy source
    ☞ Software with a corporate brand, such as Adobe Flash Player, doesn't come directly from the developer’s website. Do not trust an alert from any website to update Flash, or your browser, or any other software. A genuine alert that Flash is outdated and blocked is shown on this support page. Follow the instructions on the support page in that case. Otherwise, assume that the alert is fake and someone is trying to scam you into installing malware. If you see such alerts on more than one website, ask for instructions.
    ☞ Software of any kind is distributed via BitTorrent, or Usenet, or on a website that also distributes pirated music or movies.
    ☞ Rogue websites such as Softonic, Soft32, and CNET Download distribute free applications that have been packaged in a superfluous "installer."
    ☞ The software is advertised by means of spam or intrusive web ads. Any ad, on any site, that includes a direct link to a download should be ignored.
    Software that is plainly illegal or does something illegal
    ☞ High-priced commercial software such as Photoshop is "cracked" or "free."
    ☞ An application helps you to infringe copyright, for instance by circumventing the copy protection on commercial software, or saving streamed media for reuse without permission. All "YouTube downloaders" are in this category, though not all are necessarily malicious.
    Conditional or unsolicited offers from strangers
    ☞ A telephone caller or a web page tells you that you have a “virus” and offers to help you remove it. (Some reputable websites did legitimately warn visitors who were infected with the "DNSChanger" malware. That exception to this rule no longer applies.)
    ☞ A web site offers free content such as video or music, but to use it you must install a “codec,” “plug-in,” "player," "downloader," "extractor," or “certificate” that comes from that same site, or an unknown one.
    ☞ You win a prize in a contest you never entered.
    ☞ Someone on a message board such as this one is eager to help you, but only if you download an application of his choosing.
    ☞ A "FREE WI-FI !!!" network advertises itself in a public place such as an airport, but is not provided by the management.
    ☞ Anything online that you would expect to pay for is "free."
    Unexpected events
    ☞ A file is downloaded automatically when you visit a web page, with no other action on your part. Delete any such file without opening it.
    ☞ You open what you think is a document and get an alert that it's "an application downloaded from the Internet." Click Cancel and delete the file. Even if you don't get the alert, you should still delete any file that isn't what you expected it to be.
    ☞ An application does something you don't expect, such as asking for permission to access your contacts, your location, or the Internet for no obvious reason.
    ☞ Software is attached to email that you didn't request, even if it comes (or seems to come) from someone you trust.
    I don't say that leaving the safe harbor just once will necessarily result in disaster, but making a habit of it will weaken your defenses against malware attack. Any of the above scenarios should, at the very least, make you uncomfortable.
    6. Java on the Web (not to be confused with JavaScript, to which it's not related, despite the similarity of the names) is a weak point in the security of any system. Java is, among other things, a platform for running complex applications in a web page, on the client. That was always a bad idea, and Java's developers have proven themselves incapable of implementing it without also creating a portal for malware to enter. Past Java exploits are the closest thing there has ever been to a Windows-style virus affecting OS X. Merely loading a page with malicious Java content could be harmful.
    Fortunately, client-side Java on the Web is obsolete and mostly extinct. Only a few outmoded sites still use it. Try to hasten the process of extinction by avoiding those sites, if you have a choice. Forget about playing games or other non-essential uses of Java.
    Java is not included in OS X 10.7 and later. Discrete Java installers are distributed by Apple and by Oracle (the developer of Java.) Don't use either one unless you need it. Most people don't. If Java is installed, disable it—not JavaScript—in your browsers.
    Regardless of version, experience has shown that Java on the Web can't be trusted. If you must use a Java applet for a task on a specific site, enable Java only for that site in Safari. Never enable Java for a public website that carries third-party advertising. Use it only on well-known, login-protected, secure websites without ads. In Safari 6 or later, you'll see a padlock icon in the address bar when visiting a secure site.
    Stay within the safe harbor, and you’ll be as safe from malware as you can practically be. The rest of this comment concerns what you should not do to protect yourself.
    7. Never install any commercial "anti-virus" (AV) or "Internet security" products for the Mac, as they are all worse than useless. If you need to be able to detect Windows malware in your files, use one of the free security apps in the Mac App Store—nothing else.
    Why shouldn't you use commercial AV products?
    ☞ To recognize malware, the software depends on a database of known threats, which is always at least a day out of date. This technique is a proven failure, as a major AV software vendor has admitted. Most attacks are "zero-day"—that is, previously unknown. Recognition-based AV does not defend against such attacks, and the enterprise IT industry is coming to the realization that traditional AV software is worthless.
    ☞ Its design is predicated on the nonexistent threat that malware may be injected at any time, anywhere in the file system. Malware is downloaded from the network; it doesn't materialize from nowhere. In order to meet that nonexistent threat, commercial AV software modifies or duplicates low-level functions of the operating system, which is a waste of resources and a common cause of instability, bugs, and poor performance.
    ☞ By modifying the operating system, the software may also create weaknesses that could be exploited by malware attackers.
    ☞ Most importantly, a false sense of security is dangerous.
    8. An AV product from the App Store, such as "ClamXav," has the same drawback as the commercial suites of being always out of date, but it does not inject low-level code into the operating system. That doesn't mean it's entirely harmless. It may report email messages that have "phishing" links in the body, or Windows malware in attachments, as infected files, and offer to delete or move them. Doing so will corrupt the Mail database. The messages should be deleted from within the Mail application.
    An AV app is not needed, and cannot be relied upon, for protection against OS X malware. It's useful, if at all, only for detecting Windows malware, and even for that use it's not really effective, because new Windows malware is emerging much faster than OS X malware.
    Windows malware can't harm you directly (unless, of course, you use Windows.) Just don't pass it on to anyone else. A malicious attachment in email is usually easy to recognize by the name alone. An actual example:
    London Terror Moovie.avi [124 spaces] Checked By Norton Antivirus.exe
    You don't need software to tell you that's a Windows trojan. Software may be able to tell you which trojan it is, but who cares? In practice, there's no reason to use recognition software unless an organizational policy requires it. Windows malware is so widespread that you should assume it's in every email attachment until proven otherwise. Nevertheless, ClamXav or a similar product from the App Store may serve a purpose if it satisfies an ill-informed network administrator who says you must run some kind of AV application. It's free and it won't handicap the system.
    The ClamXav developer won't try to "upsell" you to a paid version of the product. Other developers may do that. Don't be upsold. For one thing, you should not pay to protect Windows users from the consequences of their choice of computing platform. For another, a paid upgrade from a free app will probably have all the disadvantages mentioned in section 7.
    9. It seems to be a common belief that the built-in Application Firewall acts as a barrier to infection, or prevents malware from functioning. It does neither. It blocks inbound connections to certain network services you're running, such as file sharing. It's disabled by default and you should leave it that way if you're behind a router on a private home or office network. Activate it only when you're on an untrusted network, for instance a public Wi-Fi hotspot, where you don't want to provide services. Disable any services you don't use in the Sharing preference pane. All are disabled by default.
    10. As a Mac user, you don't have to live in fear that your computer may be infected every time you install software, read email, or visit a web page. But neither can you assume that you will always be safe from exploitation, no matter what you do. Navigating the Internet is like walking the streets of a big city. It can be as safe or as dangerous as you choose to make it. The greatest harm done by security software is precisely its selling point: it makes people feel safe. They may then feel safe enough to take risks from which the software doesn't protect them. Nothing can lessen the need for safe computing practices.

  • Flash Newbie needs help with Movie Clips/Action Scripting

    Hi -
    I'm having a problem with my movie clips playing
    simultaneously and cannot, for the life of me, figure out what I
    have done wrong. I'm new to flash, so I may have set something up
    incorrectly, but here's what I have so far:
    11 layers, total: 1 layer with 10 control buttons, each
    button with the following actionscript:
    on (release) {
    gotoAndPlay(85);
    Where the number changes in relation to which keyframe the
    next movie is on.
    I have 10 movies, total, but they are only movie clips,
    essentially photo slide shows with audio, made all in the library.
    The problem happens when I click on the second or third
    button. Not only does the movie that I have selected begin to play,
    but all of the previous clips do as well, so it all sounds quite
    garbled. I don't know what I am missing in the action script, as my
    Action Layer has a stop command on it at each keyframe where there
    is a new clip to play.
    I have tried to add a stopAllSounds command, but I'm afraid
    that doesn't do anything because it is not a "sound file" per se,
    playing in the timeline.
    I'm at the end of my rope and really need some help in
    figuring this one out. My project is hanging in the balance on
    this, as I have scripted everything else correctly and it runs
    beautifully.
    Please help!
    Thanks,
    Caroline

    Each layer has a blank keyframe before and after each
    movieclip. Each movie clip is at a different frame. Even with the
    blank keyframes added, the second video starts to play and then the
    first video begins to play. Same happens if I click on the third
    button. Third plays, and starts 1st and 2nd shortly thereafter. Is
    there an action script I can put in that will tell the timeline
    that, when a button is clicked, no matter where the movieclip is,
    it will stop and start the newly selected movieclip?

Maybe you are looking for