Question about Computers & Internet

2 Answers

Pattern matching Input Specification: -------------------- 1. The first line of input contains the Master String. 2. The second line of input contains the Scan String. Both Master String and Scan String will not be greater than 80 characters in length. Sample Input and Output: ------------------------ Input: abcd23Abdaaaa4g9 .*Abd. { dot-star-A-b-d-dot } Output: 10 Input: aaadaaabbbb129cd a.*d { a-dot-star-d } Output: 16 Input: 0AbC1dEf2GhI3jKl4MnO5pQr6StU7vWx8Yz9 3JkL4 { 3-J-k-L-4 } Output Specification: --------------------- Your program must output the length of the longest substring matched. If there is no match, then the length of the matched substring is zero.

Posted by on

2 Answers

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

.* means 0 or more occurences of any char
. Means exactly one occurence of any char
Then the matching patterns char are counted

Posted on Sep 10, 2011

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Brigadier General:

    An expert that has over 10,000 points.

  • Master
  • 10,406 Answers

Nice try!

It's been almost 15 months since you asked your question.

If nobody has helped you with your "homework" assignment,
you probably scored a "zero" on your computer-programming course,
and probably no longer need an answer to your problem.

Posted on Dec 05, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Sound no picture


Your video cable is not plugged into the matching input to your audio. (ex. audio is on input 1 and your video is on input 2) Once they are matched make sure you television input is matched to where you have them plugged in.

Nov 16, 2013 | Vizio L32 32 in. LCD HDTV

1 Answer

I need to reset my combination to my mesa safe


This safe was shipped with a factory Master Code of 1-2-3-4-5-6-7-8.


If you changed the Master Code you will need to use the code you changed it to.


Deleting your current User Codes:
Input * - * lock will beep twice
input 6-6-6-# lock will beep twice
Input current Master Code - # lock will beep twice
Input user number - # lock will beep twice (not user code, user number is which user number you want to delete 1,2,3,4 or 5)
Re-input user number - # light stays green for 3 seconds

Example: * - * - 6 - 6 - 6 - # Master Code - # - 5 - # - 5 #
This will delete user 5
Unsuccessful code change: five beeps, repeat the steps.


Changing User Codes: Code length can be 3 to 8 digits long
Input * - * lock will beep twice
Input 4 - 4 - 4 - # lock will beep twice
Input Current User Code - # lock will beep twice
Input User Number - #
Input New User Code - # lock will beep twice
Re-input New User Code - # light stays green for 3 seconds

Example: * - * - 3 - 3 - 3 -# - User Code 2 - # - 2 - # -New User Code - # - New User Code - #

That example will change user code 2.
Unsuccessful Code Change: five beeps, repeat the steps.

