199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for kindergeek

hello, i was only wondering if there were other ways of making a quadratic formula calculator in python. i recently made one my self by making a module i named quadratic which is shown below: def get_coefficients(): a = float(raw_input('a = ')) b = float(raw_input('b = ')) c = float(raw_input('c …

Member Avatar for Lardmeister
0
327
Member Avatar for JesW9

def binary_search(data,key): found=False low=0 high=len(data)-1 while(not found and low<=high): guess=(high+low)//2 if (key==data[guess]): found=True else: if (key<data[guess]): high=guess-1 else: low=guess+1 if(not found): guess=-1 return guess def test(): seq = [] for i in range(1,1001): seq.append(i) for j in range(1,100): is_pass = (binary_search(seq,j)==j-1) assert is_pass == True, "fail the test when key …

Member Avatar for Lardmeister
0
200
Member Avatar for davy_yg

Hello, I wonder when do I have to use OOP (Object Oriented Programming) ? I know a little bit about it, but do not know when to use it. I basically in the middle of developing a website backend. Suggestion and advise appreciated.

Member Avatar for pritaeas
0
148
Member Avatar for SYvonneMendoza

** //When an item from the list is selected, a checkbox along with the drawn graphics schould appear. but only the graphics appear. Help? *basic** import java.awt.*; import java.applet.*; import java.awt.event.*; import java.awt.Checkbox; public class GetSelectedItemExample extends Applet implements ItemListener { Choice c; CheckboxGroup g1 = new CheckboxGroup(); Checkbox checkBox1 …

Member Avatar for SYvonneMendoza
0
241
Member Avatar for HankReardon

Hello, I have been having quite a bit of trouble with this one. Can someone please tell me how many swaps it would require to sort the following array? {2, 4, 6, 3, 7, 1} I tried putting my counter in a couple of places and neither one of them …

Member Avatar for HankReardon
0
2K
Member Avatar for kamilacbe

Hi , I have a website which has an option to play video which can be selected from a list , so my question is where can i find a video player which supports all file format and player with sharing embed code. done a flash player bt then looking …

Member Avatar for pritaeas
0
137
Member Avatar for chdboy

Hi, I'm adding day shift column where current month (I'm using datetimepicker for extracting month from it ) but getting this error Conversion failed when converting date and/or time from character string Here is the code Dim str10 As String = "Select COUNT(DayShift) FROM Attendance WHERE AttendanceStatus = 6 AND …

Member Avatar for chdboy
0
128
Member Avatar for LucianAdamson

Hey all! I am trying to write a piece of code that will replace one of my system files on reboot with a new version of that file. Hopefully someone out there has some experience with this as I am stumped at the moment. Using: VB.NET 2012 Using MoveFileEx Public …

Member Avatar for LucianAdamson
0
447
Member Avatar for 2mhzbrain

Please help, i do not know whats causing the problem... Dim miqty As Double Dim mitc As Double Dim siqty As Double Dim sitc As Double Dim diffqty As Double Dim difftc As Double Dim dvqty As Double Dim dvtc As Double dvqty = dynavqty.Text dvtc = dynavtc.Text Set editSIrs …

Member Avatar for 2mhzbrain
0
227
Member Avatar for engrmshahzad

SELECT * FROM `users` WHERE `birth_date` between '%-02-02' AND '%-05-06'

Member Avatar for JorgeM
0
82
Member Avatar for joseph.lyons.754

Hey guys im populating a combo box from my database i was just wondering how do i prevent the combo box from displaying different instances of the same value. e.g three B&Bs all from ennis. ennis is in the combobox but its displayed three times. how do i stop this …

Member Avatar for Szabi Zsoldos
0
149
Member Avatar for CHOCHOCHO

Here are the errors Binary.cpp: In function `std::istream& operator>>(std::istream&, binary&)': Binary.cpp:24: error: `nodeType*binary::head_ptr' is private Binary.cpp:114: error: within this context Binary.cpp:24: error: `nodeType*binary::head_ptr' is private Binary.cpp:115: error: within this context Binary.cpp:115: error: call of overloaded `list_clear(nodeType*&)' is ambiguous Binary.cpp:28: note: candidates are: void list_clear(nodeType*&) Binary.cpp:56: note: void list_clear(nodeType*) Binary.cpp:24: error: …

Member Avatar for Banfa
0
181
Member Avatar for mastermind2

Hi friends Please help me it is out of my head, I am pussing date and other variables value through url. Some time date is entering correctly in date field and some time entering 000-00-00. Please help me out. <?php include '../require.php'; $date=mysql_real_escape_string($_REQUEST['id']); $app_id=$_REQUEST['app']; $branch=$_REQUEST['branch']; $ins=$_REQUEST['ins']; $ins=$ins+1; //echo $app_id; //$rr="select …

Member Avatar for AARTI SHRIVAS
0
260
Member Avatar for joseph.lyons.754

Hi Guys I was just wondering how you stop the combo box from displaying different instances of the same value. In the combo box i have villages and towns names e.g doolin. onli thing is i have many businesses from doolin on the database so when i pull the town …

Member Avatar for joseph.lyons.754
0
219
Member Avatar for vatsal.jariwala.14
Member Avatar for bayyaa

## On Form_load three labels are inserted dynamically to the TableLayoutPanel.On clicking the first label, two labels popup as submenus. Now my isuue is, on clicking the second label, its submenu labels are appearing under the first label instead of second label. Where might be the problem?## Public Class Form1 …

Member Avatar for bayyaa
0
357
Member Avatar for davy_yg

Hello, I wonder what's the different between online and offline. This script works offline, after I have it online, there are some problems occur. For instance, after login to the admin with the correct username and password, I suppose to be taken to the admin page, instead I get stucked …

Member Avatar for davy_yg
0
136
Member Avatar for macgibbo83

I'm trying to add multiple records to an attendance table in a mysql database. Having trouble building an array to check for the multiple entries with the same variables. [CODE]<?php if (isset($_POST['submitted'])) { include('connect-mysql.php'); $number = $_GET['number']; for ($i = 0; $i <= $number; $i++) { $value = $_GET['value']; $text …

Member Avatar for ramaswamy123
0
11K
Member Avatar for ngonix

Hi, i'm having a little problem with my php script. Here's the deal. I have 2 tables and I want to assign a post variable to a row in one table and then insert the id value of that table in another table. The script is as follows: clients.php <?php …

Member Avatar for ngonix
0
323
Member Avatar for hwoarang69

trying to make a table tennis game. simple one with two paddles and one ball. so i have two paddel which is a long rectenger. and a ball. ball i have set x+=dx y+=dy this code above will let the ball keep on going right and down. if ball hit …

Member Avatar for Lamirp
0
154
Member Avatar for masterfact18

!! i was trying to create a simple grading system but my project doesnt work it always shows the last if statement and ignore the other statement...please help here's my code...can someone please tell me what's wrong coz i dont know how to use if/elseif/else statement... newbie here...please help Private …

Member Avatar for tinstaafl
0
289
Member Avatar for masterfact18

hi everyone... my problem is i got 2 command button named command1 and command2..what i want to happen is when command2 is click the function of command1 will work... can someone please help me...

Member Avatar for masterfact18
0
237
Member Avatar for adishardis

I have a answer table and a attribute table. Answers table: -----token-------question1a1-------question1a2-------question2------........ --aaaBBB324Cc---------Y----------------NULL--------------Y-----........ attribute table: --------token---------attribute_1------.... ------aaaBBB324Cc-----2012-08-13-------..... With higcharts I am trying to display a graph with the total count for each question1(a1-a7) from a month back, with dates from the attribute table (namely the attribute_1 column) this is not …

Member Avatar for adishardis
0
175
Member Avatar for davy_yg

var_dump(explode(".", $data['image'])); $file[0] = explode(".", $data['image']); echo $file[0]; The result: array(2) { [0]=> string(6) "image2" [1]=> string(3) "jpg" } Array I am trying to store "image2" in $file, how? (exclude the jpg)

Member Avatar for radow
0
90
Member Avatar for azgold472

I have a reservation page at [Click Here](http://www.orlandosuvandtowncar.com/reservations/Reservations.php) I get the following error when submitting the form to email Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/orlandos/public_html/reservations/res1.php on line 55 Below is that coding any help would be great. the server is running php 5.2.17. <?php require_once "Mail.php"; // EDIT …

Member Avatar for Webville312
0
279
Member Avatar for hostguy

Here's the image [link](http://postimage.org/image/kee0ndxdv/)! Will this be possible ?? If so let me know how to do it guys. I dont know how to send the response to the browser directly help me guys.. Thanks, HOSTGUY

Member Avatar for hostguy
0
140
Member Avatar for jemartalaban_1

hi, im using vb6 and i dont know how to work on a commandbutton that will trigger to another form. For example, i have a commandbutton in form1 and when i click it, there will be an effect in form2. Example, form1 1+1 and the answer will go to form2. …

Member Avatar for AndreRet
0
200
Member Avatar for jovstudios

Hello Guys .. I want to understant how to share my Database to the other Computer USing IP address.. Anyone can show me the code for connection.. This is my Code, acd.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\POS.mdb;Persist Security Info=False" acd.CursorLocation = adUseClient where can i put the ip in …

Member Avatar for AndreRet
0
143
Member Avatar for chandub

hi every one. I have form and in that that form some of fields values are taken from request object . and am validating fields values using struts validate() method. once i submit form if any error in fields validate method will throws error but the request object content is …

Member Avatar for radhakrishna.p
0
132
Member Avatar for pearl.kumar1

HI, IF i run my VB.NET Application. IT shows"Unhandled exception has occured.Connection was not closed.The Connection's current state is open". Kindly Suggest How to Solve this Problem.

Member Avatar for pearl.kumar1
0
205
Member Avatar for davy_yg

Hello, After uploading picture into a certain folder and record the filename in the database, I would like to print the database and the picture out. Here is the code: <?php $i=0; while($data = mysql_fetch_array($result)){ $result2=($i%2)?'#DFA09D':'white'; echo "<tr bgcolor='$result2'> "; echo "<td>".$data['id']."</td>"; echo "<td>".$data['judul']."</td>"; echo "<td><img src='../photos/".$data['image']."'></td>"; echo "<td><a href='input_image.php?mode=edit&id=".$data['id']."'>Edit …

Member Avatar for davy_yg
0
219
Member Avatar for Sara Tech

Hello, I need help to read entire string line with white spaces. I tried many ways but they didn't work :| If I remove `cin>> company_name;`the run jumps to `std::cout << "Enter the symbol of the company: ";` without completing reading company_name from the user! AND, If I keep `cin>> …

Member Avatar for NathanOliver
0
2K
Member Avatar for pilik

Hey I'm trying to add pairs of numbers into an array by placing them into objects then putting the objects into the arrays but I seem to be having a problem with some part of my code. When I run the following example I just get the following back : …

Member Avatar for pilik
0
1K
Member Avatar for tuyendoan

The other day my boss noticed that our php pages read, and try to follow, duplicate file extentions. The pages which are displayed carry over a varying amount of the main pages attributes. The files don't exist in our remote, so we've ruled out it being a product of human …

Member Avatar for Squidge
0
274
Member Avatar for johngorman

I'm coding a contact manager using a doubly linked list that is manipulated by functions using pointers that reads in a contactList.txt file.But when I coded the first function to do a search I got the following error list: Error 8 error C2059: syntax error : ')' C:\Users\Brian\Documents\Visual Studio 2010\Projects\G00290342Manager.c\G00290342Manager.c\ContactManager.cpp …

