132,726 Archived Topics
Remove Filter ![]() | |
Hi All, Why the output of the following program is 0231?? Please resolve my doubt. #include <iostream> using namespace std; class B { int data; public: B() { data =0;} int func(){cout<<data++;return data++; } }; int main() { B b; cout<<b.func()<<b.func()<<endl; return 2; } Software Development c++ | |
There are precious few archaeologists in Japan, and only a handful who produce their own software programs to analyze geographic information. One who does is Professor [Izumi Niiro](http://www.okayama-u.ac.jp/user/arch/about/niiro.html) of the Okayama University. A convert from Perl, Professor Niiro now uses Python to perform data analysis via the Geographic Resources Analysis … | |
Hey guys. I have a simple question about my android app. I know what you are thinking " this dumbass just posted this in the wrong thread". But I did it for a reason. The error that I have is related to java...not android. (I will star every line of … Software Development android android-development data-structure database-design java os-x | |
How do i finda spl character in a string and return found one..? Software Development python | |
it gives me an error and the code is: var a,b,c:integer; begin write('a=');readln(a); write('b=');readln(b); write('c=');readln(c); if a>b then begin if a>c then writeln('a=',a) else writeln('c=',c); end; else begin if b>c then writeln('b=',b) else writeln('c=',c); end; readln; end. Software Development pascal | |
Here is my first Code Snippet contribution: a C++ sub-routine that computes the roots of a quadratic equation. Notes: * This sub-routine checks if a = 0. * IF a = 0, then the equation is actually not a quadratic equation; it is a linear equation with one--if any--root. * … Software Development c++ mathematics | |
Hi everyone, I'm stuck making a Scroll pane to see all the bar graphs created when they do not fit on screen, or when the frame is diminished. Can anyone tell me how to do this please? Thanks import javax.swing.JFrame; import javax.swing.JOptionPane; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.awt.*; … Software Development java java-swing | |
HI Everybody I need .NET basic interview questions urgently.I will goto an interview on saturday. Nithiy Software Development asp.net | |
Hi everyone, Does anyone have an idea of how to skip a line in a JTextField? In System.out.println, I would normally type n but it didn't work for me when I used it in a textfield: text1.setText(**"n"**+coloumn[counter]); where the output displays well as desired excpet that it doesn't skip a … Software Development java java-swing | |
First You Must Download ODBC 5.2w at http://dev.mysql.com/downloads/connector/odbc/ Next Open Your ODBC And click Add  Next click MYSQL ODBC 5.2w Driver  Click Finish And  Click OK and Click OK Again Creating Your MYSQL Create Database With Name data Create Table with name user_data CREATE … Software Development mysql visual-basic | |
Hi chaps, I am looking for a not too difficult exercise which involves superclasses and subclasses (the java book I am reading doesn't really have any good one). So I was thinking about something like this: Create a superclass 2DimensionalShapes and 2 subclasses Rectangles and Triangles. I will then need … | |
Hi all there. Firstly I apologize if this is not a specific question (please do point it out if you find this unpolite). I don't have real problems so if you're not personally interested feel free to save your time and close this thread :) Anyway, I had to write … Software Development c++ | |
Add the snippet in your module. **Requirements:** * Make sure you have reference to M$ ActiveX Data Objects Library (ADODB) * A table field with OLE Object / BLOB as datatype * A recordset that is already oppened and ready to be use **To save Image on your table field, … Software Development image visual-basic | |
Hey peps I've just used this code to block a website Imports System.IO Public Class Form1 Dim path As String Dim sw As StreamWriter Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load path = "C:\Windows\System32\drivers\etc\hosts" sw = New StreamWriter(path, True) Dim Block As String = "\n … Software Development vb.net | |
Hey there, I have a question regarding the builder pattern that I need someone with more experience to clarify for me. I have this User class that has an inner, public static Builder class that has the same fields as User as well as the corresponding setter methods. Now, the … Software Development java | |
- Please how is possible (probably dirty hack) to create [How to Create Translucent and Shaped Windows](http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html) - undecorated container (returns *java.awt.IllegalComponentStateException: The frame is displayable.*) - change Look and Feel for (returns *AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated*) - by using code from linked official tutorial . import java.awt.*; … Software Development gui java java-swing oracle | |
Hi I would be really interested to understand how exactly the toString() method works. I have read quite a bit about it, that it returns the string representation of an object, that the default one can be overridden with @Override etc etc. Let's have a look at some examples: @Override … Software Development java | |
Lately, I was reading [this snippet](http://www.daniweb.com/software-development/python/code/453788/moon-phase-at-a-given-date-python) by vegaseat. I thought, why not do it in C#? But I would also like to add lattitude and logitude in the celestial calculations and draw a picture of the moon at that moment and location. Now the calculations can get a bit involved … Software Development | |
I just wanted to show the basic usage of docopt, a module that makes parsing command-line arguments so much easier. I'm not affiliated with the creators of docopt, but I'm certainly thankful for their work and happy to post this little snippet. I will point you to [docopt.org](http://docopt.org) for more … | |
with terminal is there a way for me to get a list of names that are already taken? like for things like variables and filenames `import` so I can't accidentally name something that will make a bug Software Development python | |
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:packagesToScan="jpatest.engine"> <property name="dataSource"> <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.firebirdsql.jdbc.FBDriver" /> <property name="url" value="jdbc:firebirdsql://localhost:3050/testdb" /> <property name="username" value="xxxxxxxx" /> <property name="password" value="yyyyyy" /> </bean> </property> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="DEFAULT" /> <property name="showSql" value="true" /> <property name="databasePlatform" value="org.hibernate.dialect.FirebirdDialect" /> </bean> </property> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> </property> … Software Development java spring-framework | |
Hi guys, I'm trying to write a function that could convert a lowercase string to uppercase. Not sure if I'm heading the right direction. Essentially the function [CODE]ToUpperString (char s[]);[/CODE] would convert everything in the string to the uppercase equivalent. Here's what I got so far: [CODE]void ToUpperString ( char … Software Development c++ | |
I'm working on a Grade Point Average Calculator. The user just have to Select the number of courses offered, then select the grade obtain in the different courses by choosing the appropriate grade from the Choice Box. The problem with my application is that, if the user mistakenly selects "A" … Software Development java java-swing | |
import java.io.*; public class t1 { public static void main(String a[]) { int i; char c='a'; char[] ch={'a','b','c'}; for(i=0;i<3;i++){ System.out.println(ch[i]+" "); } //String s=c.toString(); //char cant be dereferenced String s=ch.toString(); System.out.println(" S : "+s); } } Q-1) I am getting an error while converting a character array to String aoject. … Software Development java | |
I'm writing a program in .asm which prompts the user to enter a sentence. I have no problems with this but one requirement of the program is to change the format of the sentence by replacing all the spaces (" ") with underscore characters ("_"). How do I go about … Software Development assembly | |
I want make Dictionary English into Urdu.I already made Hash Table and entered Some Words Pleas Tell me how can i convert English text into Urdu. Software Development | |
i have this code an everytime i run it. `ActivePrinter = "PDF Complete on PDFC"` `ActiveWorkbook.PrintOut copies:=1, collate:=True, Preview:=False, PrintToFile:=True,` `PrToFileName:="C:\Users\srnardo\Desktop\CONVERT" & "\" & strFileName` i get this : >Runtime error '1004': >Your file could not be printed due to an error on PDF Complete on PDFC. im trying to … Software Development pdf visual-basic | |
Hi, I have a simple QT C++ application. This is only part of the code: QTextEdit* cont; for (int x=0; x<2; x++) { cont = this->findChild<QTextEdit *>("content0_"+QString::number(x)); QString con += cont->toPlainText(); // display con in a QTextEdit anywhere you want } Two QTextEdit have different values. Let just say "AA" … | |
Hi all, I am trying to get the Mouse Coordinates that are relative to my form. At the moment I am using: [CODE=c#] xs = Cursor.Position.X; ys = Cursor.Position.Y; [/CODE] However this doesn't get the "local" form mouse coordinates. My form is x = 640 y = 480. And I … Software Development | |
Can i convert an excel file to PDF file .. can anyone give me an example macro .. Thank you guyss .. Software Development pdf visual-basic | |
create a text file called contacts using Notepad (programs> accessories > Notepad) with n=15 records for storing their name,sex age ,telephone and email address that resembles the below. "Hiba", "M",20,1234567,"aaa@yahoo.com" "ahmed", "f",21,2345678,"bbb@yahoo.com" "ali", "M",25,3456789,"ccc@yahoo.com" write a program to read the file display contact information. Software Development visual-basic | |
Hello. I was reading http://xkcd.com/287/ while bored and thus decided to write a program that would solve such np complete problems. Here is what I got: #include <iostream> #include <vector> using namespace std; template <typename T> T NPMenuProblem(T desired, vector<T> options, vector<T> &ret) { vector<T> save=ret; T remainder; T min=desired; … Software Development c++ | |
Yes, you can let your computer read text to you. The task is relatively easy, if you have Windows on your machine. All you need is Microsoft's speech-API SAPI, the Python Text to Speech module pyTTS, and an updated version of win32com, all free downloads. Here are some experiments with … Software Development api python windows-api | |
You can fix one parameter of function call by calling underlying method of fixed parameter instead of using functools.partial or lambda statement. Software Development python | |
I have this code. pdfCreator.ActiveSheet.PrintOut copies:=1, ActivePrinter:= _ "PDF Complete on PDFC", collate:=True How can i add a save location to this code . My default is the desktop when i save all the the file to be converted my desktop becomes a mess . can anyone help me how … Software Development pdf visual-basic | |
The default print area is upto cell H how can i extend it to I? Can anyone here help me .. thank you. Software Development pdf visual-basic | |
I'm just starting to get into c++ development and am experimenting with different IDEs. I was curious about what everyone's favorite IDE is and why that made that decision. I've tried: Visual C++ 2012 express Code::Blocks Eclipse CDT So far, my favorite has to be Eclipse CDT. That may be … | |
Hi all it's that time again, java exercise! Mindful of what happened last time http://www.daniweb.com/software-development/java/threads/449525/building-a-simple-airline-reservation-system-exercise/ , this time I have decided that I want to have all the pseudocode done before I even start thinking about how to code the whole thing. This is what the exercise requires: > Create … Software Development java | |
Hello my fellow Daniwebers. I am to ask for some ideas for a challenge. I want a good challenge for my skills, and even help expand my skills Please post your challenge below. Thanks, Begginnerdev Software Development vb.net | |
[CODE]#include <stdlib.h> #include <stdio.h> #include<conio.h> void main() { int ch; clrscr(); printf("\n\n~~~~~~~~~~~~~~~~~SHUTDOWN MENU~~~~~~~~~~~~~~~~~~~\n"); printf("1.Shutdown\n2.Restart\n3.Logoff\n4.Hibernate\n5.exit"); printf("\nEnter choice : "); scanf("%d",&ch); switch(ch) { case 1:system("shutdown -s"); break; case 2:system("shutdown -r"); break; case 3:system("shutdown -l"); break; case 4:system("shutdown -h"); break; case 5:exit(1); break; default:printf("Invalid choice"); } getch(); }[/CODE] | |
Can anyone tell me how can i convert excel to word . I hope anyone can show me how to include the tables in the convertion. thank you!! Software Development visual-basic | |
I made an object-oriented maze game. It compiles but I can't move the character around in the maze. Please help me out, thank you. Person.h file: #include <windows.h> #include <process.h> #pragma once class Person { private: int m_X; int m_Y; public: WORD Color; Person(); ~Person(); void DrawASCIICharacter(int x, int y, … | |
Hello everyone I just finished my last program for class this semester and would love to have some feedback from the memebers here on things that I still need to improve on or good coding practices that I may not know about that can help me become better. I have … Software Development java | |
Has anyone installed tkinter 8.6 on windows ? There is a known bug in filedialog.askopenfilenames which properly returns a tuple of file pathnames under linux, but returns a string under windows. Typical windows return string (should be tuple): C:/testdir/AnotherFile.txt {C:/testdir/This is file with spaces.txt} {C:/testdir/z_last-file test.txt} I'm curious if tkinter … | |
Hi This code not run : it show this error: incompatible types-found java.lang.String but expected HuffmanCodingAnimation.Node This line of code ` root.left.code = root.code + "0";` Here is the code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.tree.*; /* * This program enables a user to enter text and displays … Software Development data-structure gui java java-swing | |
I needed a 5 minute countdown for a project I was working on so I hacked this up, It does nothing more and nothing less. Figured I would post it while I was here to save someone else the trouble. (Not that it's in anyway difficult to do.) Software Development | |
Do anyone here Know how to get the previous month of a given date.. Example given date: 11/25/2012 Output: 10/25/2012 thank you.. i know you can help me .. Software Development visual-basic | |
Good Day Hi, I would like to know, how to work with wireless and lan connections in vb6 and how to generate a random password on every users who wants to use the internet connection,this password has a limited time only it expires depends on the number of minutes you … Software Development visual-basic wireless-networking | |
Hello All, I intend to develope a console application in C# in which there should be 3 functionalities :- 1. Open Wordpad.exe and automatically type something. 2. Save the updated document. 3. Close the Wordpad with changes saved. Kindly guide me if anyone has some ideas. I have managed to … Software Development c# | |
The End.