64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for sravan953

Hey guys.... I use Python 2.6.2. I recently created a program which accepts commands from my website, here's the code I used: [CODE]import urllib import subprocess import time open_site=urllib.urlopen("http://www.sravan953.webs.com/command_python.htm") read_site=open_site.read() def run_program(): current=time.asctime() print 'Runnning program'+' ['+current+']' subprocess.call(read_site) def check_argument(): current=time.asctime() if read_site=='': print 'No command given'+' ['+current+']' timer() else: …

Member Avatar for vegaseat
0
164
Member Avatar for NickMalone85

I think I've run into a thread synchronization problem. I have a C# program where I have a extended Panel class (MapEditorPanel) and I also have a form that contains that MapEditorPanel. I have a MouseClick Event on both the Form and the Panel. The MapEditorPanels event updates the variables …

Member Avatar for Diamonddrake
0
100
Member Avatar for pymatio

I have the following script: [CODE] import sys import os import re pages = [] if len(sys.argv) > 1: for root, dirs, files in os.walk(sys.argv[1]): for f in files: filename = os.path.join(root, f) if (filename.endswith('.html')) or (filename.endswith('.htm')): pages.append(filename) for page in pages: f = open(page, "r") count = 1 for …

Member Avatar for pymatio
0
122
Member Avatar for Birendra Dhami

sir how can i add two fraction nos. to get again fraction eg. a/b+c/d=(ad+bc)/bd I would be very happy if u send me code.

Member Avatar for csurfer
0
110
Member Avatar for leegeorg07

Hi, is there an internal module / method to change the colour of the text in the pythonwin? I am asking this so that I can make more exciting text based games

Member Avatar for leegeorg07
0
2K
Member Avatar for serkan sendur

i did it like this but it seemed stupid : [CODE]string path = Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf("\\")) + "\\Sounds";[/CODE] any other ideas? my actual goal is to locate the files in my project output directory. it can be any directory i created under my windows application. it is not as straight forward …

Member Avatar for serkan sendur
0
456
Member Avatar for khr2003

Hi I am trying to modify a class and I found this code in it: [CODE] $query = " SELECT * FROM menus WHERE show = '1'"; $id = $this->menuid; if((isset($id)) && ($id != '')) { $query .= " and menuid in($id)"; } $query .= " ORDER BY menuorder ASC"; …

Member Avatar for khr2003
0
123
Member Avatar for Lukezzz

I have a little problem that my Form gets stuck when I run this first code. I have a lot of code in the event. The code runs fine but if I now will deactivate the form by clicking with the mouse on the desktop and again click somewhere on …

Member Avatar for Lukezzz
0
99
Member Avatar for MrNoob

i m trying to code htoi function in chapter 2.3 for K&R but problem i dunno where to start should i first read all string then after that change each character to its decimal and then add them ? or any better ideas?

Member Avatar for Narue
0
573
Member Avatar for themaster

Does anyone know how to give a GUI look to your C++ "Console Application". I cannot use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will …

Member Avatar for Ancient Dragon
0
293
Member Avatar for njparton

I'm stuck trying to get mechanize working as part of a larger project I'm working on. I'm trying to logon to the following website which I am registered at (but not as "bob" as below obviously): [url]http://www.morningstar.co.uk/uk/membership/signup.aspx?loginType=1&lastvisit=%2fuk%2fportfoliomanager%2fportfolio.aspx%3fSite%3duk%26lang%3den-GB[/url] I think I've managed to select the correct form (?) but I'm getting …

Member Avatar for njparton
0
208
Member Avatar for chaines51

