Table 2 Table copy data

April 22nd, 2008
INSERT INTO TABLE_B  SELECT * FROM TABLE_A; burda alanları aynı olan tablodan tabloya aktarım olayı.
INSERT INTO TABLE_B (NAME, PHONE) SELECT NAME, PHONE FROM TABLE_A; Table A dan Name ve phone alınıp Table B ye eklenir.
Commit unutmayalım.

Kral ve Yaşlı Adam

April 22nd, 2008

Bir zamanlar bir kral vardı. Bu kral işini en iyi şekilde yapmak isterdi. Sık sık şöyle düşünürdü :”Bir iş için en uygun zaman hangisidir acaba? En gerekli kişi kimdir ve yapmam gereken en önemli şey nedir? Bu üç şeyi bilseydim, çok başarılı olurdum”. Bir gün kral her tarafa haber saldı. Soruların cevabını bilene büyük ödüller vereceğini duyurdu. Bilgili kişiler toplandı. İlk soru görüşüldü. Kimileri takvim hazırlamaktan, kimileri bir bilge kişiler meclisi kurmaktan bahsetti. Böylece en uygun zamanın hangisi olduğunu bulacaklardı. En önemli kişiyse bazılarına göre din adamları, bazılarına göre savaşçılar, bazılarına göre ise hekimlerdi. En önemli şeye gelince bazıları bilim, bazıları savaşta ustalaşmak dediler. Kral bu cevapları kabul etmedi. Bir ağaç kavuğunda tek başına yaşayan , bilgeliğiyle ünlü , yaşlı bir adam vardı. Kral ona danışmaya karar verdi. Yaşlı adam, yaşadığı kovuğa halktan başkasını kabul etmezdi. Bu yüzden kral, halktan biri gibi giyinerek yola düştü. Kovuğa yaklaştıklarında muhafızlarını orada bırakıp yola devam etti. Yaşlı adam çiçek tarhları kazıyordu. Geleni gördü selamladı. Zayıftı, işini yaparken zorlanıyordu. Kral:“Ey bilge üç sorum var!” diyerek sorularını sordu. Yaşlı adam dinledi ama cevap vermedi. Kral:“Siz biraz dinlenin“ diyerek küreği aldı. Yaşlı bilge:“Sağ olun“ diyerek oturdu. Kral sorularını tekrarladı. Bilge yine susuyordu. Kral kazmaya devam etti. Ufukta güneş batmaya başladı. Kral sıkılmıştı.“Ey bilge cevap vermeyeceksen gideyim“ dedi. Bilge: “Birisi geliyor, kim acaba?“ Kendilerine doğru birisi koşuyordu. Adam yaralıydı. Yanlarına ulaşınca bayıldı. Adamın elbiselerini çıkardılar. Kral yarayı havluyla bastırdı. Fakat kanama devam ediyordu. Kral havluyu defalarca yaraya bastırıp yıkadı. Sonunda kanama durdu. Bu arada akşam olmuştu. Yaralıyı kovuğa taşıdılar. Kral yorgunluktan eşikte uyuyakaldı. Deliksiz bir uyku çekti. Uyandığında kendisine bakan yabancıyı bir süre hatırlayamadı. Adam:“beni affedin!“ dedi. Kral:“Sizi tanımıyorum, affedilecek ne yaptınız ki?“ dedi. Adam :“Ben sizin düşmanınızım. Kardeşimi astırdığınız için sizden öç almaya yemin etmiştim. Buraya geldiğinizi öğrenince size pusu kurdum. Fakat akşam olduğu halde dönmediniz. Ben de beklediğim yerden çıktım. Ama muhafızlarınız beni tanıyıp yaraladılar. Kaçtım. Siz yardım etmeseydiniz ölürdüm. Ben sizi öldürmek istedim, siz ise benim hayatımı kurtardınız. Affedin beni!“ Kral düşmanıyla bu denli kolay barıştığı için mutlu oldu. Doktorunu göndereceğini söyleyerek vedalaştı.
Yaşlı bilge dışarıda tohum ekiyordu. Kral yaklaştı. Yalvarırcasına sordu. “Cevap verecek misiniz?“ Bilge gözlerini kaldırdı:“Cevabınızı aldınız ya“ dedi. Kral: “Nasıl“diye sordu. Yaşlı bilge şöyle dedi:“Anlamadınız mı? Dün bana acımayıp tarhları kazmasaydınız gidecek, şu adamın saldırısına uğrayacaktınız. Yani en önemli vakit tarhları kazdığınız vakitti. En önemli kişi bendim ve en önemli işiniz bana yardım etmekti. Bu adam geldiğinde ise en önemli vakit onunla ilgilendiğiniz andır. Çünkü yaralarını sarmasaydınız sizinle barışmadan ölecekti. Dolayısıyla en önemli kişi oydu, en önemli iş de onun için yaptıklarınızdı. “Şu gerçeği unutmayın: En önemli vakit içinde bulunduğumuz andır. Çünkü sadece o an bir şey yapabiliriz. En önemli kişi o anda kiminle berabersek odur. Zira onunla bir daha görüşüp görüşmeyeceğimizi bilemeyiz. En önemli iş ise iyilik yapmaktır. Çünkü insan dünyaya bunun için gönderilmiştir.“
Lev Nikolayeviç Tolstoy

