How to upload data to an development server in appengine (MAC OSx)

First download your data as described here.

Then install Charles Proxy App, start the proxy. Set in Proxy -> Proxy Settings to use not the 8888 port.

Finally start your development server and run this in the console.

$ python /path/to/library/google_appengine_python_1.5.5/appcfg.py upload_data --url=http://localhost:8888/remote_api --file=test.csv --application=your_app_id --email=you@gmail.com --passin

How to download data from an appengine app.

From the command line

$ python /path/to/library/google_appengine_python_1.5.5/appcfg.py download_data --application=your_app_id --url=http://app_name.appspot.com/remote_api --filename=test.csv

Uncompressed file formats in Android package

static const char* kNoCompressExt[] = {

".jpg", ".jpeg", ".png", ".gif",

".wav", ".mp2", ".mp3", ".ogg", ".aac",
".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet",
".rtttl", ".imy", ".xmf", ".mp4", ".m4a",
".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2",
".amr", ".awb", ".wma", ".wmv"
};

INSTALL_FAILED_INSUFFICIENT_STORAGE

If you are using SDK 2.2. add this "android:installLocation="preferExternal" to the AndroidManifiest.xml like:


    package="com.andrewsmith.android.darkness"
    android:installLocation="preferExternal"

How to add C++ support to Eclipse?

Help -> Install new software -> Work with -> Helios -> Programming Languages -> C/C++ Development Tools

;)

GCC 4.2 is not compatible with the Mac OS X 10.4 SDK

Go in the XCode to

Project > Edit Project Settings > Base SDK

And select MAC OSX 10.6 ;)

GWT Celltable ContextMenu in a Column

// create your column class
private class ContextMenuColumn extends Column<UserModel, String>{

  public ContextMenuColumn(Cell<String> cell) {
   super(cell);
  }

  @Override
  public String getValue(UserModel object) {
   return "/img/icons/contextual-menu.jpg";
  }
  
  @Override
  public void onBrowserEvent(Context context, Element elem, UserModel object, NativeEvent event) {
   final UserModel user = object;
   
   int left = elem.getParentElement().getAbsoluteLeft();
      int top = elem.getParentElement().getAbsoluteTop();
      
      final DialogBox dialog = new DialogBox();
      dialog.setText(constants.Actions());
      
      Anchor lnkEdit = new Anchor(constants.Edit());
      lnkEdit.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
     placeController.goTo(new ControlPanelUsersEditPlace(user.getUserId()));
     dialog.hide();
    }
   });
      
      Anchor lnkUpdateState = new Anchor(user.getEnable() == false ? constants.Enable() : constants.Disable());
      lnkUpdateState.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
     presenter.setEnabled(user.getUserId(), !user.getEnable());
     dialog.hide();
    }
   });
      
      Anchor lnkResetPassword = new Anchor(constants.ChangePassword());
      lnkResetPassword.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
     presenter.resetPassword(user.getUserId());
     dialog.hide();
    }
   });
      
      Anchor lnkDelete = new Anchor(constants.Delete());
      lnkDelete.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
     presenter.delete(user.getUserId());
     dialog.hide();
    }
   });
      
      VerticalPanel pnl = new VerticalPanel();
      pnl.add(lnkEdit);
      pnl.add(lnkUpdateState);
      pnl.add(lnkResetPassword);
      pnl.add(lnkDelete);
      
      dialog.setWidget(pnl);
      dialog.setPopupPosition(left - 20, top + 10);
      dialog.setAutoHideEnabled(true);
      dialog.show();
  }
 }

// create your column and add it to your table
Column<UserModel, String> contextMenuColumn = new ContextMenuColumn(new MyImageCell());

table.addColumn(contextMenuColumn);

GWT Celltable add a Row Handler

Handler<UserModel> rowHandler = new Handler<UserModel>() {
@Override
public void onCellPreview(CellPreviewEvent<UserModel> event) {
if (event.getColumn() != 0 && event.getNativeEvent().getType().equals("click")) {
placeController.goTo(new CompanyUsersEditPlace(event.getValue().getUserId(), user.getCompanyId()));
}
}
};

table.addCellPreviewHandler(rowHandler);

GWT Celltable and Checkbox Column

// you need a selection model
private final MultiSelectionModel<usermodel> selectionModel = new MultiSelectionModel<usermodel>(operatorKeyProvider);

// you need a selection manager
private final DefaultSelectionEventManager<usermodel> selectionManager = DefaultSelectionEventManager.createCheckboxManager();

// you need the table ;)
@UiField CellTable<usermodel> table;

// then ...
selectionModel.addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
StringBuilder sb = new StringBuilder();
boolean first = true;
List&lt;UserModel&gt; selected = new ArrayList&lt;UserModel&gt;(selectionModel.getSelectedSet());

Collections.sort(selected);
for (UserModel value : selected) {
if (first) {
first = false;
} else {
sb.append(&quot;, &quot;);
}
sb.append(value.getFirstName());
}
}
});

table.setSelectionModel(selectionModel, selectionManager);

// create your column
Column<UserModel, Boolean> checkBoxColumn = new Column<UserModel, Boolean>(new CheckboxCell()) {

   @Override
   public Boolean getValue(UserModel object) {
    return selectionModel.isSelected(object);
   }
   
   @Override
   public FieldUpdater<UserModel, Boolean> getFieldUpdater() {
       return null;
      } 
   
  };