18 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Mr.M

Hi Dw. I'm trying to read a text file. This text file has a multiply lines and what I want is that I want to separate each line or should I say I want to split each line (chop it) so that I will be able to assign these fields …

Member Avatar for Mr.M
0
598
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
332
Member Avatar for primzon

Hello guys! Please help me with a little problem. I have one table(Person) where are some values. My current syntax is: SELECT Status, COUNT(Name) AS Number FROM Person WHERE Status = 'Married'; Result: Status_________Number --------------------- Married__________3 But I want to get the result for each status. That would be something …

Member Avatar for JorgeM
0
194
Member Avatar for kjk86

What I'm trying to do is take a source file and only pull specific lines out and display those lines to a label/textbox/etc. What's happening is I am able to pull the first line, however my loop is terminating and I do not receive the rest of the results. Here …

Member Avatar for TnTinMN
0
388
Member Avatar for diafol

Not sure if this has been mentioned - I did search but couldn't find anything that related: Noticed this issue in Opera today. I rarely use the browser, but seems common on all pages with code. The code numbers seem to overlap. ![Capture44](/attachments/large/0/Capture44.PNG "Capture44") As you can see, just the …

Member Avatar for diafol
0
224
Member Avatar for Dendari

Hello everyone. I'm working on a program which should edit a text file by adding/deleting some specific lines. By default this text file doesn't have these specific lines, so the program will add them. But I also want it to replace them if they're already in the text file. Basically …

Member Avatar for Dendari
0
204
Member Avatar for collin_ola

Hi, I am trying to split a single line of data into three separate parts so that they can be displayed in different textboxes. The data looks like this: item1_item2_item3 The code that I tried is: [CODE]Dim arrayLines() As String Dim record As String record = Subs.Text arrayLines = record.Split("_") …

Member Avatar for collin_ola
0
161
Member Avatar for Ntropy

Basically, i've been told to initialise a grid into the "canvas" section of this program i've made, I need to make a fine grid that stretches across the whole canvas horizontally and vertically, 10 x 10 pixels apart example of the code i'm editing to do this below... [CODE] class …

Member Avatar for Ntropy
0
310
Member Avatar for Tobyjug2222

Hi, I've been searching around these forums for quite a while now, and can't seem to either understand or find what I'm looking for. ^ As you can probably tell, I'm a real Novice to VB! I have a text file, that my program is always adding to it, it's …

Member Avatar for Tobyjug2222
0
296
Member Avatar for voidyman

I want to remove blank lines (empty or with spaces and tabs) from a file from within a perl script. here's what i tried. [CODE]`sed '/^ *\$/d' $file1`;[/CODE] Does not seem to work for some reason. Any Help please?

Member Avatar for voidyman
0
855
Member Avatar for techlawsam

Hi Im a beginner in programming C# while watching this tutorial on C# (writing a console application) the guy skipped over a couple segments in between parts of code. Where he was doing "if" statements of " if (input3 == "n" (vertical lines here) input3 == "n"). Im wondering how …

Member Avatar for techlawsam
0
2K
Member Avatar for Muhammad Anas

I am trying to create a program that, after inputing a text file, can: 1) Count number of lines in the text file. 2) Count number of words in the file. 3) Count number of characters in the file [B][U]including[/U][/B] white spaces. 4) Count number of characters in the file …

Member Avatar for Narue
0
2K
Member Avatar for vb2learn

Hello Coders Need help I want to remove the lines that contain specific text. (Whole Line) Eg: Textbox1.Text = [code]learn lines dani knows everything web knows lines lines knows daniweb everything dani everything lines [/code] So textbox1.text will become and remove whole line that contains the word "daniweb" [code]learn lines …

Member Avatar for vb2learn
0
2K
Member Avatar for doomas10

Hello, I have a txt file which contains data in this format: [CODE]cross-sectional study 21225114.txt prospective cross-sectional study 21225178.txt cross-sectional study 21225178.txt retrospective cohort 21225558.txt retrospective cohort study 21225558.txt cohort study 21225558.txt[/CODE] This shows what type of study each of the txt files have. Problem is some have more that …

Member Avatar for doomas10
0
177
Member Avatar for doomas10

Hello all, just a quick question! I was wondering how can you pace lines together in python. In my case i have a file like this: [CODE]<word> <word> <number>.txt <word> <word> <number>.txt <word> <word> <word> <number>.txt <word> <word><word><word> <number>.txt <word> <word> <number>.txt <word> <number>.txt <word> <word> <number>.txt [/CODE] Does anyone …

Member Avatar for doomas10
0
195
Member Avatar for ak24

Hello... I want to draw three straight lines on a form. Can you tell me if the following code is correct: [CODE]Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim Line1 As System.Drawing.Graphics Dim PenLine As New System.Drawing.Pen(System.Drawing.Color.Black) Line1 = Me.CreateGraphics Line1.DrawLine(PenLine, 0, 129, 529, 129) …

Member Avatar for ak24
0
630
Member Avatar for Griff0527

I am writing a code to open a command line, prompt for the name of a file to copy, prompt for a new file name, then it should copy the file (adding a header and line numbers plus adding .lis to the filename of the new file). I BELIEVE I …

Member Avatar for Griff0527
0
220
Member Avatar for awa

Hi, I want to make a python program which allows to read data from a file starting from a line with a certain keyword, skipping 4 lines, beginning to write the contents to an output file and stopping after n lines. I tried so far an input with the re.search() …

Member Avatar for awa
0
146

The End.