Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
Read the question carefully
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
I am all new to java trying to learn same basic and make same little application. I am stuck on beginning ) Can't make connection work from java app. I make connection to server from services (there I may see database). DB - TEST
You need to use the debugger to identify which statement causes the exception, and also try and see if there is more information available in the Exception object. The details provided do not give any clue as to what is wrong.
hello....i m creating a lan messenger with facility like pc sharing...to access remote pc ....like creating workgroup and access other pc files in own computer...... pls help me with the sharing part... Thank you
I am currently developing an email client as my school project using javafx and gmail api. I have fetched the email content in both format json as well as mimeMessage , I want to know how can I show the email content which is having images links and texts in a javafx UI and what components should I use for the gui
I want to know that whether, I have to extract images text individually from the json object and then display them accordingly , or I have to use a webview if so then how ? or there is something else I have to do.
That is all part of the research you need to do to complete your project. You need to look at each possible item in your email and figure out how you want to display it in the final message that the user sees.
java.lang.RuntimeException: java.lang.InstantiationException: com.orangeAppScreenPages.UserAgreement at org.openqa.selenium.support.PageFactory.instantiatePage(PageFactory.java:134) at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:64) at com.testCasesAndroid.SmokeTestingAndroid.Test(SmokeTestingAndroid.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104) at org.testng.internal.Invoker.invokeMethod(Invoker.java:645) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) at org.testng.TestRunner.privateRun(TestRunner.java:756) at org.testng.TestRunner.run(TestRunner.java:610) at org.testng.SuiteRunner.runTest(SuiteRunner.java:387) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) at org.testng.SuiteRunner.run(SuiteRunner.java:289) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293) at org.testng.TestNG.runSuitesLocally(TestNG.java:1218) at org.testng.TestNG.runSuites(TestNG.java:1133) at org.testng.TestNG.run(TestNG.java:1104) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81) Caused by: java.lang.InstantiationException: com.orangeAppScreenPages.UserAgreement at java.lang.Class.newInstance(Class.java:427) at org.openqa.selenium.support.PageFactory.instantiatePage(PageFactory.java:131) ... 27 more Caused by: java.lang.NoSuchMethodException: com.orangeAppScreenPages.UserAgreement.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) ... 28 more
=============================================== Default suite Total tests run: 1, Failures: 1, Skips: 0 Configuration Failures: 1, Skips: 0 ===============================================
[TestNG] Time taken by org.testng.reporters.XMLReporter@72c28d64: 6 ms [TestNG] Time taken by org.testng.reporters.EmailableReporter2@31000e60: 5 ms [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@47f4e407: 11 ms [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@57ea113a: 13 ms [TestNG] Time taken by org.testng.reporters.jq.Main@424ebba3: 30 ms [TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 5 ms
So I'm creating a card game and need some help with the best way to structure my classes. Let's use Hearthstone as an example though because lots of people are familiar with it. (No I'm not actually re-creating Hearthstone but many of the structural ideas are common among many card games)
Firstly, We have these
[Card] - has a name, cost, class, rarity, set, image, text, effects [Minion] - a type of card which also has Attack and Health [Spell] - a type of card [Weapon] - a type of card which also has Attack and Durability
Those attributes need to be accessed regularly (getAttack() etc) What's the best way to represent this hierarchy in Java classes? I've heard inheritance (Minion extends Card, Spell extends Card, Weapon extends Card) is generally frowned upon. But I also can't see the purpose in making Card an interface. Should I use one of these options anyway or is there a nicer alternative?
In a game of Hearthstone each player has a hand, deck, "graveyard", "board" (where minions are played), weapon slot and active Secrets. These are all arrays of Cards although "board" can only contain minions and the weapon slot can only contain a single weapon.
[Card in hand] - has a "base" Card and may have its attributes modified (cost, attack, health) by an effect [Minion on board] - has a "base" Minion, current Health, may be Divine Shielded/Stealthed, may have its attributes modified by effects [Weapon equipped] - has a "base" Weapon, current Durability, may have its attributes modified by effects [Active Secret] - has a "base" Spell and a trigger (something happening that causes it to activate)
Naturally cards can move around between these zones. My original idea is to have a separate class for each zone with an instance variable "Card basecard" and when a card moves from eg hand to board, remove the Card in Hand from the hand array and place a Minion on board in the board array. Again, is there a nicer alternative?
Cards have effects. There are different kinds of effects
[Battlecry, Deathrattle] - something happens when the minion is played or dies [Trigger] - something happens when a specific "trigger" affects the minion while it's on board (eg it takes damage like Acolyte of Pain) [Continuous] - the minion constantly affects the game in some way while it's on the board (eg buffs other minions like Dire Wolf Alpha) [Modifier] - the minion constantly modifies its own attributes in some way (eg lowers cost for each other card in hand like Mountain Giant)
Each Card has an array of Effects. But different effects require different methods; Trigger effects have a Trigger, Battlecries often have a "target" which may only include minions with certain attributes, continuous effects don't "do something" at a particular time they just need to be checked constantly by other objects etc
Is there a good way to represent THIS hierarchy? Again, my first thought is to just use inheritance but it gets messy. I know it seems like a big ask but is there a "nice" way to do something like this?
Create an HTML file AddCookies.html which contains four text boxes .When user enters the values in these text boxes and press the submit button, the values will be sent to AddCookies.java servlet and get saved in cookies.
Anyone Help me to explain how does this code works DataInputStream in= new DataInputStream(new FileInputStream(steg.getFile())); in.read(byteArray, 0, fileSize); in.close(); Cipher cipher= Cipher.getInstance("DES"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(password.substring(0, 8).getBytes(), "DES")); byteArray= cipher.doFinal(byteArray);