440 Posted Topics

Member Avatar for djclipz

hi djclipz, one cannot state anything about your normalisation, if you do not tell precisely of which attributes your relations consist of. As for "suich as employee id, fname, sname, sex, houseno, street name etc etc " what is etc etc? It might be helpful for yourself if you list …

Member Avatar for lich
0
107
Member Avatar for Kumar Arun

Hi Kumar, this is a very nice task, but I would suggest you take the first turn starting to design that data model by yourself. Then post your (maybe imperfect) results, and we will help you willingly. krs, tesu

Member Avatar for tesuji
0
190
Member Avatar for deepmann97

hi deepman, try this [code=sql] select t.rollno, t.age, s.sex from table1 t join table3 s on t.rollno = s.rollno where s.rollno = 1 or s.rollno = 7 union select t.rollno, t.age, s.sex from table2 t join table3 s on t.rollno = s.rollno where s.rollno = 1 or s.rollno = 7 …

Member Avatar for mwasif
0
94
Member Avatar for Lotus_2011

[url]http://en.wikipedia.org/wiki/Bubble_sort[/url] shows CORRECT bubble-sort algorithm.

Member Avatar for Lotus_2011
0
121
Member Avatar for CoolGamer48

hi coolgamer48, I let the compiler generate the assembly code of a small program containing if with/without else path to figure out whether omitting else would affect execution time, results below: [code=cpp] #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { // Without else if ( argc == 0 ) return …

Member Avatar for Salem
0
144
Member Avatar for HB25

Hi friend, I am viewing your data dictionary and erm. Well, something seems to be wrong: some trouble with keys, composite keys, also the graphic of the erm emerges in a disordered manner. The relationships between orders and items and items and products, respectively should be redrawn. Maybe the disordered …

Member Avatar for HB25
0
233
Member Avatar for kux

what about solving little/big endian problem by doing appropriate typecast before writing to file?

Member Avatar for Salem
0
195
Member Avatar for Thew

hi, static member must be initialized outside of class declaration, for example below }; of class def: [code=cpp] class C { public: static int st; ... }; int C::st = 2008; // must be outside class declaration [/code] krs, tesu

Member Avatar for Thew
0
93
Member Avatar for daniyalnawaz

hi daniyalnawaz, nice ERM. Maybe it s a good idea to state some rules about the cardinalities, for example: A product can belong to more then as on product category or (shall it be: a product can belong to one category only) As for the product options: Relationship between option_group …

Member Avatar for schumaj
0
828
Member Avatar for Nemoticchigga

hi, maybe reading from serial port needs special configuration first, as for example: [code=c] port->DataBits = 8; port->Parity = Parity::None; port->StopBits = StopBits::One; [/code] krs, tesu

Member Avatar for tesuji
0
99
Member Avatar for JohnnyC26

Hi Johnny Why open the file in binary mode, isn't it a text file created with text editor? You may check the length of input read in by getline(). Differs it from size of book? You need to read every line of your file for locating the entered ISBN, therefore …

Member Avatar for tesuji
0
99
Member Avatar for marcelomdsc

hi, [code] "17" ascii ? "1" = 41hex (4th column, 1st row) = 0100 0001bin "7" = 47hex (4th column, 7th row) = 0100 0111bin 17 76543210 00010001 = 16 + 1 = 2^4 + 2^0 -17 00010001 11101110 (invert all digits --> this is one s complement) + 1 …

Member Avatar for marcelomdsc
0
100
Member Avatar for latour1972

Hi latour1972, maybe these will help you: [code=cpp] // Two function to computing quotient and remainder int quotient (int z ) { return z / 10; } int reminder ( int z ) { return z % 10; } // Simple solution to split int number into its digits void …

Member Avatar for latour1972
0
106
Member Avatar for stonyheng

hi stonyheng, a simple way to archive a result is a correlated select like this: [code=sql] select * from date_table x where out_date = (select max(out_date) from date_table y where x.name = y.name) [/code] Unfortunately this does not work properly if you have periods where out_date is not set, that …

