while using the appengine sdk i can't view the Output of my System.out.println statements how can i view them they are like envaluable debugging tool for me .
i created this yahoo pipe to integrate my twitter+last.fm+picasa feed ..now when i am redering it as json all i can see is the last.fm feed.why is it so ?
link
http://pipes.yahoo.com/lifestream_ashu/7ba696f34ae17b6fa8f5d4de13064de
URL url = new URL("http://twitter.com/statuses/update.xml");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
String cridentials = new sun.misc.BASE64Encoder().encode((username + ":" + password).getBytes());
conn.setRequestProperty ("Authorization", "Basic " + cridentials);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(status);
wr.flush();
wr.close();
why the above code for updating twitter status is not working ? i am running it on google app engine.
i am trying to fetch the urls using google app engines urlFetch service and implement a proxy site.sites like twitter and and facebook appear disfigured as if they are missing the stylesheet ,even google is missing the google logo but yahoo opens all fine i can't understand why.
i want to create a form for users to submit questions in django ..so far the models i have created are
class Question(models.Model):
statement=models.CharField(max_length=100)
class Choice(models.Model):
statement=models.CharField(max_length=100)
value=models.IntegerField()
question=models.ForeignKey(Question)
Now i want to write a Form class for creating a above form but the problem is the number of choices are variable,a user can decide how many choices a question must have .How do i do that in django?
def merge(l1,l2):
i=0;
while((l1[i]!=none)||(l2[i]!=none)):
SyntaxError: invalid syntax
being a newbie i can't figure out whats wrong with the abouve code.
$('form').submit(function(){
this.action="http://www.sitename.com/post";
return false;
});
having altered the action attribute of the form ,i want to add one more input parameter to it how do i do that ?
$(function(){
$('a').each(function(){
var x=this.href;
this.href="www.somesitename.com/filter"+this.href;
});
});
i wrote the above jQuery script to append some site name to all the links in the page but it's not working as expected.
response.setHeader(keys[i].toString(),value);
in a servlet is throwing null pointer exception even though none of keys[i] or value are null why is it so?
how can i construct a artificial request to login to twitter or any site for that matter that accpets post forms.
what i've been trying is to extract the headers and post request parameters from the origional request(directed at the action atribute of the form) and copy it to the outgoing url object that i am making.but it just won't work.
And i am aware of the apis and i don't wanna use them i am trying this to write a web proxy site.
how can i set proxy in the netbeans app engine plugin ? so that the it works like command line appcfg -p proxy:port update application_name
i want to do this because i am behind a proxy.
why is the code below showing 'got the result null' alertbox ? while the request seems to be sending a proper json.
$(function(){
$.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitterusername', function(data) {
alert('got the result '+data);
});
});
Hi,
I have a tomcat 6 application which I have set parameters of -Xms512m -Xmx1024m. I thought 1 GB of memory in a 4 GB RAM would be enough, but that is not the case. On application stop/start multiple times (from tomcat manager) and also on image uploads (sometimes) I run into the OutOfMemory PermGen space error and the site stops responding.
Should I increase the memory still some more? Is there anything else that I can do to from the tomcat side so that it does not run into the PermGen space issue?
Thanks in advance for pointers/tips etc.
import
com.google.appengine.api.labs.taskqueue.Queue;
import
com.google.appengine.api.labs.taskqueue.QueueFactory;
import static
com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.*;
// ...
Queue queue = QueueFactory.getDefaultQueue();
queue.add(url("/worker").param("key",
key))
in the code example given on the google task queue documentation page i can't understand the url("/worker") function they are calling in the queues.add() invocation .
Hi, I have multiple quartz cron jobs in a load balanced environment. Currently these jobs are running on each node, which is not desirable. I want a node to run only a particular scheduler and if the node crashes, another node should run the scheduler intended for the node that crashed.
How can this be done with spring 2.5.6/tomcat load balancer.
how can i get the parameters of any form being submitted with method=post before it's submitted using javascript(preferably jQuery).
What i am trying to do is get the post parameters and submit it to an alternate loacation.
i was using
$('form').submit(function(){
alert('action= '+$(this).attr("action"));
alert('serialized string'+ $(this).serialize());
return false;
});
but it works only with get request i want to extract the parameters from the post requests too .
int start=0,flag=1;
long size=blobInfo.getSize(),fetched=0,fetch;
byte temp[] = null;
while(fetched<size){
if(size-fetched>MAX_BLOB_FETCH_SIZE)
fetch=MAX_BLOB_FETCH_SIZE;
else
fetch=size-fetched;
temp=blobstoreService.fetchData(blobKey,fetched,fetch );
fetched+=fetch;
out.println(temp);
}
i tried to print the data of the uploaded text file using the above code but it doesn't seem to be working .
i have some knowledge of css,jQuery,Grails,django,servlets and jsp still i can't see me designing good professional looking websites .what am lacking ? should i start learning jQUery ui ,should i get into adobe products like flash i am pretty confused. i am pretty bad in the userinterface part,
URL url = new URL("http://www.example.com/comment");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("POST");
Is
connection.setRequestProperty(key, value);
same as
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
writer.write("key=" + value);
writer.close();
if not please correct me .
Hi, We plan to host our website on a linux server. The site is created using java based technologies and will run on multiple instances of tomcat with apache in the front. I want to go in for a 64 bit linux OS so that I can install 64bit jvm. So my options are :
Ubuntu
Fedora
CentOS
which one (and which version) would be the most stable?