Friday, March 29, 2013

Working with Sencha for ExtJs


=== download Sencha tool here http://www.sencha.com/products/sencha-cmd
stored in
Linux //samba-share/downloads/sencha/SenchaCmd-3.1.0.256-linux.run.zip
Window //samba-share/downloads/sencha/SenchaCmd-3.1.0.256-windows.exe.zip

== download ExtJs SDK from http://www.sencha.com/products/extjs/
http://www.sencha.com/products/extjs/download/ext-js-4.2.0/2142
Zip Sorted in //samba-share/downloads/sencha/extjs_420_build_2142/SenchaCmd-3.1.0.256-windows.exe.zip

==help install URL == http://stackoverflow.com/questions/14730977/build-failed-in-sencha-cmd
install ruby from http://rubyinstaller.org/
or sudo apt-get install ruby

==put in bashrc
export EXTJS_SDK=~/programs/sencha-cmd/ext-4.2.0.663
export SENCHA_HOME=$SENCHA_CMD_3.1.0.256
PATH=...$SENCHA_HOME/bin:$PATH

ll $SENCHA_HOME/sencha.cfg
echo "skip.sass=1" == $SENCHA_HOME/sencha.cfg
echo "skip.slice=1" == $SENCHA_HOME/sencha.cfg

test Sencha cmd as
==sencha

create new app as follows
cd ~/projects-try

sencha -sdk $EXTJS_SDK generate app CCAProject ~/projects-try/ccaApp

== to build app first cd to it and then build
cd ~/projects-try/ccaApp

echo "skip.sass=1" ext/cmd/sencha.cfg
echo "skip.slice=1" ext/cmd/sencha.cfg

sencha app build

Tuesday, January 1, 2013

alternate to oracle dbms output



CREATE TABLE mylog_t
  (
    "TIMESTAMP" DATE NOT NULL ENABLE,
    "LOG_TEXT" VARCHAR2(500 BYTE)
  );

  CREATE or replace PROCEDURE mylog(a_log_text       mylog_t.log_text%TYPE)
   IS
      PRAGMA AUTONOMOUS_TRANSACTION;
   BEGIN
      INSERT INTO mylog_t (timestamp,log_text)VALUES (SYSTIMESTAMP,a_log_text);
      COMMIT;
   END mylog;



shamelessly copied from http://berxblog.blogspot.com/2009/01/pipelined-function-vs-dbmsoutput.html

create or replace
function dummy
return DBMS_DEBUG_VC2COLL
PIPELINED -- NOTE the pipelined keyword
is
begin
pipe row (to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ));
dbms_lock.sleep(15);
pipe row (to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ));
return;
end;
/
Make sure you set the arraysize of SQL*PLUS (or whatever) small enough, otherwise you will get a bunch of results at once, not when they occure.
set arraysize 1
select * from table(dummy());
gives
COLUMN_VALUE
--------------------
20-JAN-2009 14:24:17
and after 15 sec.
20-JAN-2009 14:24:32

Wednesday, November 28, 2012

git and eclipse

Git ref 
to import a project into git from say CVS
cd ~/projects/camscapa-project/
mkdir CAMS2
cp -R ../cams2-project/CAMS2/* CAMS2
cd CAMS2

mvn clean

for d in `find -type d -name 'CVS'`; do rm -rf $d; done
for d in `find -type d -name '.settings'`; do rm -rf $d; done
for d in `find -type f -name '.project'`; do rm -rf $d; done

git init
git add .
git commit -a -m 'all commit first time'
cd ..
git clone --bare ./CAMS2 ~/z-git-repos/CAMS2.git
mv CAMS2 CAMS2_after_init
git clone git://rpradeshik/CAMS2.git
cd CAMS2
pwd

# add gitigone with target classes etc.,

git add .
git commit -m 'ingone file' .
git push

To import in eclipse

  1. Open "Git Perspective", do "Add existing local repo"  and choose "~/projects/camscapa-project/CAMS2" 
  2. RClick on CAMS2 node and select "Import Projects"
  3. in 3 radio options choose "Import as general Project", then "CAMS2", finish
  4. This should bring CAMS2 as project into workspace, goto java perspective
  5. to import single modules inside CAMS2 say "cams-dri" RClick and do maven import
  6. Make sure maven 304 is in eclipse installation


Wednesday, October 24, 2012

Maven and Linux Tips

java and C++ interface easily http://code.google.com/p/javacpp/
benchmark ref http://benchmarksgame.alioth.debian.org/
Standard Deviation http://www.mathsisfun.com/data/standard-deviation.html

Oracle trace settings ====

SQL> ALTER system SET EVENTS ’1652 TRACE NAME ERRORSTACK LEVEL 3′;
It will write to the alert.log
Tue Jul 21 11:04:45 2009
Errors in file /u01/admin/TESTDB/udump/testdb_ora_17682588.trc:
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP

jar classifier and Profile usage, nice one

http://www.linuxtutorialblog.com/post/tutorial-conditions-in-bash-scripting-if-statements


To update version of maven for portal project
Manually update express/portal/pom.xml

mvn versions:update-child-modules -DgenerateBackupPoms=false
OR
mvn versions:set -DnewVersion=1.3-SNAPSHOT
mvn versions:commit

Wednesday, September 12, 2012

JBoss 7 re-deployment


The reason using these manual steps is war:inplace makes a mess if there are war overlays
In Jboss standalone.xml make sure you disable scanning for exploded deploys

Make sure you install inotify-tools (in ubuntu) test for exec as inotifywait
in war maven pom.xml have for exploded as
To deploy un-zipped run command as "mvn war:exploded"
To force reload of app in jboss make a touch as "touch $JBOSS_HOME/standalone/deployments/test-ui.war.dodeploy"
To Make a inotify cron rsync do as follows, have a shell script as

Sunday, July 29, 2012

sbt, g8 getting started


giter8 is ~= maven archetypes
https://github.com/n8han/giter8/

to install conscript do this
>>curl https://raw.github.com/n8han/conscript/master/setup.sh
it pus cs in ~/bin

some help:
http://scala.micronauticsresearch.com/sbt/useful-sbt-commands
scala example https://github.com/padcom/spring-example

append with EMPTY new line another sbt plugin common for user machine as
~/.sbt/plugins/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-RC1")


run as follows to create a sample project
g8 chrislewis/basic-project
(say you create testApp)

to create eclipse files
cd testApp
sbt eclipse (this create eclipse files, use Indigo to open project) !