Showing posts with label Random. Show all posts
Showing posts with label Random. Show all posts

Monday, April 16, 2018

How to change Google Play Country on Android


As you know, Google Play filters some apps on a per country and/or per region basis. And I also when relocated to Poland wasn't able to download and use Poland based apps.

Long history, in short, most of the time developers or companies (bank and government organizations i.e.) put apps on the market which are allowed to download only by the account/user which belongs to that country. 


Today, when I need to change my account to use Poland as a country wasn't easy as expected :) That is why I decided to share easy steps how I did it with you.

Tuesday, September 17, 2013

Shuffle an Array in Java with Easy or Fast way


Objects are a powerful software engineering construct, and Java uses them extensively. While developing Android applications you need fast way of doing something. For example:
Often u need randomized Array which u will save state of stage or something.
In that case how you change order of Array randomly???


There are 2 famous way for this:

Friday, April 6, 2012

Broken pipe and Transactional update cache is full

In your web applications u can see errors like following:
2012-04-06 10:01:05,031  WARN  [webscripts.connector.RemoteClient] [http-80-1] Exception during close() of HTTP API connection ClientAbortException:  java.net.SocketException: Broken pipe

Solution: In most situations this occurs when your client ajax connection is closed but response is ready. And server can't write response for client. In my case, I used YUI AJAX Get connection and set timeout "5000". When I see this warning message I increase timeout time to "300000" and log tail is happy now :)

Tuesday, September 6, 2011

A Java PreparedStatement with a SELECT statement and LIKE clause

I want to select site language texts with filter. (I have added a LIKE clause to the SELECT statement.)

For me, the hard part of this example is figuring out how to use wildcard characters with your PreparedStatement parameter. I tried adding it directly to the SQL SELECT statement, then realized I just needed to use the ? character there, and then add the wildcards in the prepStmnt.setString() statement.

Friday, August 26, 2011

Pure Javascript Bar chart

To show a chart, an existing library for charts creation will be necessary. I have chosen to use The jit Javascript library. In this library u create JSON object in server side then call your javascript function with JSON string parameter in user side. This is pure javascript library.

I choose this library because when  I search library for my genealogy tree I have found this lib more useful. For example I have created one diagram yesterday, which must show purchased ecards count by country.

So my SQL looks like following:

Tuesday, August 2, 2011

JasperReport from XML Datasource with Inline Images

There are many library for creating reports. But personally I use Jasper Report. JasperReports is an open source Java reporting tool that can write to screen, to a printer or into PDF, HTML, Microsoft Excel, RTF, ODT, Comma-separated values and XML files. It can be used in Java-enabled applications, including Java EE or Web applications, to generate dynamic content.

I'm adding XML datasources for reports @ my work place and needed to embed the image signature for every report document.

Wednesday, July 27, 2011

Add Syntax Highlighter for Blogger

Syntax Highlighter are generally used for blogs, which mainly focus on scripting tutorials. We could have seen in many popular blogs using script highlighter to highlight the script. It not only highlight the 
script, but also give us a clear idea, how the script was formulated. This javascript can be capable of displaying css, xml, jscript, python, c# and much more supported programing languages.


Before you could start registration JS for your blog, I recommend you to back up your template.

Thursday, June 30, 2011

Creating a User Defined Language in Notepad++

In notepad++ you can bring up the User Defined Language editor from the menu (View & User Define Dialog...):

There are four tabs to fill out - Folder (as in code folding), Keyword, Comment, and Operators. (For a more in depth overview of the User Defined Language system, check out the Notepad++ docs) Make sure to set the file extension and language name. There's no save button, which is a little confusing, but the changes take effect as you make them.

Installing a user defined language file that someone else has written is pretty simple: In window click import and select user defined language xml file and this will appear in User Language list box.

Wednesday, June 29, 2011

Welcome!

Welcome to my blog.
In this blog I'll write about Alfresco (+ ECM, Java, JS and etc.)