Hi,
I have a check out form where number of products can be "n". So how i can know how many input fields are in the form and take input from it?
Thanks
Hi All,
I am trying to create a console application that reads number from a file all underneath each other like so:
101
9
and then outputs into another file the closest palindrome number. So far what I have is not quite rightm i.e. I don't think I can put the class inside a method which is a bit more Java I was wandering if anyone could help at all?
Thanks :)
namespace PalidromeC
{
class Program
{
static public void Main(string[] args)
{
#region WriteAnswers
try
{
StreamWriter sw = new StreamWriter("C://Temp/PalindromeAnswers.txt");
sw.WriteLine("Answers");
sw.Close();
}//try
catch (Exception e)
{
Console.WriteLine("Exception: " + e.Message);
}//catch
#endregion
#region ReadFile
try
{
string numbers;
StreamReader sr = new StreamReader("C://Temp/Palindrome.txt");
numbers = sr.ReadLine();
while (numbers != null)
{
Console.WriteLine(numbers);
numbers = sr.ReadLine();
}//while
sr.Close();
Console.ReadLine();
}//try
catch (Exception e)
{
Console.WriteLine("Exception: " + e.Message);
}//catch
#endregion
NearPalindromeFinder f = new NearPalindromeFinder();
int palindrome = f.findNearPalindrome(n);
Console.WriteLine("Nearest Palindrome = " + palindrome);
}//main
public static void testFindNearestPalindrome(int n)
{
class NearPalindromeFinder
{
int findNearPalindrome(int start)
{
if (testPalindrome(start))
return start;
else
{
int neg = start;
int pos = start;
for (int i = 0; i < start; i++)
{
if (testPalindrome(start-i))
{
neg = start-i;
break;
}//if
if (testPalindrome(start+i))
{
pos = start+i;
break;
}//if
}//for
return (start == neg) ? pos : neg;
}//else
}//findNearPalindrome
bool testPalindrome(int start)
{
if (start == 0 || start == 1)
return true;
String str = String.valueOf(start);
String rev = new
if (str.equals(rev))
return true;
else
return false;
}//testPalindrome
}//NearPalindromeFinder class
}//testFindNearestPalindrome
}//Program Class
I have an input field on a webpage that contains a credit-card number. What is the best way of preventing the browser from caching this value?
Any solution needs to work on a large selection of browsers.
Hi All,
RAID6 is intended to provide fault tolerance in the event 2 disks fail.
What is the minimum number of disks required to implement RAID6?
thanks
I'm seeking to display a fixed number of items on a web page according to their respective weight (represented by an Integer). The List where these items are found can be of virtually any size.
The first solution that comes to mind is to do a Collections.sort() and to get the items one by one by going through the List. Is there a more elegant solution though that could be used to prepare, say, the top eight items?
Hi guys,
Is there currently a way to programatically determine from within a Silverlight app the maximum number of concurrent connections that the browser will allow? I know I can do this on the server then pass it as a parameter, but I would like to know if its possible in Silverlight.
This is for all versions of Silverlight including Silverlight 4 RC.
I need to convert a number which gives decimals in factored format in to decimals,
i.e. 11.16 is 11.5 in decimal. This is because 16 is in base of 32 and 11.16 should be read as 11+16/32 = 11.5
I get 11.16 as a string and I need to change it to 11.5 as numeric in MS SQL(2005) database.
Any shorter way of doing this rather than splitting strings,converting to numerics,maths,convert to string, concatenate and then convert to numeric?
Hi,
I have a 2 tex file which I am converting to pdf and then merging the 2 pdf.
My problem is I want to define footer for each pdf without the page numbers.
\thispagestyle{fancy}
\rfoot{text}
but it gives me the page number.
Hey,
I'm trying to find a way to get the total number of child nodes from an XmlNode recursively.
That it is to say I want to count all the children, grand children etc.
I think its something like
node.SelectNodes(<fill in here>).Count
but I don't know what the XPath is.
Thanks
Hi ,
I have generated a Google map key by login as a [email protected] . Is there any restriction in generating the number of keys for each user. Since we have 2 different domains and i need to generate key for that too.
Actually i am not sure about of how many keys the person who used this id has created..
And is there any way to find of how many keys had already been created for the same account previously???
How do I efficiently create a rock-scissors-paper game for n elements,
where n is any odd number =3.
In other words, I want a non-transitive complete ordering of n elements
such that each element is greater than (n-1)/2 other elements and each
element is lesser than (n-1)/2 other elements.
I have a mysql database which allocate:
iid, name, description, url, namecategory, idcategory, nametopic, idtopic
How can i know the number of entries that has categoryid=1 and topicid=1?
I've try
$result = mysql_query("SELECT COUNT(id) FROM videos WHERE categoryid=1 AND topicid=1")
But it hasn't worked!
Hi Guys,
This is probably a simple one to answer, but im stuck, so here goes
sed '3d' filename (or something like tht)
Im having trouble try to use a $VARIABLE instead of the number
Any1 know how to get this to work , or any alternative options
Regards
Paul
Hii...
I want to find out the number of Pocket PC devices(In my Case they are RFID reader's).Is there any way to do thi using RAPI in C#.net?can you please help me out....
Can someone provide me a code sample to query Bios Serial number and CPU id using WMI in C++.
I did search for a solution, here but couldn't find a good one.
thanks in advance.
When one "Fills right in excel" , the Column name updates
eg.
1st cell
is
=A2
If I fill right the next cell will be =B2
But rather than the column incrementing I want to increment the row number
so 1st cell is
=A2
The cell on its right is
=A3
how do i do that?
I have an unknown number of functions in my python script (well, it is known, but not constant) that start with site_...
I was wondering if there's a way to go through all of these functions in some main function that calls for them.
something like:
foreach function_that_has_site_ as coolfunc
if coolfunc(blabla,yada) == true:
return coolfunc(blabla,yada)
so it would go through them all until it gets something that's true.
thanks!
I'm trying to monitor a number of remote database connections.
How can I constantly monitor a GMail account for routing emails based on their header within the same application?
This will need to be standalone or basic package.
Should I build a Qt or .NET app for this?
Hi,
How can i find decimal(dot) in a given number in java.
I am getting input from user, he may give integer or float value.
I need to find he entered integer or float , is it possible?
if yes could u tell me please.
--
Thanks
Hello,
I've used an array of strings to populate a DataGridView.
How do I go about finding the most frequently occurring number?
Or, even better, order them by most frequently occuring?
Thank You.
Under
(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)
peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier{}
is it possible to get returned the phone number or somewhat the user has clicked?
what is the code if you want that only number should be inputted in an html textbox.
If you input letters there will be no letter that would show. If you input numbers, the numbers would show, please help