473,387 Members | 1,304 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SYNTAX AND SEMANTICS

HELLO ALL I AM TRYING TO PUT UP A PROGRAM THAT DETECTS DOUBLE VOWELS
AFTER RECIEVING AN INPUT STRING; MY MAIN PROBLEM LIES IN THE INPUT CAN
SOMEBODY KINDLY HELP DETECT ANY SYNTAX OR SEMANTIC ERRORS:

HERE IS THE CODE:

#include <iostream>
#include <string>
#include <cctype>
using namespace std;

void scanner(char s[]);
bool isVowel(char);
int length(char s[]);

int main(){

//string sentence;
const int max=4096;
char sentence[max];
cout << "Enter $ to terminate!" <<endl;
do{
cout << "\nEnter the input string: ";
getline(sentence,max);
scanner(sentence);
}while(sentence != "$");
return 0;
}

void scanner(char s[]){
int stringSize = length(char s[]);
char current,next;
int count = 0;
int aa,ae,ai,ao,au,ea,ee,ei,eo,eu,ia,ie,ii,io,iu,oa,oe ,oi,oo,ou,
ua,ue,ui,uo,uu;
aa = ae = ai = ao = au = 0;
ea = ee = ei = eo = eu = 0;
ia = ie = ii = io = iu = 0;
oa = oe = oi = oo = ou = 0;
ua = ue = ui = uo = uu = 0;
while(count < stringSize){
current = s[count];
if( (count + 1) == stringSize)
break;
next = s[count + 1];
if(isVowel(current) && isVowel(next)){
//a
current = tolower(current);
next = tolower(next);
if( current == 'a' && next == 'a')
aa++;
else if( current == 'a' && next == 'e')
ae++;
else if( current == 'a' && next == 'i')
ai++;
else if( current == 'a' && next == 'o')
ao++;
else if( current == 'a' && next == 'u')
au++;
//e
else if( current == 'e' && next == 'a')
ea++;
else if( current == 'e' && next == 'e')
ee++;
else if( current == 'e' && next == 'i')
ei++;
else if( current == 'e' && next == 'o')
eo++;
else if( current == 'e' && next == 'u')
eu++;
//i
else if( current == 'i' && next == 'a')
ia++;
else if( current == 'i' && next == 'e')
ie++;
else if( current == 'i' && next == 'i')
ii++;
else if( current == 'i' && next == 'o')
io++;
else if( current == 'i' && next == 'u')
iu++;
//o
else if( current == 'o' && next == 'a')
oa++;
else if( current == 'o' && next == 'e')
oe++;
else if( current == 'o' && next == 'i')
oi++;
else if( current == 'o' && next == 'o')
oo++;
else if( current == 'o' && next == 'u')
ou++;
//u
else if( current == 'u' && next == 'a')
ua++;
else if( current == 'u' && next == 'e')
ue++;
else if( current == 'u' && next == 'i')
ui++;
else if( current == 'u' && next == 'o')
uo++;
else /*( current == 'u' && next == 'u')*/
uu++;

count++;
}
else{
count++;
continue;
}
}
int totalVowels = aa + ae + ai + ao + au +
ea + ee + ei + eo + eu +
ia + ie + ii + io + iu +
oa + oe + oi + oo + ou +
ua + ue + ui + uo + uu ;
if(totalVowels == 0){
cout << "No double vowels!" <<endl;
}
if(aa > 0){
cout << aa <<"x "<<"aa";
totalVowels -= aa;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ae > 0){
cout << ae <<"x "<<"ae";
totalVowels -= ae;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ai > 0){
cout << ai <<"x "<<"ai";
totalVowels -= ai;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ao > 0){
cout << ao <<"x "<<"ao";
totalVowels -= ao;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(au > 0){
cout << au <<"x "<<"au";
totalVowels -= au;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ea > 0){
cout << ea <<"x "<<"ea";
totalVowels -= ea;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ee > 0){
cout << ee <<"x "<<"ee";
totalVowels -= ee;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ei > 0){
cout << ei <<"x "<<"ei";
totalVowels -= ei;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(eo > 0){
cout << eo <<"x "<<"eo";
totalVowels -= eo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(eu > 0){
cout << eu <<"x "<<"eu";
totalVowels -= eu;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ia > 0){
cout << ia <<"x "<<"ia";
totalVowels -= ia;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ie > 0){
cout << ie <<"x "<<"ie";
totalVowels -= ie;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ii > 0){
cout << ii <<"x "<<"ii";
totalVowels -= ii;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(io > 0){
cout << io <<"x "<<"io";
totalVowels -= io;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(iu > 0){
cout << iu <<"x "<<"iu";
totalVowels -= iu;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oa > 0){
cout << oa <<"x "<<"oa";
totalVowels -= oa;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oe > 0){
cout << oe <<"x "<<"oe";
totalVowels -= oe;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oi > 0){
cout << oi <<"x "<<"oi";
totalVowels -= oi;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oo > 0){
cout << oo <<"x "<<"oo";
totalVowels -= oo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ou > 0){
cout << ou <<"x "<<"ou";
totalVowels -= ou;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ua > 0){
cout << ua <<"x "<<"ua";
totalVowels -= ua;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ue > 0){
cout << ue <<"x "<<"ue";
totalVowels -= ue;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ui > 0){
cout << ui <<"x "<<"ui";
totalVowels -= ui;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(uo > 0){
cout << uo <<"x "<<"uo";
totalVowels -= uo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(uu > 0){
cout << uu <<"x "<<"uu"<<".";
totalVowels -=uu;
}
}

bool isVowel(char c){
return (c == 'a' || c == 'A' || c == 'e' ||
c == 'E' || c == 'i' || c == 'I' || c == 'o' ||
c == 'O' || c == 'u' || c == 'U') ;
}

int length(char s[]){

int i=0;
while(s[i]='\0')
i=i+1;

return i;

}

May 27 '06 #1
6 2682
Prof.Stanley wrote:
HELLO ALL I AM TRYING TO PUT UP A PROGRAM THAT DETECTS DOUBLE VOWELS
AFTER RECIEVING AN INPUT STRING; MY MAIN PROBLEM LIES IN THE INPUT CAN
SOMEBODY KINDLY HELP DETECT ANY SYNTAX OR SEMANTIC ERRORS:
a) Your keyboard has a problem with CAPS-LOCK. You should fix that.

b) For best diagnostics, try Comeau online.

Suggestions and criticism that a human can provide follow below.
HERE IS THE CODE:

#include <iostream>
#include <string>
#include <cctype>
using namespace std;

void scanner(char s[]);
bool isVowel(char);
int length(char s[]);
Note:

a) if the string is 0-terminated, then you should use std::strlen().
b) if the string is not 0-terminated, you are out of luck.
c) you should use strings anyway.

int main(){

//string sentence;
const int max=4096;
char sentence[max];
Would you use strings, there would be no such arbitrary limitation.
cout << "Enter $ to terminate!" <<endl;
do{
cout << "\nEnter the input string: ";
getline(sentence,max);
std::cin.getline( sentence, max );
scanner(sentence);
}while(sentence != "$");
return 0;
}
Since you used getline and max, the program will not crash nor produce
undefined behavior. It will just not count correctly if there are lines
longer than 4096 characters.

It will also not count correctly, if someone prepares a file that contains 0
characters in some lines.

void scanner(char s[]){
int stringSize = length(char s[]);
char current,next;
int count = 0;
int aa,ae,ai,ao,au,ea,ee,ei,eo,eu,ia,ie,ii,io,iu,oa,oe ,oi,oo,ou,
ua,ue,ui,uo,uu;
aa = ae = ai = ao = au = 0;
ea = ee = ei = eo = eu = 0;
ia = ie = ii = io = iu = 0;
oa = oe = oi = oo = ou = 0;
ua = ue = ui = uo = uu = 0;
while(count < stringSize){
current = s[count];
if( (count + 1) == stringSize)
break;
next = s[count + 1];
if(isVowel(current) && isVowel(next)){
//a
current = tolower(current);
next = tolower(next);
if( current == 'a' && next == 'a')
aa++;
else if( current == 'a' && next == 'e')
ae++;
else if( current == 'a' && next == 'i')
ai++;
else if( current == 'a' && next == 'o')
ao++;
else if( current == 'a' && next == 'u')
au++;
//e
else if( current == 'e' && next == 'a')
ea++;
else if( current == 'e' && next == 'e')
ee++;
else if( current == 'e' && next == 'i')
ei++;
else if( current == 'e' && next == 'o')
eo++;
else if( current == 'e' && next == 'u')
eu++;
//i
else if( current == 'i' && next == 'a')
ia++;
else if( current == 'i' && next == 'e')
ie++;
else if( current == 'i' && next == 'i')
ii++;
else if( current == 'i' && next == 'o')
io++;
else if( current == 'i' && next == 'u')
iu++;
//o
else if( current == 'o' && next == 'a')
oa++;
else if( current == 'o' && next == 'e')
oe++;
else if( current == 'o' && next == 'i')
oi++;
else if( current == 'o' && next == 'o')
oo++;
else if( current == 'o' && next == 'u')
ou++;
//u
else if( current == 'u' && next == 'a')
ua++;
else if( current == 'u' && next == 'e')
ue++;
else if( current == 'u' && next == 'i')
ui++;
else if( current == 'u' && next == 'o')
uo++;
else /*( current == 'u' && next == 'u')*/
uu++;

count++;
}
else{
count++;
continue;
}
}
int totalVowels = aa + ae + ai + ao + au +
ea + ee + ei + eo + eu +
ia + ie + ii + io + iu +
oa + oe + oi + oo + ou +
ua + ue + ui + uo + uu ;
if(totalVowels == 0){
cout << "No double vowels!" <<endl;
}
if(aa > 0){
cout << aa <<"x "<<"aa";
totalVowels -= aa;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ae > 0){
cout << ae <<"x "<<"ae";
totalVowels -= ae;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ai > 0){
cout << ai <<"x "<<"ai";
totalVowels -= ai;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ao > 0){
cout << ao <<"x "<<"ao";
totalVowels -= ao;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(au > 0){
cout << au <<"x "<<"au";
totalVowels -= au;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ea > 0){
cout << ea <<"x "<<"ea";
totalVowels -= ea;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ee > 0){
cout << ee <<"x "<<"ee";
totalVowels -= ee;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ei > 0){
cout << ei <<"x "<<"ei";
totalVowels -= ei;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(eo > 0){
cout << eo <<"x "<<"eo";
totalVowels -= eo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(eu > 0){
cout << eu <<"x "<<"eu";
totalVowels -= eu;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ia > 0){
cout << ia <<"x "<<"ia";
totalVowels -= ia;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ie > 0){
cout << ie <<"x "<<"ie";
totalVowels -= ie;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ii > 0){
cout << ii <<"x "<<"ii";
totalVowels -= ii;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(io > 0){
cout << io <<"x "<<"io";
totalVowels -= io;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(iu > 0){
cout << iu <<"x "<<"iu";
totalVowels -= iu;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oa > 0){
cout << oa <<"x "<<"oa";
totalVowels -= oa;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oe > 0){
cout << oe <<"x "<<"oe";
totalVowels -= oe;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oi > 0){
cout << oi <<"x "<<"oi";
totalVowels -= oi;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(oo > 0){
cout << oo <<"x "<<"oo";
totalVowels -= oo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ou > 0){
cout << ou <<"x "<<"ou";
totalVowels -= ou;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ua > 0){
cout << ua <<"x "<<"ua";
totalVowels -= ua;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ue > 0){
cout << ue <<"x "<<"ue";
totalVowels -= ue;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(ui > 0){
cout << ui <<"x "<<"ui";
totalVowels -= ui;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(uo > 0){
cout << uo <<"x "<<"uo";
totalVowels -= uo;
if(totalVowels == 0)
cout <<".";
else cout <<", ";
}
if(uu > 0){
cout << uu <<"x "<<"uu"<<".";
totalVowels -=uu;
}
}
This function mixes analysis and output. Not good. Moreover, it is a
maintainance nightmare. You should consider using something like this:

typedef std::pair< char, char > CharacterPair;
std::map< CharacterPair, unsigned long > PairCount;

void record_vowel_pair( char first, char second, PairCount & count ) {
if ( isVowel(first) && isVowel(second) ) {
++ count[ CharacterPair(first,second) ];
}
}

Maybe some call of tolower() is in order somewhere; that depends on what you
want.
bool isVowel(char c){
return (c == 'a' || c == 'A' || c == 'e' ||
c == 'E' || c == 'i' || c == 'I' || c == 'o' ||
c == 'O' || c == 'u' || c == 'U') ;
}

int length(char s[]){

int i=0;
while(s[i]='\0')
i=i+1;

return i;

}


Finally, you should reconsider the design: what about something that works
on iterators:

template < typename CharInputIterator >
PairCount record_vowel_pairs ( CharInputIterator from,
CharInputIterator to );

With that signature, main could be like so:

int main ( void ) {
PairCount count =
record_vowel_pairs( std::istream_iterator< char >( std::cin ),
std::istream_iterator< char >() );
print_some_statistics( count );
}

Or, if you insist on doing stuff line by line:

int main ( void ) {
std::string line;
while ( std::cin >> line ) {
PairCount count = record_vowel_pairs( line.begin(), line.end() ) );
print_some_statistics( count );
}
}
Warning: none of my code has been checked by a compiler. It will contain
typos.

Best

Kai-Uwe Bux
May 27 '06 #2
Prof.Stanley wrote:
HELLO ALL I AM TRYING TO PUT UP A PROGRAM THAT DETECTS DOUBLE VOWELS
AFTER RECIEVING AN INPUT STRING; MY MAIN PROBLEM LIES IN THE INPUT CAN
SOMEBODY KINDLY HELP DETECT ANY SYNTAX OR SEMANTIC ERRORS:

HERE IS THE CODE:

#include <iostream>
#include <string>
#include <cctype>
using namespace std;

void scanner(char s[]);
void scanner(const char s[]);
bool isVowel(char);
int length(char s[]);
int length(const char s[]);

Const correctness matters.

int main(){

//string sentence;
const int max=4096;
char sentence[max];
cout << "Enter $ to terminate!" <<endl;
do{
cout << "\nEnter the input string: ";
getline(sentence,max);
scanner(sentence);
}while(sentence != "$");
First off, you can't compare two raw strings with the != operator. You
should use std::strcmp:

strcmp(sentence, "$")

or, since you are only interested in the first character:

sentence[0] != '$'

Secondly, you should always check the stream state in a loop. Usually
I'd go with:

while (cin)
{
cout << "blah";
getline(sentence, max);

if (sentence[0] != '$')
scanner(sentence);
}

At least you get the idea.
return 0;
}

void scanner(char s[]){
[260 lines of code snipped]
}
Wow! That function is way longer than it really should be. But before
giving any tips and hints I'm going to hit you with a number of compiler
error and logical errors.

One way to simplify design is to use the standard library facilities.
For example, a simple scanner can be trivially written as:

void scanner(const char s[])
{
vector<char> vstack;
map<string, unsigned int> m;
unsigned int l = strlen(s);

for (unsigned int i = 0; i <= l; ++i)
{
char c = s[i];

if (isVowel(c))
{
vstack.push_back(tolower(c, locale()));
}
else
{
if (buff.size() == 2)
{
vstack.push_back(0);
++m[&vstack[0]];
}

vstack.clear();
}
}

// print out the content of m, left for exercise
}

bool isVowel(char c){
return (c == 'a' || c == 'A' || c == 'e' ||
c == 'E' || c == 'i' || c == 'I' || c == 'o' ||
c == 'O' || c == 'u' || c == 'U') ;
}
This function isn't lengthy but it is made very inflexible. Consider:

static char vowels[] = "aeiouAEIOU";

for (unsigned int i = 0; i < 10; ++i)
if (c == vowels[i]) return true;

return fail;


int length(char s[]){

int i=0;
while(s[i]='\0')
i=i+1;

return i;

}


That's just strlen...why do you reinvent the wheel?
May 27 '06 #3
"Prof.Stanley" writes:

<snip>
if( current == 'a' && next == 'a')
aa++;
else if( current == 'a' && next == 'e')
ae++;
else if( current == 'a' && next == 'i')
ai++;
else if( current == 'a' && next == 'o')
ao++;
else if( current == 'a' && next == 'u')
au++;
//e
else if( current == 'e' && next == 'a')
ea++;
else if( current == 'e' && next == 'e')
ee++;
else if( current == 'e' && next == 'i')
ei++;
else if( current == 'e' && next == 'o')
eo++;
else if( current == 'e' && next == 'u')
eu++;
//i
else if( current == 'i' && next == 'a')
ia++;
else if( current == 'i' && next == 'e')
ie++;
else if( current == 'i' && next == 'i')
ii++;
else if( current == 'i' && next == 'o')
io++;
else if( current == 'i' && next == 'u')
iu++;
//o
else if( current == 'o' && next == 'a')
oa++;
else if( current == 'o' && next == 'e')
oe++;
else if( current == 'o' && next == 'i')
oi++;
else if( current == 'o' && next == 'o')
oo++;
else if( current == 'o' && next == 'u')
ou++;
//u
else if( current == 'u' && next == 'a')
ua++;
else if( current == 'u' && next == 'e')
ue++;
else if( current == 'u' && next == 'i')
ui++;
else if( current == 'u' && next == 'o')
uo++;
else /*( current == 'u' && next == 'u')*/
uu++;

<snip>

Kind of on the wordy end of the spectrum. Take a look at this and see if
you can extract some ideas you can use.

----------------------------
#include <iostream>
#include <cctype> // tolower()
using namespace std;

const int a=1, e=2, i=3, o=4, u=5;

// return 0 if not a vowel
int classify(char c)
{
c = tolower(c);
switch(c)
{
case 'a' : return a;
case 'e' : return e;
case 'i' : return i;
case 'o' : return o;
case 'u' : return u;
default : return 0;
}
}
//=================
int main()
{
// static variables will be initialized to zero by the system
static int tally[6][6]; // allow for zero [first vowel][last vowel]
char sentence[] = "moot moon mean affair moon moUse";
int beg = 0, end; // first vowel, last vowel. Avoid l looks like 1
problem
for(int i=0; sentence[i]; i++)
{
end = classify(sentence[i]);
if(beg)
tally[beg][end]++;
beg = end;
}
// done. show output
for(int i=1; i<6; i++)
{
for(int j=1; j<6; j++)
cout << tally[i][j];
cout << endl;
}
cin.get();
cin.get();
}
May 27 '06 #4
Prof.Stanley posted:
HELLO ALL I AM TRYING TO PUT UP A PROGRAM THAT DETECTS DOUBLE VOWELS
AFTER RECIEVING AN INPUT STRING; MY MAIN PROBLEM LIES IN THE INPUT CAN
SOMEBODY KINDLY HELP DETECT ANY SYNTAX OR SEMANTIC ERRORS:

I already told you how disgusting and retarded your code is, and I even
took the time to write you much nicer code. How about you read the replies
to your posts before you just go and post some more.
-Tomás
May 27 '06 #5
Prof.Stanley wrote:
HELLO ALL I AM TRYING TO PUT UP A PROGRAM THAT DETECTS DOUBLE VOWELS
AFTER RECIEVING AN INPUT STRING; MY MAIN PROBLEM LIES IN THE INPUT CAN
SOMEBODY KINDLY HELP DETECT ANY SYNTAX OR SEMANTIC ERRORS:

HERE IS THE CODE:


I CANNOT HEAR YOU.... THERE'S SO MUCH NOISE IN HERE, THAT I MUST TURN ON
THE CAPS LOCK KEY, JUST SO OTHERS CAN HEAR ME SHOUTING.
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
May 27 '06 #6
OP's problem is not just his style but his algorithm. Scanning for
double-vowels are simple enough to be squeezed in a 30- lines function,
even if regular expression is not used.

A simple solution is to use a stack and a map. Push vowels to the stack
until a consonant is found, then pop the stack and add the record to a
map counter.

Regards,
Ben
May 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Andreas Neudecker | last post by:
Hello. I am relatively new to Python and I have a strange problem with some code. In a class the __call__ method gets parameters like this: class WhatsUp: __call__ ( self, var1,
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
75
by: David MacQuigg | last post by:
Seems like we need a simple way to extend Python syntax that doesn't break existing syntax or clash with any other syntax in Python, is easy to type, easy to read, and is clearly distinct from the...
8
by: Ike | last post by:
I am hoping someone can help me with the proper syntax for this. I have an attribute, called, say "name," such that: <set name="something">thename</set> However, the value for name, is...
23
by: Marcin Grzêbski | last post by:
I red MSDN article of C# 2.0 this week... and i found very strange syntax for properties e.g.: public int MyIntValue { get { // ... } protected set { // ... }
14
by: Dan Jacobson | last post by:
How is this for correct HTML 4.01 headers?: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="zh-tw"><head> <meta http-equiv="Content-Type"...
17
by: Dinsdale | last post by:
I would like to compare a string value to a pre-determined list of other strings. Is there a simple way to do this in one statements like this: if(strMystring.ToUpper() == ("STRING1"| "STRING2"|...
11
by: Frankie | last post by:
I have been learning about the AsyncOperation class and came across this code (sorry I got it a few days ago and don't remember the specific link). Anyway, I am wondering what the tilde (~) on...
14
by: paresh | last post by:
Is this the valid C statement. int a,b,c; c = 5; <<< a = b = c; Can anyone throw the light on this. -Paresh
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.