Category Programming

Solution for drools problem 0

Solution for the problem with drools.

The after evaluator correlates two events and matches when the temporal distance from the current event to the event being correlated belongs to the distance range declared for the operator.

The temporal distance interval for the after operator is optional:
If two values are defined (like in the example below), the interval starts on the first value and finishes on the second.
If only one value is defined, the interval starts on the value and finishes on the positive infinity.
If no value is defined, it is assumed that the initial value is 1ms and the final value is the positive infinity.

solution: change "after" --> "after[0ms]"

continue reading »

Monitoring Service for WP7 Apps 0

I have developed several WP7 apps, some of them are popular and some of them are not. Every day I have to do the same actions to determine position of my applications in the top rating, to read new comments and etc. Also I don’t like that Windows Marketplace presents downloads statistics with 7 days delay. I have solved this problem by using Google Analytics service to track number of new setups and launches of apps.

1. I really don’t have tools to monitor the position of applications in the rating, even in the top free and top paid ratings. Also it would be nice to have ranking by categories such as games, sport, news and etc. and of course this rating should be for each region of Windows Marketplace.

2. Comments monitoring. Some applications have tens and some hundreds of reviews, therefore for me this is very difficult to track new comments and link them to a specific version of the app. It would be nice if there was an opportunity to receive reports via email in a given period (daily, weekly or monthly).

3. Ability to respond on the comment. Some reviews may relate not to the application but to the platform in general. For example: “I could not buy or download your application”. Obviously, this does not refer to the application, but to the whole system. It would be nice to have an interface from which you could immediately respond on the comment.

Based on paragraphs 1, 2 and 3, I would like to create a service that would cover this functionality. If you have any ideas on this subject or you want to help, please email me.

Thank you in advance!

continue reading »

Сервис WP7 Marketplace 0

У меня есть несколько приложений для WP7, некоторые из них удачные, некоторые – нет. Каждый день мне приходится выполнять одни и те же действия, чтобы определить позиции приложений в рейтинге, прочитать новые комментарии к приложениям. Еще мне очень не нравится, что Windows Marketplace показывает статистику по скачиванию приложения с задержкой в 7 дней. Но эту проблему я решил путем использования Google Analytics сервиса для отслеживания количества новых установок и запусков моих приложений.

1. Мне действительно не хватает инструмента для мониторинга позиций приложений в рейтинге, хотя бы платных и бесплатных приложений, не говоря уже о рейтинге по категориям, таким как игры, спорт, новости и т.д. и, конечно же, этот рейтинг должен быть для каждого региона Marketplace.

2. Мониторинг отзывов. Некоторые приложение насчитывают десятки, а некоторые и сотни отзывов, поэтому лично мне стало очень трудно отслеживать появление новых отзывов и связывать их с конкретной версией приложения. Было бы здорово, если бы была возможность получать отчеты на email с отзывами за определенный период (за день, за неделю или за месяц).

3. Возможность отвечать на отзывы. Некоторые отзывы могут относиться не к приложению, а к платформе в общем. Например: “я не смог купить или скачать ваше приложение”. Очевидно, что это относится не к приложению, а к системе в целом. Было бы здорово иметь интерфейс, из которого можно было бы сразу отписаться пользователю.

Основываясь на пунктах 1, 2 и 3, я хочу сделать сервис, который бы покрывал этот функционал. Если у вас есть какие-либо идеи на этот счет, или вы хотите помочь проекту, пожалуйста, напишите мне.

continue reading »

Problem with Drools 0

Recently, I has been working with Drools component.
I found a very interesting thing.
The problem is that drool engine do not fire conditions which use “after” operator.
This condition does not always work. Error case requires that external events come to the system immediately.
It’s mean that if to set timer for 10 milliseconds between coming events everything works fine.
If events comes into the system continuously (without timer, see my code below) after some time rules not fire.

 

continue reading »

Chrome 13.x CORS (Cross-Origin Resource Sharing) issue 0

Recently, I had a problem with Chrome browser using the CORS (Cross-Origin Resource Sharing).
We are using Jetty server on the server side.
To allow cross-domain http request we using org.eclipse.jetty.servlets.CrossOriginFilter filter.
HTTP POST request led to the exclusion of Chrome 13.x browser: Origin *** is not allowed by Access-Control-Allow-Origin ….
This problem was very strange because on the other browsers (FireFox, Safari) everything works fine.

We spend a lot of time before found that Chrome send the additional parameter in the header Access-Control-Allow-Headers field: Origin.

So, to solve this issue, need to add parameter for the filter like shown below:

<filter>
	<filter-name>cross-origin</filter-name>
	<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
	<init-param>
		<param-name>allowedHeaders</param-name>
		<param-value>X-Requested-With,Origin,Content-Type, Accept</param-value>
	</init-param>  
</filter>
<filter-mapping>
	<filter-name>cross-origin</filter-name>
	<url-pattern>/cometd/*</url-pattern>
</filter-mapping>

because default value of allowedHeaders is X-Requested-With.

<init-param>
    <param-name>allowedHeaders</param-name>
    <param-value>*</param-value>
</init-param>

Or it could be like this:


That’s it.

Good luck with CORS!

Helpful information:
http://wiki.eclipse.org/Jetty/Feature/Cross_Origin_Filter
https://developer.mozilla.org/en/HTTP_access_control
https://developer.mozilla.org/En/Server-Side_Access_Control

continue reading »

Denis Blog is powered by Drupal
developed by Denis Liger

Valid XHTML 1.0 Strict

Рейтинг@Mail.ru