0
131
Member Avatar for siaosituimoloaublood

Well this is my problem..the code below is to display the grade that is associated with the points the user enters. Now, my problem is how can I have a message display an error message when the user enters a number above 500 or my array..any help is greatly appreciated. …

Member Avatar for Reverend Jim
0
131
Member Avatar for WDrago

All, I wonder if anyone has an opinion on this. What's better, this: // Diagonal checks if (board[0][0] == turn) { if (board[1][1] == turn) { if (board[2][2] == turn) { System.out.println(); System.out.println(turn + " IS THE WINNER!!!"); writeBoard(); return true; } } } Or this: // Diagonal checks if …

Member Avatar for WDrago
0
189
Member Avatar for Aaron_JY

Alright. I've just been told that, instead of creating new forms over and over again using *new FormName();* I should simply open 1 form and then hide/show it as I please. The issue now is, that I don't really know where/when I should create these new form instances and how …

Member Avatar for JOSheaIV
0
148
Member Avatar for Papa_Don

I'm trying to use the Import/Export Wizard to import data from an Excel File to the SQL Database. First, know that I'm trying to run it as an "Administrator". I've had issues because it wouldn't let me log in. So I'm trying it this way. I'm following the steps as …

Member Avatar for Papa_Don
0
254
Member Avatar for CrazyMisho

