132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mahesh113

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++
Member Avatar for rubberman
1
132
Member Avatar for happygeek

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 …

Software Development perl python
1
473
Member Avatar for bobrown101

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 …

Member Avatar for stultuske
1
885
Member Avatar for krystosan

How do i finda spl character in a string and return found one..?

Software Development python
Member Avatar for krystosan
1
211
Member Avatar for kalo150

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
Member Avatar for riki.kavadarci
1
161
Member Avatar for DavidB

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
Member Avatar for DavidB
1
737
Member Avatar for DrEinstein

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
Member Avatar for DrEinstein
1
149
Member Avatar for nithysony

HI Everybody I need .NET basic interview questions urgently.I will goto an interview on saturday. Nithiy

Software Development asp.net
Member Avatar for normantyago
1
504
Member Avatar for DrEinstein

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
Member Avatar for DrEinstein
1
676
Member Avatar for haviansyah

First You Must Download ODBC 5.2w at http://dev.mysql.com/downloads/connector/odbc/ Next Open Your ODBC And click Add ![11](/attachments/large/4/11.jpg "11") Next click MYSQL ODBC 5.2w Driver ![21](/attachments/large/4/21.jpg "21") Click Finish And ![31](/attachments/large/4/31.jpg "31") 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
Member Avatar for jemartalaban_1
1
4K
Member Avatar for Violet_82

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 …

Software Development java oop
Member Avatar for Violet_82
1
250
Member Avatar for mrboolf

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++
Member Avatar for jsdncjnsci
1
449
Member Avatar for jhai_salvador

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
1
833
Member Avatar for Mr.M

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
Member Avatar for aman'z
1
2K
Member Avatar for bibiki

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
Member Avatar for bibiki
1
161
Member Avatar for mKorbel

- 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
Member Avatar for mKorbel
1
1K
Member Avatar for Violet_82

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
Member Avatar for Violet_82
1
227
Member Avatar for ddanbe

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
1
2K
Member Avatar for chriswelborn

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 …

Software Development github python
1
3K
Member Avatar for nouth

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
Member Avatar for chriswelborn
1
631
Member Avatar for jwenting

<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
Member Avatar for jwenting
1
952
Member Avatar for nychick

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++
Member Avatar for Rogierownage
1
918
Member Avatar for Neon Tetras

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
Member Avatar for Neon Tetras
1
169
Member Avatar for devanshee

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
Member Avatar for stultuske
1
170
Member Avatar for patrickgormally

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
Member Avatar for Assembly Guy
1
6K
Member Avatar for yousafc#

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
Member Avatar for <M/>
1
1K
Member Avatar for imBaCodes

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
Member Avatar for imBaCodes
1
120
Member Avatar for kglilly

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" …

Software Development c++ qt
Member Avatar for kglilly
1
181
Member Avatar for Erslich

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
Member Avatar for gouthamarul
1
9K
Member Avatar for imBaCodes

Can i convert an excel file to PDF file .. can anyone give me an example macro .. Thank you guyss ..

Software Development pdf visual-basic
Member Avatar for imBaCodes
1
251
Member Avatar for ABDALSLAM.ALI

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
Member Avatar for jhai_salvador
1
410
Member Avatar for Labdabeta

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++
Member Avatar for Labdabeta
1
212
Member Avatar for vegaseat

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
Member Avatar for ZZucker
1
2K
Member Avatar for TrustyTony

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
Member Avatar for paddy3118
1
290
Member Avatar for imBaCodes

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
Member Avatar for imBaCodes
1
337
Member Avatar for imBaCodes

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
1
104
Member Avatar for Stein102

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 …

Software Development c++ ide
Member Avatar for Stefano Mtangoo
1
195
Member Avatar for Violet_82

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
Member Avatar for Violet_82
1
4K
Member Avatar for Begginnerdev

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
Member Avatar for Begginnerdev
1
177
Member Avatar for murtazamzk

[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]

Software Development c c# c++
Member Avatar for deceptikon
1
467
Member Avatar for imBaCodes

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
Member Avatar for imBaCodes
1
131
Member Avatar for TheNewbie1234

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, …

Software Development c c# c++
Member Avatar for Schol-R-LEA
1
1K
Member Avatar for nova4005

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
Member Avatar for nova4005
1
468
Member Avatar for rwe0

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 …

Software Development python tkinter
Member Avatar for vegaseat
1
398
Member Avatar for Dorar

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
Member Avatar for JamesCherrill
1
653
Member Avatar for Diamonddrake

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
Member Avatar for kplcjl
1
3K
Member Avatar for imBaCodes

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
Member Avatar for imBaCodes
1
172
Member Avatar for androidz

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
Member Avatar for Saleem_1
1
385
Member Avatar for KushMishra

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#
Member Avatar for tinstaafl
1
535
Member Avatar for barakros

hi I need some help. I have XML file with the folowing structure, and I wanted to know if there is a way to get some FLD nodes from a LIN Node in 1 XPATH command so I can get these values in 1 command. I need just the first …

Software Development xml
Member Avatar for barakros
1
343

The End.