14 Topics

Member Avatar for
Member Avatar for joshl_1995

Hello Daniweb Community, I was wondering if there is a way to replace words from a listbox. So at the moment I've got a listbox with a couple of strings to be replaced in the textbox, however single line listbox items work but when I add a multi-lined item eg. …

Member Avatar for joshl_1995
0
326
Member Avatar for Tycellent

std::endl vs \n Are any particular one which should be used at specific times? I understand endl flushes the stream (although i'm not 100% what this means) while \n is simply a newline.

Member Avatar for rubberman
0
398
Member Avatar for DrEinstein

Hi everyone, Does anyone have an idea of how to skip a line in a JTextField? In System.out.println, I would normally type n but it didn't work for me when I used it in a textfield: text1.setText(**"n"**+coloumn[counter]); where the output displays well as desired excpet that it doesn't skip a …

Member Avatar for DrEinstein
1
656
Member Avatar for laver68xo

I'm trying to take a file that looks like this: >taxon1 ACCGTGGATC CCTATTGATT GGATATTATC >taxon2 TTCATATGTA GGATTTCATA GATGGCCCCC And get it to look like this taxon1 ACCGTGGATCCCTATTGATTGGATATTATC I'm using a python script, so far this is what I have: #!/usr/bin/python import sys if len(sys.argv) < 2: print "usage: finalmyscript.py infile.txt" …

Member Avatar for HiHe
0
198
Member Avatar for dreamslct

**Hi forum, I've got a question for the pros. I am making a program that has map<String, String> map = new TreeMap<String, String>(); and a Scanner to read a file contains some data which is assigned to map.put(); method. The data is something like this: UK USA Canada Australia etc. …

Member Avatar for dreamslct
0
231
Member Avatar for PriteshP23

Hello Everyone..!! I am beginner at PHP. I would like to have solution for "\n" in textfile php. $file = "testFile.txt"; $fh = fopen($file, 'a+') or die("can't open file"); $firstname = $_POST["prenom"]; $lastname = $_POST["nom"]; $mood = $_POST["humeur"]; $datestring = date("d/m/y "); $timestring = date("H.i.s"); $data = "$firstname ; $lastname …

Member Avatar for PriteshP23
0
202
Member Avatar for CharlieBrook

int main(void) { char faceValue[2]; char suitValue[2]; //User enters the value of their hole cards. setCardFaceValue(faceValue); setCardSuitValue(suitValue); for(int i=0;i<2;i++) printf("Element %i: %c %c\n",i,faceValue[i],suitValue[i]); return 0; } void setCardFaceValue(char* face) { char card[2][20] = {"left card:","right card:"}; for(int i=0;i<2;i++) { printf("Enter face value for "); for(int x=0;x<19;x++) { printf("%c",card[i][x]); if(card[i][x] == …

Member Avatar for Ancient Dragon
0
232
Member Avatar for Red Dragon

Hi, I have a form which saves a string of text to a database with rawurlencode() which adds things like space characters (%20) and newline characters (%0D%0A), however, when I use rawurldecode() on this string it only decodes the space characters, and ignores all the newlines, by simply printing them …

Member Avatar for diafol
1
568
Member Avatar for dbsp

I've read many threads on how to remove a new line character '\n' using fgets()-- however, how would one go about removing a new line character simply by using getchar() ?

Member Avatar for deceptikon
0
2K
Member Avatar for iamthesgt

This is homework. I have to write a bash shell script using awk to process three delimited text files and produce a formatted report. The three files are as follows: [CODE]GRADES file John Bunyan:90:100:75:60 Maria Montessori:80:90:60:82 Alice Cooper:75:80:54:47 Harvey Mudd:89:45:89:95 PROJECTS file test1:30 test2:30 paper2:20 exam:50 LEVELS file A:89.5 B:79.5 …

Member Avatar for Fest3er
0
296
Member Avatar for AdampskiB

Hello there, Currently doing some work for my coursework. I've noticed the "\n" is obviously the new line function or whatever you guys call it, but would you understand what I mean when I say it creates too much of a new line? For example, I want the newline to …

Member Avatar for AdampskiB
0
112
Member Avatar for ChrisHunter

Hi, i'm trying to implement a print function and i can print a single string out but i'm having trouble configuring the page setup properly, mainly moving to a new line when the margin of the page is reached and moving to a new lines for each string in a …

Member Avatar for ChrisHunter
0
156
Member Avatar for weasel7711

I wrote a program to analyze a log file for a machine that my company repairs. The program that runs the machine spits output into a text file (.log) and my program will analyze it and return the results of different calculations to the user. The log file idealy looks …

Member Avatar for weasel7711
0
433
Member Avatar for Graphix

I'm having a problem with IE, while it works in FF: the var doesn't save any \n aka enter. I have the following code: [code] <script type="text/javascript"> function addu() { var message = window.prompt("Enter the text that needs to be underlined below"); if (message != "" && message != "null") …

Member Avatar for ShawnCplus
-1
153

The End.