138 Topics

Member Avatar for
Member Avatar for adanaz

I am making a text adventure and would like the command line window to be a specific size when you run the .py file in the command line window. eg. 300 wide by 250 height. I found a thread on here that shows how to specify the text colour which …

Member Avatar for DubWine
0
18K
Member Avatar for AssertNull

Consider my post in this thread... https://www.daniweb.com/programming/software-development/threads/508038/how-to-change-this-program-to-fully-oop Consider this code... int main() { srand(time(NULL)); char enter; // game starts Player player; // title cout << "Welcome to Zombie War." << endl << "Press [ENTER] to start."; cin.get(); // player name cout << "Please enter your name: "; cin >> player.playerName; …

Member Avatar for Reverend Jim
0
563
Member Avatar for ravoras

Hey Guys, So using a webform textarea I am passing some data into PHP. This data is basically 4 columns of an excel sheet and potentially unlimited rows. Now I want to be able to go through this data, select each of the four individual elements from each row, insert …

Member Avatar for skradoslav
0
4K
Member Avatar for gavriela

Hello, I'm in a beginning Java class, and I am lost :( My homework calls for me to write a program that takes an integer (of unknown length) and prints it one digit per line, like: 5 6 9 8 6 4 3 I have been googling this for hours …

Member Avatar for stultuske
0
5K
Member Avatar for Toby_1

I need to make some KML code that is basically a coloured track. So far I have worked out that it either has to be lots of small lines or placemarks. However usually with this there is no way to use the time bar. Is there a way to be …

Member Avatar for almostbob
0
318
Member Avatar for Niloofar24

Hi. In my CMS, when i type a content for a new post in the textarea, like this: one two three four five six and then click the submit button, it will save in the db table like the way i have typed, every word in a separate line. But …

Member Avatar for Niloofar24
1
1K
Member Avatar for Niloofar24

Hello, me again :) With this code: >>> from BeautifulSoup import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('http://www.python.org').read() >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links A list of links printed into the terminal. I want to send the list into a text file, i tried …

Member Avatar for Niloofar24
0
733
Member Avatar for HiHe

I copied this code from page 11 of http://personal.denison.edu/~krone/cs173/files/PythontoC++.pdf and assigned it to a Python string. Alas there are still line numbers. How could I use Python to remove these? Help, I have a mental block. s = ''' 1 #include <iostream> 2 using namespace std; 3 4 int gcd(int …

Member Avatar for vegaseat
0
1K
Member Avatar for ryannnnn

**Read title.** username = base64.b64encode(username)+'\n' This is what I thought would have worked, but it comes up with an error, "TypeError: can't concat bytes to str", meaning that I cannot add +'\n' to the end of the code. If there is anyway anyone knows how to write the byte of …

Member Avatar for vegaseat
0
297
Member Avatar for abaddon2031

I have two python script the first once contains my def callers and my command line arguments. The second one contains my defs that i want to use the command line arguments in. I was wondering if there was a way to call the command line arguments into the second …

Member Avatar for Gribouillis
0
403
Member Avatar for edogg23

Hello. I am a complete newbit to Python. I am trying to read a text file (which is actually an svg file) and add a line to the text file. I would also like to remove certain text from the file. I am trying to edit some of the tags …

Member Avatar for edogg23
0
363
Member Avatar for Diego_4

Do you know if I can change of line in a list of lists? tareas = [] > otraTarea = [tarea,year,month,day, hour, minute, second, microsecond,str(cuando),cuando] `+'\n'+ []`(this is what i have tried) #I have tried to concatenate two lists, but the program returns a message, in which it's explained that …

Member Avatar for TrustyTony
0
315
Member Avatar for Yogesh_5

how to draw 2 parallel line in visual baisc 6.0 which have same height.. suppose picture box height is 200 then first line starting cordinate is 0,100 and second line cordinate is 100,200.. how we draw..

Member Avatar for JobPencil
0
460
Member Avatar for dippy78

Hi Team, Please hekp me with the OCILogon error. Im using WampServer Version 2.2. I have a script which connects to 10g and 11g database and it works perfect from the browser. Now i want to automate the php script via batch file which will be windows 7 schedule task. …

Member Avatar for dippy78
0
967
Member Avatar for rzeune

I'm hoping this is the right place to get some expert advice on putting an app together. I have a Beaglebone Black (BBB, a credit card sized Linux platform) that collects bursts of sensor data. Even though I'm relatively new to Linux, I'm pretty comfortable with the data collection end …

