56 Solved Topics

Remove Filter
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 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 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
734
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
407
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
365
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
318
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
968
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
254
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
157
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 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
406
Member Avatar for helixkod

I have an xml file that I have to read in, convert all the carriage returns to \x0D and line feeds to \0xA, then call it into a function as a string. So for example my XML file is: <TEST> this is a string </Test> I would want a string …

Member Avatar for helixkod
0
1K
Member Avatar for garyjohnson

I have tried every solution I have come across and am still not getting any results. I have a comment box and I am trying to remove all repetative new lines or `/r/n` from the input. if (isset($_POST['comment'])) { $comment = mysql_real_escape_string($_POST['comment']); $comment = filter_var($comment, FILTER_SANITIZE_STRING); $comment = nl2br($comment); //this …

Member Avatar for garyjohnson
0
1K
Member Avatar for syeda amna

I am trying to run a program from python command line. I installed python on D: drive. PLZZ help me in fixing this problem.

Member Avatar for syeda amna
1
562
Member Avatar for babi.meloo

I need to design and implement an application that reads a string from the user and prints it one character per line. import java.util.*; import java.text.*; public class EveryLine5 { //---------------------------------------------------------------------------------------------- // Reads in a string. //---------------------------------------------------------------------------------------------- public static void main (String[] args) { int length; char current; String msg …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Yorkiebar14

Hello, I have a made a forum like page where a user can submit a thread and the information gets stored in a database. However, when I try to output the data it outputs it without any line breaks in it, example: The user inputs: Hello, This a paragraph It …

Member Avatar for Yorkiebar14
0
197
Member Avatar for volkang

Hi, I encounter an assertion error on my thesis while trying to write a line to a file. The related code is pasted below. The funny thing is that this code runs maybe 5000 times and i get the error at 5001 th time. Thank you very much for any …

Member Avatar for volkang
0
345
Member Avatar for nexocentric

My network card doesn't have any UNIX drivers, but it does have windows drivers, so I'm trying to install ndiswrapper. It seems like the default installation of Ubuntu server doesn't have python installed, so I can't dpkg niswrapper in. Is there any resource to help me learn how to hunt …

Member Avatar for nexocentric
0
267
Member Avatar for joshl_1995

Hello, I want to combine all my database table in to one line so i can put it all in the url e.g. Name | Times __________________________ test1 | 1 __________________________ test2 | 2 __________________________ This is how i want it to look in the url (Result.php?loggedin=true&links=test1-1_newline_test2-2)(_newline_ means that will …

Member Avatar for jstfsklh211
0
279
Member Avatar for guilherme.carvalho.9250

Hello everyone, Im a beginner in vb.net and currently Im developing a program where i save date to a txt file like this Reminder#dinner#26-07-2012 19:52:00 and show it in a listbox(all the lines in the txt file). What i want to do is to select a line(item) in the listbox …

Member Avatar for guilherme.carvalho.9250
0
2K
Member Avatar for guilherme.carvalho.9250

Hello to everyone, Im a beginner in vb.net and currently Im developing a "reminder" program, the user inserts a task that he as to do, the date and the time to be remimbered! Im saving the task in a txt file like this, "Make dinner,Reminder,24-07-2012 18:31:00", but line by line, …

Member Avatar for guilherme.carvalho.9250
0
2K
Member Avatar for Synestic

Hello First of all, I'm new to PHP, and also to Daniweb. I've been looking everywhere for some PHP code to skip to the next line every time my string ($description) has a period in it. So here's an example of what I want to achieve: Text: The car is …

Member Avatar for Dani
1
160
Member Avatar for Riteman

I just created 5 Rich text boxes in runtime through a subroutine as: Dim c As Control c = New RichTextBox() With c .Name = "VersesRTB" & VerseCount .Location = New Point(70, y) .Height = 100 .Width = 580 .Font = New Font("Microsoft Sans Serif", 12) End With It successfully …

Member Avatar for Riteman
0
2K
Member Avatar for Chuckleluck

Hello, I'm fairly new to programming, and I'm not exactly sure how to do line-rect collision detection. If it helps, I'm using SFML 2. Can someone explain to me how I would go about coding line-rect collision detection? Thanks in advance.

Member Avatar for adityatandon
0
223
Member Avatar for BeeKeeper18

Right guys, I'm really new to this but I'm getting along ok, but I've hit a block. I need to be able to know how to search a text file in VB for a particular line and then display it. the files I'm trying to use are set up as: …

Member Avatar for BeeKeeper18
0
3K
Member Avatar for magicmarkuk

Hi I have imported a number (500+) posts into Wordpress from another CMS (Expression Engine). On a number of posts I have a problem with the way paragraphs are being displayed and I can trace this back to the post data that has been copied across. For example, when the …

Member Avatar for magicmarkuk
0
220

The End.