You are here

leelight's blog

Sailfish OS

The Sailfish OS is a mobile-optimized operating system, baseed on Linux core, support Qt™ platform, and you can develop Android, QT, and HTML5 app for it.

This new mobile OS will release its first phone in China.

https://sailfishos.org/

Tiled (Qt)

Tiled (Qt)
Maybe the source code can be used for GIS? Just mark here

http://www.mapeditor.org/
http://files.mapeditor.org/doxygen/files.html

Blog: 

Use different Symbol style in one layer (Geoserver)

I have one layer in Geoserver, the data query is one table with geometry, there is one column named 'TYPE', which has 3 different type: 'rest', 'park', 'hotel'.
I need set 3 different color for this layer depends on 'TYPE', so custom SLD style should be defined in Geoserver like this:

  1. <?xml version="1.0" encoding="ISO-8859-1" ?>

How to install Postgre database into Xampp

How to install pgsql into Xampp:

1. install pgsql under user/xampp/pgsql/9.1/
You can choose other version

and download phpPgAdmin as you will, copy it under user\xampp\phpPgAdmin

2. edit user\xampp\apache\conf\extra\httpd-xampp.conf

....

Alias /phppgadmin "user/xampp/phpPgAdmin/"

AllowOverride AuthConfig
Order allow,deny
Allow from all

3. edit user\xampp\phpPgAdmin\conf\config.inc.php

$conf['servers'][0]['host'] = 'localhost';

$conf['extra_login_security'] = false;

Blog: 

Error "Access-Control-Allow-Origin" At Android 4.1

One of my Android Hybrid HTML5 app does not work now at Android 4.1.0, but it worked fine on 3.0 and 4.0.

Issue:
The app call one WFS service from other server, this Ajax throw exception:

11-22 14:30:47.062: E/Web Console(734): XMLHttpRequest cannot load http://xxxx Origin null is not allowed by Access-Control-Allow-Origin. at null:1

Solution:

if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) //16
// yourwebview, i use phonegap here
super.appView.getSettings().setAllowUniversalAccessFromFileURLs(true);

Why:

Sencha Touch 2 Orientation problem in Android browser or Webview

Issue:
Sencha Touch 2 was used in project and tested in Android browser or webview, when orietation is being changed, from landscape to portait or reverse, the layout will take the previous orietation's height, or half of the screen.

Solution:

Ext.setup({
viewport:{
autoMaximize:true},
onReady:function(){
Ext.Viewport.on('orientationchange', function() {
if (Ext.os.is.Android) {
Ext.Viewport.setSize(window.innerWidth,window.innerHeight);
}
});

......
}
...

Refer:

Force to update apache to newest version in CentOS 5

If you like me, try to update Apache in CentOS 5, but get this message:

No Packages marked for Update

But you have found that there is newer stable version in Apache website, please follow these steps:

1. check your Apache version:
httpd -v

2. Create a new repo file in /etc/yum.repos.d directory:

$ vi /etc/yum.repos.d/centalt.repo

[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0

2. Update httpd now:
$ yum update httpd

3. Finished then restart Apache

Blog: 

WebOS development first step

Blog: 

Oracel SQL, use ROW_NUMBER() to filter same records when JOIN tables

Sometimes we will retrieve repetitive records when we use JOIN to join tables.
Now distinct, group by, and Having will not work, ROW_NUMBER() is a good choice.

for example:

select a.one, b.two from A a
LEFT JOIN B b ON a.id = G.id where where a.name like '%abc%' and a.time < 1234545;

using ROW_NUMBER() after

SELECT ROWNUM, C* FROM(
SELECT a.id, a.one, b.two, b.id,
ROW_NUMBER() OVER(PARTITION BY a.id ORDER BY a.time DESC) AS ROW_FLG
FROM (select * from A where name like '%abc%' and time < 1234545) a
LEFT JOIN B b ON a.id=b.id
ORDER BY a.time DESC

Blog: 

SQL code snipet, join multi-tables with one column

3 tables(CHART_TEST, CHART_TEST1, CHART_TEST2) need be joined with continious timestamb:

 ID    TIMESTAMP    VALUE
     1    115    456
     4    130    671
     5    190    135
     8    150    934
     9    160    296
     2    120    356
     3    125    556
     6    140    213
     7    145    363
     10    165    358

Blog: 

Pages

Subscribe to RSS - leelight's blog