43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Roshan92

Dear all, I'm starting on C# now. I had a problem in tackling a question my lecturer asked me to do. Below is the GUI. [Click Here](http://i.share.pho.to/daa36a24_c.png) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 …

Software Development c c# c++ gui
Member Avatar for Fenrir()
0
262
Member Avatar for james.lu.75491856

import os import web ### Url mappings urls = [ '/', 'index', '/.*','notfound' ] for root, dirs, files in os.walk("C:/Users/James/Desktop/server"): for f in files: u = os.path.join(root,f) u=u.strip("/").strip("\\") ident=u.lstrip("C:/Users/James/Desktop/server").replace("/","slash").replace("\\","SLASH").replace(".","DOT") globals()[ident] = open(u,mode='rb').read() exec(""" class %(classname)s: def GET(self): global %(data)s return %(data)s """%{"classname":ident+"server","data":ident}, globals(), globals()) #create a class as if were …

Software Development os-x python session web-server
Member Avatar for james.lu.75491856
0
359
Member Avatar for zuki88

#include <iostream> #include <string> #include <stdlib.h> #include <winsock.h>//dont forget to add wsock32.lib to linker dependencies using namespace std; #define BUFFERSIZE 1024 void die_with_error(char *errorMessage); void die_with_wserror(char *errorMessage); int main(int argc, char *argv[]) { string request; string response; int resp_leng; char buffer[BUFFERSIZE]; struct sockaddr_in serveraddr; int sock; WSADATA wsaData; char *ipaddress …

Software Development c++
Member Avatar for zuki88
0
133
Member Avatar for kal_crazy

How can I figure out the time complexity of a program? The program is of the Travelling Salesman Problem. The aim was to implement the problem in two ways - Dynamic programming vs Simulated Annealing. Now I have to compare the two codes, find out which is faster and give …

Software Development java
Member Avatar for JamesCherrill
0
2K
Member Avatar for aplh_ucsc