Member Avatar for stonyheng
0
115
Member Avatar for marcelomdsc

hi, there is just another solution: [code=cpp] int main(int argc, char *argv[]) { int n = 59; char c1, c2; c1 = n / 10 + 0x30; // in ASCII table, dec 0..9 c2 = n % 10 + 0x30; // are in col 3 starting at row 0, so …

Member Avatar for marcelomdsc
0
100
Member Avatar for gazoo

hi, finally you also should implement the correct algorithm to computing leap year: int LeapYear(int year) { return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 1 : 0; } brs, cliff

Member Avatar for tesuji
0
894
Member Avatar for recursiveNugget

Hi, Left outer join should be replaced by inner join, as already stated. Can you post the create- table statements? I have got the feeling that something could be wrong with the relationships of your tables. As for example, table tUser contains foreign key contact_id what comes from tContacts. If …

Member Avatar for recursiveNugget
0
892
Member Avatar for GigaCorp

Line [code=c] fp=fopen("c:\\patientdirectory.txt","r"); [/code] opens patientdirectory in read mode only. You may add + or b+ to open it for appending a text file ("r+") or binary file ("rb+"). You must have gotten an error message when trying to write data on file opend with "r" mode using fwrite.

Member Avatar for VernonDozier
0
143
Member Avatar for evios

hi, on your ODBC configuration dialog you can activate that detailed ODBC debug information has to be written to log file. Then start your program using mysql over odbc and post the contents of that log file. krs, tesu

Member Avatar for loveknights07
0
136
Member Avatar for M3nTaL

hi, what is the error message? Your trigger will be fired AFTER update, and, obviously, it were to catch update errors IF the record to be updated does not exist in your table. Well, if that record does not exist, update would not be execute, therefore (i believe so:)) AFTER-update …

Member Avatar for tesuji
0
74
Member Avatar for info04

hi, you can also mask bit on position# 6, which is 0 if char is upper case and 1 if char is lower case, e.g. 'A' = 0x41 = 0100 0001 (binary), 'a' = 0x61 = 0110 0001 (binary). [code=c++] bool isUpperCase (char c) {return !(c&0x20);} . . . char …

Member Avatar for William Hemsworth
0
111
Member Avatar for bhuwanrc

hi, if you want to draw an int random number rn out of [0.. n-1] you can do that by supplying rn = rand() % n. rand() always produces the same sequence of random numbers. To avoid this, for example in game program, where you need "true" random numbers, you …

Member Avatar for bhuwanrc
0
63
Member Avatar for ddt99999
Member Avatar for ddt99999
0
103
Member Avatar for e_pech

