43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Phenol

I am a Python (2.75) neophyte and need to reformat a large data file. A sample is below: P1 01 01 1991 100.00 P1 01 01 1992 111.30 P1 01 01 1993 97.58 I1 01 01 1991 0.0 I1 01 01 1992 20.0 I1 01 01 1993 32.4 I need …

Software Development python
Member Avatar for rlvaugh
0
159
Member Avatar for krystosan

why this works `> varhelp = __import__("sys")` and this doesn't`> varhelp = __import__("sys.path")` the second one throws: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named path then how to achieve the second one?

Software Development python
Member Avatar for woooee
0
188
Member Avatar for renagadejesus

My teacher is asking this of me, and I am just not following how to do this. All distance learning and not a lot of assistance. any help would be amazing. "For this assignment, you will create a program that records information for a book sale. You will use parallel …

Software Development c++
Member Avatar for Moschops
0
269
Member Avatar for krystosan

I am trying to load the help on each method into a QTextEdit in PyQt4 how can I have this variable hold help on a method, example: `data = os.system('python -c "import sys; help(sys.path)"')` but data value contains `0`

Software Development operating-system python
Member Avatar for krystosan
0
371
Member Avatar for ryanpalma0794
Member Avatar for talat.zaitoun

def matrix(mat, num): for i in mat: for j in i: print(j * num) So I'm trying to make a code that multiplies a matrix by a number, my code above is not working and i think the reason is the for statements could be wrong, so what i tried …

Software Development python
Member Avatar for Schol-R-LEA
0
166
Member Avatar for cambalinho

is there any function(API or something) for get 1ms of precision? i have 1 timer, but i only get 10ms of max.

Software Development api c++
Member Avatar for cambalinho
0
419
Member Avatar for robert.knighton.79

I'm trying to take input keypress event and move the text it would have typed into a textbox to a different textbox instead. textBox1 has a length limit of 1 so I dont actually have to prevent text going into the box because the textbox is already full I just …

Software Development vb.net
Member Avatar for robert.knighton.79
0
3K
Member Avatar for praom2104

Hello, I am trying to execute a jar file with higher version of jdk. But it fails & the worst part is I am not getting any error message. Jar file compiled verison: jdk 1.5 Executed version: jdk 1.7 I assume the jar file is downward compatible. thoughts pls? Thanks! …

Software Development java
Member Avatar for praom2104
0
279
Member Avatar for Violet_82

Hi all, I wonder if you can help me with this. I am looking at a fairly long (well at least for me) java program, about 700 lines. Basically it's a very very basic simulation of an ATM that can run on a computer. Now, in all the classes I …

Software Development java
Member Avatar for Violet_82
0
167
Member Avatar for mavtcr

Friends , I am new to VB.NET I know something about VisualBasics 6 Ther we have a DataManager to create new database and tables. In VB.NET Is ther any facility to create new database and tables,If so how to use it?If there is no such facility how can we make …

Software Development vb.net
Member Avatar for Reverend Jim
0
269
Member Avatar for Deegirl

Good morning community, Can someone help me with the IndexOf method to reverse the name: Don Paul to Paul, D

Software Development vb.net
Member Avatar for Deegirl
0
272
Member Avatar for robert.knighton.79

I have a form with 30 textboxes which I want to function as if they are only 1 textbox. # **Why Do this instead of substring the string from a single textbox?** # I have them separated for user friendly appearance purposes. Each box is paired with a checkbox so …

Software Development vb.net
Member Avatar for robert.knighton.79
0
215
Member Avatar for 9tontruck

In C++, extern "C" { __declspec(dllexport) int test(char* data); } __declspec(dllexport) int test(char* data) { string str = "wassup"; strcpy(data, str.c_str()); return 1; } In C# [DllImport(dll, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] static extern int test(StringBuilder faceData); static public void testDll() { try { StringBuilder ASMData = new StringBuilder(500); …

Software Development
Member Avatar for 9tontruck
0
6K
Member Avatar for murali2489

