132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for prem2

Hi, I have a few basic doubts in java . Statment: class MainExample1 {public static void main(String[] args) {}} class MainExample2 {public static void main(String []args) {}} class MainExample3 {public static void main(String args[]) {}} 1.What is the difference between the above three statments.? 2.Why main method should be declared …

Software Development java
Member Avatar for tong1
0
111
Member Avatar for need help!

I use windows-xp python 2.6 Could I have your help. I need to hide and then show a Tkinter root window. And also "remove" the exit, minimize and maximize options. I can't do it like this! root.hide() #do some stuff root.show() Root.hide works but root.show doesn't. No Exception thrown. :(

Software Development python tkinter
Member Avatar for hayathms
0
11K
Member Avatar for guptas

Hello all! i am a beginner to network programming. I am trying to make an application in vb.net 2008 where in i can open a file from the client computer, do some changes to it and save it back. Can someone please throw some light on how should i go …

Software Development vb.net
Member Avatar for Teme64
0
844
Member Avatar for tong1

/* In the following method, why the factorial goes wrong when n>12 ? */ static int factorial(int n){ int fac=1; if ((n<0) || (n>12)) return -1; for (int i=2; i<=n;i++) fac *=i; return fac; }

Software Development java
Member Avatar for tong1
0
1K
Member Avatar for prem2

Hi, Can any one tell me the what is the difference between Identifier and Variable? Thank you, With Regards, Prem.

Software Development java
Member Avatar for tong1
0
73
Member Avatar for karthikeyan24

hi gd I am karthikeyan. can any one help me how retrive and delete data in vb.net. I am using access database.

Software Development vb.net
Member Avatar for hirenpatel53
0
112
Member Avatar for abcdr

I am trying to square each number in the list under [I]nums[/I]. But I don't know how to do it. I got this so far: [code] def squareEach(nums): for i in nums: y=i*i return y [/code] What is happening here is it's counting how many numbers are in the list …

Software Development python
Member Avatar for TrustyTony
0
451
Member Avatar for TrueVb.NetNoob

Hi Guys! I have problem coding with a vertical Scroll bar. I made a label in form1 and a vertical scroll bar next the it on the right side. The vertical Scroll bar is to scroll down the label if the label is full of text. Here is my code …

Software Development vb.net
Member Avatar for TrueVb.NetNoob
0
117
Member Avatar for Naveed_786

Dear All, I hope you all would be fine please help me in printing i want to take print preview of window form and after taking print preview want to take print of form how can i do this please provide me example. Thanks in advance

Software Development vb.net
Member Avatar for Teme64
0
176
Member Avatar for Zinderin

Still learning here... this is my method to get the record count of a table ... it works, but it seems like a lot of coding for something so simple. Is there an easier way? [CODE] public int GetTableRecCount(string table) { //Set up the connection and adapters... OleDbConnection myConn = …

Software Development dataset
Member Avatar for Zinderin
0
480
Member Avatar for andrewschools

Hello there - I have three directories. I would like to compare directory1 with directory2, then take those changes/new files and copy them over to directory3. I was given the following code: [code] #!/bin/bash dir2="d1" dir1="d2" dir3="d3" for file in dir2/*; do file_in_dir1=dir1/$(basename ${file}) if [ ! -e ${file_in_dir1} ]; …

Software Development shell-scripting
Member Avatar for rch1231
0
383
Member Avatar for Jerompie

Hello DaniWeb, This is my first topic here at DaniWeb. I have always been a great fan of this forum mostly for C# solutions. Iam a 3rd year student IT. Now I have a problem. Iam trying to make a application that checks if IP + Port is online.( it's …

Software Development client-server
Member Avatar for Teme64
0
238
Member Avatar for ph34rgh057

i was woundeirng if anyone could help me with drawing a simple image perferably a .gif thank you.

Software Development c++ image
Member Avatar for theguy126
0
214
Member Avatar for csha_cs508

please help me with this problem... i dont have any idea on how to make the code... Histogram is a process of representing the frequency of data in a chart. Write a C++ program that will simulate this process. Your program should read a string (only letters are allowed) and …

Software Development c++
Member Avatar for wisaacs
0
587
Member Avatar for crodriguez08

Hey there, I need some help with the placement of constructors and how the second constructor would work (there's two of them). All I ask is for some explanation. These are the exact instructions: The default Constructor should build a dynamic array of size 3 for the grades. Another constructor …

Software Development c++ oop perl
Member Avatar for crodriguez08
0
475
Member Avatar for Cap'nKirk

Hi, my app needs to have an internet connection to run correctly, so I have been trying to implement a piece of code to check for the availability of a net connection. [CODE] private void Form1_Load(object sender, EventArgs e) { HttpWebRequest req; HttpWebResponse resp; try { req = (HttpWebRequest)WebRequest.Create("http://www.google.com"); resp …

Software Development
Member Avatar for farooqaaa
0
195
Member Avatar for DawnyB

For my intro to programming class i have to design a game where a ball is shot at an angle and hits squares that are worth points. I have two questions 1.How do you get the ball to move. I was given this code but I don't know if I …

Software Development gaming image python
Member Avatar for Archenemie
0
1K
Member Avatar for shahreza

index no.student room 41 18 M.OPERASI 41 27 M.OPERASI 41 PODIUM 41 24 PODIUM 41 25 PODIUM 41 19 B 206/207 this is a part of data in a text file that i will read and place it in array and save it in another text file.. but i got …

Software Development java
Member Avatar for shahreza
0
197
Member Avatar for potato4610

This code is used to reverse a number in C++ but I have a problem. When I input 1010 or -1010, the output is -101 and 101. How should I fix this?[code]/* Christopher Langford U05799189 * clang4d@gmail.com * Assignment 3 Exercise 3 * July 23, 2010 * Macbook Pro w/Mac …

Software Development c++
Member Avatar for Duki
0
592
Member Avatar for empyrean

hello everyone.. i have a question.. i am using datagrid and binding the columns using datatable..i have grid with columns Area, name, date, country, comments. Now i have to filter the data using two list boxes with contains area and name distinct values. if user selects one location or more …

Software Development listview
Member Avatar for nick.crane
0
146
Member Avatar for GAME

My program won't display all the text on a webpage, it basically only reads the first line. I am using a rich textbox to display the text. [code] void readrss() { try { newstxt.Text = string.Empty; StreamReader x = new StreamReader(WebRequest.Create("http://www.xample.net/").GetResponse().GetResponseStream()); newstxt.Text += x.ReadLine(); x.Close(); newstxt.Text = newstxt.Text.Replace("<", "•"); } …

Software Development
Member Avatar for GAME
0
105
Member Avatar for SHENGTON

Hello, good day. :) I got a problem with "passes occurred". This is the only problem left in my program. My program is about Naive Searching and Binary Searching. There's no problem with my "Naive Searching". The problem is the "Binary Searching". [b]Naive Searching:[/b] This is the result when I …

Software Development c
Member Avatar for Adak
0
135
Member Avatar for MxDev

Hi guys, I want to add syntax highlighting to my text editor, and I came up with ColorCode library at this address [URL="http://colorcode.codeplex.com"]http://colorcode.codeplex.com[/URL] but I couldn't load the parsed code into richTextBox object using rtb property. The following code returns parsed html code. [CODE]using ColorCode; string sourceCode = File.ReadAllText(@"/path/to/source/file"); string …

Software Development html-css
Member Avatar for Teme64
0
700
Member Avatar for fianna

I have an XML file that I need to transform. For one reason for another the XML contains escaped HTML data in its fields (the users are using an app I can't edit to generate the XML). [CODE] <parent> <child>%3Cul%3E%3Cli%3EBoy+this+is+fun%21%3C%2Fli%3E%3C%2Ful%3E</child> </parent> [/CODE] I know the best solution is to recreate …

Software Development xml
Member Avatar for iceandrews
0
141
Member Avatar for vavazoom

Hey...I'm working on a Gaussian elimination problem...my pivot doesn't seem to work correctly...the logic must be wrong. Also, does anyone know why "INFINITY" comes up as some of my random numbers chosen? Thanks in advance for any help! :) [code] Matrix::Matrix():N(0) { //Empty Matrix by default } Matrix::Matrix(int n) { …

Software Development c++ ios
Member Avatar for mike_2000_17
0
733
Member Avatar for altf4

I have written a program that will generate a random maze and solve it. The program uses a multidimensional array of a class that holds bool values for each wall, whether or not to show an * for the path taken, and if it is a dead end. here is …

Software Development c++
Member Avatar for mrnutty
0
191
Member Avatar for aaronmk2

I understand that you are allocating memory for Stack, buy do not understand after :: and I thought that you only used :: when declaring classes not in the classes. [CODE] myTop= new Stack::Node(original.top());[/CODE] I can post the function class of the entire program if need be.

Software Development c++
Member Avatar for mrnutty
0
97
Member Avatar for timrichardson

I have a script where I want to use a message box for the occasional interactive question [code] # python 3.1 from tkinter import * from tkinter import ttk from tkinter import messagebox answer = messagebox.askyesno(message="Are you thinking of the " + "data " + "?" ,icon='question' ,title="My guess" [/code] …

Software Development gui python tkinter
Member Avatar for vegaseat
0
1K
Member Avatar for Vishwa Vijay

Hello there, I am able do run rmi over lan but when I want to access my rmi server from other system which is out of my lan network it doesnt work. My ip address what I check by ipconfig/all is locally assinged ip address and my ip address check …

Software Development java
Member Avatar for Vishwa Vijay
0
89
Member Avatar for jk_bscomp

hello everyone ,,,,i have recently installed a java version "1.4.2" in my terminal and i made it succcessfully but my problem now is how to compile a java sourcecode using the terminal..pls help me about this anyway,I am using a ubuntu flavor of linux Your help is very much appreciated.... …

Software Development java ubuntu
Member Avatar for stephen84s
0
266
Member Avatar for Garrett2011

take following class and two object definitions: [CODE=c++] class Rect{ public: enum centimeter; enum meter; Rect(double len,double wid,enum centimeter){ length=(len/100); width=(wid/100); } Rect(int len,int wid,enum meter){ length=len; width=wid; } //rest of implementation private: double length;//in meters double width;//in meters }; Rect obj1(10,5,Rect::centimeter()); Rect obj2(10,5,Rect::meter());[/CODE] two previous constructors have dummy enum …

Software Development c++ oop
Member Avatar for Garrett2011
0
2K
Member Avatar for Cap'nKirk

Hi, my app does not contain a web component but it does download images from the web into pictureboxes. I am trying to figure out how to code a progressbar on my app that would start when the form is loaded and increase gradually until all the pictureboxes have been …

Software Development
Member Avatar for Cap'nKirk
0
191
Member Avatar for bigaditya

HI why do we use get/ set to change properties? I mean instead of writing [CODE]class Point { double x, y; public Point(double x, double y) { this.x = x; this.y = y; } public double X { get { return x; } set { x = value; } } …

Software Development
Member Avatar for Lusiphur
0
843
Member Avatar for judithSampathwa

hi there, does anybody know how to create a user input message box in C# thanxxx

Software Development
Member Avatar for Duki
0
285
Member Avatar for Tommymac501

I'd like to post some code of an app I wrote to spit out large files, and sort them, and finally reassemble them. I'm new to Python, and the 'object' way in general. If you feel like it, would you please tell me how it should have been written 'properly'. …

Software Development app-store python
Member Avatar for Gribouillis
0
175
Member Avatar for ichigo_cool

Hi. I'm trying to make a two-dimensional array full of descriptions. As if they were map tiles for a text-based RPG. There's a point class that holds your coordinates and I use the Get_X and Get_Y functions to put into the map so it can read them. I'm just starting …

Software Development c++
Member Avatar for ichigo_cool
0
104
Member Avatar for rakesh07

[code]class count { public static void main(String args[]) { int a=0; int i; int l=0; int b=0; int c=0; for(i=1;i<=1000;i++) c=i/10; if(i%10==0) { l=l+1; } else if(c%10==0) { l=l+1; } System.out.println("no of zeros in this string is:"+l); }}[/code] this is my code...to calculate number of zero from 1 to 1000,,,,but …

Software Development java
Member Avatar for jon.kiparsky
0
111
Member Avatar for WargRider

I was testing out a networking script of mine, and it worked fine locally. It is basically a replica of a very bare bones multiplayer game network, where multiple clients connect to a master server, each client can say anything that it wants, and the server redirects that message to …

Software Development client-server java
Member Avatar for WargRider
0
2K
Member Avatar for Tommymac501

I have the statement [CODE]fn = sys.argv[1] [/CODE] catching the filename at the command line when the user starts my program. The problem comes when a user uses a path with a space in it such as; 'C:\Documents and Settings\user\My Documents'. The argument parser sees ''C:\Documents' as the first paramenter, …

Software Development python
Member Avatar for Tommymac501
0
141
Member Avatar for akvilio

Hi, I have a little problem. I need to write a function that will be given a number (with unknown number of digits) and it will search the number for similar neighboring digits. I must say that I'm not allowed to use arrays (unfortunately). I thought of disassembling the number …

Software Development c
Member Avatar for akvilio
0
120
Member Avatar for VBNick

Hullo. I made a small webserver just to flex my winsock muscle, but it only works for small files like html files. Once I have processed the request to get the path of the file, I send the result like this: [code] ifstream fin; fin.open(URL, ios_base::binary | ios_base::in); if (!fin.good() …

Software Development c++ ios web-browser web-server
Member Avatar for VBNick
0
177
Member Avatar for P00dle

[CODE]try { File realFile = new File(file); boolean rename = realFile.renameTo(new File("C:\\Dummy Files 2\\" + file)); if (rename) { System.out.println(file + " was moved succesfully"); boolean delete = realFile.delete(); if (delete) { System.out.println(realFile.getAbsolutePath() + " was deleted"); } else { System.out.println(realFile.getAbsolutePath() + " could not be deleted"); } } else …

Software Development file-system java
Member Avatar for P00dle
0
333
Member Avatar for judithSampathwa

Hi there, I have some questions regarding insert update and select queries in VS 2008. When writing select update and insert queries where should I write them. Is it in a class in visual studio or is it in the database as a stored procedure or something else. At the …

Software Development sql visual-studio
Member Avatar for Duki
0
130
Member Avatar for litlemaster

Hi Everyone, I was working with DataGridView tool in Visual Studio. I have managed to display data from my database in DataGridView. Now I have to Select some certain rows and store them in such a way, so that I can Use a loop on them and process each row …

Software Development visual-studio
Member Avatar for Duki
0
130
Member Avatar for mrnervios

I want to upload a text file to a access database, but the string does not work. I guess the problem is with the quote marks or something of the sort. The string is as follows: rs.Open "SELECT * FROM [" & Me.Text1.Text & "] ", objConnection, adOpenStatic, adLockOptimistic, adCmdText …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
189
Member Avatar for shweta102030

[CODE]Private Sub Command1_Click() Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Set cn = New ADODB.Connection Set rs = New ADODB.Recordset On Error GoTo myerror cn.Provider = "Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Main.mdb;Persist Security Info=true;Password=123456789" cn.CursorLocation = adUseClient cn.Open rs.Open "SELECT * FROM BA_Data", cn, adOpenKeyset, adLockOptimistic, 0 MsgBox "Total …

Software Development open-source visual-basic
Member Avatar for vb5prgrmr
0
212
Member Avatar for sabareesh

// find new size nNewArraySize = StrNewSizeForCharReplace(pszString, pszFindString, pszReplaceString); // nNewArry size is 1063 // alllocate memory pszTemp= (unsigned char*)malloc(nNewArraySize + 1); // add 1063 character in to pszTEmp // 1063 nLength = strlen(pszTEmp) // length is 1063 free(pszTemp); // Heap memory exception How can remove this exception

Software Development c++
Member Avatar for Ancient Dragon
0
133
Member Avatar for andrewktmeikle

Hi team, I'm having some issues getting the results of my query to output on a data grid. I'm using an sql query to get the data from access, which is working fine, but then I want to output it onto a datagrid. My code is as follows just for …

Software Development microsoft-access open-source vb.net
Member Avatar for andrewktmeikle
0
243
Member Avatar for kingofnothing

hi everybody i dont now whats wrong whith this code below when i run it debug show an error with con.open() [CODE]Dim con As New System.Data.SqlClient.SqlConnection con.ConnectionString = "Server=iraq\\sqlexpress ; Database=stats ; Trusted_Connection=True ;" Dim com As New System.Data.SqlClient.SqlCommand com.CommandText = "insert into users values('" & TextBox1.Text & "','" & …

Software Development vb.net
Member Avatar for Oxiegen
0
274
Member Avatar for Rickay

why doesn't this work? [CODE]int main() { fstream file; char output[100], pasword[100]; int a; const string x("Yes"); const string y("No"); string z; char b; cout << "\nEnter correct password to continue: \n" << endl; cin.getline(output, 15); if(output == "file.txt") { cout << "Change password? Type Yes or No. \n" << …

Software Development c++ cybersecurity
Member Avatar for Ancient Dragon
0
145

The End.