Showing posts with label by Phil Wodarczyk. Show all posts
Showing posts with label by Phil Wodarczyk. Show all posts

iPhone presentation

http://docs.google.com/Presentation?id=ddcdv84n_2hhv88dfq

if you have any questions let me know: philip.wodarczyk@gmail.com


As an Amazon Associate I earn from qualifying purchases.

iPhone presentation

http://docs.google.com/Presentation?id=ddcdv84n_2hhv88dfq

if you have any questions let me know: philip.wodarczyk@gmail.com


As an Amazon Associate I earn from qualifying purchases.

example for gwt lazy panel

The gwt lazy panel has a createWidget method that is created when lazyPanel.setVisible("true") is called, making it possible to reduce initial loading of a tab panel

hasBeenLoaded = false;
TabPanel tp = new TabPanel();
tp.getTabBar().setStylePrimaryName("tabStatisticsMain");
tp.getDeckPanel().setStylePrimaryName("tabStatisticsMain");
tp.setWidth("100%");
VerticalPanel vp1 = new VerticalPanel();
VerticalPanel vp2 = new VerticalPanel();
create(vp1);

tp.add(vp1, "Individual stats");
tp.setVisible(true);
final LazyPanel lp = new LazyPanel()
{
@Override
protected Widget createWidget()
{
return create(vp2);
}
};
lp.setVisible(false);
tp.add(lp, "Team stats");
tp.addBeforeSelectionHandler(new BeforeSelectionHandler()
{
public void onBeforeSelection(BeforeSelectionEvent event)
{
if (event.getItem().intValue() == 1){
lp.setVisible(true);
if(!hasBeenLoaded){
Document.get().getElementById("Loading- Message").getStyle().setProperty("visibility", "visible");
hasBeenLoaded = true;
}
}
else
lp.setVisible(false);
}
});

tp.selectTab(0);
container.add(tp);


As an Amazon Associate I earn from qualifying purchases.

example for gwt lazy panel

The gwt lazy panel has a createWidget method that is created when lazyPanel.setVisible("true") is called, making it possible to reduce initial loading of a tab panel

hasBeenLoaded = false;
TabPanel tp = new TabPanel();
tp.getTabBar().setStylePrimaryName("tabStatisticsMain");
tp.getDeckPanel().setStylePrimaryName("tabStatisticsMain");
tp.setWidth("100%");
VerticalPanel vp1 = new VerticalPanel();
VerticalPanel vp2 = new VerticalPanel();
create(vp1);

tp.add(vp1, "Individual stats");
tp.setVisible(true);
final LazyPanel lp = new LazyPanel()
{
@Override
protected Widget createWidget()
{
return create(vp2);
}
};
lp.setVisible(false);
tp.add(lp, "Team stats");
tp.addBeforeSelectionHandler(new BeforeSelectionHandler()
{
public void onBeforeSelection(BeforeSelectionEvent event)
{
if (event.getItem().intValue() == 1){
lp.setVisible(true);
if(!hasBeenLoaded){
Document.get().getElementById("Loading- Message").getStyle().setProperty("visibility", "visible");
hasBeenLoaded = true;
}
}
else
lp.setVisible(false);
}
});

tp.selectTab(0);
container.add(tp);


As an Amazon Associate I earn from qualifying purchases.

Setting up Eclipse...again

So Eclipse Galileo doesn't support GWT 1.6.4 fully yet, so I had to use 3.5 (Ganymede).

Download Eclipse Ganymede...
http://www.eclipse.org/downloads/packages/release/ganymede/sr2

...install...

to add plug-ins go to Help...Software Updates...Available Software...Add Sites...

Add some optional plug-ins (we use google, maven, subclipse)

Google -> http://dl.google.com/eclipse/plugin/3.4
Maven -> http://m2eclipse.sonatype.org/update/
Subclipse -> http://subclipse.tigris.org/update_1.6.x

I did have an issue where the installer would say it couldn't find the repositories so it wouldn't install. In that case I deleted my added site and added it again...then it seemed to install.

I also ran the eclipse project update the same way.


As an Amazon Associate I earn from qualifying purchases.

Setting up Eclipse...again

So Eclipse Galileo doesn't support GWT 1.6.4 fully yet, so I had to use 3.5 (Ganymede).

Download Eclipse Ganymede...
http://www.eclipse.org/downloads/packages/release/ganymede/sr2

...install...

to add plug-ins go to Help...Software Updates...Available Software...Add Sites...

Add some optional plug-ins (we use google, maven, subclipse)

Google -> http://dl.google.com/eclipse/plugin/3.4
Maven -> http://m2eclipse.sonatype.org/update/
Subclipse -> http://subclipse.tigris.org/update_1.6.x

I did have an issue where the installer would say it couldn't find the repositories so it wouldn't install. In that case I deleted my added site and added it again...then it seemed to install.

I also ran the eclipse project update the same way.


As an Amazon Associate I earn from qualifying purchases.

Tethering with iPhone 3.0 software