Hi Team, I have been trying to understand the concept of RMI by writing a simple classes for 1. RMIInterface 2. RMIServer 3. RMI Client I have written three classes in eclipse and started RMIRegistry by running start rmiregistry command. When i tried to compile RMI server class im getting …

Software Development java
Member Avatar for JamesCherrill
0
409
Member Avatar for Waseemaburakia

I NEED HELP! (please and thank you). I have an assignmet for extra points. I'm lost. Out profesor is not explaining anything and the assignments are NOT what we covered so far (which isn't much). I could use any help I can get. I've been trying to google it and …

Software Development python
Member Avatar for ZZucker
0
281
Member Avatar for Mistyz

I've been assig to do the class rectangle, the class has two instance variables: length and width of the rectangle, and the methods methods setLength(), getLength(), setWidth(), getWidth() and computeArea(). Do you have any idea to do this. Anyway i'm to to python.

Software Development python
Member Avatar for ZZucker
0
544
Member Avatar for chdboy

I have a String which has been splitted like this String companyinforstring ="Company name.:Company profile no 1.:Company profile no 2.:Company profile no3.:---------------------------------------------------------------:Company address, :Street number, :Area,Area no2, :City. "; for (String retval: companyinforstring.split(":")) { System.out.println(retval); graphics.drawString(retval.toUpperCase(), 250, 200); } The Problem is that String which has been splitted, overlaping each …

Software Development java
Member Avatar for chdboy
0
199
Member Avatar for G_Waddell

Greetings People of Daniweb! I'm trying to add a 3rd party control to a form and I'm getting the following message: **Unable to cast object of type 'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.SyntheticConfigSettings' to type 'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.ContainerModel.ITypeRegistrationsProvider' ** Does anyone have any idea why this could happen? Any searches I tried on google brings back nothing …

Software Development vb.net
Member Avatar for G_Waddell
0
210
Member Avatar for KushMishra

Hi All, I am working on a page that creates a dynamic MySql query with the selected fields at the run time and for this I want to take a combobox with few checkboxes so that based on their selection I can fetch the query result and populate them into …

Software Development asp.net c c# c++
Member Avatar for KushMishra
1
8K
Member Avatar for robert.knighton.79

I tried using a solution to a very similar question here but it doesnt work for large files like the one I'm using. http://www.daniweb.com/software-development/vbnet/threads/320160/visual-basic-reading-text-file-into-array The code from that question: Dim OpenAnswerFile As New OpenFileDialog Dim strFileName() As String '// String Array. Dim tempStr As String = "" '// temp String …

Software Development file-system vb.net visual-basic
Member Avatar for Reverend Jim
0
4K
Member Avatar for John_47

Hello, i'm currently trying to write some code to find the integral of exp(-x*x). I have been given code for one trapezium rule (trap0) which is imperfect, and a second set of code for a new trapezium rule (trap1), which uses the old code and some new conditions to 'perfect' …

Software Development python
Member Avatar for John_47
0
218
Member Avatar for twigan1015

I have 7 textbox entries and I would like to add them to a listbox and when I close my application it would save them, I have the code for the 7 texboxes and everything like that has been done, but I just dont know how to add multiple textboxs …

Software Development vb.net
Member Avatar for tdeath
0
2K
Member Avatar for limesight18

