You are here

Blogs

How to select records with given interval

How to select records with every N records' interval?
Using the rank(), this is the the snipet, for Oracle:
Table name: tableabc,
---------------------
id  |  time  |   test
---------------------
SELECT id, rank() over (partition by 1 order by time) as interval, test
                                   FROM  tableabc 

Force Internet Explorer to display content in the available highest mode

The X-UA-Compatible meta tag allows web authors to choose what version of Internet Explorer the page should be rendered as. IE11+ have changes to these modes. See IE11 note below.

Simplify your polyline but keep its form

If you need add a polyline or polygon to draw a country/state shape in Google Map/OSM, maybe you will get performence problem because of the huge collection of points in your polyline.
Then you need this javascript library: Simplify.js

Blog: 

apk2bar got "Android SDK path is not set" after ADT updated

After my Android ADT was updated, i found the blackberry apk2bar does not work anymote. It throws always "Android SDK path is not set" Even I have set it in system envrionment.

There is 2 solutions:

1 . As a temporary solution, you can copy all of the files from /build-tools/17.0.0 back to /platform-tools. This will allow our tools (apk2barVerfifier, apk2bar, etc.) to function as expected. You may need to provide the SDK location directly to the tool, depending how you've got things setup.

2. I prefer andhave tested this solution:

 

navigator.geolocation not work in Android 4.1.2, soulution

One hybrid app with Phonegap 1.9.0 worked fine in Android 3.0 and 4.0, but when I update the OS to 4.1.2, the navigator.geolocation stop working.
Firstly i update the project with new version of phonegap cordova 2.7.0, it does not help. And I found even i test navigator.geolocation in Android native brower, under this demo link:

http://html5demos.com/geo
The gps operation was never be called. And i found many other developers have same problem in new Android OS.

At last I found one solution(not 100%, but at least works now):
My orginal code:
 

Tomcat Socket accept failed java.io.IOException: Too many open files

If you open many HTTP connections during the same time in your service in Tomcat, you will probably get such exception: Socket accept failed java.io.IOException: Too many open files.

How to fix:

open $tomcat/bin/catalina.sh

add this line:
ulimit -n 8192

or
ulimit -n //this will set unlimit

then restart tomcat and start with 'catalina start', Java will run with the given limit above.

Blog: 

Route-Me: iOS map library

Route-Me: iOS map library

Route-Me is an open source map library that runs natively on iOS. It's designed to look and feel much like the inbuilt iOS map library, but it's entirely open, and works with any map source.

Currently, OpenStreetMap, Microsoft VirtualEarth, CloudMade, OpenAerialMap, OpenCycleMap, SpatialCloud, TileStream7, and two offline-capable, database-backed formats (DBMap and MBTiles) are supported as map sources.

https://github.com/route-me/route-me

OSM mobile open source project

1. http://osmand.net/
you will find open source project for Android, WP7, WP8, WinRT.

2. osmdroid, Offline map library with OSM
http://code.google.com/p/osmdroid/

3. mapsforge, android library with OSM, support also offline
http://code.google.com/p/mapsforge/

4. osmbonuspack
osmdroid is a library to interact with OpenStreetMap data inside an Android application. It offers an almost full/free replacement to Android map objects: MapView, MapController, Overlays, etc.

http://code.google.com/p/osmbonuspack/

5.
Using OSMDroid for Offline mapping in Android

Pages

Subscribe to RSS - blogs