16 Şubat 2017 Perşembe

Find Duplicate Records in Oracle

SELECT NAME, COUNT(NAME) FROM CUSTOMERS GROUP BY NAME HAVING COUNT(NAME) > 1

6 Şubat 2017 Pazartesi

Java Keystore Operations

Navigate to %JAVA_HOME%\bin or add this path to environment variables.

Generate key in keystore :

keytool -genkey -keystore {path}\{name}.keystore -alias {alias} -keyalg RSA

List files in a keystore :

keytool -list -v -keystore {path}\{name}.keystore

Export certificate from keystore :

keytool -export -keystore {path}\{name}.keystore -alias {alias} -file {destination}

Import certificate to keystore :

keytool -import -keystore {path}\{name}.keystore -alias {alias2} -file {destination}

20 Şubat 2013 Çarşamba

A Free Help Authoring Tool : Precision Helper

Creating help documents, manuals are important for applications. We decided to create one for our web application, and googled some keywords: "help document creator", "compiled html generator", "help page prepare tool".. Finally we found the best term, and the best freeware application : "Precision Helper"

http://www.be-precision.com/products/precision-helper/

Creating .chm files and converting to web help files are so user-friendly and easy.

Features are listed here:
http://www.be-precision.com/products/precision-helper/properties.php

Here are some screenshots:
http://www.be-precision.com/products/precision-helper/screenshots.php

And a sample web-help document:
http://www.be-precision.com/products/precision-helper/webhelp.php

Note; it is completely free, you can donate if you like and keep this work alive.


14 Şubat 2013 Perşembe

Using java.text.Normalizer to convert accents to regular string

I had to send SMS in Java application, and the message consists of a name parameter like Alkın TÖŞDÖĞEN. This is a Turkish word so it is not properly displayed in message.

The first solution in everyone's mind is I think to use .replaceAll("Ö", "O").replaceAll("ı", "i")..

But here is a simpler way :

public static String convertToRegular(String aOriginal) {
        return (Normalizer.normalize(aOriginal, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]",""));     
 }

Normalizer separates accents. ReplaceAll replaces all non-regular characters with empty characters.




http://stackoverflow.com/questions/3322152/java-getting-rid-of-accents-and-converting-them-to-regular-letters

15 Ekim 2012 Pazartesi

Deploying war file to Uhuru Appcloud : So Easy!

Last week I found a new PaaS called Uhuru Appcloud. I would like to show to how to easily deploy a Java web application to Appcloud in a few steps.

1. The first thing you should do is visiting this site : http://www.uhurucloud.com/ and signing in by one of these openid authentication accounts; google, microsoft and facebook.


2. When you login, you will see your 'teams' page, that is where our applications will live in. By default, we have one team cloud that contains 0 apps, 0 services and 1 member: me.


3. Now, we have our environment, so we may use one of these great tools : Visual Studio Plugin, Appcloud Admin, Command Line. I downloaded the Appcloud Admin from :
http://www.uhurucloud.com/tools/cloudadmin/

4. After installing and opening the Appcloud Admin we should add a Target:


Use http://services.uhurucloud.com as default target URL, click next. You will see login page as you sign in the page before. After successful authentication we should see our test team. Choose one of them and click OK.



5. Since main idea is to show you deploying a web application to Uhuru Appcloud, I will not show you how to create a war file. Instead, I downloaded a simple JSF application and extracted the war file to my folder:



Now, my web application is ready. I may 'push' it to Uhuru Appcloud :


We can set environment variables, add services (mssql, mysql, redis, rabbitmq, uhurufs and mongodb) also.

6. After pushing our web application to server; we can start to use it:


asiltestjsf application is installed and deployed to Tomcat. Ready to use it from url : http://asiltestjsf.uhurucloud.com/



In my opinion, Uhuru Appcloud is very user friendly and easy-to-deploy platform. It supports Java, .Net, PHP, Ruby etc, there are much more features I did not cover yet, but details can be found at:

http://uhurusoftware.com/

Congratulations to Jawak Khaki and Jawaid Ekram for this idea. You should try and give it a chance.



Blogger tarafından desteklenmektedir.