Akdora’s Blog

Programming, Oracle, Life, Fun

Business Intelligence / Data Warehouse Event June 12, 2013

Filed under: Non-technical — Akdora @ 7:13 am

Business Intelligence / Data Warehouse
Özel İlgi Grubu Etkinliği 2013
21 Haziran 2013, Cuma – İTÜ ARI Teknokent, Istanbul

http://www.troug.org/?p=484

 

Program
09:00-09:30 Kayıt ve Açılış
Hasan Tonguç Yılmaz
09:30–10:15 Oracle Big Data Appliance & Hadoop Introduction
Ersin İhsan Ünkar
10:30–11:15 Exadata ile Veri Ambarı Yolculuğumuz
Ferhat Şengönül
11:30–12:15 Veri Ambarı Ad-Hoc Performansında Yeni Bir Seçenek
Ahmet Gök / Principal Consultant (Intellica-Sponsor Sunumu)
12:30-13:30 Öğlen Arası
13:30–14:15 OBIEE 11g Design Tips & Best Practices
Ahmet Selahattin Güngörmüş
14:30-15:15 ODI & Oracle Big Data Connectors
Sanem Seren Sever
15:30–16:15 Oracle DW SQL Tuning
Özgür Macit
16:30–17:15 Oracle Data Mining: Powering Next-Generation Predictive Applications
Onur Sarkan
17:15-17:20 Kapanış
 

How to SFTP & FTP with Ant Tasks February 14, 2013

I will explain, how you can send files using ANT scipt over SFTP protocol.

Until i find how to use sftp protocol, I googled also ftp protocol. I will explaint it firstly,

If you want to use FTP protocol, you may use <ftp> tag of commons-net-1.4.1.jar. To do this :

  • Download commons-net-1.4.1.zip jar from here.
  • Add this jar to your ant lib folder using explorer or Define it from eclipse, “Window > Preferences > Ant > Runtime > Global Entries > Add Jar “
  • If you do not add this jar, you will get “Could not create type ftp due to java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClientConfig” error.
  • Then write your ftp command to ant script
<target name="deploy" description="War is deploying">
 <ftp server="${ftp.host}" port="${ftp.port}" remotedir="${ftp.remotedir}" userid="${ftp.userid}" password="${ftp.password}" depends="yes">
      <fileset dir="${maven.build.dir}/war/" />
 </ftp>
</target>
  • If you use this method for SFTP (Port:22), You will get “error during FTP transfer: org.apache.commons.net.MalformedServerReplyException:
    Could not parse response code. Server Reply: SSH-1.99-OpenSSH_3.9p1” error.
  •  So, this method is valid for only FTP protocol.

 

After the experience below, I keep searching and find SCP task (min Ant 1.6).

  • Download jsch.jar0.1.42 or later from here
  • You may see examples in the page. This task can used to transfer any data from remote and local machine.
  • Add this jar to your ant lib folder using explorer or Define it from eclipse, “Window > Preferences > Ant > Runtime > Global Entries > Add Jar “
  • Then write your scp command to ant script
<target name="deploy" description="War is deploying">
    <scp file="${war.filepath}" sftp="true" trust="true" todir="userid:password@host:/to/dir/" />
</target>
  • If you do not add trust=”true” property, you will get “com.jcraft.jsch.JSchException: reject HostKey” error.

 

Good coding

 

Making Eclipse IDE Supports JSF 2.0 October 22, 2012

Filed under: Java,JSF — Akdora @ 8:29 am

Autocomplete was not working for JSF tags in my Eclipse. I googled it and finally found the solution on http://www.mkyong.com/jsf2/how-to-make-eclipse-ide-supports-jsf-2-0/

Thanx Mkyong.

The different thing I did is; I downloaded javax.faces-2.xx.xx.jar and saved in a specific folder. Then I created a user library with this jar. I did not use “jsf-api-xxx.jar and jsf-impl-xxx.jar“.

 

Solution Your profile could not be opened correctly in Chrome November 3, 2011

Hi,
When you try to open your chrome web explorer, if you get “Your profile could not be opened correctly” error, try to following solution:
There are several solutions on the web for this, but this is the easiest way:

-Close Chrome
-Go to “C:\Users\[user]\AppData\Local\Google\Chrome\User Data”
-Delete “Web Data” and “Web Data-journal” files. (If you cannot delete it, restart computer)
-Open Chrome

 

Clear extJS combo value when text is cleared or doesn’t match October 11, 2011

Filed under: Non-technical — Akdora @ 12:58 pm
Tags: , , , , ,

Here is the scenario;
-Type something to combobox
-Select something on the list
-Search and fill gridPanel
-Clear combobox and then search again
-It fills gridPanel with value that before we cleared.
I this this is a bug.
If you use Ext.getCmp(‘myCombo’).getValue() or Ext.getCmp(‘myCombo’).lastSelectionText, it does not work.
You have to use Ext.getCmp(‘myCombo’).getRawValue(). This works ;)
By the way comboBox is not readonly.

 

Java Debug Problem “Source not found.” May 23, 2011

Filed under: Java — Akdora @ 6:10 am

Quick Hint:
When you try to debug java code in eclipse, if you get “Source not found.” error with red letters. Here is the solution:
Down Arrow Icon Next to Debug Icon > Debug Configurations > Classpath Tab > Add Projects to User Entries
Add your project that cannot debug to this location.

 

HTML Image Saving Protection (Save Image As >> Point.gif) April 15, 2011

Filed under: CSS — Akdora @ 11:04 am
Tags: ,

If you have a web page with full of your copyrighted photos and do not want to visitors to save images in (easy way!) to their local computers. Let me show a trick about it.

In the photo (img) section of the page, we have always something like as following;

     <img id="myImg"
      src="http://www.google.com.tr/logoyapsana/images/templates/google_logo_01.gif"
      width="667" height="472"
      style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px;">
      </img>

On the image, when we right-click to the mouse and click to “Save Image As” command, we can save the image to our local disk. However, if we create a basic css style with a div below of the image, we can prevent this.

The important thing is in here: blank/point image’s dimensions has to be same with original image dimensions and css class of the component should include the following properties.

.BlankPixel { 
     position: absolute; 
     top: 0;
     left: 0; 
}
<div id="Photo">					
      <img id="myImg"
      src="http://www.google.com.tr/logoyapsana/images/templates/google_logo_01.gif"
      width="667" height="472"
      style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px;">
      </img> 
	</div>
       <div class="BlankPixel"><a href="#"><img src="http://akdora.files.wordpress.com/2011/04/point.gif" width="667" height="472"></a></div>

That’s it. This trick is an only basic measure for basic internet users. If someone want to save the photo, since the resource is downloaded to your computer to show up on the screen. It can be saved in any way.

Here is the full html example:
Copy the code and create a html page called “a.html” and open it. Try to save Google logo and see what happens :) A file dialog box will ask you a location to save “http://akdora.files.wordpress.com/2011/04/point.gif&#8221; file! Not Google Logo!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>My Title</title>
    <style type="text/css">
	.BlankPixel { 
		position: absolute; 
		top: 0;
		left: 0; 
	}
	</style>
  </head>
  <body>
    <div id="Photo" class="Photo">					
      <img id="myImg"
      src="http://www.google.com.tr/logoyapsana/images/templates/google_logo_01.gif"
      width="667" height="472"
      style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px;">
      </img> 
	</div>
	<div class="BlankPixel"><a href="#"><img src="http://akdora.files.wordpress.com/2011/04/point.gif" width="667" height="472"></a></div>
  </body>
</html>

 

 
Follow

Get every new post delivered to your Inbox.

Join 27 other followers