43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for mukthyar1255

Hi I am new to python programming,please explain me how to install external modules written by other python users,please mention names of such modules.. Thanks Mukthyar

Software Development python
Member Avatar for Gribouillis
0
84
Member Avatar for niths

hi all, In my page i need to get the system ip address. i used this code. [CODE] string myHost = System.Net.Dns.GetHostName(); string myIP = System.Net.Dns.GetHostByName(myHost).AddressList[0].ToString();[/CODE] this is working fine when i run application in local system. Now i hosted that application in server say(10.20.7.63). so now when i access …

Software Development dns
Member Avatar for zmeditation1
0
211
Member Avatar for bmanzana

when i run this code an icon for the image is created but when clicked it says that no preview is availeble any help would be grately apretiated. heres the code. [CODE]from Image import * import ImageDraw z=1 win=new('RGB', (400,400), 'rgb(255,255,255)') win.save('c:\\Documents and Settings\\bradley\\desktop\\python programs\\frac.png') while z < 100000: x=(z**+1) …

Software Development python
Member Avatar for bmanzana
0
119
Member Avatar for vedro-compota

Hi ,programmers! Please tell me why it's possible to use such condition - [CODE][U]if (!fork ( ))[/U] return 1;[/CODE] as I know the fork() returns pid_t-type but at the same time "if" needs boolean.. big thanks in advance)

Software Development c
Member Avatar for vedro-compota
0
176
Member Avatar for yoni0505

Hi I have a problem with a code I made, some save editor for some game. The code suppose to write 2 bytes to a specific offset in some file. The file's short integers are saved as little endian. everything works fine, but when one of the integers equal 10, …

Software Development c++ ios
Member Avatar for yoni0505
0
207
Member Avatar for sumeetdesaeee

Hi.. I have a query regarding accessibility of top level class from member inner class. I have just read the reason why local or anonymous inner classes can access only final variables.The reason being JVM handles these two classes as entirely different classes and so, if value of variable in …

Software Development java
Member Avatar for sumeetdesaeee
0
139
Member Avatar for amalwit

[CODE]class A{ void method(){ System.out.println("Hello world"); } } class B{ void myMethod(){ A.method(); } }[/CODE] Can anyone tell me why I am getting this error.( non-static method method() cannot be referenced from a static context).Reffering context is not static.:?:

Software Development java
Member Avatar for amalwit
0
228
Member Avatar for djjavo

Hi Am new to this and was wondering if anyone knew a solution to this problem. I am wanting to get information from a text file into different arrays. My current text file has a new line for each driver but I would like it to look something like this: …

Software Development file-system vb.net
Member Avatar for djjavo
0
251
Member Avatar for Mike_11

