hello friends, given an expression we have to remove the
unwanted brackets in that expression.
Eg : (a+b) ---> a+b
(a+b)*(c)-----> (a+b)*c. Please mail me if you know
the logic. My mail id is : firstname.lastname@example.org.
Thank you in advance :-)
I am developing a web application using google map api.I
want to update the map inside the div control within update
panel. I got other controls updated but map doesn't get
updated.I do not not want to update map whenever unnecessary
controls are fired at server side.How could it be achieved?
Given a table of the form:
Product Sold on
There are 30 products and 10,000 records of such type. Also
the month period during which sales happened is given to u.
Write the program to display the result as:
Product Month No. of copies
A January 12
A February 15
A March 27
B January 54
B February 15
B March 10
C January 37
Definition of priority queue was given. We have to implement
the priority queue using array of pointers with the
priorities given in the range 1..n.
The array could be accessed using the variable top. The list
corresponding to the array elements contains the items
having the priority as the array index.
Adding an item would require changing the value of top if it
has higher priority than top.
Extracting an item would require deleting the first element
from the corresponding queue.
The following class was given:
void put(int item, int priority); // inserts the item with
the given priority.
int get(int priority); // extract the element with the
int count(); // returns the total elements in the priority
int isEmpty(); // check whether the priority queue is empty
We had to implement all these class functions.
An array of size 5X5 is given to us. The elements from 1 to
25 are to be inserted in the array, such that starting from
a particular position for an element i, the next element
i+1can be inserted only at the mentioned positions (u,v),
and if these all positions are occupied then it returns
giving a count of how many positions have been occupied in
(u,v) = (x+/-3 , y)
(u,v) = (x , y+/-3)
(u,v) = (x+/-2 , y+/-2).
Example: if the starting element is 1 with the given
positions (1,2), then next element 2 can be placed at any
one of the positions marked with *.
_ _ _ _ _
1 _ _ _ *
_ _ _ _ _
_ _ * _ _
* _ _ _ _
You are given any character string. Find the number of sets
of vowels that come in the order of aeiou in the given
string. For eg., let the given string be DIPLOMATIC. The
answer returned must be "The number of sets is 2" and "The
sets are "IO and AI". Vowels that form a singleton set must
be neglected. Try to post the program executable in gcc or
g++ or in java.
c# code to Count number of 1's in a given range of integer
(0 to n)
How to block double clicks
program to show a progress bar
code to positioning of window in certain dimensions
Code for Using Keyboard Events?
give me the small script to add a global page through any
Financial: credit card number validation) Credit card
numbers follow certain
patterns. A credit card number must have between 13 and 16
digits. It must start
■ 4 for Visa cards
■ 5 for Master cards
■ 37 for American Express cards
■ 6 for Discover cards
In 1954, Hans Luhn of IBM proposed an algorithm for
validating credit card
numbers. The algorithm is useful to determine whether a card
number is entered
correctly or whether a credit card is scanned correctly by a
scanner. All credit
card numbers are generated following this validity check,
commonly known as
the Luhn check or the Mod 10 check, which can be described
as follows (for illustration,
consider the card number 4388576018402626):
1. Double every second digit from right to left. If doubling
of a digit results in a
two-digit number, add up the two digits to get a
2 * 2 = 4
2 * 2 = 4
4 * 2 = 8
1 * 2 = 2
6 * 2 = 12 (1 + 2 = 3)
5 * 2 = 10 (1 + 0 = 1)
8 * 2 = 16 (1 + 6 = 7)
4 * 2 = 8
2. Now add all single-digit numbers from Step 1.
4 + 4 + 8 + 2 + 3 + 1 + 7 + 8 = 37
3. Add all digits in the odd places from right to left in
the card number.
6 + 6 + 0 + 8 + 0 + 7 + 8 + 3 = 38
4. Sum the results from Step 2 and Step 3.
37 + 38 = 75
5. If the result from Step 4 is divisible by 10, the card
number is valid; otherwise,
it is invalid. For example, the number 4388576018402626 is
invalid, but the
number 4388576018410707 is valid.
Write a program that prompts the user to enter a credit card
number as a long
integer. Display whether the number is valid or invalid.
Design your program to
use the following methods:
/** Return true if the card number is valid */
public static boolean isValid(long number)
/** Get the result from Step 2 */
public static int sumOfDoubleEvenPlace(long number)
/** Return this number if it is a single digit, otherwise,
* the sum of the two digits */
public static int getDigit(int number)
/** Return sum of odd place digits in number */
public static int sumOfOddPlace(long number)
/** Return true if the digit d is a prefix for number */
public static boolean prefixMatched(long number, int d)
/** Return the number of digits in d */
public static int getSize(long d)
/** Return the first k number of digits from number. If the
* number of digits in number is less than k, return
Write a program that print in screen a tree with its height
taken from user by entering number of 4 digits and find
the odd numbers then calculate the sum of odd numbers so he
get the height of tree?
How many digit have a Polaris 1995 300c.c. 2x4 nad how many
have a Polaris 2007 300 c.c 2x4?
And what site I can check this information???
What is the coding about how to recognize color in fuzzy
logic using Matlab R2009b?
Create a Menu that can be activated while clicking on Right
sample code to auto focusing the first field in a form
write a simple calculator c program to perform addition,
subtraction, mul and div.
write a function that allocates memory for a single data
type passed as a parameter.the function uses the new
operator and return a pointer to the allocated memory.the
function must catch and handle any exception during allocation
How to Split Strings with Regex in Managed C++ Applications?