This method read the Database and Returns the Username and Password. tblPassword has only one user name and a password. using (SqlConnection dataConnection = new SqlConnection("Data Source=isukoon-pc\\sqlexpress;Initial Catalog=AdsManager;Integrated Security=True")) using (SqlCommand dataCommand = new SqlCommand("select username from tblPassword", dataConnection)) using (SqlCommand data2Command = new SqlCommand("select password from tblPassword", dataConnection)) { …

Software Development c# open-source
Member Avatar for aplh_ucsc
0
240
Member Avatar for MasterHacker110

I program mainly in C++ but recently took up Java for its advantages. I heard about the mono project and that C# is now cross platform but that the GUI of C# is not. I like Java but I also like C#, Java has some anoying restrictions sometimes (like no …

Software Development apple c# gui unix
Member Avatar for sepp2k
0
259
Member Avatar for abhig

*Question: Create Student class as an abstract class in C++. Inherit GraduateStudent and PostGraduateStudent and ResearchStudent classes from Student class. Define proper constructors, destructors and functions related to attendance and examination result. Make necessary assumptions wherever required.* I am not the same guy who posted this http://www.daniweb.com/software-development/cpp/threads/464146/cpp-program , I just …

Software Development c++
Member Avatar for abhig
0
291
Member Avatar for sasikrishnasamy

Hi, I have a problem while reading a jsp file. I have a jsp file called scan.jsp. It is a very big file having 9000 lines. It has java script codes, some imported files etc. Unable to read all lines of data when I try the following code. public static …

Software Development java java-jsp
Member Avatar for sasikrishnasamy
0
261
Member Avatar for MeandJava

Hello everybody, I have some problems with my school assignment. I need to display a picture in a jlabel and i have already some code. Can someone give me some advice how i could get it to work. Thanks in advance. Greetz MeandJava [CODE]import java.awt.*; import java.io.*; import javax.swing.*; public …

Software Development image java java-swing
Member Avatar for Ranjana_1
0
4K
Member Avatar for phorce

I have two threads, and, I want one thread to run for 10 seconds, and then have this thread stop, whilst another thread executes and then the first thread starts up again; this process is repeated. So e.g. from threading import Thread import sys import time class Worker(Thread): Listened = …

Software Development python
Member Avatar for Gribouillis
0
11K
Member Avatar for Ann Krizette

can you help me code in VB6 a return command in returning the book that had been borrowed..tnx..need it asap. :(. a very simple code will do..

Software Development visual-basic
Member Avatar for Ann Krizette
0
276
Member Avatar for iTechnnn

This is my assaigment: Let's say that we can buy a candy from the vending machine for $1 each. Inside every candy is a coupon. We can redeem six coupons for one candy from the machine. This means that once you have started buying candy from the machine, you always …

Software Development java
Member Avatar for iTechnnn
0
170
Member Avatar for williampalme

I need some urgent help in the Python programming project. In this project I am implementing the file system which provides the capability to store and retrieve data on the virtual drive. The virtual drive is represented by an ordinary file on the computer. This will create the file on …

Software Development file-system python
Member Avatar for TrustyTony
0
290
Member Avatar for supriya badam

Wat is the size of string?does string have specific size..??as like integer... Float.. Double.. Char...??

Software Development c++
Member Avatar for irum.nageen.3
0
2K
Member Avatar for Madiya122

Hi all, I have just started to learn java. The trial code I have is showing errors at compiling. Here is the code. import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class ppp { public static void main(String args[]) throws FileNotFoundException { //Scanner Example - read file line by line in …

Software Development java
Member Avatar for Madiya122
0
509
Member Avatar for Subhradeep

I am using Debian Linux and Python 2.7 with PIL. I want to capture an image from a webcam and store it in a file. What are the ways in which this can be done? Also,I want to covert the captured image for modification using Scipy. What is the procedure.for …

Software Development debian python raspberry-pi webcam
Member Avatar for Gribouillis
0
2K
Member Avatar for NardCake

Right off the bat I will say this has absolutely nothing to do with Microsoft Visual Basic. Recently I've been practicing language design and development and I've written a few basic interpreters for calculator languages and such and I've decided for some more practice I want to write a basic …

Software Development visual-basic
Member Avatar for NardCake
0
185
Member Avatar for goo_1

What i'm trying to do is writing Program that print the number of newlines,words and characters in counted file by python I'm lost and i do not how should i do it? that what i got so far infilename = input("Enter the name of the file:") infile = open ( …

Software Development python
Member Avatar for vegaseat
0
328
Member Avatar for kiail

Hello, I have an issue I've been beating my head on a little. I have a list that I've made from an xml document and I'm trying to call that list and print it to console and run queries on it. So far nothing I've tried or searched and implemented …

Software Development
Member Avatar for JOSheaIV
0
177
Member Avatar for iFrolox

Hello, I'm trying to read a .xml or create the .xml if it doesn't exist or it cant find a node/child. This is what I have so far: bool XmlErr = false; if (File.Exists(XMLPath)) { try { XDocument xDoc = XDocument.Load(XMLPath); } catch { XmlErr = true; } if (XmlErr …

Software Development xml
Member Avatar for iFrolox
0
122
Member Avatar for nitish.mohiputlall

Here is the question: Write a program containing a function that takes has 2 integer parameters x and y and returns the value of x^2 + y^2. My codes: #include<stdio.h> #include<stdlib.h> int Myfun(int x,int y); int main() { int n,p,k,sum=0; printf("Enter 1st integer: "); scanf("%d", &n); printf("Enter 2nd integer: "); …

Software Development c c# c++
Member Avatar for robsonminag
0
151
Member Avatar for codemonster

I'm trying to overload the assignment operator. The objective is to copy two linked lists. I copy the first element fine, but for some reason the second loop around I encounter a null pointer and my loop ends on me. My brain is fried from over-studying and I can't think …

Software Development c++ linked-list
Member Avatar for irum.nageen.3
0
14K
Member Avatar for alina.nazchowdhury

I need to finish a program, i found it in a book but the for statement is now finised. I don't know to finish it, anybody can help me, please? Private Sub Form_Load() For i = 1 To Screen.FontCount - 1 Combo1.AddItem Screen.Fonts(i) Next For i = 5 To 300 …

Software Development visual-basic
Member Avatar for rishif2
0
217
Member Avatar for elie.karkafy
Member Avatar for oussama_1
0
514
Member Avatar for techxaidz

Hi! I am beginner in Java Programming and I am currently working with a program that randomly populate 14 buttons with a letter based on a given set of words and if the size of the word is less than the size of the button, it'll just populate it with …

Software Development java
Member Avatar for techxaidz
0
326
Member Avatar for mcoliver88

Hi I am creating a quiz of 10 questions, using a string array. When the user clicks on the next button the next question follows. How do i set it up that when the user comes towards the end of the array the previous button changes to finish. I know …

Software Development gui
Member Avatar for mcoliver88
0
256
Member Avatar for kalo150

this code have to print all the prime numbers from 1 to 100 but when i run it cmd crash #include <stdio.h> int main(){ int a,b,c,d; for(a = 0;a <= 100;a++){ d = 0; for(b = 0;b <= 100;b++){ c = a % b; if (c == 0) d++; if …

Software Development c
Member Avatar for Schol-R-LEA
0
102
Member Avatar for kirtee2209

Hi. I have an application in C#. When installing the msi, the user is requested to input some values and these are entered in registry under HKEY_LOCAL_MACHINE\SOFTWARE\MyFolder. When running the application, the value is read from the registry location and the application uses these values for processing. This works fine …

Software Development windows-vista-7-8
Member Avatar for Ketsuekiame
0
389
Member Avatar for drieran

Hi, I'm developing with a BeagleBoard Black (BBB) under Ubuntu using C. When the BBB is powered on I'm doing many time controlled tasks. My problem happens when NTP changes the clock and all my counters are not valid. Normally BBB starts with no date/time set, some seconds later (if …

Software Development c ubuntu
Member Avatar for drieran
0
246
Member Avatar for elie.karkafy

i have a txt file that is exported from an attendance software as follow : Date Time s1 s2 EmpiD IN\OUT 07-24-13 12:23:52 001 07 0000020009 0300000000 07-24-13 12:24:02 001 07 0000020010 0300000000 between the columns of this txt file different spaces for example between date and time 1 space …

Software Development vb.net
Member Avatar for oussama_1
0
352
Member Avatar for dancingdophie

So I'm writing an event-driven program. The program is supposed to calculate checks and deposits, but the calculation comes out completely wrong. For instance, if i type 500 for initial balance, click 'entering a transaction', type 1 for checks, and type the amount 50 for transaction amount, the remaining balance …

Software Development gui java java-swing
Member Avatar for javanoobcoder
0
272
Member Avatar for Suzie999

Trying to put inline functions in external file within project, and getting below errors. If I remove "__forceinline", then all is well. If I have the inline function in main cpp file and not in header, it is fine also. Is there a procedure to deal with this? file.h __forceinline …

Software Development c++
Member Avatar for Suzie999
0
1K
Member Avatar for H_beginner

I am trying to create a program which adds substracts two matrices. Using switch statements. I am not sure that I am making the correct function calls. I ve been struck on this for two days looking for some guidance. Please see below my code. I am trying to create …

Software Development c++
Member Avatar for rubberman
0
156
Member Avatar for H_beginner

I wanted to know if I can make the matrix size entered by the user dynamic. Currently I have fixed it as a 2*2 matrix. If I try making it a dynamic array it says the integer should be constant. #include<iostream> #include<iomanip> using namespace std; int input (); void output(int …

Software Development c++
0
84
Member Avatar for oussama_1

Hi I have access database with two tables With a Relationship i can insert records into the first table with no problems but when im trying to insert a record in the second table i got error message Error message : Syntax error in INSERT INTO statement. - Microsoft Office …

Member Avatar for oussama_1
0
6K
Member Avatar for krystosan

import sys from PyQt4 import QtGui, QtCore class Example(QtGui.QWidget): def __init__(self, items=None): super(Example, self).__init__() self.items = items or {'India':['New Delhi', 'Bangalore']} self.initUI() def initUI(self): self.combo = QtGui.QComboBox(self) self.cbBox = QtGui.QComboBox(self) self.combo.addItems(self.items.keys()) self.cbBox.addItems(self.items[str(self.combo.currentText())]) self.combo.move(50, 50) self.cbBox.move(50,80) self.combo.currentIndexChanged.connect(self.onActivated) self.setGeometry(300, 300, 300, 200) self.setWindowTitle('Learning by practice') self.show() def onActivated(self): self.cbBox.clear() self.cbBox.addItems(self.items[str(self.combo.currentText())]) def main(): …

Software Development python
Member Avatar for krystosan
0
283
Member Avatar for kyle.mace.35

Alright so I am trying to swap fstreams. I do not use c++11 so there is no swap function. Is there anyway I can swap the files 2 fstreams have open? Or is there a way to get the name of the file that the fstream has open?

Software Development c++
Member Avatar for kyle.mace.35
0
197
Member Avatar for RHNation

def main(): print('Welcome to the Fast Freight Shipping Company Calculator for Shipping Charges') print() #constants for the shipping prices weight_one <= 2 weight_two > 2 weight_three > 6 weight_four > 10 weight_one_rate = 1.10 weight_two_rate = 2.20 weight_three_rate = 3.70 weight_four_rate = 3.80 #get the weight of the package using …

Software Development python
Member Avatar for Lardmeister
0
4K
Member Avatar for mavtcr

Friends,I have made a programme where master datas are entered and updated in an Access database. In the database there are several Branches with three digit codes.Under each Branch comes several families with a unique number.I want to generate this uniqe number automatically.. To explain further BranchA with code 100,BranchB …

Software Development open-source visual-basic
Member Avatar for mavtcr
0
140
Member Avatar for ange1991

private void button4_Click(object sender, EventArgs e)//delete { conn.Open(); comm.Connection = conn; comm.CommandText = " DELETE FROM Table1 WHERE Fname =" + textBox1.Text + ""; dataGridView1.Update(); conn.Close(); } HERE AM UNABLE TU DELETE THE RECORD IN MY DB ..

Software Development c c# c++
Member Avatar for ange1991
0
122
Member Avatar for rwe0

I am not sure how to do this, please let me know your suggestions. I want to have my python program be able to read the site I visit with a browser (firefox) separately. An example of useage would be this: In the browser log into my account (credit card, …

Software Development python web-browser
Member Avatar for rwe0
0
242
Member Avatar for bright.silva

@Gribouillis and other gurus in the house, i just did this code but seem i ssem to be having difficulties in modifying it to work the way i want it.Its a bit lenghty, pls pardon me because am still a beginner in python.This program prints out where a particular property …

Software Development python
Member Avatar for bright.silva
0
153
Member Avatar for RaigaX9

Hello everyone, I'm having some issues with my rock, paper, scissors JApplet program. Of course I have it "extends Applets" from the beginning of my class and I realized that this wasn't the same as JApplet. After I changed "Applet" to "JApplet", when I ran it, it doesn't look like …

Software Development java java-swing
Member Avatar for mic0280
0
577
Member Avatar for chanchalrawat

I am writing a code of the consumer producer problem in python , so far I am almost ready but my code still not running.. Would you help me in any way to finish it, I am new in python and am not sure what I do wrong, any help …

Software Development python
Member Avatar for Gribouillis
0
357
Member Avatar for kyle.mace.35

Okay so I am working on an external polyphase sort/merge and I am using peek to look at the next value in a file, there is just one problem. My peek gives me the wrong number, but if i just read the value it gives me the right value. What …

Software Development c++
Member Avatar for mike_2000_17
0
293
Member Avatar for Trekker182

Hello all, I'm trying to read in a group of letters each on a new line and have the user guess them depending on how many games they want to play. My program works fine but I've noticed while testing it that for any more attemps, fscanf just keeps the …

Software Development c file-system
Member Avatar for Ancient Dragon
0
159
Member Avatar for samuel terngu

My UPDATE vb.net code below displays this error message:conversion from string "UPDATE tblstaff SET fName='name' " to type 'integer' is not valid.Microsoft.visualBasic conn.Open() If conn.State = ConnectionState.Open Then com = New OleDb.OleDbCommand("SELECT *FROM tblstaff ") com.Connection = conn Dim cb As New OleDb.OleDbCommandBuilder(da) da.Fill(ds, "Eeestaffinfo") Dim sql As String = …

Software Development open-source vb.net
Member Avatar for samuel terngu
0
853
Member Avatar for mcoliver88

HI I have created a button called "start" , when the user clicks on it the buttons name changes to "reset". How can i write an if statment to say if the user clicks on the button = "reset" then do this. if (button = to "reset" and clicked) { …

Software Development
Member Avatar for mcoliver88
0
111
Member Avatar for Paraborn

Hey guys, I'm new to this website as well as Python and well, programming in general. Anyway, I would like some feedback on this program I wrote, its purpose is to take a credit card number, which the user inputs and determine whether it is a valid or invalid credit …

Software Development python
Member Avatar for woooee
0
243
Member Avatar for nitish.mohiputlall

Here is the question: Write a function which accepts an integer N and returns the sum of first N numbers. and here are my codes: #include<stdio.h> #include<stdlib.h> int Myfun(int x); int main() { int a, sum; printf("Enter an integer: "); scanf("%d", &a); printf("sum is %d\n", sum); system("pause"); return (1); } …

Software Development c
Member Avatar for Ancient Dragon
0
125

The End.