|
great. Please feel free to provide more information as you also want some lines as answer.
- where at Yahoo are you trying to login? mail? social stuff? other?
- what kind of exception did you get? Post the exception!
regards Torsten
I never finish anyth...
|
|
|
|
|
Exception:
{"error":{"lang":"en-US","description":"Please provide valid credentials. OAuth oauth_problem=\"signature_invalid\", realm=\"yahooapis.com\""}}
Here, I'm used Yahoo API get profile information of user. Frist I'm get request token, after I'm used request token get access token and parameter, final I'm used access token and parameter get profile of user. but I've encountered one bug \"signature_invalid\" in the final step.
|
|
|
|
|
see - the exception says:
Please provide valid credentials
so please check them. It's not fun, but they are broke.
regards Torsten
I never finish anyth...
|
|
|
|
|
This sounds a rather specific problem. You might find asking on a yahoo API programmers' forum that you'll get more help.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
"Please provide valid credentials" - the error is quite clear.
|
|
|
|
|
I have one project java . I want read book.xml by SAX sample . You have dowload my project to check erro http://www.mediafire.com/?a721nrt49a7eokv[^]
this struct of Book.xml :
<?xml version="1.0"?><br />
<catalog><br />
<book id="bk101"><br />
<author>Gambardella, Matthew</author><br />
<title>XML Developer's Guide</title><br />
<genre>Computer</genre><br />
<price>44.95</price><br />
<publish_date>2000-10-01</publish_date><br />
<description>An in-depth look at creating applications <br />
with XML.</description><br />
</book><br />
<book id="bk102"><br />
<author>Ralls, Kim</author><br />
<title>Midnight Rain</title><br />
<genre>Fantasy</genre><br />
<price>5.95</price><br />
<publish_date>2000-12-16</publish_date><br />
<description>A former architect battles corporate zombies, <br />
an evil sorceress, and her own childhood to become queen <br />
of the world.</description><br />
</book><br />
<book id="bk103"><br />
<author>Corets, Eva</author><br />
<title>Maeve Ascendant</title><br />
<genre>Fantasy</genre><br />
<price>5.95</price><br />
<publish_date>2000-11-17</publish_date><br />
<description>After the collapse of a nanotechnology <br />
society in England, the young survivors lay the <br />
foundation for a new society.</description><br />
</book><br />
<book id="bk104"><br />
<author>Corets, Eva</author><br />
<title>Oberon's Legacy</title><br />
<genre>Fantasy</genre><br />
<price>5.95</price><br />
<publish_date>2001-03-10</publish_date><br />
<description>In post-apocalypse England, the mysterious <br />
agent known only as Oberon helps to create a new life <br />
for the inhabitants of London. Sequel to Maeve <br />
Ascendant.</description><br />
</book><br />
<book id="bk105"><br />
<author>Corets, Eva</author><br />
<title>The Sundered Grail</title><br />
<genre>Fantasy</genre><br />
<price>5.95</price><br />
<publish_date>2001-09-10</publish_date><br />
<description>The two daughters of Maeve, half-sisters, <br />
battle one another for control of England. Sequel to <br />
Oberon's Legacy.</description><br />
</book><br />
<book id="bk106"><br />
<author>Randall, Cynthia</author><br />
<title>Lover Birds</title><br />
<genre>Romance</genre><br />
<price>4.95</price><br />
<publish_date>2000-09-02</publish_date><br />
<description>When Carla meets Paul at an ornithology <br />
conference, tempers fly as feathers get ruffled.</description><br />
</book><br />
<book id="bk107"><br />
<author>Thurman, Paula</author><br />
<title>Splish Splash</title><br />
<genre>Romance</genre><br />
<price>4.95</price><br />
<publish_date>2000-11-02</publish_date><br />
<description>A deep sea diver finds true love twenty <br />
thousand leagues beneath the sea.</description><br />
</book><br />
<book id="bk108"><br />
<author>Knorr, Stefan</author><br />
<title>Creepy Crawlies</title><br />
<genre>Horror</genre><br />
<price>4.95</price><br />
<publish_date>2000-12-06</publish_date><br />
<description>An anthology of horror stories about roaches,<br />
centipedes, scorpions and other insects.</description><br />
</book><br />
<book id="bk109"><br />
<author>Kress, Peter</author><br />
<title>Paradox Lost</title><br />
<genre>Science Fiction</genre><br />
<price>6.95</price><br />
<publish_date>2000-11-02</publish_date><br />
<description>After an inadvertant trip through a Heisenberg<br />
Uncertainty Device, James Salway discovers the problems <br />
of being quantum.</description><br />
</book><br />
<book id="bk110"><br />
<author>O'Brien, Tim</author><br />
<title>Microsoft .NET: The Programming Bible</title><br />
<genre>Computer</genre><br />
<price>36.95</price><br />
<publish_date>2000-12-09</publish_date><br />
<description>Microsoft's .NET initiative is explored in <br />
detail in this deep programmer's reference.</description><br />
</book><br />
<book id="bk111"><br />
<author>O'Brien, Tim</author><br />
<title>MSXML3: A Comprehensive Guide</title><br />
<genre>Computer</genre><br />
<price>36.95</price><br />
<publish_date>2000-12-01</publish_date><br />
<description>The Microsoft MSXML3 parser is covered in <br />
detail, with attention to XML DOM interfaces, XSLT processing, <br />
SAX and more.</description><br />
</book><br />
<book id="bk112"><br />
<author>Galos, Mike</author><br />
<title>Visual Studio 7: A Comprehensive Guide</title><br />
<genre>Computer</genre><br />
<price>49.95</price><br />
<publish_date>2001-04-16</publish_date><br />
<description>Microsoft Visual Studio 7 is explored in depth,<br />
looking at how Visual Basic, Visual C++, C#, and ASP+ are <br />
integrated into a comprehensive development <br />
environment.</description><br />
</book><br />
</catalog><br />
The First , i read Books.xml by startElement(),endElement(). At endElement(), instale object Books class and add it in the ArrayList(listBook).I used method getListBook() return ArrayList <books> . At main() in class xxx.java, i print console by "read" all object in List.
Thank
|
|
|
|
|
Point 1: use the proper <pre> tags to format your code rather than the inline <code> tags (go back and edit your original message).
Point 2: Nobody is going to download your project in order to find out what's wrong with your code. Compile and test your program, find out what or where it is going wrong, and post a proper description of your problem; people will then try to help you.
The best things in life are not things.
|
|
|
|
|
i` sorry !! i will fix the message at night . i`m very bussiness,now
i`m very sorry!!!
|
|
|
|
|
Can anybody tell me, Hoew to capture the image from webcam using java code ?,...................
I need for my project...
|
|
|
|
|
Here's an example[^] that may help.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Hi folks!
this is the code thats giving me problems.
try{
ResultSet rs = Main.dbase.search("select * from myTable");
while(rs.next())
{
cmb.addItem(rs.getString(1).trim());
}
rs.close();
} catch (Exception ex) {System.out.println(ex);}
here dbase is an object executing Statement.executeQuery , and cmb is JComboBox.
the problem is that even though the table has 10 rows, i get only single row in cmb.
if I don't comment out the first rs.next() , i get the 2nd row in cmb.
i tried to track the value of rs.next() and found that after while(rs.next()) it gives out false , always.
My target is to get all the 10 values in cmb.
TheMrProgrammer
http://www.icbse.com/2009/funny-exam-answers-school-students
http://download.cnet.com/TheCalcMan/3000-2094_4-10958266.html
|
|
|
|
|
Have a go at this:
Statement statement = null;
try {
statement = Main.dbase.createStatement();
ResultSet rs = statement.executeQuery("select * from myTable");
while (rs.next()) {
cmb.addItem(rs.getString(1).trim());
}
} catch (SQLException e ) {
System.out.println(ex);
} finally {
if (statement != null) {
statement.close();
}
}
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Myself I can't see how that answers the OPs question.
|
|
|
|
|
It fixes the code...
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
So you are agreeing that it does not in fact answer the question?
|
|
|
|
|
There are two parts.
1. Database code
2. Gui code.
It seems apparent that you are in fact getting 10 rows from the database. Your statements about the commented rs.next() and your implicit comments about it.
If you are not sure the verify it using a debugger or System.out.println (do NOT use gui code.)
Consequently that means the problem is with your GUI code and not the database code.
You can replace your database code entirely with a for/next loop that adds 10 fixed values (such as "xxx") to the combo box. Until that code works it is pointless to attempt to do anything with the database code.
Creating a small complete example with JUST the gui code (no database code) might help to determine what the problem is.
|
|
|
|
|
|
What is your question?
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Are you suggesting we use this, advertising its existence or complaining that it sucks?
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Hi
I am writing a program that extracts .class files from a .jar, adds some other .class files, and then recompresses it. I am at the stage of unzipping the code, but i get this error message(I am using a .jar file from the java game "Minecraft")
java.io.FileNotFoundException: META-INF/MOJANG_C.SF (No such file or directory)
Why? And ow do i prevent it?
Here is my zip code
<br />
public static final int BUFFER = 2048;<br />
public static void unzip(String fName) throws Exception<br />
{<br />
<br />
BufferedOutputStream dest = null;<br />
FileInputStream fis = new <br />
FileInputStream(fName);<br />
JarInputStream zis = new <br />
JarInputStream(new BufferedInputStream(fis));<br />
ZipEntry entry;<br />
while((entry = zis.getNextEntry()) != null) {<br />
int count;<br />
byte data[] = new byte[BUFFER];<br />
FileOutputStream fos = new FileOutputStream(entry.getName(), true);<br />
dest = new <br />
BufferedOutputStream(fos, BUFFER);<br />
while ((count = zis.read(data, 0, BUFFER)) <br />
!= -1) {<br />
dest.write(data, 0, count);<br />
}<br />
dest.flush();<br />
dest.close();<br />
}<br />
zis.close();<br />
}<br />
<br />
modified on Tuesday, June 14, 2011 9:14 AM
|
|
|
|
|
Remove the blind throw, void unzip(String fName) throws Exception is such a bad idea and add targeted try/catch blocks.
From that look at the exception and see exactly where it is being thrown and why. My best guess is that the file does not exist due to either a typing error or a missing qualified path.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Is it for debugging reasons?
I know where it stops
|
|
|
|
|
This is not for debugging reasons, it's for 'giving you a chance of not being flayed alive by anyone who knows how to write good code' reasons.
You should NEVER use a blind catch. Ever. End of story.
In the general case of I/O, you should catch each exception because if anything happens, you should close all open streams before exiting the method.
In the specific case of your code, if you know where the bug us WHY NOT TELL US?
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
FileOutputStream fos = new FileOutputStream(entry.getName(), true);
|
|
|
|
|
That's better. If you read the docs[^]:
JavaDoc wrote: throws FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
So the file's not there or not writeable.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|