Hi ,i am trying to create a program to check my e-mail.It's OK ,but i can't login... I used fiddler to trace the request which were send from my PC and I receive that: POST http://www.example.com/login.php HTTP/1.1 Host: www.example.com Connection: keep-alive Content-Length: 346 Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Origin: http://www.example.com User-Agent: …

Member Avatar for JOSheaIV
0
250
Member Avatar for Jboctor8

I am trying to send Data from text boxes in my windows form to specific cells in excel. I am forgetting to do something because i keep getting this error... Error 1 'ExcelWorkbook1.ThisWorkbook' does not contain a definition for 'textBox1' and no extension method 'textBox1' accepting a first argument of …

Member Avatar for JOSheaIV
0
860
Member Avatar for mshravs

here I have problem. I need the code for creating an answering machine for the landline phone wherein it automatically connects to voice module immediately after 3 rings.

Member Avatar for adam_k
0
132
Member Avatar for MasterHacker110

I have this email program but it doestn seem to work, the emaik never arive at the reciever, not even in his spam folder from email.mime.text import MIMEText from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from smtplib import SMTP msg = MIMEMultipart() msg['Subject'] = 'Email From Python jajaja' msg['From'] …

Member Avatar for TrustyTony
0
181
Member Avatar for unikorndesigns

Hi Everyone, I am having a very hard time to figure this out. I had uploaded my CMS which is developed on the CI framework. I have configured the script with the database but however i try to access the index.php file it shows up an Internal Server Error but …

