|
Thanks for your response.
User can enter the data once in a day. once user enter the data ex: Sep 21st, he can not enter data for that particular user id in Sep21st. in future also he cannot add the data for Sep21st. that is my requirement. Could you please provide the solution
|
|
|
|
|
The solution is fairly obvious. Keep a record of each user and whether he entered data, and on what date. Then you just need to check that to see whether he/she is allowed to enter any more.
|
|
|
|
|
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 ?
|
|
|
|
|
|
using window.close() is ok:
1.u check button is or isn't response;
2.debug js by firefox or chrome browser ,check console is or isnot error
|
|
|
|
|
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 pavani.asb@gmail.com
|
|
|
|
|
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
vaseemahamad@ymail.com
|
|
|
|
|
|
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.
|
|
|
|
|
|
hello,
it would be very helpful if you instruct me how to build translator software.
lobsangtsering@gmail.com
|
|
|
|
|
|
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?
|
|
|
|