43,549 Solved Topics
Remove Filter ![]() | |
I need to log in to a website using python. The two fields are username and password. This is what I have tried: [CODE]import urllib import urllib2 import httplib username = "username" password = "password" url = "https://webconnect.bloomfield.org/Zangle/StudentConnect/logincheck.aspx" password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() password_mgr.add_password(None, "https://webconnect.bloomfield.org/Zangle/StudentConnect/", username, password) handler = urllib2.HTTPBasicAuthHandler(password_mgr) opener = … Software Development python | |
Hi How can I stop a class method execution ? I have been reading and the most similar solution I found is use Threads....is there another solution ? Im working with jasperreports, In order to generate report I just call single method to start the report print and another method … Software Development java | |
The problem is that it gets stuck on public static void queryChange(String string) { System.out.println("Sending Query: "+string); try{ System.err.println("queryChange 1"); Connect(); System.err.println("queryChange 2"); [COLOR="red"]conn.createStatement().executeUpdate(string);[/COLOR] System.err.println("queryChange 3"); }catch(Exception e){ System.out.println("SQLException: " + e.getMessage()); } System.out.println("Sent Query: "+string); } java doesnt error it just gets stuck. Sent Query: UPDATE `servers` SET `playersCurrent` … | |
Hello, I want to count phrases in a text file by using Python. For instance, if a text is like "I love you very much", I want to make a dictionary like: "I love": 1, "love you": 1, "you very": 1, and "very much": 1. I also want to do … Software Development python | |
hello i have a simple client server program in which different paramters are asked by client. i want to use cryptographic techniques like DES, AES, RSA but i do not know how and where to use.... i m doing socket programing first time even programing in linux. so i do … Software Development c client-server | |
![]() | hi, im currently making a food ordering system in python. I recently decided to put a background in the window and now all of my buttons have disappeared?? does anyone know why this might be. Software Development python |
Can you people please help me in this program using only nested loops? I cannot use bufferedreader or charAt function Hard coding cannot be used. [B]The dots all stand for spaces[/B] The pattern is:- abcde .bcde ..cde ...de ....e ....ed ....edc ....edcb ....edcba The spaces are mandatory. [B]The dots are … Software Development java | |
![]() | I was wondering if anyone knows how to create a transparent background image? just a small example or something. |
hello, i have some simple questions but i don't know why my code is not correct see these questons: 1-Write an algorithm to accept three numbers and display the largest one? this is my code [CODE]int num1,num2,num3; cout <<"Please enter three numbers:"; cin >> num1 >> num2 >> num3; if(num1 … | |
I am currently stuck in one part of my application. I have two combo boxes that i am having the users select from. The first combo box is simply bound to a datatable. that is working properly. The second one i need to populate off another datatable after sorting out … | |
For the Object class' equals method, the API says :[QUOTE]The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object … | |
Hey guys, Is there any way to call the click event of a linklabel? E.g., I have a form that should call linkLabel_refresh_LinkClicked when it closes. Is that possible? Thanks Software Development | |
I have found a tutorial that will teach me how to set up my first Database, but the first thing it tells me to do is right-click on the Data Connections Icon within Database Explorer and choose "Create New SQL Server Database" ... unfortunately, this option is greyed out, so … Software Development microsoft-access sql vb.net | |
hey everyone !!! well i got a very annoying problem i am teaching my self about java and especially about developing programs that could be used by Nintendo wii remote. i have recently found a perfect program that has been created in java and created for nintendo wii remote and … Software Development java java-netbeans open-source | |
The following code iteratively calculates continued fractions. I'm having trouble separating the numerator and denominator from the returned value. [code=python]def cf3(terms, iterations): answer = 0 for n in range(iterations, 0, -1): answer = Fraction(1, terms[n] + answer) answer += Fraction(terms[0], 1) return answer [/code] The following is sample output showing … Software Development mathematics python | |
[CODE]output = open('d:\code\\output.txt','w') for y in range (0,len(evidence_array)): output.write(evidence_array[y] + ', ' + found[y] + '\n') #I am not sure if this output writing is correct! output.close()[/CODE] PLEAE CAN SOMEONE HELP! ---I AM NOT SURE IF THIS OUTPUT WRITING IS CORRECT THANKS Software Development python | |
Hello Dear DaniWeb community Here I am again, with a new problem :-) For those of you that are reading every post you probably have already seen that I'm trying to implement an auto-extracting process which extract data from ActiveDirectory, process it in order to make a filtered csv file … Software Development perl | |
Please, someone explain me why when I compile this code in Dev-C++ (Windows OS) the following error message apears: 'clrscr' undeclared (first use this function) int main() { int c; char d; clrscr(); printf(" Example program for PSC232 \n"); setup(); printf("*IDN?\n\r"); send("*IDN?\n"); printf("RECEIVE...\n\r"); loop: receive(); goto loop; } ps: ignore … Software Development c | |
Ok so I dont think I have installed ANY compiler for C++ on my Windows Vista system. So I would need info about that as well. Anyhow. Just like java can be run using javac and then java w/e w/e... how do I run my .cpp notepad files via the … Software Development c++ ide windows-vista | |
k, what i'm trying to do is create a windows service to run in the background to monitor [URL="http://www.vmware.com/products/player/"]vmplayer.exe[/URL] to see if it is running or not. then if it is running, then turn on the various hardware, software, and services it needs/uses to run, and if it is not … | |
Hi all, How to create refresh Button in the form? I have combo box with the data linked to Access database. I create another form for data input for those that appear on the combo box. When I close the input form, I realise that the data is not yet … Software Development visual-basic | |
Guys, Why do we have these unresolved externals? This is the second time I am meeting them, and I'm sure it is a common problem. I've defined all the constructors including a void constructor just for the sake of (I don't actually need it). Pray tell where the error is: … Software Development c++ data-structure | |
#define prn(a) printf("%d",a) #define print(a,b,c) prn(a), prn(b), prn(c) #define max(a,b) (a<b)? b:a main() { int x=1, y=2; print(max(x++,y),x,y); print(max(x++,y),x,y); } output:222342 pls explain how we get output 342 at end Software Development c first-post | |
Hi, I am working on a small program (in Windows) to control the Speed of a CD Drive. So far I have used some of the IOCTL_CDROM_... and IOCTL_STORAGE... Control codes to control the drive by opening/closing it etc. I have now developed a small piece to also control the … Software Development c | |
i have created two winforms ,first from take a value and pass it into the second form and display on a label, but when i run the programme it throws exception form 1 [CODE] private void button1_Click(object sender, EventArgs e) { Form2 fm2 = new Form2(this.txtName.Text); fm2.Show(); } [/CODE] form … Software Development | |
Hi Guys, I want to store the values of regex.match in an array but i am getting error. my code is as follows [code] string[] subj = null; for (int f = 1; f <= dir.Length; f++) { Match o = Regex.Match(txt1, "section_title='(?<TITLE>.*)'"); subj[f] = o.Groups[1].Value; } } } [/code] … Software Development regex | |
I am very new to vb 2008 and have create a simple window forms application which link to microsoft access 2007 database. I build the application exe file already. The exe file is run well on my computer, but when i transfer it by copy and paste the whole folder … Software Development microsoft-access operating-system vb.net | |
Hi all, Im fairly new to java. Im wanting to connect to mysql but the following is thrown Exception: com.mysql.jdbc.Driver have i missed something? here is the code [code] import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class MySql { public static void main(String args[]) throws Exception { Connection con = … | |
Hello everyone! I wrote a basic c++ program using classes and pointers. Although it compiles without any errors, it will not run, saying "This program has stopped working". I am assuming that this issue may have been created by a memory leak, but I made sure to delete all dynamically … | |
Hey All. I'm trying to figure out how to search for a string within my file and if the string exists, I want to get whatever follows it. Here's an example: HighScores.txt ---------------------------- Devin: 202 Corey: 185 Nick: 315 Patrick: 112 ---------------------------- If my program opens the file, I'd like … Software Development c++ | |
I'm writing a script that will search file names looking from certain file extensions. The thing is, is that I am looking for multiple extensions, and the list may change. I could write an if statement using "and", but the line just gets a bit long and can become difficult … | |
Hi all, I am trying to link to an external library (the boost regex library) under gcc. I am ashamed to admit that what I know about linking external libraries comes soley from modified snipets from online forums. My problem is as follows; I use to keep all my source … | |
Hello, I am trying to calculate the value of pi (just for fun, I know it's already done for millions of decimal places), the program I made works fine, but the problem is that, it is constrained by the accuracy of [I]double[/I] values. Is there anyway to create 'extendable' floating … Software Development c++ | |
Hey guys and girls, I am extremely new to coding, and I would appreciate some help. I am trying to write a code in which someone inputs a number, which is part of a file name, then I do stuff with the filename. Here is the part that I am … Software Development c++ data-science | |
I've been trying to use substring to get the last three digits as part of the extension but wasn't successful. Can anyone tell me how I can extract the extension from the file name? Rgs Software Development | |
I know it sounds stupid but I want to try this with the kind of for (not the norma for i=0 i<9; i++) but the other one with arraylist. is this possible? If yes please help me match data types Thanks [CODE=JAVA] import java.util.ArrayList; import java.util.List; /** * Created by … Software Development java | |
Hello everybody ! wow my first time on danyweb ! ;p Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know … Software Development python | |
Hey guys i seem to be having an issue with the following code: [CODE]// show solution to variable scope problem using "the heap" // a block of memory controlled by the programmer #include<iostream> using namespace std; double* Function() { double* dLocalVar = new double; return dLocalVar; // give address of … Software Development c++ | |
I followed a tutuorial to send gmails through a C# app. Im making a console app and this code fails I have no idea whats wrong... [CODE]class MainClass { public static void Main (string[] args) { sendMail mailSend = new sendMail(); mailSend.mail("stmp.gmail.com",465,"sendersemail@gmail.com","senders password","fromadress@gmail.com","toadress@gmail.com","Subject","Body",true); } }[/CODE] [CODE] public class sendMail { … Software Development email | |
I'm still interested if someone read this book since it's based upon standard C++?! Can one learn C++ over Visual... I mean what's difference anyway, except M$ is involved in Visual ?! Software Development c++ | |
I have this problem that I can't figure out, I can't figure out the line statement that needs to go in. Here's the problem [code=c] struct NodeType { int data; NodeType* p; }; NodeType* p; NodeType* q; p = new NodeType; p->data = 18; q = new NodeType; q->data = … Software Development c++ linked-list | |
The API says that the implementation of BlockingQueue are thread safe, but about the drainTo method, it says : [QUOTE]"This operation may be more efficient than repeatedly polling this queue. A failure encountered while attempting to add elements to collection c may result in elements being in neither, either or … | |
I'm writing a script that will search files that contain certain keywords, and then output the line to a text file. The problem I'm having is that the script is opening every type of file, including executables. The script seems to work fine, as in it doesn't crash when it … Software Development python | |
hi everyone i made crystal report then i saved it as a word document but i passed parameters to that report then an error occured after that the error is:- missing parameter values ok i tried to save it with 2 different codes but th same error shows up the … Software Development | |
I have a form (Delphi 2010) that includes several data controls, including a DBImage. All these are hooked to a underlying MSSQL 2005 database and table. I'm using ADOConnection and ADO Table for ease of use. I need to include image data in this table, so I have set up … | |
I tried to do this [CODE]ArrayList<String> a=new ArrayList<String>(2); a.add("dss"); a.add("dsfs"); a.add("fsfs"); [/CODE] Though i have specified a limit of 2 on the collection, i am able to add more. If this is general about Collections, is there any Collection which sets a limit and strictly follows it ? Software Development java | |
Hello, I'm writing a lexixal analyzer on FLEX, and i want to open an #include file. Calling fopen(yytext,"r"); as shown in flex manual http://flex.sourceforge.net/manual/Multiple-Input-Buffers.html#Multiple-Input-Buffers does not open the file, although that the string in yytext has the value "<filename>". Instead, when i use fopen("<filename>","r") the file opens normaly and the … Software Development c | |
Hi I am new to perl...I have a file in which sections are seperated by "//************************************************" How can i search for the asterisk character using regular expressions? =-------------- open(IN, "<$inFile") while (<IN>) { if (/^\/\/**/) #here is the error..search for multiple '*' character { print "Seperater found" } } pls … Software Development perl | |
helleo all i want to delete from 5 tables with inner join like that: Category=CategoryId,CategoryName,.. Item=ItemId,ItemName,pictureId,VideoId,AudioId,CategoryId Picture=pictureId,pictureName Video=VideoId,VideoName Audio=AudioId,AudioName the user will Enter category name in text box iwant to delete Category+Item+picture+audio+video help me please :) Software Development audio | |
Hi everybody. I have an UserControl (Windows Application - .NET Framework 3.5) which is composed of a TextBox and ListBox: it should pretty much emulate a "suggestion box" just like the ones in Google and other various search engines. Now, the initial status of this control (TextBox blank) imply the … Software Development |
The End.