Hi. I'm trying to make a simple question program, my first question doesn't work (if you enter the wrong answer/an answer that isn't an integer, you get stuck in an infinite loop). However, my second question works fine even though the code is quite similar. Sorry if I'm being a …

Software Development c++
Member Avatar for AKMafia001
0
407
Member Avatar for tunlinaung

It is OK, if you write like this below : [CODE] delegate void mydelegate(); public class testing { mydelegate d1; string str ; public void btnStart_Click(object sender, EventArgs e) // Click Event { ThreadStart ts = new ThreadStart(StartServer); Thread t = new Thread(ts); t.Start(); } public void StartServer() { str …

Software Development
Member Avatar for tunlinaung
0
293
Member Avatar for stevanity

I have just started out with Java. I have been programing with C and C++ for some years now. I have this problem. Im not able to call a non static method belonging to the main class from the static main method. This is the code: [CODE]public class Helloworld { …

Software Development java
Member Avatar for masijade
0
28K
Member Avatar for goldenpete

Hi, I am having an issue with OpenCV version 2.1, 2.0 on windows VS2008. I am attempting to open an uncompressed .avi video to grab frames from it. The VideoCapture class works to capture from an attached camera, and it compiles, making me think it is not a location/missing file …

Software Development c++
Member Avatar for beano69
0
542
Member Avatar for masterofpuppets

Hey guys, Here's the problem I have: I am writing a server application in Java using the ServerSocket and Socket classes. I have an instance of ServerSocket which listens for connection and accepts them. The server runs a website that requires users to log in using an e-mail and a …

Member Avatar for masterofpuppets
0
1K
Member Avatar for nocloud

I have a custom date class that is constructed in the following way: [CODE] date date_file("dates.txt"); [/CODE] I want to put this object into a new class as a private member, e.g [CODE] //the mem_data class======================================// class mem_data { public: mem_data(int,int,std::string); ~mem_data(); private: std::vector<reader> mem_store; int complete; date date_file; }; …

Software Development c c# c++
Member Avatar for mike_2000_17
0
278
Member Avatar for drax12

Hey guys, I'm want to retrieve results from the database, where datetime picker given value, is equal to database value. var _check = (from day in Check.tbl_employees where day.d_from== _frm && day.d_to == _to select new { day.desg_id, }).FirstOrDefault(); datetime picker gives a value with its time,but i'm only interested …

Software Development asp.net
Member Avatar for drax12
0
714
Member Avatar for Zaffron

Obviously, it doesn't work. So what I'm trying to do (this is all very rough at the moment, merely an experiment/test to see if I can get it to work) is have a method under the player class that, when called, takes the value of the requested item, sees if …

Software Development apple python
Member Avatar for Zaffron
0
113
Member Avatar for MasterBerd

Hey Guys! Below is my code of Battleship game. I keep getting "Process terminated due to StackOverflowException." error. It keeps pointing to [CODE] char[,] Grid = new char[10, 10]; [/CODE] and i have no idea what it's asking to fix. Please help me. Thanks! [CODE] using System; using System.Collections.Generic; using …

Software Development c c# c++
Member Avatar for MasterBerd
0
1K
Member Avatar for maikens

Hi, I am having a problem with an assignment for a C++ course. I have to make a Game of Life simulator (predator and prey). There are two organisms, lion and ant, and the lions eat the ants. My problem is that for some reason I can't fathom, the lions …

Software Development c++
Member Avatar for daianahoney
0
319
Member Avatar for WolfShield

So, I am working with some code I don't understand. Here is the file: [CODE=Python] import sys import os def change_ext(directory, old_ext, new_ext): for f in os.listdir(sys.argv[1]): base, ext = os.path.splitext(f) if ext[1:] == sys.argv[2]: os.rename(f, "%s.%s" % (base, sys.argv[3])) if __name__ == '__main__': if len(sys.argv) < 4: print "usage: …

Software Development python
Member Avatar for WolfShield
0
430
Member Avatar for annetria

I'm receiving the following errors when trying to read from a file: java.io.FileNotFoundException: rates.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.util.Scanner.<init>(Scanner.java:636) at MortgageCalculator4.submitButtonActionPerformed(MortgageCalculator4.java:187) at MortgageCalculator4.access$000(MortgageCalculator4.java:20) at MortgageCalculator4$1.actionPerformed(MortgageCalculator4.java:70) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) …

Member Avatar for annetria
0
136
Member Avatar for bibiki

hey there again, I am trying to build a small mechanism that lets me store product names and prices on a produktet.txt file. the file should hold lines as follows: product1 price1 product2 price2 . . productN priceN So, I built a small panel with three rows and one column. …

Software Development java java-swing
Member Avatar for bibiki
0
146
Member Avatar for Warl30ck

OK so I'm trying to parse simple URL's from a whole char chunk using strtok but always keeps giving me an unhandled exception error . SO here is all the code in C++ : [CODE] char* str = "(%/\%)google.com(%/\%)hotmail.com(%/\%)nananna.org(%/\%)" char *url[]; while(str != NULL){ url[0] = strtok(str, "(%/\%)"); if (DownloadFile_1(url[0],szPath) …

Software Development c++
Member Avatar for Narue
0
317
Member Avatar for WildBamaBoy

Right now I only need to be able to send a 100kb JPEG photo. I tried Google and found a couple of things but their code only threw exceptions so maybe what they've done is not appropriate in my situation. This is an attempt at a remote screen viewer. If …

Software Development
Member Avatar for oredigger
0
186
Member Avatar for reza.adinata

Hi, I am new in C, trying to create a simple C file, that assign a value for a struct member with the type of string. I can't figure out why it said error : string.c:20: error: expected expression before ‘{’ token, but I don't find any syntax error.. [CODE] …

Software Development c
Member Avatar for reza.adinata
0
220
Member Avatar for ayagi

hi, i have a problem. As i need to export my report to PDF. In Crystal Report Viewer the Alignment are perfect.. But when i export into PDF the Alignment changed entirely.. In the Report im using all the Controls ( Text,Line,Box). Thanks in Advance.. thanks in advance

Software Development pdf vb.net
Member Avatar for mnjogin
-1
109
Member Avatar for vedro-compota

hi programmers!) Please help me understand this - as I understand from practice - the getting SIGALRM by process is ends the process - but I can't find the explanation of this guess. for exp. - I have code - [CODE]int main(void) { /* Установить будильник */ sleep(1); if((alarm(5)) > …

Software Development c
Member Avatar for vedro-compota
0
114
Member Avatar for danielgr

Hi, When I view images on my development PC they look fine, but when I view them on other PC's, the images are sized differently and often get cut off. I've tested this on multiple PC's and the images always get cut off. I've attached the images from my PC …

Software Development display image vb.net
Member Avatar for danielgr
0
209
Member Avatar for ayagi

i need to update my data using stored procedure here is my code : [CODE] Try con = getconnect() con.Open() sqlcmd = con.CreateCommand sqlcmd.CommandText = "Select * from EmployeeProfile where EmployeeID = '" & txtEmpID.Text & "'" daemployee.SelectCommand = cmdemployee1 daemployee.Fill(dsemployee, "EmployeeProfile") If dsemployee.Tables(0).Rows.Count <> 0 Then txtEmpID.Text = dsemployee.Tables(0).Rows(0).Item("EmployeeID") …

Software Development vb.net
Member Avatar for ayagi
0
316
Member Avatar for DaMoose75

I have a problem with this simple Win32 application I am trying to make. As you can tell by the title, the function CreateWindow() always returns 0, which indicates failure. Here is my code. [CODE] int MessageLoop() { MSG msg; ZeroMemory(&msg, sizeof(MSG)); while (GetMessage(&msg, 0, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); …

Software Development c++
Member Avatar for DaMoose75
0
3K
Member Avatar for epicbeast9022

Hello, I cannot read a file, config.cfg, in the current directory on MacOS X 10.6. I'm running a console app. Can anybody tell me what I'm doing wrong? (By the way the getline() function returns no string.) [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, …

Software Development c++ macos
Member Avatar for epicbeast9022
0
382
Member Avatar for LogicallyInsane

So after pretty much giving up on programming (I think I should say that I kinda forgot about it actually) and not checking Daniweb, I decided after a few months of doing other things I'd come back to Daniweb and start trying to program once again. After skimming through "Learn …

Software Development python
Member Avatar for LogicallyInsane
0
86
Member Avatar for b0tz

[CODE] String ip = "www.google.ro"; String pingResult = ""; String pingCmd = "ping " + ip + " -c 4"; String s; try { Process p = Runtime.getRuntime().exec(pingCmd); BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); // read the output from the command System.out.println("Rezultat ping:\n"); for …

Software Development java
Member Avatar for b0tz
0
224
Member Avatar for element432

Im trying to do a exercise in one of my books and it wants me to use a function to get the factorial of a number entered by the user. Ive tried several different ways and they either get me numbers that make no sense or say if I entered …

Software Development c++
Member Avatar for element432
0
128
Member Avatar for autorunman22

im a newbie and im learning java just week ago. I wonder how i cant make the ball bounce in one axis only (the X axis) im not good in logic:( and i want that logic to be in one event. [code]if(x<0){ ++x;//go right }else if(x>500) {--x;//go left } [/code] …

Software Development algorithm java
Member Avatar for autorunman22
0
164
Member Avatar for niranga

Hi All, Is it possible to bind an array or a Vector with a event listener? For an example if we add an element to the Vector or remove from the Vector, can I use an event listener to track the changes? Thanks a lot in advance. Cheers..!!

Software Development java
Member Avatar for niranga
0
998
Member Avatar for galhajaj

Hello, i have a little dificulties in the area of object-oriented programming i guess... i am making a chess-like game i created the classes "board" and "square" (the square inherit from picturebox) now - in the constructor of the board i create 8X8 squares inside it all the program is …

Software Development
Member Avatar for galhajaj
0
217
Member Avatar for pseudorandom21

Sooo... Every DLL injection result I've read so far only uses a pre-made DLL, loads it into another process and says "darn I'm good." They do absolutely NOTHING useful and a couple of them are rip-offs of one another only using a different programming language. Google has failed me! Once …

Software Development c++
Member Avatar for pseudorandom21
0
188
Member Avatar for Derek Elensar

This is my final project for my C++ class online. I was instructed to make a test and to pull answers from withing a .txt file and compare them to the answer that the user inputs. I'm sure there's a much easier wau of doing things than the way I'm …

Software Development c++ ios
Member Avatar for Derek Elensar
0
230
Member Avatar for kutuup

Hi all, I'm trying to build a program in visual studio 2008, when I build in debug mode, it runs just fine, but if I try to build in release mode, there are no errors but when the program runs I get this error: The program can't start because MSVCR90D.dll …

Software Development c++ visual-studio
Member Avatar for kutuup
0
497
Member Avatar for Drau

im trying to convert double to string with this code: if its a number like 3.7345 than its working - but if its 5.0 (only zeros after the point) [CODE] double number=5.0; string ToString; stringstream out; out << number; ToString = out.str(); return ToString;[/CODE] it returns - 5 and i …

Software Development c++
Member Avatar for Drau
0
154
Member Avatar for kutuup

I'm trying to read integers in a .txt file into a 2 dimensional array (map). Here is the function: [CODE] void loadmap(int mapnum) { int x; ifstream inFile; inFile.open("level1.txt"); if (!inFile) { cout << "Unable to open file"; //exit(1); // terminate with error } for(int countline = 0; countline <= …

Software Development c++ file-system
Member Avatar for kutuup
0
349
Member Avatar for Muhammad Anas

I just found a question whose statement is as follows: [COLOR="Green"]Write a function contains(const char*, char) which returns the pointer to the first (left-most) occurrence of the 2nd parameter char in the 1st parameter cstring, or NULL if the cstring doesn't contain the char. [/COLOR] Another condition is that inside …

Software Development c++
Member Avatar for Muhammad Anas
0
266
Member Avatar for leegeorg07

Hi I was wondering if there has ever been/ are plans to be a python os and if it exists where could it be found? secondly i was wondering if python could be installed on windows mobile or android?

Software Development android python
Member Avatar for SamarthWiz
0
167
Member Avatar for e-papa

HI guys, I want to create and encryption system that converts a character to encrypted data, I'm thinking about using the ord() and chr() functions in python then slice the sting into characters implement the encryption on each character and bring them back together what do you think, Is there …

Software Development encryption python
Member Avatar for vidur
0
207
Member Avatar for joao cruz

hi everybody, i'm a student and i'm sick of going around this. lol i have to make a game of tic tac toe, and i did everything, and everything is working fine exept this. this is a method to see if there is a victory in a line, it does …

Software Development java
Member Avatar for joao cruz
0
98
Member Avatar for zpzp16

hi I have a list like L=[1,2,-3,5,12,0,-2,23,51,-10,1,68] I have to Subtraction each item of list from other .i.e l[1]-l[0] & l[2]-l[0] & l[3]-l[0]&... and l[2]-l[1]& l[3]-l[1]&... and l[3]-[2]&... I must arrange this Subtraction in a table.I know I must use while or for...in... to create tow loop but I am …

Software Development python
Member Avatar for vegaseat
-1
110
Member Avatar for dre-logics

I use Visual basic 8.0 I have a bound Datagridview. This Datagridview has 25 row. Only thing i want to clear the row [COLOR="Red"]Contents[/COLOR] of a specific row. [COLOR="red"]I want not delete of remove the row!!!![/COLOR] How can helpme with this problem? Thanks, André

Software Development vb.net visual-basic
Member Avatar for codeorder
0
99
Member Avatar for jenymaru08

elow I'm trying to create a program that will display the output : [code] * ** *** **** [/code] please help me [code=c] int main() { for(int i=0;i<=7;i++) {for(int j=0;j<=i;j++) cout<<'*'; for(nt k=0;k<=i;k++) cout<<' '; [/code] then what next its only give the output [code] * ** [/code] please help …

Software Development c++
Member Avatar for EMDArellano
0
134
Member Avatar for pmennen

The Eric4 IDE I've been using IDLE under the latest Enthought release (python 2.7) running windows XP (and windows 7 on another computer). But I decided I wanted to use a real IDE with the goal of writing GUI applications. It seemed like Eric4 would be a reasonable choice. I …

Software Development gui ide python
Member Avatar for vegaseat
0
522
Member Avatar for tbjo

Hi! I'm working on code for a personal project thingie, and I'm stumped by part of it. I am trying to search a line (provided in a separate .txt file) to see if I can find any consecutive occurrences of elements of a list in said line. For example: in …

Software Development python
Member Avatar for vegaseat
0
191

The End.