Follow by Email

Tuesday, November 25, 2014

HTML TD Can't Wrap text , grows with the size of line and mess up the witdh of the TD



I am using Internet Explorer 9.

A dynamicaly generated text having a very long line when displayed in a TD in my HTML table mess up the whole width of the TD which basically grows to fit the whole line and doesn't automaticaly wrap text

applying wrap text CSS on TD is not working , The solution was to apply the below style at table level

style="width: 100%; table-layout: fixed;"

I didn't even need to apply text wraping to my TDs.




Below Thread was very helpfull

http://stackoverflow.com/questions/1057574/html-td-wrap-text

and the solution which worked for me in this thread is copy pasted below

table-layout:fixed will resolve the expanding cell problem, but will create a new one. IE by default will hide the overflow but Mozilla will render it outside the box.
Another solution would be to use: overflow:hidden;width:?px
<table style="table-layout:fixed; width:100px">
 <tr>
   <td style="overflow:hidden; width:50px;">fearofthedarkihaveaconstantfearofadark</td>
   <td>
     test
   </td>
 </tr>
</table>
 
Since I am using IE I had to only use
 
style="width: 100%; table-layout: fixed;"
 
for my table.
 

Wednesday, October 8, 2014

oracle How can I tell where my database function was used




http://stackoverflow.com/questions/4670164/how-can-you-tell-if-a-pl-sql-package-procedure-or-function-is-being-used
 
As mentioned in the above stackoverflow thread , below query can be used to find where your database function/procedure has been used.
 
SELECT * FROM all_source where UPPER(TEXT) like UPPER('%YOUR_DATABASE_FUNCTION_NAME%')
 
The oracle documentation for all_sources can be found at below link
 
 http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2063.htm 


Below post is also very informative

http://oracletuts.net/sql/how-to-search-code-using-user_source-and-all_source-in-sql/
 

Thursday, September 25, 2014

Crystal report passing string date parameter to a report from my jsp page


Problem Statement :

Just found out that passing a string attribute from my jsp page to a crystal report is not working and the report was asking for the date parameter again.

Solution :

Thanks to a thread on stackoverflow , the solution was to create date string as

#9/25/2014# and then pass it to crystal report from my page and now it's working fine.

 

Monday, September 8, 2014

Eclipse saving workbench state hangs

I followed the below instructions in the blog

  • Make a backup of your “.metadata“-folder (very important!!) (this folder inside teh eclipse workbench/workspace folder)
  • navigate into the “.plugins“-folder located inside “.metadata
  • delete the folder “org.eclipse.ui.workbench
  • startup eclipse again and check if there is still everything you need


  • http://blog.elitecoderz.net/repair-eclipse-workbencheclipse-workbench-reparieren/2009/06/comment-page-1/#comment-6693

    and the problem was resolved , now when I close my eclipse it doesn't hang at saving workbench state.

    infact I have noticed that the eclipse is starting a closing faster than before.

    Usefull Oracle Database Queries


    Get the details of important oracle parameters such as "PASSWORD_LOCK_TIME" and "SESSIONS_PER_USER" etc

    select * from dba_profiles order by profiles

    Get the Name of the oracle instance

    SELECT sys_context('USERENV','DB_NAME') AS Instance FROM dual;
    Get the name of the current oracle instance and user id

     select name,user from v$database


    I will keep adding other usefull queries here....

    java.net.SocketException: Connection reset

    One reason of this exception I have noticed is when user clicked on a link in your website and before it was loaded completly user clicked anotehr link on the same page.

    This causes
    java.net.SocketException: Connection reset

    Sunday, August 10, 2014

    Oracle Splitting String into multiple rows


    I used below query to split a comma separated string to rows in oracle

    select regexp_substr(a.col1,'[^,]+', 1, level) RT_PARAM_NAME from

            (select 'a,b,c,d' col1 from dual) a

            connect by regexp_substr(a.col1,'[^,]+', 1, level) is not null  



    Note the regular expression '[^,]+' which basically tells the query to use , as a delimeter , and note the use of level and connect by.