473,587 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ratio

13 New Member
Hello everyone, does anyone know how to do those ratios:

ratio of printing to non-printing characters iii) ratio of vowels to consonants

cuz im not that good at this :(
Thank you in advance

"Methods which count a) number of printable characters (including symbols such as apostrophes etc.), b) number of consonants, and e) frequeny of each vowel. Methods a)-d) should return a single statistical count, whilst method e) should return (or update) an array.

Once all methods are assembled , use the data to derove and print to the screen the following statistics; i) string length ii) ratio of printing to non-printing characters iii) ratio of vowels to consonants"
Aug 14 '08 #1
5 1947
blazedaces
284 Contributor
Go through the string, one character at a time (use a for loop).

Why don't you look up the special non-printable characters (there are fewer of those) and set up a switch statement for those characters (put vowels in too I guess cause you want to count those). Every time a character matches the specifics you need, add + 1 to a count variable (like int vowelCount for the number of vowels).

The length of the string is stored in the string, so you don't have to add something to count that.

The rest is simple math.

Good luck,
-blazed
Aug 14 '08 #2
NoOneCanHelpMe
13 New Member
Thank You very much
I will try now to do it

NoOneCanHelpMe
Aug 14 '08 #3
NoOneCanHelpMe
13 New Member
-blazed

I am sorry to disturb you but could you explain me something about driver class or if you know some site with info, because I am struggling a lot with this
I would appreciate any help
Thank You
Aug 15 '08 #4
Nepomuk
3,112 Recognized Expert Specialist
-blazed

I am sorry to disturb you but could you explain me something about driver class or if you know some site with info, because I am struggling a lot with this
I would appreciate any help
Thank You
Hey, you've already started a thread about that and anyway you haven't answered the question r035198x asked you there. Please don't hijack you own thread and please answer the questions people ask you if you want to be helped.

The name of your "driver class" will be something like org.path.to.the .driver and there may even be an API documentation available. Please give this information when asking for help.

Greetings,
Nepomuk
Aug 15 '08 #5
NoOneCanHelpMe
13 New Member
Hey, you've already started a thread about that and anyway you haven't answered the question r035198x asked you there. Please don't hijack you own thread and please answer the questions people ask you if you want to be helped.

The name of your "driver class" will be something like org.path.to.the .driver and there may even be an API documentation available. Please give this information when asking for help.

Greetings,
Nepomuk
I am sorry but I wasnt sure how to ask this question :( im kinda new to those forums :(

Thank you very much for your information
Aug 15 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
5353
by: Marc A. Lefebvre US-775 | last post by:
I have a table that I need to extract values, determine their ratio, and then round to the nearest 50. SELECT NAME, MFG, ROUND((WEIGHT/VOLUME),50) AS WV_RATIO, COUNT(*) OVER (ORDER BY NAME, MFG, WV_RATIO) AS NUMBER_OF_MATCHES FROM MEMBERS; 1) To calculate the ratio, can I just use the "/" symbol in my select statement?
7
11407
by: eric | last post by:
Hi there, BP hit ratio = 1 - (BP physical reads / BP logical reads). If all the BP physical reads are asynchronous, it should mean that the pages are brought up to the bufferpool before the database manager needs them. But in that case, the BP hit ratio will be 0% (BP physical reads = BP async. physical reads = BP logical reads). Could...
4
7611
by: xixi | last post by:
the formula for package cache hit ratio is 1 - (package cache inserts/package cache lookups), what the result would be a effective ratio? currently we have cache inserts=25, cache lookups=35, so i get ratio =0.28, is this a good number?
0
1318
by: DB2 News Group | last post by:
Using the new snapshot function in version 8 I have come across something interesting. When computing the bufferpool hit ratio and tablespace buffer pool hit ratio, both of these show up as very low (< 2%) for a large table (MDC) (400+ million rows) upon which full table scans are performed. When running a query against the table which...
2
9428
by: Carl Gilbert | last post by:
Hi I am looking for either a component or technique to allow me to do the following: * Provide a panel with a background image * Resize the image to best fit the panel to maintain aspect ratio * Provide white (or other color) borders at the sides or the top/bottom The last point would be used to allow users to resize the panel to any...
1
1762
by: Brian | last post by:
Is there a rule-of-thumb for a healthy ratio between these two counters? I think I have some memory leak problems on the run in my ASP.NET application but the difference between these counters bothers me. I'm seeing anywhere from 2 to 3:1 ratio. Right now, for example, private bytes is 95M and total heap is 45MB. Total heap changes more...
2
4769
by: dunleav1 | last post by:
I have a many row and many column table that is in a 16K page size. I have four indexes on the table. I am running row compression on the table. The table does not have a primary key. The table does not have a clustered index. I ran a reorg on the table and the indexes. I ran runstats on the table and the indexes after the reorg. Three...
5
3479
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, If I create a form in Java with controls like Panels, textboxes... when I stretch/shrink the form, all the controls can grow/shrink - along with the text contained in the textboxes. This is convenient for resizing a form for different screen resolutions. I can't see how to do this /control this in .Net (VS2005). I have a user...
3
14088
by: Danny Ni | last post by:
Hi, I am looking for a way to display images with different aspect ratio into frames with fixed width and height, the problem is some images will look distorted if they are forced into fixed frame due to differnt aspect ratio. Some graphic designer suggests me to keep the aspect ratio of the original graphic and pad the graphic with empty...
0
7843
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...
0
8206
Oralloy
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. ...
1
7967
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...
1
5713
isladogs
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.