Here's a great explanation of how to put tethering on your iPhone.

There are many warnings...
http://tech.yahoo.com/blogs/patterson/53688/think-twice-before-tethering-that-iphone/

Here's the tethering link...
http://richardlai.xanga.com/704930537/enable-tethering-on-iphone-30---too-easy-worldwide-carriers/

I got this to work by downloading the USA config file. I have At&t.


As an Amazon Associate I earn from qualifying purchases.

Tethering with iPhone 3.0 software

Here's a great explanation of how to put tethering on your iPhone.

There are many warnings...
http://tech.yahoo.com/blogs/patterson/53688/think-twice-before-tethering-that-iphone/

Here's the tethering link...
http://richardlai.xanga.com/704930537/enable-tethering-on-iphone-30---too-easy-worldwide-carriers/

I got this to work by downloading the USA config file. I have At&t.


As an Amazon Associate I earn from qualifying purchases.

Printing in GWT

Good source on printing in GWT: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/eea48bafbe8eed63

This worked for me!


As an Amazon Associate I earn from qualifying purchases.

Printing in GWT

Good source on printing in GWT: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/eea48bafbe8eed63

This worked for me!


As an Amazon Associate I earn from qualifying purchases.

Internet Explorer 8 compatibility issues

Using GWT, I had an issue with pop up panels not showing content in IE8 so in order to force the compatibility mode in IE8 to turn on, I added this html script which you have to put inside a meta tag:

equiv="X-UA-Compatible" content="IE=EmulateIE7"

Also another issue with GWT/IE is that in the html we assign class="hidden" to our page, but in order to make our page visible again we can't use:
RootPanel.get("page").addStyleName("visible");

We must use the code below for IE:
RootPanel.get("page").getElement().getStyle().setProperty("visibility", "visible");


As an Amazon Associate I earn from qualifying purchases.

Internet Explorer 8 compatibility issues

Using GWT, I had an issue with pop up panels not showing content in IE8 so in order to force the compatibility mode in IE8 to turn on, I added this html script which you have to put inside a meta tag:

equiv="X-UA-Compatible" content="IE=EmulateIE7"

Also another issue with GWT/IE is that in the html we assign class="hidden" to our page, but in order to make our page visible again we can't use:
RootPanel.get("page").addStyleName("visible");

We must use the code below for IE:
RootPanel.get("page").getElement().getStyle().setProperty("visibility", "visible");


As an Amazon Associate I earn from qualifying purchases.

Email to SMS

You can text via email to any major provider. The below site explains how this works. I tested using a gmail account and an AT&T phone, and I was even able to reply to my email account. If you don't have a phone with a mail client, you could get your emails forwarded to your phone via text.

http://www.makeuseof.com/tag/email-to-sms/


As an Amazon Associate I earn from qualifying purchases.

Email to SMS

You can text via email to any major provider. The below site explains how this works. I tested using a gmail account and an AT&T phone, and I was even able to reply to my email account. If you don't have a phone with a mail client, you could get your emails forwarded to your phone via text.

http://www.makeuseof.com/tag/email-to-sms/


As an Amazon Associate I earn from qualifying purchases.

Hibernate hql error with sets

Hibernate error

If anyone gets an error similar to this:

java.lang.NullPointerException
at org.hibernate.hql.ast.tree.DotNode.getColumns(DotNode.java:97)
at org.hibernate.hql.ast.tree.DotNode.initText(DotNode.java:212)
at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:206)



if your hql query looks similar to: where user.addresses.state.abbreviation = 'WI';

try joining and creating an alias for the set of addresses: join user.addresses as adrs ... where ... adrs.state.abbreviation = 'WI';


As an Amazon Associate I earn from qualifying purchases.

Hibernate hql error with sets

Hibernate error

If anyone gets an error similar to this:

java.lang.NullPointerException
at org.hibernate.hql.ast.tree.DotNode.getColumns(DotNode.java:97)
at org.hibernate.hql.ast.tree.DotNode.initText(DotNode.java:212)
at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:206)



if your hql query looks similar to: where user.addresses.state.abbreviation = 'WI';

try joining and creating an alias for the set of addresses: join user.addresses as adrs ... where ... adrs.state.abbreviation = 'WI';


As an Amazon Associate I earn from qualifying purchases.

Naming a for loop in java

for(int i = 0; i<10; i++)
{
loopName: for(Organization org: organizations)
{
if(org.getId() .equals( new Long("5")))
break loopName;
}
//do other stuff

}


http://www.informit.com/library/content.aspx?b=STY_Java2_24hours&seqNum=96


As an Amazon Associate I earn from qualifying purchases.

Naming a for loop in java

for(int i = 0; i<10; i++)
{
loopName: for(Organization org: organizations)
{
if(org.getId() .equals( new Long("5")))
break loopName;
}
//do other stuff

}


http://www.informit.com/library/content.aspx?b=STY_Java2_24hours&seqNum=96


As an Amazon Associate I earn from qualifying purchases.

apt quotation..