Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method phpbb_feed_factory::init() should not be called statically in /www/htdocs/w006661d/anddev/feed.php on line 66
[phpBB Debug] PHP Notice: in file /feed.php on line 171: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /feed.php on line 172: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org Android Development Community | Android Tutorials 2008-12-16T12:49:29+01:00 http://www.anddev.org/feed.php?f=23&t&mode 2008-12-16T12:49:29+01:00 http://www.anddev.org/viewtopic.php?t=4026&p=15142#p15142 <![CDATA[News Review • Start an Android coding blog]]>
There are a lot of forum members asking questions which have been asked 10 times before and are clearified when looking in the docs or in the log. So I thought, it might be good to start something like a blog, in which we explain such Android coding practices. I know we do such things in the Tutorials, but I think a blog would be a better place to have such coding pointers.
Another thing the blog would be usefull for, is general announcement of new tutorials on the forum. To which we can point to from the blog.

And with this, I'm saying I want to be part of the blog, as I'm getting tired of people asking why their application displayed the "The application <app> has stopped unexpectedly." dialog.

Statistics: Posted by MrSnowflake — Tue Dec 16, 2008 12:49 pm


]]>
2008-12-05T21:41:35+01:00 http://www.anddev.org/viewtopic.php?t=3880&p=14578#p14578 <![CDATA[News Review • GoogleMapTile-Server]]> http://mt1.google.com/mt?x=1&y=4&z=4

Statistics: Posted by plusminus — Fri Dec 05, 2008 9:41 pm


]]>
2008-12-02T22:30:14+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=14392#p14392 <![CDATA[News Review • ]]>
http://code.google.com/android/samples/ ... llbar2.xml
http://code.google.com/android/samples/ ... thumb.html
http://code.google.com/android/samples/ ... track.html

Statistics: Posted by plusminus — Tue Dec 02, 2008 10:30 pm


]]>
2008-11-11T19:53:06+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=13229#p13229 <![CDATA[News Review • ]]>
[syntax="java"]private static ${enclosing_type} mInstance;

private ${enclosing_type}(){}

public static ${enclosing_type} getInstance(){
if(instance == null)
mInstance = new ${enclosing_type}();

return mInstance;
}[/syntax]

Statistics: Posted by plusminus — Tue Nov 11, 2008 7:53 pm


]]>
2008-11-07T22:36:59+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=13048#p13048 <![CDATA[News Review • ]]>
- 1 of 4 weeks each month FREE-AndNav :!:
- 1-2 days per week FREE AndNav
- X FREE uses
- X days FREE use (Trial-period)

Statistics: Posted by plusminus — Fri Nov 07, 2008 10:36 pm


]]>
2008-11-07T17:32:49+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=13038#p13038 <![CDATA[News Review • ]]> @Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

//...

this.bundleCreatedWith = this.getIntent().getExtras();

//...

switch(Nationality.fromAbbreviation(this.bundleCreatedWith.getString(EXTRAS_COUNTRYCODE_ID)){
case UNITED_KINGDOM:
case NORTHERN_IRELAND:
this.findViewById(R.id.ibtn_sd_ziporcity_select_uk_postcodesearch).setVisibility(View.VISIBLE);
this.findViewById(R.id.tv_sd_ziporcity_select_uk_postcodesearch).setVisibility(View.VISIBLE);
break;
default:
break;
}

//...
}
[/syntax]

Statistics: Posted by plusminus — Fri Nov 07, 2008 5:32 pm


]]>
2008-11-07T15:49:32+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=13030#p13030 <![CDATA[News Review • ]]> protected static final String PATTERNSTRING_UK_POSTCODE_BS_7666 = "(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW]) [0-9][ABD-HJLNP-UW-Z]{2})";
/** Note: this pattern is <b>CaSe-SeNsItIvE</b>! */
protected static final Pattern PATTERN_UKPOSTCODE_BS_7666 = Pattern.compile(PATTERNSTRING_UK_POSTCODE_BS_7666);

public static void main(String[] args) throws Exception {

final String matchme = "lolzAA9A 9AArofl";
if(doesMatchUKPostcode_BS_7666(matchme)){
System.out.println(getMatchUKPostcode_BS_7666(matchme));
}else{
System.out.println("Didn't match...");
}
}

/**
* Checks whether the <code>aPostcode</code> passed is a valid <b>BS 7666</b>-UK-Postcode.
* @param aPostcode <b>CaSe-SeNsItIvE</b>!
* @return
* @throws NoMatchFoundException
*/
protected static boolean doesMatchUKPostcode_BS_7666(final String aPostcode){
final Matcher matcher = PATTERN_UKPOSTCODE_BS_7666.matcher(aPostcode);
return matcher.find();
}

/**
* Extracts a matched <b>BS 7666</b>-UK-Postcode out of a String.
* @param aPostcode <b>CaSe-SeNsItIvE</b>!
* @return
* @throws NoMatchFoundException whether the <code>aPostcode</code> passed is <b>not</b> a valid <b>BS 7666</b>-UK-Postcode.
*/
protected static String getMatchUKPostcode_BS_7666(final String aPostcode) throws NoMatchFoundException{
final Matcher matcher = PATTERN_UKPOSTCODE_BS_7666.matcher(aPostcode);
final boolean matchFound = matcher.find();

if(matchFound)
return matcher.group();
else
throw new NoMatchFoundException();
}[/syntax]