Member Avatar for broj1
0
290
Member Avatar for Papa_Don

Group, In the classes on VB I took were some training on creating Parent and Child Forms. What never was clearly explained is why we would need to use such related forms. I ask this as I'm now working on a group of forms that will be the "order entry" …

Member Avatar for Papa_Don
0
554
Member Avatar for turpentyne

I'm a bit new with javascript/jquery. I've taken over a page design with images and links that animate on rollovers. I've almost got things working, but there's one last glitch. The mouseover effects of an image growing/shrinking work fine when the page is first loaded. But if the user clicks …

Member Avatar for turpentyne
0
351
Member Avatar for while(!success)

Hi guys, I'm hoping you can help me find a more elegant solution to my query inside a foreach loop. Here is the loop in question: foreach (DataRow row in dt_blah.Rows) { SqlCommand sc = con.CreateCommand(); sc.CommandType = CommandType.Text; sc.CommandText = "select blah blah blah .. where S = @s1 …

Member Avatar for AleMonteiro
0
1K
Member Avatar for masterfact18

i would like to know hot to put a limited input in a textbox.. situation is like this i put a textbox in a form then what i would like to happen is to accept only 2 number and will not accept the following number that is being pressed...please help... …

Member Avatar for masterfact18
0
136
Member Avatar for toldav

Help, I'm trying to get which object has the greater area of the 3 triangles. Also want to print out the info for each triangle object by calling toString(). If any one would check my work I have done if for any change I need it. Thank you. // testerTriangle …

Member Avatar for stultuske
0
189
Member Avatar for Navlag

1. What happens when you add an element to a vector that is already at capacity? Does std::vector have a "capacity"? 2. In C++ and OOP in general, what do you call a design where a Person class inherits from Head, Arm, Body, Leg classes instead of the other way …

Member Avatar for Ancient Dragon
0
215

The End.