I'm wondering if this is even possible in C++. Here's what I did in java a while back: [code=java] class Suit { public static Suit Hearts = new Suit("Hearts"); public static Suit Clubs = new Suit("Clubs"); public static Suit Diamonds = new Suit("Diamonds"); public static Suit Spades = new Suit("Spades"); …

Member Avatar for ArkM
0
171
Member Avatar for khr2003

Hi I am trying to run this query: [CODE]mysql_query("update group_data set title='$title', desc='$title' where groupid='$groupid'");[/CODE] but the problem is that I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc='' …

Member Avatar for Josh Connerty
0
87
Member Avatar for drjay1627

i'm a java c/c++ person. trying out ruby for the 1st time! how do i do something like this in ruby: [code] //this is java public static void main ( String args [] ) { File inFile = new File ( args [ 0 ] ); File outFile = new …

Member Avatar for ~s.o.s~
0
208
Member Avatar for animefun2

I have an array of integer of size 20 and there values range from 0-9 and i want atleast the value 0 placed in one location in the array once. how can i control rand() to be able to do that? cause there a possibility 1/10 will randomily generate 0 …

Member Avatar for seemant_sun
0
196
Member Avatar for gnobber

I've read that the bits in a byte (in c++) are implementation or system dependent. What does that mean? Does it mean implementation of c++ or the processor architecture or some other thing? And I've read that you should use sizeof to determine the size of a byte? Could you …

Member Avatar for DonB
0
327
Member Avatar for atman

Hello., Have a question about array being set from function argument. I wrote this little program, and want to know why cant i set an array size from the function argument. Any help would be greatly appreciated. [CODE] int money(int deposit, ...){ int i, sum = 0, nextvar; // myArr[deposit]; …

Member Avatar for siddhant3s
0
123
Member Avatar for shahji

Hello, I am trying to write a macro to add a few headings. I have the following macro. Sub DOPaste() Dim i As Integer y =11 z = y Do While Sheets("Investments").Range("A" & y).Value <> "" i = 1 Sheets("Investments").Cells(z + 1, "D") = "Interim for year" Sheets("Investments").Cells(z + 3, …

0
74
Member Avatar for lewigi2012

Hello. I'm making a program for my friend who is running an RPG Adventure at his school. I'll explain the basis behind the program and then what the problem is. Basically, before any battle, each player is required to roll a d12 and add their Battle Initiative Value (BIV) to …

Member Avatar for lewigi2012
0
114
Member Avatar for killhha

so lets say i have a program and it keeps on outputting the letter 'A' constantly until the user presses enter or something. then it will exit the loop and continue with the rest of the program. how would i do this?

Member Avatar for killhha
0
549
Member Avatar for mccs

Hello can someone please help me, I am trying to add information to a database with checkbox. I have every thing working expect for the checkbox. I am fairly new to the php/sql side of web coding. Anyway I want to add information to the one field of a database, …

Member Avatar for mccs
0
571
Member Avatar for Xessa
Member Avatar for Xessa
0
86
Member Avatar for Xessa

Hello again people. I have a problem. Think of a textarea. The text area is filled with information depending on an entrance in a textbox. Like userID is entered and the information is filled in the textarea. I want the user to edit the textarea. But when he is editing, …

Member Avatar for Xessa
0
120
Member Avatar for furqan219

:) this page name is search.php which gets siteID from the databse and show in LISTBOX. [CODE] <form action="site_report.php" method="post"> <?php $con = mysql_connect("localhost","xxxx","xxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("onm", $con); $query="SELECT SiteId FROM SitePInfo WHERE Region='Central 1' "; $result = mysql_query ($query); echo "<select …

Member Avatar for furqan219
0
290
Member Avatar for VernonDozier

I have a webpage that is passed a string: [code] http://www.mywebsite.com/gallery.php?gallery=Sand_&_Surf [/code] Using the GET method, I am trying to do this: [code=php] $gallery = $_GET['gallery']; [/code] I want to store "Sand_&_Surf" in the [ICODE]$gallery[/ICODE] variable. From there, I do a database query and display all the paintings that are …

Member Avatar for VernonDozier
0
111
Member Avatar for kerek2

Hi, I already create connection to sql database and successfull. I need to know how to run two command together?...This is my problem:- [CODE] sqlcmd = New Sqlcommand ( "Select * from Staff_Main where Staff_id like '"&textbox1.text&"'",cn) dr = sqlcmd.executereader while dr.read() label1.text = dr.item(1) 'item 1 is name sqlcmd …

Member Avatar for kerek2
0
389
Member Avatar for seemant_sun
Member Avatar for Ancient Dragon
0
137
Member Avatar for JackDurden

IF i have this function... [CODE] node* get_lowest(node* root) { node* min = root->child[0]; for(int i = 0; i<root->child.size();i++) { if(min > root->child[i]) min = root->child[i]; } cout<<"Here it is:"<<min->data<<endl; return min; } [/CODE] how do I get it to return the smallest indexed pointer? for example if root->child[0] and …

Member Avatar for VernonDozier
0
255
Member Avatar for MervinKoops

Hello I'm new here my name is Mervin, I'm creating a 3D online game in C# (everything is going well so far don't need to discuss it ;) ) And I am building a TCP server for it in C# (Visual C#.NET) The server needs to be able to handle …

Member Avatar for MervinKoops
0
116
Member Avatar for tulipputih

Hi, Anyone can help me?..must be easy for most of you. instead of just displaying data from the database in a table, i want to make it varies..some in textbox, some in text area. this is my code: [code=php]<?php $query= mysql_query(" SELECT * FROM office WHERE officeID='" . $_GET['officeID'] . …

Member Avatar for Atli
0
154
Member Avatar for Xessa

I have 3 textboxes names myTextBox1 myTextBox2 myTextBox3 onblur i want to check if the value of the checkbox is true. I have a function in my js file. [code] function isNumeric(myString) {.......} [/code] In my JSP file i write; [code] onblur="isNumeric(X)" [/code] I wrote everything and it does not …

Member Avatar for itsjareds
0
100
Member Avatar for jbisono

Hi, everyone this is my issue I have to read a binary record from the database and concatenate another string to it, the thing is that is just working one way, I ll put some code to explain better. [ICODE] buffer = rdGetBinary.GetInt32(3);//this is the length of the actual row …

Member Avatar for jbisono
0
118
Member Avatar for adamramadhan

can sombody give me a great example to make a connection php - mysql ( oop - best practice ) ? [ICODE]<?php /* Database Connection */ class db { private $db['host']='localhost'; private $db['user']='root'; private $db['pass']=''; private $db['name']='build'; public function connect($db['host'],$db['user'],$db['pass']) { $db['connect'] = mysql_connect($db['host'],$db['user'],$db['pass']); if (!$db['connect']) { printf("Cannot connect to …

Member Avatar for adamramadhan
0
136
Member Avatar for infinitelygreen

Hello! I recently started learning Python, and I'm trying to install the package GASP ([url]http://pypi.python.org/pypi/gasp/0.4.5[/url]) in order to be able to code some graphics. However, the file is of type EGG. I found that I need to install EasyInstall in order to be able to install EGG files. (The download …

Member Avatar for infinitelygreen
0
96
Member Avatar for zido85

i have this code, im using jquery which im not very familiar and i need help please:D [code] <html> <head> <title>Select and drag?</title> <style type='text/css'> body,html { color:#333; font-family:Calibri; font-size:11px; } .panel {float:left;width:200px;margin:20px;} ul { list-style-type:none; border:1px solid #999; background:#ccc; padding:20px; min-height:150px; width:100px; } li { display:block; border:1px solid #999; …

Member Avatar for Josh Connerty
0
2K
Member Avatar for jamello

hello smartheads! I am currently investigating the extent of adoption of mono by the different flavours of linux OS. I am aware that opensuse and ubuntu are favourably disposed to mono but what I cannot ascertain is wheher RedHat linux has adopted/implemented mono. I keep getting conflicting reports:confused: . I …

Member Avatar for jamello
0
350
Member Avatar for leegeorg07

Hi, I have this code: [code=python] def yn(input): if input.lower == 'y': return True else: return False def limestone(): I = raw_input("are there shelly fragments? (y/n)") if yn(I): print "Shelly limestone" else: print "chalk" def crystals(): I = raw_input("Are the crystals big?(y/n)") if yn(I): big_crystals() else: print "Basalt" def big_crystals(): …

Member Avatar for leegeorg07
0
72
Member Avatar for poeticinsanity

I'm having a simple problem. I'm using this class to do some stuff with another module. Now, for some reason the self.database and other variables are not able to be accessed by the other methods. I thought _init_ was suppose to work as a constructor, thus the other methods should …

Member Avatar for poeticinsanity
0
90
Member Avatar for Gary888

Hello, This is a JavaScript/PHP question so I will go ahead and post it here. I would like to know if it is possible to access (in a PHP class) a value/variable that has been returned by a JavaScript function. The function is in external .js class. Here what I …

Member Avatar for Gary888
0
2K
Member Avatar for msgjunkie

I have followed the instructions on MSDN to "Display Related Data in a Windows Application" ( [url]http://msdn.microsoft.com/en-us/library/57tx3hhe(VS.80).aspx[/url] ). I have a data source that has a Customers table and a related Orders table. I can easily create a form which allows the user to select a Customer and display the …

Member Avatar for msgjunkie
1
105
Member Avatar for chaines51

I've always been curious: in VS, and most other IDEs, you are allowed to do something like this: [code=c++] //in file class.h class blah { //prototypes, members, blah, blah blah } //in file class.cpp #include "class.h" //method definitions... etc. //in file main.cpp #include "class.h" int main { //do stuff with …

Member Avatar for VernonDozier
0
118
Member Avatar for sivak

can anyone send me the llink for garpage collector working principle..when we use fimalize and when we use dispose method in c# .net plz

Member Avatar for thewebhostingdi
0
88
Member Avatar for tomtetlaw

How do I search a string for anything? What I mean is, I need to say: [code=python] if line == 'playername = (any name)': temp = line.strip().replace('playername=', '') return temp [/code] Any ideas?

Member Avatar for jlm699
0
109
Member Avatar for CTBC

I have a form where there are 2 buttons, one which randomly adds buttons onto the form, and one that resets the form to default. When the form is opened there are two buttons, but after clicking the random button, there are many buttons. For the reset button, I currently …

Member Avatar for sknake
0
166
Member Avatar for tulipputih

Hi all.. really need a help. this is looks easy peasy but I can't solve it :( I want to make a link from lesson ID to a details of the selected lesson ID. [icode]<td> "<a href='details.php?lessonID=". $lessonID ."'> </a>" </td>[/icode] when I run the coding the following error appear …

Member Avatar for navi17
0
243
Member Avatar for StNick

Hi all, I have a web app that is used in a number of countries, including ones such as Brazil, where the comma is used as a decimal separator. This is causing problems with my SQL queries, as it is trying to update a number field with "0,013" when it …

Member Avatar for StNick
0
107
Member Avatar for elanorejoseph

i always get some problem when i try to create a edit link and corresponding page. now the value to be edited are not shown in the edit form, and i do want to return to the same page where i have selected value to editted .can any one help …

Member Avatar for Atli
0
120
Member Avatar for fizmo

hiya, I'm very new to how javascript works and have inherited a website that contains a form that uses the calculate total function...which only works in IE. I've searched all over the net trying to find a solution to get this working across all browsers but not having much luck …

Member Avatar for fizmo
0
140
Member Avatar for SKANK!!!!!

im trying to get the username of the personal profile. the url is example.com/theusername/index.php the "theusername" i want to make into a variable. How do i do that? i want the variable to be called "theusername" so how do i make that into a variable? does anyone know? with php …

Member Avatar for SKANK!!!!!
0
203
Member Avatar for BestJewSinceJC

Ezzaral & James -- I remember (and found) a thread from a while back where you guys gave me an example of an Observer pattern. Basically a model had a List of interested Listeners. When the model changed, it went through a for loop, notifying each listener (the views) that …

Member Avatar for BestJewSinceJC
0
74

The End.