- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
- Interests
- programming, cricket, soccer, surfing
- PC Specs
- AMD64 , Win XP, Fedora(11), Ubuntu(9)
61 Posted Topics
Re: try this: [CODE] if (bankQ.front()) [/CODE] instead of: [CODE] if (bankQ.front() != NULL) [/CODE] also keep ur code optimized... | |
Re: Hello superiors. Maybe, the the poster(one who started the thread) was talking about DSLs....like Groovy. | |
Re: [QUOTE] I'm confused. You store a result to intResult, but that value returned is a double. What do you really mean? [/QUOTE] I see that the intResult variable is a double type. There are issues with the types alright. | |
Hello all. I want to find the return address where execution should jump after returning from a function. Say this is my code: [CODE] void foo(){ } int main(){ foo(); printf("After foo.."); return 0; } [/CODE] After foo() returns, how to find the rturn address where control will be passed? … | |
Re: Thats not the c++ code you are trying to run. Its little language constructs plus a lot of algorithmic language. Hence, the syntax errors Please read a beginner's book on c++ Cheers | |
Re: This might help: [url]http://www.cplusplus.com/forum/beginner/5099/[/url] | |
Re: you need to elaborate a bit more about the problem. dont understand it well. | |
Re: I think he wants to know how random numbers are generated by the built in function..... | |
Re: use a global count variable to keep track of the nodes u are inserting. if count = 0, then only add a node as head... Getting the idea? | |
Re: try : [CODE] private: List <GrabStuff> *bucket[]; [/CODE] instead of: [CODE]List <GrabStuff> bucket[];[/CODE] | |
Re: Hi. Try this. Naive, but should give you some idea. The way you architect the classes entirely depends on you. [CODE] #include<iostream> using namespace std; const int SIZE = 3; class Matrix{ public: int matrix[SIZE][SIZE]; void read_matrix(); }; class MatOps{ public: Matrix mul_matrix(Matrix &, Matrix &); }; void Matrix :: … | |
Re: Hi. From what i see, [CODE] void square_array (double values [size]) { int index; cout << "\nThe square of the numbers are:\n"; for (index = 0; index < size; index++) { values [index] = values [index] * values [index]; cout << "\n\n"; cout << values [index]; } } void print_cube_root … | |
Re: Hi. First of all, you need to to decide the language u are going to use for the application. And then if there is an API to allow your app to communicate with the web. For example, check this c++ library: [url]http://www.webtoolkit.eu/wt[/url] All the best. Cheers. | |
Re: [QUOTE=ranjithgoud;1036395]hi guys, i am ranjith intrested in writing c c++ progs i hav a doubt that can i write a c or c++ program to excute at a given time thanks[/QUOTE] Yes you can. See the system() function for more information. Cheers | |
Re: Urmi, your problem seems to be API specific. There are many APIs/connectors/drivers that can be used to connect a language and a database. Search the docs of the API u are using. See if u can find any official support(forums, irc) for the API u are using. | |
Re: hi, Did u try writing the '\n' char instead of 'endl'? | |
Re: Hi. This thread is related to designing/modelling. No two developers can create the same design/model. This issue is related to the ethics of ARCHITECTURE. If u really want to create a high quality software, refer to design patterns of software architecture. Read about Object oriented design patterns specifically. You will … | |
Re: Try using this: [CODE] test obj; test *t = &obj; t->run(); [/CODE] test* t; t->run(); | |
Re: [QUOTE=fraandres;1036162]getting a error saying the variable 'bonus' is being used without being initialized can anyone how do a initialized .... i just cant find a way [/QUOTE] initialize bonus as: double numtick, percentage, total,revenue,balance, bonus = 0; | |
Re: just compare the inString with reversestring using the == operator | |
Re: [QUOTE=kingstrider;1036532] v want to to ask the user integers again and again till a condition is satisfied this is wat i have ritten but the loop never continues # include <iostream.h> void main () {int a=0; int b=0; int c=a-b; do { cout<<"enter two integers"<<endl; cin>>a; cin>>b; a=a; b=b; } … | |
Re: Check [url]http://stackoverflow.com/questions/294343/read-and-write-rtf-files-with-c-qt[/url] | |
Re: Hi. Where is the problem? Have u not understood what the program is? Do you know c++(basic level)? Cheers | |
Re: Actually there is no need to initialise it to NULL as we do in case of normal pointers. How ever, for more info, you can refer to the boost library docs. Cheers | |
Re: [QUOTE=pavankotturi;1034937]how to insert system current date by using sql query in SQL SERVER 2005[/QUOTE] use getdate() function : insert into tab_name values(getdate()) | |
Re: [QUOTE=sarithak;1035233]Hi frnds... i m doing music portal. i need to upload Albums to FTP from admin side.Each Album having 5/6 audio files. Each song details should be saved in my DB also..plz give me some suggestions ...[/QUOTE] You can write a script to open a given dir(which will contain your … | |
hello guys. dont know if this is the right forum. I am trying to [B]install Joomla[/B] and at step 2 it says [B]MySql No support[/B] [B]i have mysql installed[/B] and also have dbs created. Using php, i can access connect to the db and run queries. What am i missing? … | |
Hello guys, I m trying to run a simple php code. I have Apache Tomcat/6.0.18 running. I dont know if it is php enabld or not. i've created a hello.php file: [ICODE] <html> <body> <p>This is going to be ignored.</p> <?php echo 'While this is going to be parsed.'; ?> … | |
Re: [QUOTE]calculate any given factorial number using trees[/QUOTE] Do you mean calculate factorial of a given number using trees? | |
Re: Also check your base conditions. I can see two calls to the main(). I dont think the first call is inside a base condition and that cud be why the stack overflows. Please chk ur code properly. | |
hi. I am trying to simulate the PGP algorithm. I am trying to encrypt the symmetric key using a public key. My code: [CODE] . . KeyGenerator kgen = KeyGenerator.getInstance("DESede"); kgen.init(168);//**IMP Key symmetric_key = kgen.generateKey(); Cipher c = Cipher.getInstance("DESede"); c.init(Cipher.ENCRYPT_MODE, [B]symmetric_key[/B]); byte[] encrypted_packing = c.doFinal(packing); //Is the following right thing … | |
hello . I am trying to simulate the MD5 hashing algo. My code: [CODE] private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { try { MessageDigest object = MessageDigest.getInstance("MD5"); String str = jTextField1.getText(); byte arr [] = str.getBytes(); object.update(arr);//update the md5 object with the message arr = object.digest();//calculate the digest str = IntegerToHex(arr);//convert to … | |
In this code : [CODE] #include <iostream> using namespace std; class Singleton{ private: Singleton(){} public: static Singleton* getInstance(); void myFunction(){ cout<<"\nmyFunction() called.."; } }; Singleton* Singleton :: getInstance(){ static Singleton* obj = NULL; if(obj == NULL){ cout<<"\nCreating new instance..."; obj = new Singleton(); cout<<"\nReturning instance..."; } else{ cout<<"\nan old instance … | |
hi. I am creating a website using Visual Studio 2008. I m creating a Visual C#->ASP.NET website. I have a Login.aspx which has my login form. I have a dir - "CriticalDir" in the project which has a TeamData.aspx that will display a table which contains critical info. I have … | |
hi. I get a NillpointerException. Here's my code: [CODE] private void Login_ButtonMouseClicked(java.awt.event.MouseEvent evt) { String usrname = uname_TextField.getText(); String pass = passwd_PasswordField.getText(); String pwrd = pass.toString(); String args[] = null; boolean auth_flag = false; try{ R = S.executeQuery("select uname, passwrd from Employee_Master;"); while(R.next()){ if(usrname.equals(R.getString("uname"))){ if(pwrd.equals(R.getString("passwrd"))){ this.dispose(); [B]args[0] = R.getString("uname")[/B]//causing nullpointerexception … | |
hi. I have a jlist on a frame. I want to add items dynamically in the list. So, I am using DefaultListModel..Here's my code: [CODE]public class AdminFrame extends javax.swing.JFrame { private Statement S; private ResultSet R; DefaultListModel model = new DefaultListModel(); JList Employee_list = new JList(model); /** Creates new form … | |
Hi. I have two tables in mysql - [B]customer_master[/B] and [B]contact_master[/B]. customer_master has a primary key - "cust_id" ,which is a foreign key in contact_master and "cust_name" which is also a foreign key in contact_master. I have a [B]frame[/B] which will do [B]CRUD operations for contact_master[/B]. The frame has two … | |
Hi all. I am trying to connect to MySQL database on a remote m/c(IP: 192.168.120.44) Heres my code: [CODE] System.out.println("Making new connection(object).."); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://192.168.120.44:3306/tox_erp10","root","tiger"); System.out.println("Done"); [/CODE] I am using netbeans IDE. [B]I can connect to the remote database thru SERVICES in netbeans[/B]. But the code doesnt work.. It … | |
hi all. I want to ch ange my jframe's icon(cup of coffee). i chkd the forum but that's what i m doing... here's my code: [CODE]public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { AppStarter dialog = new AppStarter(new javax.swing.JFrame(), true); dialog.setLocationRelativeTo(null); dialog.addWindowListener(new java.awt.event.WindowAdapter() { public … | |
Hello guys. I am doing a swing application wherein I m using a DefaultTableModel. Here's my code: [CODE] DefaultTableModel tab = new DefaultTableModel(){ @Override public boolean isCellEditable(int r, int c){ //if(c == 10) {return true;} return false; } }; private JTable jt = new JTable(tab); [/CODE] The JTable will diplay … | |
Hello folks, am new to architecture. Cud anyone of you tell me what is 64 in IA 64 architecture? Thanks | |
Hi folks, I want to write grammar rules for a form entry application. On the form/frame I have some fields: Customer name, telephone number I check the validity of the textfileds before data saved. What can be the grammar for a telephone number and name considering that users shud not … | |
Hello folks, I m tying to implement a Singleton pattern; Iwant connect to MySQL databaseusing only a single Connection object(Singleton). I have implemented the application using threads. I run 2 threads. The second thread should use the Connection object created by the first thread which is not happening. My code: … | |
Hello folks, I am trying to run a simple java application which connects to Oracle 9i and gets and displays the resultset. I am connecting to oracle using sun.jdbc.odbc.jdbcodbc bridge driver. [B]**The application was running fine 4 days ago**[/B]. I m using Netbeans 6.0. Two days ago I installed Netbeans … | |
Helo folks I m new to linux. I had fedora 9 which dint work pretty well. So i installed fedora 10. I want to set my screen resolution to 1024 x 768. The only options I see in the Hardware>screen resolution are 800 X 600 and less. I dont see … | |
Hello folks, I m trying to simulate the RSA algorithm. This is some of my code: [ICODE] System.out.println((int)Math.pow(6, 5) % 119); System.out.println((int)Math.pow(41, 77) % 119); [/ICODE] The first results in 41 while the second results in -9 when the expected shud be 6. Whats wrong? | |
hello folks. I m trying to call an exe from java code. [ICODE] public void MyClass{ public void run(){ Runtime rt = new Runtime ().getruntime(); Process p = rt.exec("c:\mylexicalanalyser.exe < SampleInput.txt "); // } . . p s v m(){ new MyClass(); } } [/ICODE] mylexicalanalyser.exe was created by flex … | |
Hi folks, I want to access Oracle 9i table "emp" in Java... I do not know what driver to use .. The name of the Oracle database under which "emp" falls is "Oracledb" I do not know what the connection string is? Pls help... | |
Hello folks, I have a Netbeans desktop application with a frame. I have a menu called SALES. Under that i have a menu-item "Import". I have added a mouseclicked event where i call a function. When i click on Import, nothing happens... Plz help. Thanks | |
hello folks, could anyone tell me how to access a spreadsheet from a java program? I tried using the javaexcel API but cant run the program. Any other APIs/ways I can find? thanks |
The End.