Need help with choices
So I need a new phone for one of my lines, but my the upgrade isn't up for 14 months (Nokia Twist...worst phone ever made). I have to pay retail & I don't know what to get. Which one is better LG Vortex or Motorola Citrus?? I've read reviews for both, but the ones I come across are comparing them to more expensive/powerful phones. I know you get what you pay for & I can't pay for much right now but a smartphone would be nice...
It's a no brainer, I would go with the Vortex. There are several reviews out for both phones. I inclucded this link because you can compare the two phones and can also read each indiviual review. Hope this helps.
http://www.phonearena.com/phones/carriers/Verizon
Similar Messages
-
No Creative Cloud in Croatia - need help with choices
HI everyone,
I've been working in varous agencies all my work life so I never really bothered with software purhcases, but now that I'm about to open my own small one-man company, I have some tough choices in front of me.
I create newspapers and magazines (paper-based designs), but I started fiddling with web design and I'm really excited about the prospect of offering my clients mobile and tablet publications.
When I saw Creative Cloud I was really excited because it:
a) offers me a reasonable monthly subscription fee
b) offers help with hosting and distribution of e-content
Unfortunately, Creative Cloud is not available in Croatia, so I'm thinking about purchasing Design Standard (short on cash, hm).
If I do that, I'm not sure if I'll be able to use all the nifty web-based features of Creative Cloud in the future, except if I purchase both Design Standard Now, and sign a 1-year Contract for the Cloud once it becomes available in Croatia.
Is there a way to combine Creative Cloud web solutions (not talking about software, but rather storage, web hosting, fonts etc.) with purchaing a regular CS6 Design Standard licence?The web hosting features included in Creative Cloud, Business Catalyst and TypeKit can be purchased separately.
-
Need help with calculator project for an assignment...
Hi all, I please need help with my calculator project that I have to do for an assignment.
Here is the project's specifications that I need to do"
"""Create a console calculator applicaion that:
* Takes one command line argument: your name and surname. When the
program starts, display the date and time with a welcome message for the
user.
* Display all the available options to the user. Your calculator must include
the arithmetic operations as well as at least five scientific operations of the
Math class.
-Your program must also have the ability to round a number and
truncate it.
-When you multiply by 2, you should not use the '*' operator to perform the
operation.
-Your program must also be able to reverse the sign of a number.
* Include sufficient error checking in your program to ensure that the user
only enters valid input. Make use of the String; Character, and other
wrapper classes to help you.
* Your program must be able to do conversions between decimal, octal and
hex numbers.
* Make use of a menu. You should give the user the option to end the
program when entering a certain option.
* When the program exits, display a message for the user, stating the
current time, and calculate and display how long the user used your
program.
* Make use of helper classes where possible.
* Use the SDK to run your program."""
When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
Here is the programs code that I've written so far:
{code}
import java.io.*;
import java.util.*;
import java.text.*;
public class Project {
private static String nameSurname = "";
private static String num1 = null;
private static String num2 = null;
private static String choice1 = null;
private static double answer = 0;
private static String more;
public double Add() {
answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
return answer;
public double Subtract() {
answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
return answer;
public double Multiply() {
answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
return answer;
public double Divide() {
answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
return answer;
public double Modulus() {
answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
return answer;
public double maximumValue() {
answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
return answer;
public double minimumValue() {
answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
return answer;
public double absoluteNumber1() {
answer = (Math.abs(Double.parseDouble(num1)));
return answer;
public double absoluteNumber2() {
answer = (Math.abs(Double.parseDouble(num2)));
return answer;
public double Squareroot1() {
answer = (Math.sqrt(Double.parseDouble(num1)));
return answer;
public double Squareroot2() {
answer = (Math.sqrt(Double.parseDouble(num2)));
return answer;
public static String octalEquivalent1() {
int iNum1 = Integer.parseInt(num1);
String octal1 = Integer.toOctalString(iNum1);
return octal1;
public static String octalEquivalent2() {
int iNum2 = Integer.parseInt(num2);
String octal2 = Integer.toOctalString(iNum2);
return octal2;
public static String hexadecimalEquivalent1() {
int iNum1 = Integer.parseInt(num1);
String hex1 = Integer.toHexString(iNum1);
return hex1;
public static String hexadecimalEquivalent2() {
int iNum2 = Integer.parseInt(num2);
String hex2 = Integer.toHexString(iNum2);
return hex2;
public double Round1() {
answer = Math.round(Double.parseDouble(num1));
return answer;
public double Round2() {
answer = Math.round(Double.parseDouble(num2));
return answer;
SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
Date now = new Date();
SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
static Date timeIn = new Date();
public static long programRuntime() {
Date timeInD = timeIn;
long timeOutD = System.currentTimeMillis();
long msec = timeOutD - timeInD.getTime();
float timeHours = msec / 1000;
return (long) timeHours;
DecimalFormat decimals = new DecimalFormat("#0.00");
public String insertNameAndSurname() throws IOException{
boolean inputCorrect = false;
while (inputCorrect == false) {
while (nameSurname == null || nameSurname.length() == 0) {
for (int i = 0; i < nameSurname.length(); i++) {
if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
inputCorrect = true;
else{
inputCorrect = false;
break;
try {
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
System.out.print("Please enter your name and surname: ");
nameSurname = inStream.readLine();
inputCorrect = true;
}catch (IOException ex) {
System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
inputCorrect = false;
System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
return nameSurname;
public String inputNumber1() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
num1 = br.readLine();
double number1 = Double.parseDouble(num1);
System.out.println("\nThe number you have entered is: " + number1);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
inputCorrect = false;
return num1;
public String calculatorChoice() throws IOException {
System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
System.out.println("\n*********************************************");
System.out.println("---------------------------------------------");
System.out.println("Please select an option from the list below: ");
System.out.println("---------------------------------------------");
System.out.println("1 - Add");
System.out.println("2 - Subtract");
System.out.println("3 - Multiply");
System.out.println("4 - Divide (remainder included)");
System.out.println("5 - Maximum and minimum value of two numbers");
System.out.println("6 - Squareroot");
System.out.println("7 - Absolute value of numbers");
System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
System.out.println("9 - Round numbers");
System.out.println("0 - Exit program");
System.out.println("**********************************************");
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
System.out.print("Please enter your option and hit <ENTER>: ");
choice1 = inStream.readLine();
int c1 = Integer.parseInt(choice1);
System.out.println("\nYou have entered choice number: " + c1);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
inputCorrect = false;
return choice1;
public String inputNumber2() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
num2 = br2.readLine();
double n2 = Double.parseDouble(num2);
System.out.println("\nThe second number you have entered is: " + n2);
System.out.println("\nYour numbers are: " + num1 + " and " + num2);
inputCorrect = true;
} catch (NumberFormatException nfe) {
System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
inputCorrect = false;
return num2;
public int Calculator() {
int choice2 = (int) Double.parseDouble(choice1);
switch (choice2) {
case 1 :
Add();
System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
break;
case 2 :
Subtract();
System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
break;
case 3 :
Multiply();
System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
break;
case 4 :
Divide();
System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
Modulus();
System.out.print(" and the remainder is " + decimals.format(answer));
break;
case 5 :
maximumValue();
System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
minimumValue();
System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
break;
case 6 :
Squareroot1();
System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
Squareroot2();
System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
break;
case 7 :
absoluteNumber1();
System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
absoluteNumber2();
System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
break;
case 8 :
octalEquivalent1();
System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
octalEquivalent2();
System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
hexadecimalEquivalent1();
System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
hexadecimalEquivalent2();
System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
break;
case 9 :
Round1();
System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
Round2();
System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
break;
case 0 :
if (choice2 == 0) {
System.exit(1);
break;
return choice2;
public String anotherCalculation() throws IOException {
boolean inputCorrect = false;
while (inputCorrect == false) {
try {
BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
System.out.print("\nWould you like to do another calculation? Y/N ");
more = br3.readLine();
String s1 = "y";
String s2 = "Y";
if (more.equals(s1) || more.equals(s2)) {
inputCorrect = true;
while (inputCorrect = true){
inputNumber1();
System.out.println("");
calculatorChoice();
System.out.println("");
inputNumber2();
System.out.println("");
Calculator();
System.out.println("");
anotherCalculation();
System.out.println("");
inputCorrect = true;
} else {
System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
System.out.println("the program will now exit, Goodbye.");
System.exit(0);
} catch (IOException ex){
System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
inputCorrect = false;
return more;
public static void main(String[] args) throws IOException {
Project p1 = new Project();
p1.insertNameAndSurname();
System.out.println("");
p1.inputNumber1();
System.out.println("");
p1.calculatorChoice();
System.out.println("");
p1.inputNumber2();
System.out.println("");
p1.Calculator();
System.out.println("");
p1.anotherCalculation();
System.out.println("");
{code}
*Can you please run my code for yourself and have a look at how this program is constructed*
*and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
Your help will be much appreciated.
Thanks in advanceSmirre wrote:
Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
AND you might want to ask yourself why the heck a calculator needs to know the users Name. -
Need help with Berkeley XML DB Performance
We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
Berkeley DB XML Performance Questionnaire
1. Describe the Performance area that you are measuring? What is the
current performance? What are your performance goals you hope to
achieve?
We are measuring the performance while loading a document during
web application startup. It is currently taking 10-12 seconds when
only one user is on the system. We are trying to do some testing to
get the load time when several users are on the system.
We would like the load time to be 5 seconds or less.
2. What Berkeley DB XML Version? Any optional configuration flags
specified? Are you running with any special patches? Please specify?
dbxml 2.4.13. No special patches.
3. What Berkeley DB Version? Any optional configuration flags
specified? Are you running with any special patches? Please Specify.
bdb 4.6.21. No special patches.
4. Processor name, speed and chipset?
Intel Xeon CPU 5150 2.66GHz
5. Operating System and Version?
Red Hat Enterprise Linux Relase 4 Update 6
6. Disk Drive Type and speed?
Don't have that information
7. File System Type? (such as EXT2, NTFS, Reiser)
EXT3
8. Physical Memory Available?
4GB
9. Are you using Replication (HA) with Berkeley DB XML? If so, please
describe the network you are using, and the number of Replica’s.
No
10. Are you using a Remote Filesystem (NFS) ? If so, for which
Berkeley DB XML/DB files?
No
11. What type of mutexes do you have configured? Did you specify
–with-mutex=? Specify what you find inn your config.log, search
for db_cv_mutex?
None. Did not specify -with-mutex during bdb compilation
12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
Which compiler and version?
Java 1.5
13. If you are using an Application Server or Web Server, please
provide the name and version?
Oracle Appication Server 10.1.3.4.0
14. Please provide your exact Environment Configuration Flags (include
anything specified in you DB_CONFIG file)
Default.
15. Please provide your Container Configuration Flags?
final EnvironmentConfig envConf = new EnvironmentConfig();
envConf.setAllowCreate(true); // If the environment does not
// exist, create it.
envConf.setInitializeCache(true); // Turn on the shared memory
// region.
envConf.setInitializeLocking(true); // Turn on the locking subsystem.
envConf.setInitializeLogging(true); // Turn on the logging subsystem.
envConf.setTransactional(true); // Turn on the transactional
// subsystem.
envConf.setLockDetectMode(LockDetectMode.MINWRITE);
envConf.setThreaded(true);
envConf.setErrorStream(System.err);
envConf.setCacheSize(1024*1024*64);
envConf.setMaxLockers(2000);
envConf.setMaxLocks(2000);
envConf.setMaxLockObjects(2000);
envConf.setTxnMaxActive(200);
envConf.setTxnWriteNoSync(true);
envConf.setMaxMutexes(40000);
16. How many XML Containers do you have? For each one please specify:
One.
1. The Container Configuration Flags
XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
xmlContainerConfig.setTransactional(true);
xmlContainerConfig.setIndexNodes(true);
xmlContainerConfig.setReadUncommitted(true);
2. How many documents?
Everytime the user logs in, the current xml document is loaded from
a oracle database table and put it in the Berkeley XML DB.
The documents get deleted from XML DB when the Oracle application
server container is stopped.
The number of documents should start with zero initially and it
will grow with every login.
3. What type (node or wholedoc)?
Node
4. Please indicate the minimum, maximum and average size of
documents?
The minimum is about 2MB and the maximum could 20MB. The average
mostly about 5MB.
5. Are you using document data? If so please describe how?
We are using document data only to save changes made
to the application data in a web application. The final save goes
to the relational database. Berkeley XML DB is just used to store
temporary data since going to the relational database for each change
will cause severe performance issues.
17. Please describe the shape of one of your typical documents? Please
do this by sending us a skeleton XML document.
Due to the sensitive nature of the data, I can provide XML schema instead.
18. What is the rate of document insertion/update required or
expected? Are you doing partial node updates (via XmlModify) or
replacing the document?
The document is inserted during user login. Any change made to the application
data grid or other data components gets saved in Berkeley DB. We also have
an automatic save every two minutes. The final save from the application
gets saved in a relational database.
19. What is the query rate required/expected?
Users will not be entering data rapidly. There will be lot of think time
before the users enter/modify data in the web application. This is a pilot
project but when we go live with this application, we will expect 25 users
at the same time.
20. XQuery -- supply some sample queries
1. Please provide the Query Plan
2. Are you using DBXML_INDEX_NODES?
Yes.
3. Display the indices you have defined for the specific query.
XmlIndexSpecification spec = container.getIndexSpecification();
// ids
spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// index to cover AttributeValue/Description
spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
// cover AttributeValue/@value
spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// item attribute values
spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// default index
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
// save the spec to the container
XmlUpdateContext uc = xmlManager.createUpdateContext();
container.setIndexSpecification(spec, uc);
4. If this is a large query, please consider sending a smaller
query (and query plan) that demonstrates the problem.
21. Are you running with Transactions? If so please provide any
transactions flags you specify with any API calls.
Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
22. If your application is transactional, are your log files stored on
the same disk as your containers/databases?
Yes.
23. Do you use AUTO_COMMIT?
No.
24. Please list any non-transactional operations performed?
No.
25. How many threads of control are running? How many threads in read
only mode? How many threads are updating?
We use Berkeley XML DB within the context of a struts web application.
Each user logged into the web application will be running a bdb transactoin
within the context of a struts action thread.
26. Please include a paragraph describing the performance measurements
you have made. Please specifically list any Berkeley DB operations
where the performance is currently insufficient.
We are clocking 10-12 seconds of loading a document from dbd when
five users are on the system.
getContainer().getDocument(documentName);
27. What performance level do you hope to achieve?
We would like to get less than 5 seconds when 25 users are on the system.
28. Please send us the output of the following db_stat utility commands
after your application has been running under "normal" load for some
period of time:
% db_stat -h database environment -c
% db_stat -h database environment -l
% db_stat -h database environment -m
% db_stat -h database environment -r
% db_stat -h database environment -t
(These commands require the db_stat utility access a shared database
environment. If your application has a private environment, please
remove the DB_PRIVATE flag used when the environment is created, so
you can obtain these measurements. If removing the DB_PRIVATE flag
is not possible, let us know and we can discuss alternatives with
you.)
If your application has periods of "good" and "bad" performance,
please run the above list of commands several times, during both
good and bad periods, and additionally specify the -Z flags (so
the output of each command isn't cumulative).
When possible, please run basic system performance reporting tools
during the time you are measuring the application's performance.
For example, on UNIX systems, the vmstat and iostat utilities are
good choices.
Will give this information soon.
29. Are there any other significant applications running on this
system? Are you using Berkeley DB outside of Berkeley DB XML?
Please describe the application?
No to the first two questions.
The web application is an online review of test questions. The users
login and then review the items one by one. The relational database
holds the data in xml. During application load, the application
retrieves the xml and then saves it to bdb. While the user
is making changes to the data in the application, it writes those
changes to bdb. Finally when the user hits the SAVE button, the data
gets saved to the relational database. We also have an automatic save
every two minues, which saves bdb xml data and saves it to relational
database.
Thanks,
Madhav
[email protected]Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
milu@colinux:~/xpg > dbxml -h ~/dbenv
Joined existing environment
dbxml> setverbose 7 2
dbxml> open tv.dbxml
dbxml> listIndexes
dbxml> query { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
Michael Ludwig -
Need help with a Asus 27" monitor with webcam problem.
Need help with a Asus 27" monitor I bought. Model VK278Q. The issue is that the webcam will not work properly. Various applications can see the webcam, but I just get a black box. From what I have read, the issue seems to be that there are no official drivers for the webcam.
I thought someone in this community might be able to offer some help before I return the monitor. I read somewhere that it may be possible to tweat the OS so that the iSight software will work for the monitor webcam.
ThxNAVARRO360 wrote: ... there is no simple fix? ...
Eureka! You now understand the situation.
Even the old standard for Mac OS X drivers for non-compatible cams, macam, says that it has no driver for ASUS (20") monitor camera.
The macam status shows:
not working (no documentation)
With no working driver for the 20" ASUS, it is not surprising that there is none for the 27" either. There may be good reason that ASUS won't (or can't) offer either the technical documentation or a Mac driver for their monitor's inbuilt webcam. However, they apparently do not publish that information.
If ASUS Technical Support cannot provide the driver you need for OS X, the ASUS will continue to be a ridonculous (sic) monitor whose webcam will not work with your OS X Mac. The only other simple fix I can think of is to use the ASUS with a different PC that is compatible with this monitor and its inbuilt webcam. What you do is certainly your choice.
Message was edited by: EZ Jim
Mac OSX 10.7.3 -
i'm making a game at the moment.......
i need help with a way to check all the hashmaps of enimies in a class called room......i need to check if they all == 0...when they all equal zero the game ends......
i know i can check the size of a hash map with size().....but i want to check if all the hashmaps within all the rooms == 0.First of all stop cross posting. These values in the HashMap, they are a "Collection" of values, so what is wrong with reply two and putting all these collections of values into a super collection? A collection of collections? You can have a HashMap of HashMaps. One HashMap that holds all your maps and then you can use a for loop to check if they are empty. A map is probably a bad choice for this operation as you don't need a key and an array will be much faster.
HashMap [] allMaps = {new HashMap(),new HashMap()}; -
Hi, I need help with my iphone four bought in England but I live in Italy, I upgraded IOS six and now I can not read more than the Italian card, how can I contact a service center via email?
Only the carrier it is locked to can authorize unlocking it. Sounds like the phone was hacked to unlock it originally. Find out what carrier it is locked to, and look up their contact information using google or the search engine of your choice.
-
Need help with Adobe Premiere Elements 2
I can drag a large high rez jpeg into timeline. Then when I click to playback....it gets more pixelated. That's a bad beginning. Then, when I go to export it, I've tried several extensions. All look bad during playback on YouTube. This should be pretty simple. High quality jpeg, but is fuzzy in movie. What's going wrong?
hi Bill -
ok fine. I have PSDs too. I tried what you said.
I put a PSD right beside a JPEG in the timeline. I rendered it (which I
didn't know to do because the instructions don't even mention it. The
instructions are terrible. Seems it leaves out a lot of info.)
So, then I click PLAY on my monitor. I see no difference between the PSD
and the JPEG yet. So, if I want to put this on YouTube, what's the best way
exactly, without gettting too technical? It looks like I have the choice
between Exporting in Mpeg or Quicktime or Windows Media. I think youtube
likes wmv.
From: Bill Hunt <[email protected]>
To: Tommy Midyette <[email protected]>
Date: 6/3/2010 10:01:24 AM
Subject: need help with Adobe Premiere Elements 2
>
When you drag the stills to the Timeline, there should be a red line
above them. Press Enter to Render the Timeline.
Â
Do not know the particulars of PrE 2, but in later versions, you can
Rt-click on the Program Monitor, and choose Magnification = 100%, rather
than Fit. You might have to resize your Program Monitor, but check at 100%.
Â
Also remember a few points:
Â
1.) You are looking at a DVD-quality image now, and that was designed
with low-rez CRT TV's in mind, and NOT hi-rez computer monitors. DVD vs
hi-rez sources and displays is probably less than what VHS vs DVD was, not
that long ago.
2.) You are looking at an emulation, a preview
3.) Your images have already been compressed to JPEG once, loosing
quality. That is why I always work in PSD, especially if there has already
been one JPEG compression, whether in camera, or in the image processing
stage. I keep JPEG either out of my workflow, or as limited, as is
possible. Some do not see the quality loss with JPEG compression, but I do,
and if I can create images that are as good as it gets, I know that my
clients will be happy.
Â
Good luck,
Â
Hunt
> -
Urgent: im new and need help with this task!
I need help with converting the pseudo code to java code, Any help will b greatly appreciated!
// Declare a variable of type int, called "choice".
// Generate a random number between 0 inclusive and 7
// exclusive, and store that number into the variable
// "choice". (How do you generate a random number? Use the
// nextInt(int) method inside the random object, which takes
// a single int parameter. You can read about this method
// here:
// http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html
// If "choice" is equal to 0, then create and return a new
// IBlock object, passing "game" as the parameter to IBlock's
// constructor.
// Otherwise, if "choice" is equal to 1, then create and
// return a new TBlock object, passing "game" as the
// parameter.
// Otherwise, if "choice" is equal to 2, then create and
// return a new OBlock object, passing "game" as the
// parameter.
// Otherwise, .... etc ....
// (please continue to do this for all of the 7 kinds of block
// that can be created)import java.util.*;
public class Echo{
public static void main(String[] args) {
//System.out.println("enter ur choice");
Random r=new Random();
int choice=r.nextInt(6);
switch(choice)
case 0:
IBlock object0=new IBlock("games");
break;
case 1:
TBlock object1=new TBlock("games");
break;
case 2:
OBlock object2=new OBlock("games");
break;
case 3:
LBlock object3=new LBlock("games");
break;
case 4:
JBlock object4=new JBlock("games");
break;
case 5:
SBlock object5=new SBlock("games");
break;
case 6:
ZBlock object6=new ZBlock("games");
break;
class TBlock
TBlock(String s)
System.out.print("TBlock called"+"\n value passed is "+s);
class IBlock
IBlock(String s)
System.out.print("IBlock called"+"\n value passed is "+s);
class JBlock
JBlock(String s)
System.out.print("JBlock called"+"\n value passed is "+s);
class OBlock
OBlock(String s)
System.out.print("OBlock called"+"\n value passed is "+s);
class LBlock
LBlock(String s)
System.out.print("LBlock called"+"\n value passed is "+s);
class SBlock
SBlock(String s)
System.out.print("SBlock called"+"\n value passed is "+s);
class ZBlock
ZBlock(String s)
System.out.print("ZBlock called"+"\n value passed is "+s);
} -
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 36869Well, 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:
new2this2020What's the problem you're having ???
PS. -
Need help with trim and null function
Hi all,
I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
ThanksHi,
Thanks for the reply. What am I doing wrong?
SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
(AL1.user_data_text,'XX')
FROM Table
I want the XX to appear in the same column as the
trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
What you're saying is:
SELECT trim ( SUBSTR (AL1.user_data_text, 1, 3))
, NVL ( AL1.user_data_text, 'XX' )
FROM Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
SELECT NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
, 'XX'
FROM Table -
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 -
Need help with Airport Express and so on.
Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
The AirPort Extreme base station (AEBS) is a router so it will do what you need.
You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection. -
I need help with shooting in my flash game for University
Hi there
Ive tried to make my tank in my game shoot, all the code that is there works but when i push space to shoot which is my shooting key it does not shoot I really need help with this and I would appriciate anyone that could help
listed below should be the correct code
//checking if the space bar is pressed and shooting is allowed
if(evt.keyCode == 32 && shootAllow){
//making it so the user can't shoot for a bit
shootAllow = false;
//declaring a variable to be a new Bullet
var newBullet:Bullet = new Bullet();
//changing the bullet's coordinates
newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
newBullet.x = tank_mc.x;
//then we add the bullet to stage
addChild(newBullet);
listed below is my entire code
import flash.display.MovieClip;
//declare varibles to create mines
//how much time before allowed to shoot again
var cTime:int = 0;
//the time it has to reach in order to be allowed to shoot (in frames)
var cLimit:int = 12;
//whether or not the user is allowed to shoot
var shootAllow:Boolean = true;
var minesInGame:uint;
var mineMaker:Timer;
var cursor:MovieClip;
var index:int=0;
var tankMine_mc:MovieClip;
var antiTankmine_mc:MovieClip;
var maxHP:int = 100;
var currentHP:int = maxHP;
var percentHP:Number = currentHP / maxHP;
function initialiseMine():void
minesInGame = 15;
//create a timer fires every second
mineMaker = new Timer(6000, minesInGame);
//tell timer to listen for Timer event
mineMaker.addEventListener(TimerEvent.TIMER, createMine);
//start the timer
mineMaker.start();
function createMine(event:TimerEvent):void
//var tankMine_mc:MovieClip;
//create a new instance of tankMine
tankMine_mc = new Mine();
//set the x and y axis
tankMine_mc.y = 513;
tankMine_mc.x = 1080;
// adds mines to stage
addChild(tankMine_mc);
tankMine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
function moveHorizontal(evt:Event):void{
evt.target.x -= Math.random()*5;
if (evt.target.x >= stage.stageWidth)
evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
removeChild(DisplayObject(evt.target));
initialiseMine();
//declare varibles to create mines
var atmInGame:uint;
var atmMaker:Timer;
function initialiseAtm():void
atmInGame = 15;
//create a timer fires every second
atmMaker = new Timer(8000, minesInGame);
//tell timer to listen for Timer event
atmMaker.addEventListener(TimerEvent.TIMER, createAtm);
//start the timer
atmMaker.start();
function createAtm(event:TimerEvent):void
//var antiTankmine_mc
//create a new instance of tankMine
antiTankmine_mc = new Atm();
//set the x and y axis
antiTankmine_mc.y = 473;
antiTankmine_mc.x = 1080;
// adds mines to stage
addChild(antiTankmine_mc);
antiTankmine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
function moveHorizontal_2(evt:Event):void{
evt.target.x -= Math.random()*10;
if (evt.target.x >= stage.stageWidth)
evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
removeChild(DisplayObject(evt.target));
initialiseAtm();
function moveForward():void{
bg_mc.x -=10;
function moveBackward():void{
bg_mc.x +=10;
var tank_mc:Tank;
// create a new Tank and put it into the variable
// tank_mc
tank_mc= new Tank;
// set the location ( x and y) of tank_mc
tank_mc.x=0;
tank_mc.y=375;
// show the tank_mc on the stage.
addChild(tank_mc);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onMovementKeys);
//creates the movement
function onMovementKeys(evt:KeyboardEvent):void
//makes the tank move by 10 pixels right
if (evt.keyCode==Keyboard.D)
tank_mc.x+=5;
//makes the tank move by 10 pixels left
if (evt.keyCode==Keyboard.A)
tank_mc.x-=5
//checking if the space bar is pressed and shooting is allowed
if(evt.keyCode == 32 && shootAllow){
//making it so the user can't shoot for a bit
shootAllow = false;
//declaring a variable to be a new Bullet
var newBullet:Bullet = new Bullet();
//changing the bullet's coordinates
newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
newBullet.x = tank_mc.x;
//then we add the bullet to stage
addChild(newBullet);
if (tank_mc.hitTestObject(antiTankmine_mc))
//tank_mc.gotoAndPlay("hit");
currentHP -= 10;
// remove anti tank mine
removeChild(antiTankmine_mc);
if (tank_mc.hitTestObject(tankMine_mc))
//tank_mc.gotoAndPlay("hit");
currentHP -= 10;
// remove anti tank mine
removeChild(tankMine_mc);
//var maxHP:int = 100;
//var currentHP:int = maxHP;
//var percentHP:Number = currentHP / maxHP;
//Incrementing the cTime
//checking if cTime has reached the limit yet
if(cTime < cLimit){
cTime ++;
} else {
//if it has, then allow the user to shoot
shootAllow = true;
//and reset cTime
cTime = 0;
function updateHealthBar():void
percentHP = currentHP / maxHP;
healthBar.barColor.scaleX = percentHP;
if(currentHP <= 0)
currentHP = 0;
trace("Game Over");
updateHealthBar();USe the trace function to analyze what happens and what fails to happen in the code you showed. trace the conditional values to see if they are set up to allow a shot when you press the key
Maybe you are looking for
-
I have an ipad and want to buy an ipad mini. Can I transfer everything over?
I have 3 ipads under one apple ID and soon to have a fourth. I want to rearrage who has what device. Here is how they are now: iPad 3 16m wifi:User 1 iPad 2 16m wifi:User 2 iPad 2 16m wifi:User 3 User 4 currently has no ipad. User 1 is getting a new
-
Configure kernel without mkinitcpio.
Hello i got one problem with kernel. I have compiled and installed my new kernel (2.6.30-3) and i hav own config for it ,but i don't want to sue mkinitcpio ,i compiled all modules i need to boot in the kernel and after install i delate /boot/kenel26.
-
Hi my airplay connection from my computer to my apple tv it doesn't work anymore why?
-
Display MENGE field with no decimals in smartfroms
Hi Experts, I want to print MSEG-MENGE field with no decimals in smartforms , how do i declare this field, I have also declared this field in global defination in quantity/currency field... But i am unable to get the output.. I tried using &mseg-men
-
Issue in Standard Function DateTrans
Hi, I have a requirement to convert the date format from dd-MMM-yyyy to MMddyyyy. I am using standard Function "DateTrans" for this conversion.I am getting the error Unparseable date: "01-DEC-2011" I am working on PI7.1EHP1. Source Dateformat: 01-DE