JSP ile JSF farkları

February 26th, 2008

the difference between JSP and JSF:

1. A developer has more control with JSP, but (should) get easier development with JSF
2. Event handling is done differently in JSP (HTTP) and JSF (Java)
3. The UI is designed differently (or should be at least) with JSP (markup) and JSF (components).
4. The end product should also be defined differently - JSP page versus a JSF application.
Is this the only thing that is need to make a decision for either or? Probably not. There are other pieces that need to be taken in account when deciding which technology to use - tools support, enough components, type of application etc…. At this point there are not enough JSF components (although there are some interesting projects underway - Ajaxfaces, Myfaces, ADF Faces, and WebChart 3d) and enterprise tools support is still limited to a few tools vendor. Looking at our ADF Faces components they are currently available as early access (not production) and demands for these components are stacking up, literally, outside my office doorstep. Although I would love to make them production - now! - it is not a viable solution since we are still checking features and fixing critical bugs.
All this combined - not enough enterprise level components in production, lacking tools support etc… - leave customers in a vacuum where the decision is either to continue with JSP, since it is mature and has a wide developer base, or move forward with JSF not sure if the support, or the developers will be there. This is particularly sensitive to customers that need to get started now and be production by summer.
If you are in this vacuum here are some key points promoting JSF:
1. Fundamental unit is the Component
2. Built in event and state management
3. Component sets can be provided by any vendor
4. Closer to ASP.Net or Swing development
5. Choice of UI technology
6. Scale up (rich clients)
7. Scale down (mobile devices)
8. Built into J2EE containers in J2EE 5.0 (tentative)

asker kontun Dağıtımı

September 20th, 2007

Acemi birliğini tamamlayan kontun dağıtımı kıbrıs 39.tümene çıkmış adam adayı çok sevdi her yerde oraya çıkıyo bu gidişle oraya yerleşecek zindan şaplanma fazla ( kesin tankla falan gelir şimdi bu askerden yakışır ).Hayırlı teskereler.

executing pl/pgsql function in postgre and java

September 20th, 2007

CREATE OR REPLACE FUNCTION squre_root(integer)
RETURNS double precision AS
$BODY$
BEGIN
return SQRT($1);
END; $BODY$
LANGUAGE ‘plpgsql’ VOLATILE;
ALTER FUNCTION squre_root(integer) OWNER TO hede;

to execute this procedure in pgadmin  : select squre_root( 9 );

import java.sql.*;