hi e_pech, possibly this works (so far, i didn't test it): [code] int main_string() { long int i = 2008; string s; stringstream st; st << i; cout << "The value of longvar is " + st.str() + "!\n"; return 0; } [/code] krs, cliff

Member Avatar for e_pech
0
167
Member Avatar for rkpalmer

hi, also your conception of communicating between Fortran and c++ programs is hardly to understand, there are simple ways to call fortran programs from c++ environment.. You may peer at [url]http://wwwcompass.cern.ch/compass/software/offline/software/fandc/fandc.html[/url] or further sites easily be found by googling the internet. krs, cliff

Member Avatar for rkpalmer
0
138
Member Avatar for shouvik.d

hi, you may specify your tables and key firstly, so we get able to check it and hopefully spy out some mistakes. brs, cliff

Member Avatar for shouvik.d
0
126
Member Avatar for nevets_steven

Hi nevets_steven, your both tables do not satisfy the requirements of the First Normal Form (1NF), which is the minimum requirement, because they have countless repeating groups. Therefore, it's really hard to construct appropriate Queries, to prevent inconsistent data or to win upper hand against hidden anomalies. To get rid …

Member Avatar for tesuji
0
108
Member Avatar for salim

hi salem, checking your schema booking_tbl ( PK booking_id, FK vehicle_reg, FK customer_id, booking date, booking duration) vehicle_tbl ( vehicle_reg, vehicle coulour, vehicle make, vehicle) I can assert that you did a good job. The relationship [B]booking_tbl [I]M:1[/I] vehicle_tbl[/B] is correct because: 1. the primary key of vehicle_tbl, which is …

Member Avatar for tesuji
0
246
Member Avatar for mezo

hi mezo, It depends on your datamodel where to store changing data. As for example merchandise management systems (also retail systems, ERP) usually distinguish between master data which remain almost unchangeable and transaction data which differs, for example such things like customers order data. If your customers can order a …

Member Avatar for trudge
0
192
Member Avatar for a2008

hi a2008 if you divide two consecutive Fibonaccis, say F20 / F19 = 6765/4181 = 1.618033963, the ratio converges to the famous golden ratio (1 + sqrt(5))/2 = 1.61803398874989484820458683 . . . krs, cliff

Member Avatar for Nick Evan
0
148
Member Avatar for veledrom

hi, sure, MySQL now also offers some procedures, functions and triggers (of a kind) but one cannot compare that with Oracle's inimitable functionality nor you can seriously write PL/SQL programs using MySQL. I would suggest you download free Oracle express edition 10g which is also able to perform PL/SQL. Such …

Member Avatar for tesuji
0
113
Member Avatar for riniuia

hi, there is an extension to Chen's ERM what is called ISA relationship (is a .. ) for modelling generalization/specialization hierarchies, which also can be used to express inheritances. Maybe this will help you. krs, cliff

Member Avatar for tesuji
0
68
Member Avatar for Asiima

hi, without where clause cross product of both tables will be computed, that is each row of income will be combined with each row of payments. To prevent this, you need a where clause like where i.fieldofincome = p.fieldofpayments, If you don't have such common fields you can't join both …

Member Avatar for tesuji
0
129
Member Avatar for VernonDozier

ofstream is for output, which can be combined with fstream::out | fstream::app // for append but not with fstream::in | fstream::out if you want to do both, use fstream. you may have a look at [url]http://www.daniweb.com/forums/thread6542.html[/url] krs, cliff

Member Avatar for VernonDozier
0
214
Member Avatar for guy40az

hi guy40az, i am afraid this is not an easy task. Once i had programmed similar problems using plain c under real mode, what is rather outdated. Today i am using professional library for port and memory mapped IO on XP. Maybe you will succeed by using this interesting library: …

Member Avatar for hammerhead
0
136
Member Avatar for knewc

Hi, for testing I would suggest "Able was I ere I saw Elba", a perfect palindrome, once given by Napoleon I when he was embarking on his 100-day journey to that isle. krs, cliff

Member Avatar for ithelp
0
162
Member Avatar for Black Magic

hi, below is listing 5.1 taken from second version of c++21d which you can found here: [url]http://www.angelfire.com/art2/ebooks/teachyourselfcplusplusin21days.pdf[/url] All seems to be ok there. Maybe you have incompletely copied the example. functions can be overloaded, so it s possible that there is a second function FindArea what will meet your function …

Member Avatar for Black Magic
0
251
Member Avatar for sjvr767

hi, storing some data (physically) in 900 different tables seems to be a rather bad idea, because you would have union them firstly to draw any useful information from them. Aside from the fact that handling 900 different tables when adding actual data every week isn't that easy-going. I would …

Member Avatar for sjvr767
0
106
Member Avatar for HB25

hi, if you design an entity relationship model (ERM) there are only entities and relationships. There aren't any "tables" there. Once you might map your ERM into relational model, which consists of tables (relations) only. Your shown relationship ' (ONE) Warehouse-> could have many -> orders' expresses the trivial fact …

Member Avatar for HB25
0
2K
Member Avatar for tesuji

Hi there everyone, I've just started with Ubuntu 7.10 and KDevelop 3.5.8 (just installed, true greenhorn to Ubuntu) . First, I created this hello-world program: #include <cstdio> int main() { printf("Hello World\n"); return 0;} with gedit, compiling and linking it with g++ -o hello hello.cpp. Running it with ./hello worked …

0
133

The End.