Statistics: Posted by plusminus — Fri Nov 07, 2008 3:49 pm


]]>
2008-11-05T17:06:21+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=12884#p12884 <![CDATA[News Review • ]]> http://mirror.its.uidaho.edu/pub/apache ... encies.zip

[syntax="java"]final HttpClient httpClient = new DefaultHttpClient();
final HttpPost request = new HttpPost(url);

// create the multipart request and add the parts to it
final MultipartEntity requestEntity = new MultipartEntity();
requestEntity.addPart("Position", new StringBody("49.4727330,8.6541690"));
requestEntity.addPart("Minutes", new StringBody("5"));

request.setEntity(requestEntity);

final HttpResponse response = httpClient.execute(request);
final int status = response.getStatusLine().getStatusCode();

if (status != HttpStatus.SC_OK) {
System.out.println("Damn...");
// Damn it
} else {
final Reader r = new InputStreamReader(new BufferedInputStream(response.getEntity().getContent()));
// see above
final char[] buf = new char[8 * 1024];
int read;
final StringBuilder sb = new StringBuilder();
while((read = r.read(buf)) != -1)
sb.append(buf, 0, read);

System.out.println(sb.toString());
}[/syntax]

Statistics: Posted by plusminus — Wed Nov 05, 2008 5:06 pm


]]>
2008-10-31T16:18:04+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=12546#p12546 <![CDATA[News Review • ]]> http://developer.decarta.com/html/static/schemas/

[syntax="xml"]<xls:AvoidList>
<xls:AOI>
<gml:CircleByCenterPoint numArc="1">
<gml:pos>-134.2567801 38.6721569</gml:pos>
<gml:radius uom="km">3.26</gml:radius>
</gml:CircleByCenterPoint>
</xls:AOI>
</xls:AvoidList>[/syntax]

[syntax="xml"]<xls:AvoidList>
<xls:AOI>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:pos>45.256 -110.45</gml:pos>
<gml:pos>46.46 -109.48</gml:pos>
<gml:pos>43.84 -109.86</gml:pos>
<gml:pos>45.256 -110.45</gml:pos>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</xls:AOI>
</xls:AvoidList>[/syntax]

[syntax="xml"]
<xls:RequestHeader/>
<xls:Request methodName="GeocodeRequest" requestID="123456789" version="1.1">
<xls:GeocodeRequest>
<xls:Address countryCode="DE">
<xls:StreetAddress>
<xls:Street>Mannheimer straße</xls:Street>
</xls:StreetAddress>
<xls:Place type="Municipality">Schriesheim</xls:Place>
</xls:Address>
</xls:GeocodeRequest>
</xls:Request>[/syntax]

[syntax="xml"]<xls:RequestHeader/>
<xls:Request methodName="GeocodeRequest" requestID="123456789" version="1.1">
<xls:GeocodeRequest>
<xls:Address countryCode="DE">
<xls:StreetAddress>
<xls:Street>Mannheimer strasse</xls:Street>
</xls:StreetAddress>
<xls:PostalCode>69198</xls:PostalCode>
</xls:Address>
</xls:GeocodeRequest>
</xls:Request>[/syntax]

Statistics: Posted by plusminus — Fri Oct 31, 2008 4:18 pm


]]>
2008-10-20T16:40:10+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11807#p11807 <![CDATA[News Review • ]]> Statistics: Posted by plusminus — Mon Oct 20, 2008 4:40 pm


]]>
2008-10-20T16:00:11+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11806#p11806 <![CDATA[News Review • ]]> Statistics: Posted by plusminus — Mon Oct 20, 2008 4:00 pm


]]>
2008-10-20T15:14:06+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11802#p11802 <![CDATA[News Review • ]]> http://groups.google.com/group/android- ... d?lnk=raot

Statistics: Posted by plusminus — Mon Oct 20, 2008 3:14 pm


]]>
2008-10-15T13:24:49+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11579#p11579 <![CDATA[News Review • ]]>

Statistics: Posted by plusminus — Wed Oct 15, 2008 1:24 pm


]]>
2008-10-14T18:59:18+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11543#p11543 <![CDATA[News Review • ]]> Statistics: Posted by plusminus — Tue Oct 14, 2008 6:59 pm


]]>
2008-10-10T20:55:03+01:00 http://www.anddev.org/viewtopic.php?t=3081&p=11321#p11321 <![CDATA[News Review • ]]> long startMs = System.currentTimeMillis();

for(int i = 0; i < CNT; i++){
final StringTokenizer st = new StringTokenizer(test, " ");
while (st.hasMoreTokens())
al1.add(GeoPoint.fromDoubleString(st.nextToken()));

al1.clear();
}
long endMs = System.currentTimeMillis();
System.out.println("len: " + (endMs - startMs));
}

private static class GeoPoint{
protected final int mLatitude, mLongitude;
public GeoPoint(int latitude, int longitude) {
mLatitude = latitude;
mLongitude = longitude;
}

protected static GeoPoint fromDoubleString(final String s){
final int commaPos = s.indexOf(',');
return new GeoPoint((int)(Double.parseDouble(s.substring(0,commaPos-1)) * 1E6),
(int)(Double.parseDouble(s.substring(commaPos+1,s.length())) * 1E6));
}
}[/syntax]

Statistics: Posted by plusminus — Fri Oct 10, 2008 8:55 pm


]]>