public class PlSqlTest {
public static void main(String args[]) {
CallableStatement stmt = null;

int a=9;

System.out.println(”\nArray Parameter Test\n”);
try {
Class.forName(”org.postgresql.Driver”);

Connection conn = DriverManager.getConnection(”jdbc:postgresql://localhost/hede”, “hede”,”hede”);

conn.setAutoCommit(false);
stmt = conn.prepareCall(”{?= call squre_root(?)}”);
stmt.registerOutParameter(1, java.sql.Types.DOUBLE);
stmt.setInt(2, a );
stmt.execute();
double result = stmt.getDouble(1);

System.out.println(”\nThe result is ” + result);

conn.close();
}
catch (SQLException se) {
System.out.println(”\nA SQL exception occurred.”);
System.out.println(”\nError code: ” + se.getErrorCode());
System.out.println(”\nSQL state: ” + se.getSQLState());
se.printStackTrace();
}
catch (Exception e) {
System.out.println(”\nSome other exception occurred.\n”);
e.printStackTrace();
}
}
}

Bugun CcemAlp Doğum günü

September 20th, 2007

Beşiktaşlı Oldu!!! Hollanda’ya inek sağmaya gitti inek diye bunu sağıyorlar gömülmüş kodlara kafasını kaşıyamıyor Taa twenteden Tansuya laf yetiştiriyor.Kanqa doğumgünün kutlu olsun nice senelerede oralarda yaşlanma.

Mutluluklar Enver & Burcu Altın

September 10th, 2007

08.09.2007 Tarihinde Dünya evine giren şirket kanqamızın her ne kadar nikaha gitmek nasip olmasa Mutluluklar diliyerek tebrik ediyorum.Notumuda Düşüyorum geçmiş olsun birader birini daha kaybettik bu genç yaşta.

Darısı Başıma Hülya

September 10th, 2007

06.09.2007 Tarihinde Dünya evine girmek üzere ilk adımı nişanlanarak geçen Hülya Çakmakçı kanqamızın Tebrik ediyoruz Mutluluklar Diliyorum.

openCDS device Management

September 6th, 2007

Open cds can dedect device type and automaticaly generates,imports configuration file on opencds Device Creation if a new device is detected, and autoCreate is false the subscriber will be given a “Device Not Supported” message. If autoCreate is true, we’ll gather as much info as possible from the UAProf and populate the device repository. New devices may be quarantined -meaning they can’t be used by subscribers until an administrator processes them in the Catalog Server.A notification email can be sent when a new device is created. If left blank, no emails will be sent.

autoCreate.newDevice=true

quarantine.newDevice=false

newDevice.notification.emailAddress=email@dns

Note:This autoCreate process doesn’t work properly.like Nokia N80 or N73 ,we expect to see openCDS 5.1 version (may be released in September 2007 ).

If you create your application using XMLRPC This can not include create method.

we solve this problem add a jsp file to subscriberportal to compile this jsp use subscriberportalapi.jar.

<%@page import=”com.sun.content.server.subscriberapi.ISystemService”%>
<%@page import=”com.sun.content.server.subscriberapi.ApiServiceFactory”%>
<%@page import=”com.sun.content.server.subscriberapi.IModel”%>
<%@page import=”com.sun.content.server.subscriberapi.ApiUtil”%>
<%@page import=”com.sun.content.server.server.webapps.common.UIHelper”%>
<%@page import=”com.sun.content.server.subscriberapi.IApiContext”%>

<%
String userAgent = request.getHeader(”user-agent”);
System.out.println(”Model Created info:Starting!!!”);

//while using webbrowser it creates more than more mozilla device types

if (!userAgent.startsWith(”Mozilla”)){
try{
ApiUtil.initTransaction();
UIHelper.configureAPI(request);
IApiContext apiContext = UIHelper.getApiContext(request);
UIHelper.configureAPIRequest(apiContext);
ISystemService ss = ApiServiceFactory.getSystemService(null);
IModel newModel = ss.createModel(request);
System.out.println(”Model Created info:Stopping !!!”);
}
catch(Exception e){
e.printStackTrace();
}
finally{
ApiUtil.commitTransaction();
}
}%>

Use redirection turn back to your aplication. this is a nail ( Turkish called ” çakma “) solution.

Common Lisp

August 3rd, 2007

In 1995,
the American National Standards Institute recognized a slightly updated version as ANSI
Common Lisp, the first object-oriented language to receive certification, and ANSI CL remains
the only language that meets all of the criteria set forth by the Object Management
Group (OMG) for a complete object-oriented language.
1-Dynamic Redefinition: You can add new operations and functionality to the running
CL process without the need for downtime. In fact, a program can be running in one
thread, while parts of the code are redefined in another thread. Moreover, as soon as
the redefinitions are finished, the application will use the new code and is effectively
modified while running. This feature is especially useful for server applications that
cannot afford downtimes – you can patch and repair them while they are running.