440 Posted Topics
Re: 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 … | |
Re: 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 … | |
Re: [url]http://en.wikipedia.org/wiki/Bubble_sort[/url] shows CORRECT bubble-sort algorithm. | |
Re: 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 … | |
Re: 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 … | |
Re: what about solving little/big endian problem by doing appropriate typecast before writing to file? | |
![]() | Re: 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 ![]() |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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. | |
Re: 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 | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: You may show us the meaning of ............. ............. | |
Re: 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 | |
Re: 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 | |
Re: hi, you may specify your tables and key firstly, so we get able to check it and hopefully spy out some mistakes. brs, cliff | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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 | |
Re: 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: … | |
Re: 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 | |
Re: 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 … | |
![]() | Re: 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 … ![]() |
Re: 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 … | |
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 … |
The End.