How to use multiple patterns for masking/format the input text
Hi All,
I am using Jdeveloper 11.1.1.5 and i have a requirement where i need to format my input Text value in these below patterns:-
Format
Example
AA9A 9AA
EC1A 1BB
A9A 9AA
W1A 1HQ
A9 9AA
M1 1AA
B33 8TH
A99 9AA
AA9 9AA
CR2 6XH
DN55 1PT
AA99 9AA
For Example :- If user puts value as EC1A1BB, it should automatically changed to EC1A 1BB
if user puts value as W1A1HQ, it should be automatically changed to W1A 1HQ and so on..
If it could have been one format , i might have followed this :- https://blogs.oracle.com/jdevotnharvest/entry/get_social_security_numbers_right
But for multiple patterns i am not able to get through to the proper solution.
Is there any way to achieve this ? Please suggest.
Regards,
Shah
For the validation you should be able to use one regular expression where you add the logical or (|) (check the doc http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) between the groups. If none of the patterns matches you have an error.
For the for formatting I'm not sure you can use only one expression.
I suggest to write one method which does the checking on and the formatting may be using an array of patterns to check and iterate the patterns in a loop. Once you found a match you can read the needed format from another array (or an other dimension if you prefer to use a multidimensional array).
Timo
Similar Messages
-
How to use lock pattern for ur home screen in pod touch 4g(ios 5)
how to use lock pattern for ur home screen in pod touch 4g(ios 5)
Video formats:
H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
Support for 1024 by 768 pixels with Apple VGA Adapter; 576p and 480p with Apple Component AV Cable; 576i and 480i with Apple Composite AV Cable (cables sold separately) -
How to use multiple hierarchies for a single char in single query
Hi,
Is there any way that we can use multiple hierarchies for a single char in single query. I tried and it just allows me to select one hierarchy even if I use hierarchy variable.
I have a requirement where user wants to see information related to a cost center with different cost center groups in different hierarchies (every year has different cost center group hierarchies).
Suppose I want to see information related to a cost center from year 2001-2004.in these four year cost center may have been associated to different groups depending upon that year hierarchy. How can I do that?
Thanks
JonaNope. Now way to do this.
There is always just one hierarchy assigned to a characteristic. And even if the hierarchy was time dependent, it only reads it for one key date and not according to transaction data.
Regards,
Beat -
How to use multiple classes for each form
Hi,
I have created two forms using screen painter and now i want to use different classes for these two forms .
I have declared the Sbo Connection in main class i.e. Set Application ,Connection Context() but while connecting to other classes
for executing the code for that form SAP is not connected to that class.How to use multiple classes functionality i don't able to
do that.Please provide some sample codes for that as it will be more helpful for me to understand.
Thanks & Regards,
AmitHi Amit,
In fact, its more advisable to use separate classes for every form that you use. Have one common class, say, for eg., clsMain.cs which has all the connection and connectivity to other classes, wherein, the menu event and item event of this main class, will just be calling the menu / item event of other classes.
The individual functionality of the child classes will be called from the item / menu event of the respective classes.
Item event in clsMain.cs will be as below.
private void oApplication_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
SAPbouiCOM.Form oForm;
BubbleEvent = true;
try
if ((pVal.FormTypeEx == "My_Form1Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
NameSpace.Repots.ClsForm1.ClsForm1_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
if ((pVal.FormTypeEx == "My_Form2Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
NameSpace.Repots.ClsForm1.ClsForm2_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
Now, in the individual classes, you can have their respective item events, which will be called from the main class, and the respective functionalities will occur.
Hope this helps.
Regards,
Satish. -
How to use multiple addresses for a global vendor
Hi experts.
scnerios is.company has different plants in different countires.they have centrally agreed contract with vendor.now each plant create p,o is in different country how can we use that vendors local addresses in p.o because in vendor master we can define one addres at a time.so if that adrees is in other country.and plant creating p,o is in different how can select the local address of that vendor.
if option is partner function then how to use it.all adressess witl be odering address of that vendor.his offices is alll the counties.
thanksIQBAL,
You can maintain multiple addresses for the same vendor using international addresses.
First, you have to Activate International Address Versions for each country/language via config at
IMG: Flexible Real Estate Management (RE-FX) > Address Management > International Settings > Activate International Address Versions (You can do this even if you are not using Real Estate Management
Then, in the vendor master, address screen, select the "International Verion" button, select the address version and maintain your address.
If you have any programs that need to display or print these addresses, you will have to specifiy the address version to display/print. by default, the version (Field = NATION) is Blank.
I hope this helps. -
How to use multiple Interfaces for the same BS?
Hi @ ,
Is it possible to have a scenarion where i am using multiple interfaces in the same BS based upon some conditional field in the message.
I amnot able to get the solution I know with condition editor I can have multiple receivers but in my scenarion based upon message fiels i have to decide which BAPI to be used and wht mapping and then post it to the same System
Any help will be highly rewarded
RegardsHi-
Yes it is possible you can use multimapping for mapping the interfaces.
To know more about multimapping see
http://help.sap.com/saphelp_nw04/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/content.htm
Some more helpful links
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible -
How to use one NIC for everything and the other to allow ssh from
Hello,
I have two internet connexion at home:
- a cable connection (CABLEBOX) that i use for all of my devices as it's the fastest. All my computers are connected to it using ethernet or wifi.
- an adsl connection (ADSLBOX) that is connect to the second network card of one of my computers (MEDIABOX) only and that i want to use only to ssh that same device from the outside
I want that specific computer to use its:
- NIC1 to connect to the LAN and to the internet. Routing is enabled on CABLEBOX.
- NIC2 to connect to that device from the outside using ssh. ssh-D should also work through NIC2 as i need to be able to use that computer as a proxy on some occasions. Routing is enabled on ADSLBOX and it's set to port forward the port 22 to MEDIABOX.
Once this will be working i'd like to also route ftp connections to specific ips by NIC2.
No firewall is set on MEDIABOX yet, i'll do it later on.
I know basics on how to set routing rules, how to assign a specific LAN to a network card but i have a hard time on deciding which rules i should set...
Can someone guide me?
Thanks in advance
Last edited by parpagnas (2013-12-03 18:31:31)A possible solution might be this.
On ADSLBOX and CABLEBOX configure different subnets for the LAN, e.g.
ADSLBOX: 192.168.1.0/24
CABLEBOX: 192.168.2.0/24
The MEDIABOX gets these static IPs:
ADSL-LAN: 192.168.1.2
CABLE-LAN: 192.168.2.2
On the MEDIABOX, configure the two network interfaces using two routing tables.
The ADSL-LAN routing table
ip route add 192.168.1.0/24 dev eth0 src 192.168.1.2 table 1
ip route add default via 192.168.1.1 table 1
The CABLE-LAN routing table
ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2 table 2
ip route add default via 192.168.2.1 table 2
The main routing table
ip route add 192.168.1.0/24 dev eth0 src 192.168.1.2
ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2
# use the CABLE-LAN gateway as default, so general internet traffic from MEDIABOX runs over CABLEBOX
ip route add default via 192.168.2.1
define the lookup rules
ip rule add from 192.168.1.2 table 1
ip rule add from 192.168.2.2 table 2
To test the setup:
ip route show
ip route show table 1
ip route show table 2
I don't know how to persist something like this in ArchLinux using netctl. Might require to write a special systemd unit for it. Above is a working example from a RedHat box at my company.
Last edited by teekay (2013-12-04 07:42:22) -
How to use custumer DataTagsLibrary for BC4J in the JSP's with Struts Suppo
I've been looking for a good tutorial to learn very well
BC4J, DataTags Library for JSP , all with struts support.
But it's dificult to join all this topics.
Can someone help.
If you have any answer for me, plesea send an e-mail to
[email protected]Try these links:
http://radio.weblogs.com/0118231/ - Look for the Toy Store demo.
http://otn.oracle.com/sample_code/tutorials/bc4jvsm/content.html - The new Shopping Mall tutorial.
http://otn.oracle.com/products/jdev/howtos/content.html - The JDeveloper how to list.
Also, check frequently on the JDeveloper forum here on OTN.
HTH.
Thanks, George -
How to use RLS with complex numbers as the input?
I import a file which have complex numbers, and I want to filter it using complex RLS adaptive filter, but it always freeze at the filtering and update then it returns one value in the matrix and all the other numbers are NaN, so how can I fix this.
The second thing is when I use FBLMS, it always return error 42020 unless I specify the filter length= number of the input which is huge number, so how do I specify normal filter length.Hi engomar,
There is a detailed description of how to choose filter length in the Adaptive Filter Tollkit Help file.
http://zone.ni.com/reference/en-XX/help/372357B-01/lvaftconcepts/aft_choose_filterlength/
This page has several links to other important factors of what filter to choose. Under Computational Resource Requirements, it lists the memory usage for different filter types. RLS is the most memory intensive, which could be causing the freeze. Maybe try a LMS to see if this helps.
Robert R. | Applications Engineer | National Instruments -
How to use multiple connections for xcelsius dashboard via toggle button
Can anyone shed some light on how to apply a toggle button for multiple connections using xcelsius dashboard.
I created two SAP connections in my xcelsius dashboard. The first connection uses query 1 (bottom ten customers) and the second connection uses query 2 (top ten customers). I wanted to use a toggle button where the user would click Top Ten customers versus Bottom Ten customers. Which ever the user clicks in the toggle botton would run that query.
If the toggle button is not the way to handle this can someone explain a better approach to run either query in the same dashboard.
Thanks,
JoeHi,
I've never had to do this so have no practical experience. However in theory you should be able to do the following (assuming the data connection type youu2019re using has the "Usage" tab):
Set up the two connections as normal - On the usage tab set the detail query to Refresh before components are loaded and make sure that this is unchecked for the other query. Set both queries to populate the same range so that one query will overwrite the other in the Xcelsius spreadsheet.
Bind a toggle button to a cell e.g. A1
Back to the data connections again and set the "Refresh on trigger" trigger cell to A1. And set the "When Value Becomes" to either "On" or "Off" dependent on how you've set up the toggle button. Repeat for the other query.
Hope this helps,
Paul -
How to use 2 webcam for java at the same time?
hi there,
I have a question to ask regarding webcam and java. Basically i want to know whether is it possible to have 2 web cam running in java at the same time? I have no problem when running one usb webcam since i m using "
ml = new MediaLocator("vfw://0") ;
what parameter must i use to specify when using 2 web cam
many thanks
sunHi
I am making a project in which i have to capture a image through webcam. How can I do it will you please guide me or if can provide me code. Many thanks for your support. My email id is [email protected] -
How to Use different icons for JTree in the same level
Hi guys, i come cross a problem with JTree. The module need a JTree which need to represent items in the same level using different icons. For example:
[Icon for Root]Root
|
|_____________[Icon for Table] TABLES
|
|_____________[Icon for Index] INDEXS
|
|_____________[Icon for Views] VIEWS
As i know, the default behavior for JTree is using the same icon for all leaves and
the same icon for all node that has children. How can i achieve that?
Thansk a lot!subclass DefaultTreeCellRenderer. if you overwrite the method below, then you can set the icon to whatever you want....!
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus) {
String stringValue = tree.convertValueToText(value, sel,
expanded, leaf, row, hasFocus);
this.tree = tree;
this.hasFocus = hasFocus;
setText(stringValue);
if(sel)
setForeground(getTextSelectionColor());
else
setForeground(getTextNonSelectionColor());
// There needs to be a way to specify disabled icons.
if (!tree.isEnabled()) {
setEnabled(false);
if (leaf) {
setDisabledIcon(getLeafIcon());
} else if (expanded) {
setDisabledIcon(getOpenIcon());
} else {
setDisabledIcon(getClosedIcon());
else {
setEnabled(true);
if (leaf) {
setIcon(getLeafIcon());
} else if (expanded) {
setIcon(getOpenIcon());
} else {
setIcon(getClosedIcon());
setComponentOrientation(tree.getComponentOrientation());
selected = sel;
return this;
} -
How to use Linux legally for business in the US
Hello.
I am doing some research on software patents and how they inhibit businesses in the US from using FOSS.
My question is, basically, what would a business have to do in the US to use Linux in place of Windows/Mac and make sure they are not violating software patents? Violating these patents (for example, including an illegal H.264 codec in a company's system image so that video can be played by employees) present a serious liability to US businesses and could potentially discourage them from abandoning a proprietary OS for a free one.
One portion (of many) of this discussion I do not understand is how does one guarantee their system is clean of illegal codecs? For example, assume if one used his/her package manager to delete any codec-related packages he/she could find. If this person used a web browser to navigate to a website that included in-page H.264 videos or sound effects encoded using MP3, would this content merely not function (meaning, the person would be legally safe but unable to play the content)? Or do web browsers have these illegal codecs built in? I don't understand how website programming works enough to know the answer to this particular question.
I would appreciate any insight on this issue (and/or any thoughts you might have on this subject).
Thank you for your time.See distro's to avoid here if you are in the US:
http://www.gnu.org/distros/common-distros.html
And, linked from that page, see ones that should be safer:
http://www.gnu.org/distros/free-distros.html
With Parbola:
https://parabolagnulinux.org/
Being Free and based on Arch.
Now, the problem, completely free is very picky about the hardware it will run on so you will want to procure hardware specifically built to run under a Free system without issues. Licensed distributables you can get away with using, for example: Adobe Flash Player. Just accept the license agreement and you should be good to go. The minefield is that somewhere in even the Free code there could be a patent lying in wait. Something that someone in the US patented and the Free systems programmers were not aware of it. This is an issue in the US because commercial Operating Systems such as Windows will indemnify their users against patent infringement. On Free systems however you, the business using them, could end up being on the hook for significant damages.
The reason a completely Free system is very picky about what hardware it will run on is because all those binary blobs in common Linux distributions contain code that just makes stuff work. Without that you have to make absolutely sure that what you have will work with just Free software.
See:
http://www.gnu.org/philosophy/fighting- … tents.html
Last edited by headkase (2013-02-21 01:25:52) -
How to use CQL patterns in CEP?
Hi,
How to use CQL patterns and what is the use ?Try the new Stream Explorer interface and check out the patterns section. These are pre-defined patterns that allow you to look for trends, missing events, duplicates, W Pattern, etc. These do in-memory incremental processing of data with high throughput and low latency.
The SX user interface allows you to easily define a data stream and start applying a pattern. An Event Processing Network (EPN) with a CQL processor and the CQL are generated automatically and the results are immediately shown on the user-interface. -
Can I use differnet patterns for a "digital pattern match start trigger"
Hello,
Currently I would like use different patterns for a trigger the PCIe-6537 board to start capture data, for example, two patterns: 1101 and 1100 in digital IO lines line0:3, whenever one of this two pattern happens, start capture.
It seems like "digital pattern match" in DAQmx trigger can use one pattern only.
thanks!Hi tt_ni,
Pattern I/O only allows the acquisition
based off of one pattern. This is a “limitation” of the hardware based on the
registers being set a certain way and monitoring a change from that. You could
add external circuitry to OR your patterns and based the pattern I/O off of the
output of that external circuitry. The other option is to look at an FPGA
option.
Mark E.
Precision DC Product Support Engineer
National Instruments
Digital Multimeters (DMMs) and LCR Meters
Programmable Power Supplies and Source Measure Units
Maybe you are looking for
-
Replace special characters in xml to its HTML equivalent
Hello All, I did a small xml processor which will parse the given xml document and retrieves the necessary values. I used XPath with DocumentBuilder to implement the same. The problem which had faced initially was, i could not able parse the document
-
IPhone 5 apple logo flashing when on charge.
My iPhone 5 randomly turned off last night and I was unable to turn it on. I then plugged it into a charger and the apple logo appeared and then went again. This flashing has been happening continuously - black screen for 5 seconds, apple logo for 10
-
Errors while running MAU application in a PDA
Hi All, We have customized ZMAU and after checking the u2018Add JSP as complied classesu2019 u2013 We are deploying that application on a PDA with OS = WM 6.0 Crème = CrEme329_ARM_CE42_PPC.exe DB2E 9.22 The application is successfully deployed. When
-
Can you use pages for OS on IPad offline?
Can you use the pages app on the IPad offline?
-
I need to restart my iPhone 4s almost every day. Settings app unresponsive
Moved here: https://discussions.apple.com/thread/3593901 Sorry, I can't figure out how to delete a discussion.