[CODE]dim H, M, S, AMPM as strings DTPicker1.Hour = H DTPicker1.Minute = M DTPicker1.Second = S DTPicker1.?????? = AMPM [/CODE] im having a problem on how i can change the DTpickers AM/PM in codes im trying to load a time from a database to DTPicker, ive Split the (field loaded …

Software Development visual-basic
Member Avatar for ricardo.driju
0
1K
Member Avatar for loemnk

hello there. in order to gain experience I started a small python project. it is an more or less simple, collaborative address book (Snow Leo and Python 2.6.1). the final step is to create a standalone programm. to create the address book I used PyQt4 and MySQLdb. since py2app chokes …

Software Development gui mysql python
Member Avatar for vegaseat
0
5K
Member Avatar for chdboy

I'm not able to get the printout. here is the code public class Billing extends Frame implements ActionListener,Printable { JButton printbtn = new JButton("Print"); } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if (pageIndex > 0) { return NO_SUCH_PAGE; } // User (0,0) is typically outside …

Software Development java
Member Avatar for JamesCherrill
0
306
Member Avatar for mrinsult2000

I have an issue with some code im writing. I have a Datagridview object that always has two columns, but could have any amount of rows depending on many different scenarios. I would like to be able to take the values from the DatagridView and put them into an array, …

Software Development xml
Member Avatar for Richardlee32
0
5K
Member Avatar for jalmeida

I' sorry but i need some help, i cant find the error. I want to add a new record to the database (access 2010), but although the dataset is updated, the added information does not save do DB. THe code bellow is the code that i run when press the …

Software Development dataset vb.net
Member Avatar for jalmeida
0
395
Member Avatar for </scorpion>

how to get only the edited row and save the date as modified date? i have 6 fields in sql server: dtl_id = int cost = decimal startdate = datetime enddate = datetime status = varchar modified_date = datetime (modified_date is declare in sql as getdate) . this is my …

Software Development
Member Avatar for </scorpion>
0
576
Member Avatar for can-mohan

Hi All, I have doubt in my mind regarding declaration of cin and cout object . As per my understanding cin and cout both object are accessible in main then they shouldn't have protected.in below code snippet i have overloaded both input and output operator and while giving new name …

Software Development c++
Member Avatar for can-mohan
0
463
Member Avatar for Neon Tetras

I want to execute WordPad using the code below. It runs fine on my pc. But failed to run on other pcs. String program = "C:\\Program Files\\Windows NT\\Accessories\\wordpad"; String file = "srcFiles\\Resources\\readme.rtf"; //This is the path to the file i want to open with wordpad. Runtime load = Runtime.getRuntime();; try{ …

Software Development java
Member Avatar for djslavens
0
195
Member Avatar for glao

Hello , I am trying to solve some problems from the "Computer Simulation Methods" book. It says > > Write a class that solves the nuclear decay problem.Input the decay constant l from the control window.For l=1 and dt=0.01 ,compute the difference between the analytical result and the result of …

Software Development algorithm c++
Member Avatar for glao
0
656
Member Avatar for jantrancero

So i made a script and it works fine but it could be better. The code will be written below, the purpose of the script is to make a beep sound when the timer runs out (that works) but i also want to show on the screen how many hours …

Software Development python
Member Avatar for CaptainFApin
0
2K
Member Avatar for Triryche

I know I have a fundamental problem, I do not fully understand List objects. Based on a user input from a list box I want to creat a different list named `icons`. I previously had issues with the `switch` function, seemed I was doing it at the class level, so …

Software Development
Member Avatar for Triryche
0
267
Member Avatar for HiHe
Member Avatar for vegaseat
0
684
Member Avatar for Tayler_1

f = open("program0.4.txt", "w") done = input('Enter done for last name when finished') Last_Name = input("Enter Last Name: ") while Last_Name != 'done': First_Name = input("Enter First Name: ") Hrs_Wrkd =int(input("Enter Hours Worked: ")) Hrly_Wge = int(input("Enter Hourly Wage: ")) f.write('Last Name' + ' ' + 'First Name' + ' …

Software Development python
Member Avatar for Tayler_1
0
1K
Member Avatar for Triryche

I'm adding sound to a simple matching game. I have a sound for a flipping a card, a match, and no match. The problem I am having is when 2 cards are match, the flip and match sounds play simultaneous. So I tried calling Sleep at line 146, which gives …

Software Development perl
Member Avatar for Triryche
0
328
Member Avatar for jvasher

Sometime crashes, sometimes blank text, and sometimes works. I'm passing (I hope) a reference to TextDisplay::update() so It can draw all the text in keyBindMenu which is a vector of std::strings. I'm not sure if I'm handling this correctly. My understanding of this is very weak, but I think I …

Software Development c++
Member Avatar for jvasher
0
142
Member Avatar for DarkLightning7

I'm attempting to write a substitution function but am having trouble figuring out how to fix the Error: operator and operand don't agree [circularity] operator domain: ''Z list * ''Z list * ''Z list operand: ''Z list * ''Z list * ''Z in expression: sub2 (x,y,hd z) Code: fun sub2(x, …

Software Development
Member Avatar for DarkLightning7
0
1K
Member Avatar for refphlex

The second loop after opening the file again the second calculation for count isn't coming out correctly it seems to be doubled, comes out double the normal value when it shouldn't someone help please! #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cmath> using namespace std; int main () …

Software Development c++
Member Avatar for refphlex
0
167
Member Avatar for ChicagoBears2012_1

I have a function that has takes in a string "secret" sec = set(secret) print sec output: set(['A', 'C', 'E', 'I', 'H', 'M', 'S', 'T']) Assuming I called the function sending in the string "Mathematics", how do I get an ordered set. I'm looking to get unique characters in the …

Software Development mathematics python
Member Avatar for snippsat
0
270
Member Avatar for Deegirl

Good morning, Can someone help me code this part of my assignment, it's been 24 hrs trying to do this. Place student names and final mark into two, one- dimensional arrays. One array will be of String (for names), the other will be an array for real numbers (for marks) …

Software Development vb.net
Member Avatar for Deegirl
0
248
Member Avatar for Ihteshamullhaq

i wantto builda GPA in C# and want to a condtion which chek the value from user input. chek it if it is greater then 70 show A GRADE greater then 50 show B GRADE like and print it and also set is this char type value to switch and …

Software Development programming-construct
Member Avatar for Ihteshamullhaq
0
182
Member Avatar for furalise

Hi What is the difference between using the **fstream** library to read a file....and using something like a procedure below using the FILE* object? There seems to be two ways to read a file? Thanks /* FEOF example */ #include <stdio.h> int main() { FILE * pFile; char buffer [100]; …

Software Development c++ file-system
Member Avatar for furalise
0
845
Member Avatar for andrew mendonca

Here is the website for the assignment I am working on: http://view.samurajdata.se/rsc/5c1dd0b4/ Here is the website for my header file (MixedExpression.h): http://ideone.com/G9aC9D Here is the website for my library source file (MixedExpression.cpp): http://ideone.com/PfH8f0 Here is the website for my calculator client file (Calculator.cpp): http://ideone.com/4wGayu Here are the input lines: ( …

Software Development c++
Member Avatar for Banfa
0
215
Member Avatar for wrathness

Good afternoon everyone. I made a project using Florian Leitner-Fischer's usb library. I can send data to the bus 100%, but when i read i get the recieve frame and then my application hangs for some reason. When i uncomment out "MsgBox(content)" in the event catcher, the program no longer …

Software Development vb.net
Member Avatar for wrathness
0
232
Member Avatar for KushMishra

Hi All, I am creating a dynamic GroupBox through C# and want to change only the header font and not all the fonts in that. GroupBox myGroupBox = new GroupBox(); myGroupBox.Header = mychk.Content.ToString(); myGroupBox.Content = myStack; Here, *myGroupBox.FontWeight* changes all the contents inside the *myGroupBox* but how to change only …

Software Development asp.net c#
Member Avatar for KushMishra
1
2K
Member Avatar for MrHardRock

Hey guys I had an assignment to recursively write the Towers of Hanoi then test it. I did not have too much of an issue getting the program written But I am not sure what the book means by test the efficiency do they want the number of moves my …

Software Development java
Member Avatar for stultuske
0
905
Member Avatar for iTechnnn

Hello, im having problem with my output =/ Everytime i run my program is not giving me the right output so, this is my assaigment. Consider a class that keeps track of the sales of an item. An object of this class will have the attributes: Number Sold Total Sales …

Software Development java
Member Avatar for stultuske
0
2K
Member Avatar for great_learner

Hi guys, I am completely new to objective c. I am trying to compile a very basic program of "hello world", but the problem is that gcc compiler can't figure out where my header files are. I wrote on cygwin bash shell: [CODE =c]$ gcc -lobjc hello.m -o hello[/CODE] and …

Software Development file-system objective-c
Member Avatar for spark_1
0
247

The End.