Member Avatar for rzeune
0
291
Member Avatar for opel123

okay so hi, my problem is on (i think) case 3(the delete), it actually works when you input a movie title of example: armageddon(2012), but if you input a title that has spaces in between example: when i met your mother(2009), it just crashes. i don't know what to do …

Member Avatar for Ancient Dragon
0
15K
Member Avatar for CreatorZeus

okay i have a file with data orgainzed like this in a dat file to be read: apple.0.0.end. and i want it to be read by char until it sees "." then print that, then read again repeated until the end of the line. so i can show the data …

Member Avatar for deceptikon
0
253
Member Avatar for ABSOR

I have a text file that I open and attempt to read the individual lines. I have used the same code before on other files with no problem, but for some reason, this particular file is strange. When I do the following command; Line Input #1, read_string the string read_string …

0
148
Member Avatar for martin.krivos.9

Hi i need windows command line to find all files that end with .jpg.pdf and remove the .jpg part so it will be pure .pdf at the end, i have following line for /R %DIR% %%i in (*.jpg.pdf) do set without=%i:~0,-8% & rename %%i "%%without.pdf" It should remove last 8 …

Member Avatar for dodo2013
0
467
Member Avatar for nchy13

HI, I am trying to set the consecutive pixels to a specific color so as to obtain a line. Though, I know there is a built in function for drawing the line, but I am interested to do it without using any GL primitive. This is the display function as …

0
156
Member Avatar for clouds_n_things

So I wrote a cool little python script for terminal commands that I get sick of entering. Most of the script is explained in docstrings and comments. Looking for useful terminal commands or things I missed or could have done better. I'm actually quite proud of it. :) #!/usr/bin/env python …

Member Avatar for clouds_n_things
1
308
Member Avatar for stealthless

Hello, I'm a starter in Python and I need help. I'm trying to ask the user to input as much text as he/she likes until he/she types EOF (end of file) on a separate line. Once he/she does, the program should end. I started on my code and below is …

Member Avatar for slate
0
541
Member Avatar for 2concussions

Okay, so I've been working on a program where you add planets to a solar system and try to get them to orbit a sun. What I need, and have been having great troubles with figuring out, is a 'guide line' to show you where your planet is going to …

Member Avatar for 2concussions
0
243
Member Avatar for lysv

I have a .Net web application where any uncaught exceptions get handled via the Application_Error event in Global.asax. Here, I email myself details of any uncaught exceptions that sneak through. My problem is that while I am getting the error messages just fine, I am not getting the line numbers …

Member Avatar for BMXDad
0
398
Member Avatar for natehome

im trying to get this script to draw a line from the center of the rectangle to the mouse BUT i only want it to draw about 10 pixels out. how can i find that point that is 10 pixels(or points) out? code so far: import pygame from pygame.locals import …

Member Avatar for natehome
0
300
Member Avatar for siddiquedu

Can you please help !! Here, you see that const int size=25; Actually, How can i use infinite number like (n). I used "n" like bellow int n; const int size = n; however it only takes 8 values. My txt file can contained different value(n) evrytime, so, i dont …

Member Avatar for siddiquedu
0
404
Member Avatar for sourabhyogi

Hi, I am trying to write a program which read a certain input in a particular format and then gives an ouput. I wrote a code to read the file. Input is something like this. X 20 60 80 90 X 78 98 97 96 X 34 35 43 23 …

Member Avatar for sourabhyogi
0
258
Member Avatar for dhimanbiswas4u

sir i want to get data between to tag... example:(showing in my view source) <img class='stat_icon' src='/images/green.png'> **data to be extracted**</a> or like <input type=hidden name=timestamp value='**data to be extracted**'> for the first example i wrote like: Imports System.Text.RegularExpressions Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

Member Avatar for tinstaafl
0
268
Member Avatar for chriswelborn

I just wanted to show the basic usage of docopt, a module that makes parsing command-line arguments so much easier. I'm not affiliated with the creators of docopt, but I'm certainly thankful for their work and happy to post this little snippet. I will point you to [docopt.org](http://docopt.org) for more …

1
3K
Member Avatar for ferdinandmucos

I'm not well conversant with java or AJAX, but how can i read each line of a string display each line of question and answers at a time, after a user have answered the question id displays the next question upto the last one. Im using fget () n php …

Member Avatar for diafol
0
306

The End.