43,549 Solved Topics
Remove Filter ![]() | |
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 | |
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 | |
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 | |
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 | |
![]() | 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, … ![]() |
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 | |
[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 | |
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 | |
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++ | |
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 | |
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 | |
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++ ![]() | |
![]() | 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 … Software Development client-server java lan-wan socket-programming ![]() |
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; }; … | |
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 | |
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 … | |
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 … | |
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++ | |
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 | |
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) … Software Development gui ide java java-netbeans java-swing user-interface | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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++ | |
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, … | |
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 | |
[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 | |
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++ | |
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] … | |
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 | |
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 | |
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++ | |
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 … | |
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 | |
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++ | |
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 | |
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++ | |
![]() | 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? |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 … | |
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 |
The End.