var divs = document.getElementsByTagName("div"); for (var i=0; i < divs.length; i++) { var div = document.createElement("div"); document.body.appendChild(div); }
'' == 00 == '0''' != '0'
block {
package com.blogpost.client;import com.google.gwt.core.client.EntryPoint;import com.google.gwt.user.client.Window;import com.google.gwt.user.client.ui.RootPanel;import com.google.gwt.visualization.client.AjaxLoader;import com.google.gwt.visualization.client.DataTable;import com.google.gwt.visualization.client.Query;import com.google.gwt.visualization.client.QueryResponse;import com.google.gwt.visualization.client.Query.Callback;import com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine;public class BlogPost implements EntryPoint { public void onModuleLoad() { AjaxLoader.loadVisualizationApi(new Runnable(){ public void run() { Query query = Query.create("http://spreadsheets.google.com/pub?key=pCQbetd-CptH5QNY89vLtAg"); query.send(new Callback(){ public void onResponse(QueryResponse response) { if (response.isError()) { Window.alert("An error occured: " + response.getDetailedMessage()); } DataTable data = response.getDataTable(); AnnotatedTimeLine.Options options = AnnotatedTimeLine.Options.create(); options.setDisplayAnnotations(true); RootPanel.get().add(new AnnotatedTimeLine(data, options, "800px", "400px")); } }); }}, AnnotatedTimeLine.PACKAGE); }}
function logMeIn() { scope = "http://www.google.com/calendar/feeds"; var token = google.accounts.user.login(scope);}function setupMyService() { var myService = new google.gdata.calendar.CalendarService('exampleCo-exampleApp-1'); logMeIn(); return myService;}