There are other things you can do with the MSL-500 lock that comes on the MFL-2014E. You can change the master code, activate user codes, change user codes, delete user codes, set single user or dual user modes (dual user modes requires two user codes to be entered each time you want to open the safe, set the time delay.

The Mesa safe company has a website which does have the operating instructions for the MSL-500 electronic lock. A Google search of "Mesa MSL-500 Operating Instructions" would get you there quickly.

Oct 18, 2013 | Mesa Safes MFL2014E Safe Depository Safe...

1 Answer

Error sc 329


This is for a Ricoh copier. You did not indicate machine.

SC 329: Laser Beam Pitch Adjustment Error
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The LD unit home position sensor does not detect an on condition while changing the LD unit position for correcting the LD position or changing the DPI.


Instructions from the Service Manual below...

.

5.4.3 LASER BEAM PITCH ADJUSTMENT
There are two laser beam pitch adjustment procedures: one for 400 dpi, and one
for 600 dpi. These adjustments use the following SP modes.
· SP2-109-1: Laser Beam Pitch Adjustment - 400 dpi
· SP2-109-2: Laser Beam Pitch Adjustment - 600 dpi
· SP2-109-3: Laser Beam Pitch Initial Setting - 400 dpi
· SP2-109-4: Laser Beam Pitch Initial Setting - 600 dpi
· SP2-902-2, no.12: IPU Test Pattern - Cross Stitch - 400 dpi
· SP2-902-2, no.13: IPU Test Pattern - Cross Stitch - 600 dpi

1. Perform SP2-109-8 (Beam Pitch Data Reset).

2. Input the value for 400 dpi that is printed on the LD unit into SP2-109-1.
Use the value printed after "P" on the new LD unit as shown below.
NOTE: Do not use values printed after a "V".

(These value numbers are on a sticker inside the machine with a UPC code on it. The numbers are just under the UPC barcode. And example number looks like this: "15980300151P: 120, 172", so the example 400 dpi value here is "120".)

3. Press the "Enter" key.

4. Perform SP2-109-3.

5. Print the 400-dpi test pattern onto A3 (11"x17") paper using SP2-902-2 no.12
(cross stitch). (See Service Tables - Test Pattern Printing - Section 4.2.3, pasted below.)

6. Write the value of SP2-109-1 on the test pattern which was input at step 2.

7. Change the value of SP2-109-1 and print another test pattern, repeating steps
2 to 5. Print about 5 patterns with different values for SP2-109-1 (e.g. "48", "96",
"192", "240").

8. Check this test pattern. If the laser beam pitch is not correct, the image looks
like a black vertical stripe pattern.
NOTE: If the laser beam pitch is correct, the vertical stripe is not so noticeable.
If the value is not correct, the vertical stripe pattern is darker.

9. Adjust the laser beam pitch position until the thin lines are of uniform thickness
(no striping effect should appear on the printout), doing steps 2, 3, and 4. (In
step 2, input a value which is estimated to be correct, then do steps 3 and 4,
then if necessary go back to step 2 and try another value.)

10. After adjusting the laser beam pitch for 400 dpi, adjust the laser beam pitch for
600 dpi, using the same procedure as for 400 dpi (use the SP modes for 600
dpi).

.

4.2.3 TEST PATTERN PRINTING (SP2-902)
NOTE: Do not operate the machine until the test pattern is printed out completely.
Otherwise, an SC may occur.

1. Access the SP mode which contains the test pattern you need.

2. Press exit, then touch the "Copy Mode" key on the operation panel to access
the copy mode display.

3. Select the paper size.

4. Press the "Start" key to print the test pattern.

5. After checking the test pattern, exit copy mode by touching the "SP Mode" key.
Reset the test pattern to 0.

6. Exit the SP mode.

.
Test Pattern Table (SP2-902-2: Test Pattern Printing - IPU)
No. Test Pattern
-
0 None
1 Grayscale 1
2 Grayscale 2
3 Grayscale 3
4 Grayscale 4
5 Grayscale 5
6 Vertical Lines (256-greyscale) 13 Cross Stitch (600 dpi)
7 Vertical Lines (1-dot)
8 Vertical Lines (2-dot)
9 Hatch Pattern
10 Cross Pattern
11 Slant Pattern
12 Cross Stitch (400 dpi)
.

Test Pattern Table (SP2-902-3: Test Pattern Printing - Printing)
No. Test Pattern
-
0 None
1 Vertical Line (1-dot)
2 Horizontal Line (1-dot)
3 Vertical Line (2 dot)
4 Horizontal Line (2-dot)
5 Grid Pattern (Single-dot)
6 Grid Pattern (Double-dot)
7 Alternating Dot Pattern
8 Full Dot Pattern
9 Black Band
10 Trimming Area
11 Argyle Pattern
12 16 Grayscales (Horizontal)
13 16 Grayscales (Vertical)
14 16 Grayscales (Vert./Hor.)
15 16 Grayscales (Vert./Hor Overlay)
16 Not used
17 Horizontal Line (1-dot)
18 Grid Pattern (Single-dot)
19 Grid Pattern (Double-dot)
20 Alternating Dot Pattern
21 Blank Page

.

These adjusments listed in the manual require removal of a service panel and mechanical adjustment of the laser mounts, so it should be done by a qualified technician.

However, these test procedures can indicate whether or not this is the problem with your printer.

Sep 05, 2012 | Office Equipment & Supplies

3 Answers

A java code for anagram


import java.io.IOException;

public class AnagramApp {
static int size;

static int count;

static char[] charArray;

public static void main(String[] args) throws IOException {
String input = "Java Source and Support";
size = input.length();
count = 0;
charArray = new char[size];
for (int j = 0; j < size; j++)
charArray[j] = input.charAt(j);
doAnagram(size);
}

public static void doAnagram(int newSize) {
int limit;
if (newSize == 1) // if too small, return;
return;
// for each position,
for (int i = 0; i < newSize; i++) {
doAnagram(newSize - 1); // anagram remaining
if (newSize == 2) // if innermost,
display();
rotate(newSize); // rotate word
}
}

// rotate left all chars from position to end
public static void rotate(int newSize) {
int i;
int position = size - newSize;
// save first letter
char temp = charArray[position];
//shift others left
for (i = position + 1; i < size; i++)
charArray[i - 1] = charArray[i];
//put first on right
charArray[i - 1] = temp;
}

public static void display() {
System.out.print(++count + " ");
for (int i = 0; i < size; i++)
System.out.print(charArray[i]);
System.out.println();
}
}

Nov 22, 2010 | Computers & Internet

2 Answers

Does my Inspiron 9400 Laptop have build in microphones?


Yes It is. You can check them either in COntrol Panel > SOund or Start > Run > DXDIAG.

WIth regards
FIXYA team

Oct 09, 2010 | Dell Inspiron 9400 Notebook

1 Answer

Compaq TFT 8020 Display Problim


have you tried going to menu and setting back to factory defaults? also, disconnect power cable and leave unplugged for 1 minute. Plug back in then see if problem is still there. Otherwise, something is wrong with the monitor that will need serviced or exchanged.

Jun 24, 2009 | Compaq TFT8020 (White) 18" LCD Monitor

2 Answers

SC 329 code Aficio 550


SC 329: Laser Beam Pitch Adjustment Error
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The LD unit home position sensor does not detect an on condition while changing the LD unit position for correcting the LD position or changing the DPI.


Instructions from the Service Manual below...

.

5.4.3 LASER BEAM PITCH ADJUSTMENT
There are two laser beam pitch adjustment procedures: one for 400 dpi, and one
for 600 dpi. These adjustments use the following SP modes.
· SP2-109-1: Laser Beam Pitch Adjustment – 400 dpi
· SP2-109-2: Laser Beam Pitch Adjustment – 600 dpi
· SP2-109-3: Laser Beam Pitch Initial Setting – 400 dpi
· SP2-109-4: Laser Beam Pitch Initial Setting – 600 dpi
· SP2-902-2, no.12: IPU Test Pattern – Cross Stitch – 400 dpi
· SP2-902-2, no.13: IPU Test Pattern – Cross Stitch – 600 dpi

1. Perform SP2-109-8 (Beam Pitch Data Reset).

2. Input the value for 400 dpi that is printed on the LD unit into SP2-109-1.
Use the value printed after “P” on the new LD unit as shown below.
NOTE: Do not use values printed after a “V”.

(These value numbers are on a sticker inside the machine with a UPC code on it. The numbers are just under the UPC barcode. And example number looks like this: "15980300151P: 120, 172", so the example 400 dpi value here is "120".)

3. Press the “Enter” key.

4. Perform SP2-109-3.

5. Print the 400-dpi test pattern onto A3 (11”x17”) paper using SP2-902-2 no.12
(cross stitch). (See Service Tables - Test Pattern Printing - Section 4.2.3, pasted below.)

6. Write the value of SP2-109-1 on the test pattern which was input at step 2.

7. Change the value of SP2-109-1 and print another test pattern, repeating steps
2 to 5. Print about 5 patterns with different values for SP2-109-1 (e.g. “48”, “96”,
“192”, “240”).

8. Check this test pattern. If the laser beam pitch is not correct, the image looks
like a black vertical stripe pattern.
NOTE: If the laser beam pitch is correct, the vertical stripe is not so noticeable.
If the value is not correct, the vertical stripe pattern is darker.

9. Adjust the laser beam pitch position until the thin lines are of uniform thickness
(no striping effect should appear on the printout), doing steps 2, 3, and 4. (In
step 2, input a value which is estimated to be correct, then do steps 3 and 4,
then if necessary go back to step 2 and try another value.)

10. After adjusting the laser beam pitch for 400 dpi, adjust the laser beam pitch for
600 dpi, using the same procedure as for 400 dpi (use the SP modes for 600
dpi).

.

4.2.3 TEST PATTERN PRINTING (SP2-902)
NOTE: Do not operate the machine until the test pattern is printed out completely.
Otherwise, an SC may occur.

1. Access the SP mode which contains the test pattern you need.

2. Press exit, then touch the “Copy Mode” key on the operation panel to access
the copy mode display.

3. Select the paper size.

4. Press the “Start” key to print the test pattern.

5. After checking the test pattern, exit copy mode by touching the “SP Mode” key.
Reset the test pattern to 0.

6. Exit the SP mode.

.
Test Pattern Table (SP2-902-2: Test Pattern Printing – IPU)
No. Test Pattern
-
0 None
1 Grayscale 1
2 Grayscale 2
3 Grayscale 3
4 Grayscale 4
5 Grayscale 5
6 Vertical Lines (256-greyscale) 13 Cross Stitch (600 dpi)
7 Vertical Lines (1-dot)
8 Vertical Lines (2-dot)
9 Hatch Pattern
10 Cross Pattern
11 Slant Pattern
12 Cross Stitch (400 dpi)
.

Test Pattern Table (SP2-902-3: Test Pattern Printing – Printing)
No. Test Pattern
-
0 None
1 Vertical Line (1-dot)
2 Horizontal Line (1-dot)
3 Vertical Line (2 dot)
4 Horizontal Line (2-dot)
5 Grid Pattern (Single-dot)
6 Grid Pattern (Double-dot)
7 Alternating Dot Pattern
8 Full Dot Pattern
9 Black Band
10 Trimming Area
11 Argyle Pattern
12 16 Grayscales (Horizontal)
13 16 Grayscales (Vertical)
14 16 Grayscales (Vert./Hor.)
15 16 Grayscales (Vert./Hor Overlay)
16 Not used
17 Horizontal Line (1-dot)
18 Grid Pattern (Single-dot)
19 Grid Pattern (Double-dot)
20 Alternating Dot Pattern
21 Blank Page

.

These adjusments listed in the manual require removal of a service panel and mechanical adjustment of the laser mounts, so it should be done by a qualified technician.

However, these test procedures can indicate whether or not this is the problem with your printer.

Dec 12, 2008 | Xerox WorkCentre 490CX All-In-One InkJet...

1 Answer

No sound


1-connection with the input devices or connection of speakers cables is faulty.
2-the input source do not match with receiver.
3-master volume is turned too low.
4-mute mode is set.
5-headphone are connected.
6-selection of input source is wrong.
7- no digital signal in input.

Aug 10, 2008 | Audio Players & Recorders

1 Answer

Numark cd mix 2


Well, it's not that hard to set up. What do you need help with? If you want to know how to connect:

1) The CD units go into the back of the mixer - in the CD / LINE INPUT - Left side on CD / LINE INPUT 1 and Right side to CD / LINE INPUT 2

The output of the mixer - MASTER OUT - goes to the INPUT of your stereo, amplifier, or receiver's LINE INPUT connection.

That's it. Press PLAY on your CD players, and raise the faders/volumes, and your all ready to go.


- TWEAK AV LAB

Nov 30, 2007 | Numark Fusion 494 Complete DJ Package

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

112 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...