 |
 |
When posting your question please:- 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.
cheers,
Chris Maunder
The Code Project Co-fou
|
|
|
|
 |
how to convert ascii characters to septet and then how to pack septet in 8 bit representation ..
Reply quickly
Thanks for reply in advance
|
|
|
|
 |
Ascii characters are already 7 bits wide. If you wish to pack them close together then it is just a matter of repeated shift and add.
|
|
|
|
 |
What am I trying todo: I request the document from a website with jsoup and then I try to get different kind of information from it. So far it worked with like getting the text of a tag but now I have a few H2 tags which contains headlines of different Information structures. I need to check if this H2 tag a specific text and then get the text of the parent html node.
This is the code I try to execute
String expression = "//h2[text()='Synopsis']";
System.out.println(Xsoup.compile(expression).evaluate(doc).get());
and this is the exception I get
org.jsoup.select.Selector$SelectorParseException: Could not parse query 'h2[text()='Synopsis']': unexpected token at 'text()='Synopsis''
at us.codecraft.xsoup.xevaluator.XPathParser.byFunction(XPathParser.java:225)
at us.codecraft.xsoup.xevaluator.XPathParser.consumePredicates(XPathParser.java:202)
at us.codecraft.xsoup.xevaluator.XPathParser.findElements(XPathParser.java:138)
at us.codecraft.xsoup.xevaluator.XPathParser.parse(XPathParser.java:51)
at us.codecraft.xsoup.xevaluator.XPathParser.parse(XPathParser.java:375)
at us.codecraft.xsoup.xevaluator.XPathParser.combinator(XPathParser.java:85)
at us.codecraft.xsoup.xevaluator.XPathParser.parse(XPathParser.java:49)
at us.codecraft.xsoup.xevaluator.XPathParser.parse(XPathParser.java:375)
at us.codecraft.xsoup.Xsoup.compile(Xsoup.java:27)
at de.daraku.coding.daraku_mal_api.Test.TestParseAnimeSearch.TestSynopsis(TestParseAnimeSearch.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
For the last 4 hours and tried like 30 different xpath statements like the one above I'm at a loss here and can't think of anything more I could try. Every selution that goes remotely in this kind of direction I tried returned null, something entirely different as I expected or with the exception you see above.
here is an example that actually works but as I said before its quite easy
Xsoup.compile("//div[@id='contentWrapper']/h1/text()")
and yes the H2 tag with the text Synopsis exists, If I requests a list of all H2 tags like this
String expression = "//h2";
List<String> list = Xsoup.compile(expression).evaluate(doc).list();
there is a list entry with Synopsis as tag at the 5th position. But since I can't really say that every H2 tag will be displayed its hard to say that its always on the 5th position.
I chose XSoup because it is XPath based on JSoup and since I already use Jsoup, why don't combine it and save some time (thats at least what I thought)
Is Anyone here that can help me? Is it only a problem of XSoup, Or is my statement just wrong? Or is there an even better way to do this?
|
|
|
|
 |
how to close the modal dialog so that it return to parent window by using button ?
I am using window.close(); it is not working . What other we can implement ?
|
|
|
|
|
 |
If any one done the task similar to this,If possible share the piece of code
|
|
|
|
 |
please any one can send a crossword solution in java
|
|
|
|
|
 |
1)need to read the data from an input file where input file contains parameters like no:of nodes,no:of subgraphs,random number etc.(idea how to specify all these in input file)
2)create a data structure tree or array to store above
3)create graph in main memory and traverse this graph a node at a time and outputs the data into output files
4)output file must contain node id and ids to which it is connected to
please help.i am starter in coding.please do help and guide me.thanks in advance.
my mail [email protected]
|
|
|
|
 |
0) Please do not use bold characters, it appears as if you are shouting, and that is considered rude.
1-4) First learn Java and its libraries: http://download.oracle.com/javase/tutorial/index.html[^].
5) People here are happy to help you when you get stuck with the code you have written, but no one is going to write it for you.
|
|
|
|
 |
can anybody provide job in java for fresher no salary.if anybody have such company please contact
91-8898744187
[email protected]
|
|
|
|
|
 |
I am reading date time and generating random number using MyClass(Java class) that have Main function.
I need to exposed one class(Exposed_class) for reading random number value from My class, to third party application (that is also written in Java).
in this case there was two main that is running concurrent and want to share data.
|
|
|
|
 |
You should create a library (class or jar file) that the other application calls in order to get its information.
|
|
|
|
 |
yes, I agreed bu problem is that to shared variable of my current running application to other java application and if other application access my class that is OK but how to share value of my current running object.
|
|
|
|
 |
You would need to use shared memory[^] or some sort of message passing protocol.
|
|
|
|
 |
Shivanand Gupta wrote: I need to exposed one class(Exposed_class) for reading random number value from My class, to third party application (that is also written in Java).
No, you are approaching this incorrectly.
What you need is a 'service' that provides a unique (presumably that is what you think you are doing) data to the caller.
That service is an independent app.
Then the two apps that you have use that service. That way either app can be running without the other.
This of course presumes there isn't a different way to solve the problem which wouldn't require any sharing at all.
|
|
|
|
 |
For get your Solution you can visit on http://techgurulab.com/course/java-tutorials/
|
|
|
|
 |
hello, it would be very helpful if you instruct me how to build translator software. [email protected]
|
|
|
|
|
 |
Please do not post email address here: we can send you messages without it, but it can invite a lot of spams...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
I am a beginner for Java programming. I started to self study by referring java documentation. But it is too complicated. But I followed language basics. After that I am in a trouble to select that , which java technologies to study. My dream is to be a java developer. Anyone can guide me?
|
|
|
|
 |
Start with the Java Tutorials[^]. They will guide you from the very beginning in clear and simple terms.
|
|
|
|
 |
Start with the basics, buy a book. If you can't get hold of a good book, then as Richard suggests, The Java Tutorials is also a good place to start.
|
|
|
|
 |