say, you defined your toggle button bar as below
<mx:ToggleButtonBar id="tbbModule" itemClick="tbbModule_Click(event)">
<mx:Array>
<mx:String>Home</mx:String>
<mx:String>Module 1</mx:String>
<mx:String>Module 2</mx:String>
</mx:Array>
</mx:ToggleButtonBar>
If you want to disable the first button, then
mx.controls.Button(tbbModule.getChildAt(0)).enabled =false;
Monday, November 14, 2011
Wednesday, August 3, 2011
Oracle: Regular expression to extract text from rtf string
After few trial and errors, figured out a way to extract text from rtf string format.
with rtf as ( select
'{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\lang1033\f0\fs17 This is first line of rtf string with 01/02/1950 and some $10.20 with +ive sign
\par
\par e-mail second line rtf@rtf.com
\par \pard\sb100\sa100\cf1\lang1036\f1\fs24 Yes, Third line of rtf. \cf0\f2
\par \f1\fs20 some text \f2\fs24
\par \f1\fs20 123 456 abc 7890\f2\fs24
\par \pard\lang1033\f0\fs17
\par }' str from dual)
select str, regexp_replace(str, '({\\)(.*)(})|(\\[^ ]*)|(})') from rtf;
Here is the break down of Regular expression. It has 3 parts
({\\)(.*)(}) | (\\[^ ]*) | (})
Replace
with rtf as ( select
'{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}{\f1\fswiss\fcharset0 Arial;}{\f2\froman\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\lang1033\f0\fs17 This is first line of rtf string with 01/02/1950 and some $10.20 with +ive sign
\par
\par e-mail second line rtf@rtf.com
\par \pard\sb100\sa100\cf1\lang1036\f1\fs24 Yes, Third line of rtf. \cf0\f2
\par \f1\fs20 some text \f2\fs24
\par \f1\fs20 123 456 abc 7890\f2\fs24
\par \pard\lang1033\f0\fs17
\par }' str from dual)
select str, regexp_replace(str, '({\\)(.*)(})|(\\[^ ]*)|(})') from rtf;
Here is the break down of Regular expression. It has 3 parts
({\\)(.*)(}) | (\\[^ ]*) | (})
Replace
1) Anything that starts with {\ followed by any any character(s) and ends with }
or2) Any thing that starts with \ and not followed by a space
or3) Replace the last }
Friday, July 22, 2011
Flex: Workspace in use or cannot be created
I have seen this annoying message more often in Flex Builder 3. It looks like the locks are not properly released when you quit Flex Builder.
If you get this error, You have 2 options
Option 1
Option 2
Restart your pc
Either option will resolve this for you.
If you get this error, You have 2 options
Option 1
- Go to Task Manager
- Kill FlexBuilder.exe
- Kill Javaaw.exe
Option 2
Restart your pc
Either option will resolve this for you.
Thursday, July 21, 2011
Data pump: Import multiple dump files
If the size of the dump file is large, usually they will be split into smaller chunks for easier ftp upload/download.
If you are trying to import a dump file that is split into many chunks, then you need to modify the DUMPFILE paratermeter to include %U
If the dump files are named EXP_PROD_1.dmp, EXP_PROD_2.dmp etc , then
DUMPFILE=EXP_PROD_%U.DMP
If you are trying to import a dump file that is split into many chunks, then you need to modify the DUMPFILE paratermeter to include %U
If the dump files are named EXP_PROD_1.dmp, EXP_PROD_2.dmp etc , then
DUMPFILE=EXP_PROD_%U.DMP
Tuesday, July 19, 2011
Dropbox: How to get shareable links
I was trying to embed some of my pictures onto craigslist and couldn't get a shareable link.
To activate shareable link
1) log onto your dropbox account
2) Click on the link Enable Share
To activate shareable link
1) log onto your dropbox account
2) Click on the link Enable Share
Subscribe to:
Posts (Atom)