|
by: Andrew Poulos |
last post by:
If I have a string with numerals in it and I want to get each number in
sequence. Is there a way to do it without parsing the string character
by character? For example,
str = "abc13def345gh56.7fghdfgf"
/*
get number(1) returns 13
get number(2) returns 345
get number(3) returns 56.7
get number(4) returns undefined
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?
-----------------------------------------------------------------------
When formatting money for example, to format 6.57634 to
6.58, 6.5 to 6.50, and 6 to 6.00?
Rounding of x.xx5 is uncertain, as such numbers are not
represented exactly.
|
by: Ron |
last post by:
I want to write a program that will accept a number in a textbox for
example 23578 and then in a label will display the sum of the odd and
even number like this...
the textbox containsthe number 23578
the label would say:
Sumof odd number is: 15
Sum of even number is: 10
any ideas?
|
by: cyberdwarf |
last post by:
Hi
I need to print a report which will always output an even number of pages (this is for duplex printing).
ie, if the report ends with an odd number of pages, I need to output a blank sheet...
I've tried playing with 'Page' and 'Pages', but no luck!
Anyone know of a quick/dirty way of doing this?
All help gratefully received
TIA
Steve
|
by: =?Utf-8?B?Vmlua2k=?= |
last post by:
Hello Everyone,
I am trying to convert the digits to even number so for example if I have
3 digit number, I want it to be 4 digit and If I have 5 digit number, I want
it to be 6 digit. How can i do it in C#
Below is what I am trying to di
number = 123
I want it to be
|
|
by: AntietamCollector |
last post by:
Hello all, this is my first post on the Forum. I'm trying to learn Java programming, but I'm already stuck. Can someone help me with the practice exercise below? I don't yet understand loops. Thanks very much.
Write a program that makes an int variable num and sets it equal to some large number (like 200). Then use an if statement in a while loop that prints out "num is an even number" if num is even (hint: you can use (num % 2) == 0 to...
|
by: bferguson94 |
last post by:
def main():
myList=
choice = 0
while choice !='4':
choice= raw_input('1.add number to list\n2.get mean \n3.get median \n4.quit')
if choice == '1':
addNum(myList)
if choice == '2':
getMean(myList)
if choice == '3':
|
by: hidayu1986 |
last post by:
currently i try this code but:
-->for alphanumeric(allow alphanumeric : a-z,0-9,(symbol))
<asp:textbox onkeypress="if(((event.keyCode>=39)&&(even t.keyCode<=39))){event.returnValue=false;}"
id="txtStfNo" runat="server" Font-Names="Arial" Font-Size="9pt" MaxLength="10" Width="440px" Height="60px"></asp:textbox>
<asp:textbox onkeypress="if(((event.keyCode>=39)&&(even t.keyCode<=39))){event.returnValue=false;}"
id="txtccno"...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|