|
is anyone can help me?
from vevi
|
|
|
|
|
Dude, you need to have patience. If someone can help you, they will.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
He became impatient after only 20 minutes too..
Regards,
--Perspx
Don't trust a computer you can't throw out a window
-- Steve Wozniak
|
|
|
|
|
Perspx wrote: became impatient after only 20 minutes
More the reason to delay replying with real helpful stuff, too
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
you can create cutome font using System.Graphics
I think there is a font and fontfamily class. Try to Googling you will get your answer.
|
|
|
|
|
please think about a little with the question .
if i use google can find the answer,i would not be ask it in here .
if you did't know please dont reply!!
from vevi
|
|
|
|
|
|
hi,
eyes and face detection can be done. so i was thinking
if anyone knoe how to do for nose and mouth detection?
thanks
|
|
|
|
|
You should search for some already done research on facial detection and look at some algo's best results wise.
then u will get your answer
|
|
|
|
|
It's an interesting problem. I'd consider this approach:
1. Use your existing algorithm to get the bounds of the face.
2. Replace each pixel with a number proportional to the variance in the neighborhood of that pixel. (There will be more variance in the regions of the eyes, mouth, and around the nose.)
3. Use the Open operation (Erode morphological operator followed by Dilate) to eliminate stray isolated pixels with high variance.
4. Use the Close operation (Dilate morphological operator followed by Erode) to fill in the gaps.
5. You should have four regions remaining: Two eyes, nose, and mouth.
(This is more interesting than what I'm working on now!)
|
|
|
|
|
I believe it is tradition/convention to organize source files in a project so each class is contained in one .cs source file. Correct?
I am writing several static utility classes with about 10-20 methods each. And each will have about four (4) overloaded methods so the static class definition (and the .cs source file) is getting pretty lengthy.
Should I keep to the one-class, one-source-file convention, or is there a better way to organize my project in the Solution Explorer?
|
|
|
|
|
you can try to chop it to small files and create a partial class
Life - Dreams = Job
TheCardinal
CTC-RDG
|
|
|
|
|
Yes, definitely a good idea to keep one class per file as good programming practice. Um... Tradition? No. We (those at my company) like to strictly adhere to this rule and leave the partial class definition to automatically generated code only. Actually using it is IMHO a bit unsavory to read but preferable to a single file mess. You can use the #region directive to collapse source code sections together for convenience.
Hope that helps
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Partial classes are great for segregating related functionality into discrete files. For instance, I only put generated code into the main form file, and anything added manually into a separate file(s). For instane, all code related to a BackgroundWorker object would go into a separate file.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
ssclaire wrote: I believe it is tradition/convention to organize source files in a project so each class is contained in one .cs source file. Correct?
It all depends.
I have files with one class and files with several classes and one class spread across multiple files. The key for me is to organize files in a logical, clear way. Having too many files can be as distracting and confusing as having few files with too much code in each.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Don't worry about the length until the file gets to around 1000 lines of code. After that, you could try to find logical places to separate the code, and create partial classes.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
One class per source file is a good default convention, but a good programmer knows when to break the rules to improve clarity and simplicity.
For example, it may be more maintainable to combine a few related classes that are only used together in the same file. Ask yourself: "What organizational structure would *I* prefer to work on when maintaining this system?"
|
|
|
|
|
Thanks, folks. Good answers to my question.
|
|
|
|
|
hi,
I am tryin to compile one C# program, but m stuck somewhr in middle with one extern fuction i defined. Actually long time bac in this code i defined one extern function get_option. But i forget exact signature of this function and i an using this function in main function with two argument.
When i am tryin to compile this program obv it will throw error for the same reason. Can anybody help me to find/guess the exact signature of that function.
below is ma actual code:
*********************************************************************
/*
****************************************************************************
** (C) Copyright 1993 Hutchison Telecom Australia
**
** TITLE: mewsvars
** DESC: Lists the company, customer and newspager database options.
** Only processes records with a billing start date prior to that
** specified.
** Use the -F option to process all records instead of just those
** required for VARS processing. VARS processing only requires
** N8 - Chicago Mercantile Exchange
** N5, N9, NA and NJ (005) are all Chicage Board of Trade
** NF (005) NI (006) - New York Board of Trade live
** N9 - New York Board of Trade Delayed
**
**
** ND - Comex Live (terminal 005)
** NG - Comex Live (terminal 006)
** N6 - Comex Delayed
** N9 - NYMEX Delayed & Commodities
** NF - New York Cotton Live
** NH - Eurex Live (terminal 006)
** NE - Eurex Live (terminal 005)
** ND - Advanced Market Indices (terminal 006)
** NL - Advanced Market Indices (terminal 005)
**
**
** CRM FILES: EQUIP.DAT read only
** PHONE.DAT read only
** CUSTOMER.DAT read only A00, A10, A50 records
** BILLING.DAT read only
** CLUSTER.DAT read only
** OUTPUT: varscust.txt - company, customer, address and Y/N flags for
** the N5, NA, N8, NJ, ND, N6, N9 databases
** INPUT:
**
** DATE SMURF NAME COMMENT
** 30/12/93 844/93JH11 SC Original
** 12/01/93 LL add arg to btrieve call
** 28/04/98 Changed to add Comex and Nymex exchanges for VARS reporting.
** 30/06/98 MC CRM6 update
** 29/08/99 SC Added support for NYBOT
** 20/08/02 SC Added support for Eurex Live & Market Indices
** (Using option NH ON 006) to support Deutsch Bourse VARS reporting
/*
* $History: NEWSVARS.C $
*
* ***************** Version 11 *****************
* User: Stuart/Konda Date: 31.07.08 Time: 10:07a
* Updated in $/Crm60/newsvars
* TT190647 - Minor changes to be made for Newvars
*
* ***************** Version 11 *****************
* User: Muruga Date: 5.10.05 Time: 10:07a
* Updated in $/Crm60/newsvars
* TT71472 - Minor changes to be made for Newspager
*
* ***************** Version 10 *****************
* User: Stevec Date: 20.08.02 Time: 12:10
* Updated in $/Crm60/newsvars
* Fixed incompatibilities between options between terminals 005 and 006
* for Eurex and Market Indicies for Deutsch Bourse
*
* ***************** Version 9 *****************
* User: Stevec Date: 20.08.02 Time: 11:01
* Updated in $/Crm60/newsvars
* Added support for database NH - Eurex Live, and added it to the output
* file for processing by Vars - Deutsch Bourse
*
* ***************** Version 8 *****************
* User: Stevec Date: 3/07/00 Time: 14:32
* Updated in $/Crm60/newsvars
* Added additional debug
*
* ***************** Version 7 *****************
* User: Stevec Date: 27/06/00 Time: 17:59
* Updated in $/Crm60/newsvars
* Changed Option NJ so that if the terminal is 006, it is turned off as
* this is NZ Futures and no royalty is payable, but on 005 it is Outlook
* Live and royalty is payable to CBOT.
*
* ***************** Version 6 *****************
* User: Stevec Date: 6/01/00 Time: 8:15
* Updated in $/Crm60/newsvars
* Changed program to allow the required_date field to be an optional
* command line parameter.
*
* ***************** Version 5 *****************
* User: Stevec Date: 3/09/99 Time: 12:10
* Updated in $/Crm60/newsvars
* changed handling of option NG for terminal 006 to treat it as ND like
* 005
*
* ***************** Version 4 *****************
* User: Stevec Date: 29/08/99 Time: 17:45
* Updated in $/Crm60/newsvars
* Added support for paging terminal 006 - Flex Network for pocketwatch
*
* ***************** Version 3 *****************
* User: Stevec Date: 29/08/99 Time: 17:39
* Updated in $/Crm60/newsvars
* Added support for NYBOT live and delayed reporting to VARS
*
* ***************** Version 2 *****************
* User: Michelle Date: 5/03/99 Time: 14:25
* Updated in $/Crm60/newsvars
****************************************************************************
*/
#include <stdarg.h>
#include <std.h>
#include <equip.h>
#include <phone.h>
#include <customer.h>
#include <billing.h>
#include <cluster.h>
#define EQUIP_DAT "equip.dat"
#define PHONE_DAT "phone.dat"
#define CUSTOMER_DAT "customer.dat"
#define BILLING_DAT "billing.dat"
#define EXTRA 2 /* line delimiter */
/* FORWARD DECLARATION */
void fatal();
LOCAL void convert_databases();
LOCAL int val_opts(int c, char *arg); /* CRM6: MC 30/06/98 changed from void to int and added arguments */
LOCAL void usage();
PUBLIC void cleanup();
extern int open_cluster();
/* CRM6: MC 30/06/98 added */
extern int new_decode_cluster(char * phone, char cl_options[MAX_GROUPS][MAX_OPTIONS][OPTION_SIZE]);
/* GLOBAL */
extern int errno;
extern char *get_option();
char *Progname;
char N1[5];
char N2[5];
char N3[5];
char N4[5];
char N5[5];
char N6[5];
char N7[5];
char N8[5];
char N9[5];
char NA[5];
char NB[5];
char NC[5];
char ND[5];
char NE[5];
char NF[5];
char NG[5];
char NH[5];
char NI[5];
char NJ[5];
char NK[5];
char NL[5];
char NM[5];
char NN[5];
char NO[5];
char NP[5];
char NQ[5];
/*swa */
char T1[5];
char T2[5];
char T3[5];
char T4[5];
char T5[5];
char T6[5];
char A2[5];
char A3[5];
char A8[5];
char B4[5];
char required_company[10];
char required_date[10];
FILE *vars_output;
int N1_tot, N2_tot, N3_tot, N4_tot, N5_tot, N6_tot, N7_tot, N8_tot, N9_tot, NA_tot, NB_tot, NC_tot, ND_tot, NE_tot, NF_tot, NG_tot, NH_tot;
int NI_tot, NJ_tot, NK_tot, NL_tot, NM_tot, NN_tot, NO_tot, NP_tot, NQ_tot;
/*swa*/
int T1_tot, T2_tot, T3_tot, T4_tot, T5_tot, T6_tot, A3_tot, A2_tot, A8_tot, B4_tot;
int full_listing = FALSE; /* Set to true when all records should be processed
instead of just those required for VARS processing */
int start_yy, start_mm, start_dd;
char buffer1[100];
PHONE phone;
char buffer2[100];
CUSTOMER cust;
EQUIP equip;
BILLING billing;
LOCAL int
val_opts(int c, char *arg)
{
switch(c)
{
case 'h':
case '?':
default:
usage();
break;
case 'o':
if (!arg)
{
fatal("missing output file name\n");
}
if (freopen(arg, "w+", stdout) != stdout)
{
fatal("Not able to reassigned stdout\n");
}
break;
case 'F':
full_listing = TRUE;
break;
case 'c':
if (!arg)
{
fatal("missing company number\n");
}
if (strlen(arg) >= sizeof(required_company) )
{
fatal("Company number too long or invalid\n");
}
strcpy(required_company, arg);
break;
case 'd':
if (!arg)
{
fatal("Missing Start cutoff date");
}
strcpy(required_date, arg);
break;
}
return (0); /* CRM6: MC 30/06/98 added */
}
/*
* Usage.
*/
LOCAL void
usage()
{
fprintf(stderr, "syntax: %s [flags]\n", Progname);
fprintf(stderr, "where flags are:\n");
fprintf(stderr, "\t-o file # output file, default stdout\n");
fprintf(stderr, "\t-F # Generate full database listing for all Newspagers\n");
fprintf(stderr, "\t-c company no. # specific company number to report on\n");
fprintf(stderr, "\t-d ccyymmdd # Billing cutoff date (CCYYMMDD format)\n");
fprintf(stderr, "\t # Normally the second of the month eg 940402\n");
fprintf(stderr, "\t-h # Help\n");
fprintf(stderr, "%s Lists the company, customer and newspager database options.\n",Progname);
fprintf(stderr, "Only processes records with a billing start date prior to that \n");
fprintf(stderr, "specified.\n");
fprintf(stderr, "Use the -F option to process all records instead of just those \n");
fprintf(stderr, "required for VARS processing.\n");
exit(1);
}
PUBLIC void
cleanup()
{
}
LOCAL void
convert_databases()
{
/* char cluster_group[MAX_GROUPS][GROUP_SIZE]; */
char cluster_options[MAX_GROUPS][MAX_OPTIONS][OPTION_SIZE];
if (new_decode_cluster(phone.buf.phone_nbr, cluster_options) != OK )
{
printf("WARNING - decode_cluster_area failed for phone %.10s\n",
phone.buf.phone_nbr );
}
/* decode_options(cluster_group, cluster_options); */
strncpy(N1, get_option("N1", cluster_options),1);
strncpy(N2, get_option("N2", cluster_options),1);
strncpy(N3, get_option("N3", cluster_options),1);
strncpy(N4, get_option("N4", cluster_options),1);
strncpy(N5, get_option("N5", cluster_options),1);
strncpy(N6, get_option("N6", cluster_options),1);
strncpy(N7, get_option("N7", cluster_options),1);
strncpy(N8, get_option("N8", cluster_options),1);
strncpy(N9, get_option("N9", cluster_options),1);
strncpy(NA, get_option("NA", cluster_options),1);
strncpy(NB, get_option("NB", cluster_options),1);
strncpy(NC, get_option("NC", cluster_options),1);
strncpy(ND, get_option("ND", cluster_options),1);
strncpy(NE, get_option("NE", cluster_options),1);
strncpy(NF, get_option("NF", cluster_options),1);
strncpy(NG, get_option("NG", cluster_options),1);
strncpy(NH, get_option("NH", cluster_options),1);
strncpy(NI, get_option("NI", cluster_options),1);
strncpy(NJ, get_option("NJ", cluster_options),1);
strncpy(NK, get_option("NK", cluster_options),1);
strncpy(NL, get_option("NL", cluster_options),1);
strncpy(NM, get_option("NM", cluster_options),1);
strncpy(NN, get_option("NN", cluster_options),1);
strncpy(NO, get_option("NO", cluster_options),1);
strncpy(NP, get_option("NP", cluster_options),1);
strncpy(NQ, get_option("NQ", cluster_options),1);
/*swa*/
strncpy(T1, get_option("T1", cluster_options),1);
strncpy(T2, get_option("T2", cluster_options),1);
strncpy(T3, get_option("T3", cluster_options),1);
strncpy(T4, get_option("T4", cluster_options),1);
strncpy(T5, get_option("T5", cluster_options),1);
strncpy(T6, get_option("T6", cluster_options),1);
strncpy(A3, get_option("A3", cluster_options),1);
strncpy(A2, get_option("A2", cluster_options),1);
strncpy(A8, get_option("A8", cluster_options),1);
strncpy(B4, get_option("B4", cluster_options),1);
if (N1[0] != 'Y')
N1[0] = 'N';
if (N2[0] != 'Y')
N2[0] = 'N';
if (N3[0] != 'Y')
N3[0] = 'N';
if (N4[0] != 'Y')
N4[0] = 'N';
if (N5[0] != 'Y')
N5[0] = 'N';
if (N6[0] != 'Y')
N6[0] = 'N';
if (N7[0] != 'Y')
N7[0] = 'N';
if (N8[0] != 'Y')
N8[0] = 'N';
if (N9[0] != 'Y')
N9[0] = 'N';
if (NA[0] != 'Y')
NA[0] = 'N';
if (NB[0] != 'Y')
NB[0] = 'N';
if (NC[0] != 'Y')
NC[0] = 'N';
if (ND[0] != 'Y')
ND[0] = 'N';
if (NE[0] != 'Y')
NE[0] = 'N';
if (NF[0] != 'Y')
NF[0] = 'N';
if (NG[0] != 'Y')
NG[0] = 'N';
if (NH[0] != 'Y')
NH[0] = 'N';
if (NI[0] != 'Y')
NI[0] = 'N';
if (NJ[0] != 'Y')
NJ[0] = 'N';
if (NK[0] != 'Y')
NK[0] = 'N';
if (NL[0] != 'Y')
NL[0] = 'N';
if (NM[0] != 'Y')
NM[0] = 'N';
if (NN[0] != 'Y')
NN[0] = 'N';
if (NO[0] != 'Y')
NO[0] = 'N';
if (NP[0] != 'Y')
NP[0] = 'N';
if (NQ[0] != 'Y')
NQ[0] = 'N';
/*swa*/
if (T1[0] != 'Y') T1[0] = 'N';
if (T2[0] != 'Y') T2[0] = 'N';
if (T3[0] != 'Y') T3[0] = 'N';
if (T4[0] != 'Y') T4[0] = 'N';
if (T5[0] != 'Y') T5[0] = 'N';
if (T6[0] != 'Y') T6[0] = 'N';
if (A3[0] != 'Y') A3[0] = 'N';
if (A2[0] != 'Y') A2[0] = 'N';
if (A8[0] != 'Y') A8[0] = 'N';
if (B4[0] != 'Y') B4[0] = 'N';
/* Accumulate Totals */
if (N1[0] == 'Y')
N1_tot++;
if (N2[0] == 'Y')
N2_tot++;
if (N3[0] == 'Y')
N3_tot++;
if (N4[0] == 'Y')
N4_tot++;
if (N5[0] == 'Y')
N5_tot++;
if (N6[0] == 'Y')
N6_tot++;
if (N7[0] == 'Y')
N7_tot++;
if (N8[0] == 'Y')
N8_tot++;
if (N9[0] == 'Y')
N9_tot++;
if (NA[0] == 'Y')
NA_tot++;
if (NB[0] == 'Y')
NB_tot++;
if (NC[0] == 'Y')
NC_tot++;
if (ND[0] == 'Y')
ND_tot++;
if (NE[0] == 'Y')
NE_tot++;
if (NF[0] == 'Y')
NF_tot++;
if (NG[0] == 'Y')
NG_tot++;
if (NH[0] == 'Y')
NH_tot++;
if (NI[0] == 'Y')
NI_tot++;
if (NJ[0] == 'Y')
NJ_tot++;
if (NK[0] == 'Y')
NK_tot++;
if (NL[0] == 'Y')
NL_tot++;
if (NM[0] == 'Y')
NM_tot++;
if (NN[0] == 'Y')
NN_tot++;
if (NO[0] == 'Y')
NO_tot++;
if (NP[0] == 'Y')
NP_tot++;
if (NQ[0] == 'Y')
NQ_tot++;
if (T1[0] == 'Y')
T1_tot++;
if (T2[0] == 'Y')
T2_tot++;
if (T3[0] == 'Y')
T3_tot++;
if (T4[0] == 'Y')
T4_tot++;
if (T5[0] == 'Y')
T5_tot++;
if (T6[0] == 'Y')
T6_tot++;
if (A3[0] == 'Y')
A3_tot++;
if (A2[0] == 'Y')
A2_tot++;
if (A8[0] == 'Y')
A8_tot++;
if (B4[0] == 'Y')
B4_tot++;
}
/*swa*/
LOCAL void generate_output()
{
/* Create customer details */
/*
If database 9 is on, ensure 5 is on also, as 5 is the delayed
indicator
*/
fprintf(vars_output, "%.9s%.30s%.30s%.30s%.19s%.4s%.4s%.20s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.10s\n",
cust.buf_a00.company_nbr, cust.buf_a00.a00_name,
cust.buf_a50.a50_addr1, cust.buf_a50.a50_addr2,
cust.buf_a50.a50_city, cust.buf_a50.a50_state_county,
cust.buf_a50.a50_postal_code, cust.buf_a10.a10_primary_phone,
N4,N5, NA, N8, NJ, ND, N6, N9, NF, NH, 20, 21 ,24 ,25 ,28 ,29 ,A3 ,A2 ,A8 ,B4, phone.buf.phone_nbr);
}
int main(int argc, char** argv)
{ int ebuflen;
int pbuflen;
int cbuflen;
int bbuflen;
long selected = 0L;
long skipped = 0L;
char last_phone_no[17];
required_company[0] = '\0';
required_date[0] = '\0';
strcpy(last_phone_no, "99999999999") ;
set_multi_defaults(argc, argv, (struct option *)0, "c :Fh", val_opts);
ebuflen = sizeof(equip.buf);
pbuflen = sizeof(phone.buf);
cbuflen = sizeof(cust.buf_a00);
bbuflen = sizeof(billing.buf);
/*
fprintf(stderr, "Equip buflen = %d\n", ebuflen);
fprintf(stderr, "Phone buflen = %d\n", pbuflen);
fprintf(stderr, "Customer buflen = %d\n", cbuflen);
fprintf(stderr, "Billing buflen = %d\n", bbuflen);
*/
vars_output = fopen("varscust.txt", "w+");
if (vars_output == NULL)
{
fatal("Cannot open varscust.txt file for output");
}
/*
** open equip.dat
*/
equip.buflen = ebuflen;
sprintf(equip.filename, "%s\\%s", dbpath, EQUIP_DAT);
equip.keyno = B_RDONLY;
equip.status = bopen(equip, buf);
if (equip.status != 0)
{
berror(equip);
exit(1);
}
/*
** open phone.dat
*/
phone.buflen = pbuflen;
sprintf(phone.filename, "%s\\%s", dbpath, PHONE_DAT);
phone.keyno = B_RDONLY;
phone.status = bopen(phone, buf);
if (phone.status != 0)
{
berror(phone);
exit(1);
}
/*
** open customer.dat
*/
cust.buflen = cbuflen;
sprintf(cust.filename, "%s\\%s", dbpath, CUSTOMER_DAT);
cust.keyno = B_RDONLY;
cust.status = bopen(cust, buf_a00);
if (cust.status != 0)
{
berror(cust);
exit(1);
}
/*
** open billing.dat
*/
billing.buflen = bbuflen;
sprintf(billing.filename, "%s\\%s", dbpath, BILLING_DAT);
billing.keyno = B_RDONLY;
billing.status = bopen(billing, buf);
if (billing.status != 0)
{
berror(billing);
exit(1);
}
if ( open_cluster() != OK )
fatal("fail to open cluster.dat");
{
long count=0L;
N1_tot = N2_tot = N3_tot = N4_tot = N5_tot = N6_tot = N7_tot = N8_tot = N9_tot = NA_tot = NB_tot = NC_tot = ND_tot = NE_tot = NF_tot = NG_tot = NH_tot = NI_tot = NJ_tot = 0;
NK_tot = NL_tot = NM_tot = NN_tot = NO_tot = NP_tot = NQ_tot = 0;
/*swa*/ T1_tot = T2_tot = T3_tot = T4_tot = T5_tot = T6_tot = A3_tot = A2_tot = A8_tot = B4_tot = 0;
billing.keyno = 0;
billing.buflen = bbuflen;
if (required_company[0] != '\0')
{
strcpy(billing.keybuf, required_company);
billing.mode = B_GETGE;
}
else
{
billing.mode = B_GETFIRST;
}
fprintf (stderr,"Processing ....\n");
equip.keyno = 0;
while ( (billing.status = bget(billing, buf)) != B_EOF_ERR)
{
billing.mode = B_GETNX;
if(strncmp(billing.buf.company_nbr,required_company,3) != 0)
break;
if (billing.status != 0)
{
berror(phone);
exit(1);
}
/* Skip over custom invoice descriptions and usage records,
and minimum spend records */
if (billing.buf.rent_or_svc[0] == 'D' ||
billing.buf.rent_or_svc[0] == 'G' ||
billing.buf.rent_or_svc[0] == 'U' )
continue;
/* Skip over cancelled billing records */
if (billing.buf.pending_status[0] == 'C')
{
if (required_date)
{
if (strncmp(billing.buf.bill_to_century, required_date, 8) < 0)
{
fprintf(stderr, "Billing Cancelled on %.8s for Phone %.10s - skipped\n",
billing.buf.bill_to_century, billing.buf.phone_nbr );
continue;
}
}
else
continue;
}
/* Skip over records with blank phone numbers */
if (strncmp(billing.buf.phone_nbr, " ", 10) == 0 )
continue;
if (required_date)
{
if (strncmp(billing.buf.start_century, required_date, 8) >= 0)
{
fprintf(stderr, "Billing start date is %.8s for Phone %.10s - skipped\n",
billing.buf.start_century, billing.buf.phone_nbr );
continue;
}
}
if ( ++count % 1000 == 0 )
fprintf(stderr, " Have read %ld records - %ld selected %ld skipped\r", count, selected, skipped );
phone.buflen = pbuflen;
phone.keyno = 1;
strncpy(phone.keybuf, billing.buf.phone_nbr, 10);
phone.keybuf[10] = '\0';
phone.mode = B_GETGE ;
phone.status = bget(phone, buf);
if (phone.status != 0 || strncmp(phone.buf.phone_nbr, billing.buf.phone_nbr, 10) != 0)
{
fprintf(stderr,"Missing Phone Rec for %.9s %.10s Status %d\n",
billing.buf.company_nbr, billing.buf.phone_nbr, phone.status );
continue;
}
if (
(
strncmp(phone.buf.pt_terminal, "005", 3) != 0 &&
strncmp(phone.buf.pt_terminal, "006", 3) != 0
)
||
phone.buf.status[0] == ' ' || phone.buf.status[0] == 'U'
)
continue;
if (strncmp(billing.buf.phone_nbr, last_phone_no, 10) == 0)
continue;
strncpy(equip.keybuf, phone.buf.link_to_ei, 5);
equip.keybuf[5] = '\0';
equip.keyno = 0;
equip.buflen = ebuflen;
/*
Link to equipment file for equipment details
*/
equip.status = bgeteq(equip, buf);
if (equip.status != 0 )
{
fprintf(stderr,"Missing Equip Rec %.10s %.5s Error:%d\n",
phone.buf.phone_nbr, phone.buf.link_to_ei, equip.status);
continue;
}
convert_databases();
/*
N8 - Chicago Mercantile Exchange
N5, N9 and NA are all Chicage Board of Trade
ND - Comex Live - 005
NG - Comex Live - 006
N6 - Comex Delayed
N9 - NYMEX Delayed & NYBOT Delayed
NF - New York Cotton Live for terminal 005
NI - New York Cotton Live for terminal 006
NH - Eurex Live & Market Indicies (NE & NL on 005, ND & NH on 006)
*/
// Set NH on for Eurex & Market Indicies, as each uses a different code
// for the two terminals, and are used for other purposes further down
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0)
{
if (ND[0] == 'Y')
NH[0] = 'Y';
}
if (strncmp(phone.buf.pt_terminal, "005", 3) == 0)
{
if (NE[0] == 'Y' || NL[0] == 'Y')
NH[0] = 'Y';
}
// Reset NF if this is terminal 006, as NF is Warrants for 006, and no royalty
// is payable for this
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0 && NF[0] == 'Y')
NF[0] = 'N';
// Reset ND if this is terminal 006, as ND is Warrants for 006, and no royalty
// is payable for this
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0 && ND[0] == 'Y')
ND[0] = 'N';
// Reset NJ if this is terminal 006, as NJ is NZ Futures for 006, and no royalty
// is payable for this
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0 && NJ[0] == 'Y')
NJ[0] = 'N';
// If terminal = 006 and NG is set, set ND on so that remainder of code works.
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0 && NG[0] == 'Y')
ND[0] = 'Y';
// If terminal = 006 and NI is set, set NF on so that remainder of code works.
if (strncmp(phone.buf.pt_terminal, "006", 3) == 0 && NI[0] == 'Y')
NF[0] = 'Y';
if ( !full_listing )
if (N8[0] != 'Y' && N4[0] != 'Y' && N5[0] != 'Y' && N9[0] != 'Y' && NA[0] != 'Y' && NJ[0] != 'Y' &&
ND[0] != 'Y' && N6[0] != 'Y' && NF[0] != 'Y' && NH[0] != 'Y' )
{
skipped++;
continue;
}
/* Customer has these databases, so read customer file
to get name & address details and generate output */
strncpy(cust.keybuf, billing.buf.company_nbr, 9);
cust.keybuf[9] = 0;
cust.keyno = 0;
strcat(cust.keybuf, "A00");
cust.buflen = cbuflen;
cust.status = bgeteq( cust, buf_a00);
if (cust.status != 0)
{
fprintf(stderr, "Cannot read customer record for %s\n", cust.keybuf);
continue;
}
strncpy(cust.keybuf, billing.buf.company_nbr, 9);
cust.keybuf[9] = 0;
strcat(cust.keybuf, "A10");
cust.keyno = 0;
cust.buflen = cbuflen;
cust.status = bgeteq( cust, buf_a10);
if (cust.status != 0)
{
fprintf(stderr, "Cannot read customer record for %s\n",
cust.keybuf);
berror(cust);
strncpy(cust.buf_a10.a10_primary_phone, " ", 20 );
}
strncpy(cust.keybuf, billing.buf.company_nbr, 9);
cust.keybuf[9] = 0;
strcat(cust.keybuf, "A50");
cust.keyno = 0;
cust.buflen = cbuflen;
cust.status = bgeteq( cust, buf_a50);
if (cust.status != 0)
{
fprintf(stderr, "Cannot read customer record for %s\n",
cust.keybuf);
berror(cust);
continue;
}
selected++;
generate_output();
strncpy(last_phone_no, billing.buf.phone_nbr, 10);
last_phone_no[10] = 0;
printf ("%.11s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s%.1s\n",
equip.buf.ei_serial,N1, N2, N3, N4, N5, N6, N7, N8, N9, NA, NB, NC, ND, NE, NF, NG, NH, NI, NJ,
NK, NL, NM, NN, NO, NP, NQ );
}
fprintf (stderr, "\nTotal %ld record processed - %ld records selected %ld records skipped.\n", count, selected, skipped);
}
/* cleanup */
equip.status = bclose(equip, buf);
phone.status = bclose(phone, buf);
cust.status = bclose(cust, buf_a00);
billing.status = bclose(billing, buf);
fclose(vars_output);
fclose (stdout);
exit (0);
}
************************************************************
and error on compiling this code is ::
--------------------Configuration: Modcode - Win32 Debug--------------------
Compiling...
Modcode.cpp
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(303) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(304) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(305) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(306) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(307) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(308) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(309) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(310) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(311) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(312) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(313) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(314) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(315) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(316) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(317) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(318) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(319) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(320) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(321) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(324) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(325) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(326) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(327) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(328) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(329) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(330) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(333) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(334) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(335) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(336) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(337) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(338) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(339) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(340) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(341) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(342) : error C2664: 'get_option' : cannot convert parameter 2 from 'char [70][4][100]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(916) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Error executing cl.exe.
Modcode.exe - 36 error(s), 1 warning(s)
**********************************************************
pls help me if anyone can !!!
|
|
|
|
|
ishwarverma wrote: I am tryin to compile one C# program
There is your first problem. It's not a C# program at all, it's a C program.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
yep!!! i knw...i just put here # mark in hurry!!!....
so can u help me to get it resolve huhhh!!!??
|
|
|
|
|
ishwarverma wrote: yep!!! i knw...i just put here # mark in hurry!!!....
so can u help me to get it resolve huhhh!!!??
You shouldn't be in such a hurry. This is a forum, not a chat.
If you would have taken just a little time to think before you posted, you would have realised that you were about to post the question in the wrong forum.
ur in d wrng form man!!!!!!! go d c frum ask qstn!!!!!!!!!!!!!!!!!!!!!!!!!
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Man, what a retard...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John you're bottling your feelings up again. Let it out man. Just say what you mean - you'll feel better.
|
|
|
|
|
You want John to actually say what he really feels?
You're inviting a vitriolic diatribe of bibl....
Hang on, you are right! Come on John give it your best!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|