51 Topics

Member Avatar for
Member Avatar for Reverend Jim

I just posted a code snippet [here](https://www.daniweb.com/programming/code/515601/vbscript-implementation-of-quicksort) and noticed a couple of problems. 1. No matter how I try to fix it, the frst line refuses to display properly indented. 1. The few lines of code that I included in the top window, even though properly indented, refuse to display …

Member Avatar for Dani
0
916
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 Mike Askew

Howdy I have a timespan that contain in excess of 24 hours. For the example lets use a value of 1 day 6 hours and 32 minutes. I would like to get this into a string that displays "30:32". Have so far tried something along the lines of `string.Format("{0}:{1}", TimeSpan.TotalHours, …

Member Avatar for Teme64
0
2K
Member Avatar for diafol

In this thread: https://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/495011/jquery-gallery/3 I tried to format the html in the editor without success. I narrowed it down to <script> tags. All lines prior to the <script> tags seem to be missing a new line and HTML looks as if it's been posted as one long line. If a …

Member Avatar for cereal
2
355
Member Avatar for Ivzirnalsradeys

a) Program code is often written using procedures. Give THREE advantages of using procedures in programming. b) Write an algorithm (pseudocode or flowchart) for a procedure to validate the input of a date in February in any year. The date should be input in the form ddmmyyyy e.g. 07021998 You …

Member Avatar for rubberman
-2
232
Member Avatar for kxjakkk

I wanted to format this string but I don't know how I can do the formatting part at all. class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if …

Member Avatar for sepp2k
0
259
Member Avatar for Nikolas9896

Could you tell me how I can use the .docx file with Visual Studio 2013 but only with C++ code, and in my application **without** using **MS Word** or another wordprocess. Thanks. I wanna change formatting(bold italy, centre..) and text in .docx-files.

Member Avatar for NathanOliver
0
130
Member Avatar for sys73r

I'm working with a LIST that am getting from a soup which after the clean up gives me: lists of variable length ['7.0', '7.5', '6.8', '6.9'] or ['7.0', '7.5'] so my problem is when I try formating the output: code snippet: if grades: print '\r\n["' + str(student[0]), if len(grades) == …

Member Avatar for David W
0
387
Member Avatar for Pyler

Right now I'm typing in consolas, a favorite font among programmers but as soon as I submit this post, all that I've written will be in Arial. I'm sorry but, I hate Arial. I can't stand the narrow words. I almost always have to stop and examine each word individually …

Member Avatar for ddanbe
0
279
Member Avatar for ObSys

Ok so I'm writing a program that outputs text to a file. Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would …

Member Avatar for JamesCherrill
0
275
Member Avatar for diafol

When lloking through code snippets on PHP, I noticed that formatting/indentation is looking a little strange. Example: http://www.daniweb.com/web-development/php/code/430455/configurable-table-class ![ef419832f9f07668996122411aaec172](/attachments/large/0/ef419832f9f07668996122411aaec172.png "ef419832f9f07668996122411aaec172")

Member Avatar for Dani
0
239
Member Avatar for mavtcr
Member Avatar for G_Waddell
0
957
Member Avatar for diafol

Have a look at this thread... http://www.daniweb.com/web-development/databases/mysql/threads/466095/create-.mdf-file-from-mysql My machine shows seems to reformat this to plain text. So just plain page of text. Using Chrome/W7. Anybody else?

Member Avatar for diafol
0
305
Member Avatar for nikolaos

I am making a project in Number Theory and i want to display some formatting text in a textArea in my Gui. I have a method named padding which takes an integer as an argument and return a String consisitng of a number of spaces. This number is 12 - …

Member Avatar for nikolaos
0
927
Member Avatar for Olagsfark
Member Avatar for pritaeas
0
138
Member Avatar for bengngim

I have the following code which works fine to format text from an SQL table. It seems a little long winded though. It will create paragraphs from the line breaks but ignore header and list tags (not wrap those in "p" tags. Can anyone see an obvious way to condense …

Member Avatar for diafol
0
277
Member Avatar for milkman93

Hey Guys, I'm want to output a calculation to a JLabel. Example: double num1 = 14; double num2 = 3; double ans; ans = num1/num2; JLabel jl = new JLabel(); add(jl); jl.setText("The Answer is: " + ans); Currently the answer for this will be 4.666666667. Now if this was a …

Member Avatar for milkman93
0
5K
Member Avatar for Baldur

Hi Everyone, I have been trying to teach myself how to code for more than a year now, having started with VBA and then switching to c++. Recently I have been forced to confront how horrific my coding practices are, and have been doing pennance by trying to modify 1500 …

Member Avatar for Tumlee
0
406
Member Avatar for dbalas

Hi! Need help with conditional formatting of table rows... What i need to acheave is to change table row background in red if date_needed is <= than 48 hours than now(). This is what i have now `if (date('d',strtotime($data['date_needed'])) <= 2) $row["rowstyle"]='style="background:red"';` it works in a way... It changes background …

Member Avatar for dbalas
0
350
Member Avatar for VIPER5646

Hi all I'm trying to shade a cell based on a date difference between column 7 & 8. It seams to work accept column 8 seams to be the one being shaded instead of column 7. I have googled but can't find a solution to have the calculatin being made …

Member Avatar for john.knapp
0
308
Member Avatar for JamesCherrill

I'm curious. Why is so much code in this forum formatted like this [CODE]if (something) { do something } else { do another thing }[/CODE] rather than [CODE]if (something) { do something } else { do another thing }[/CODE] The first version is harder to read and takes up more …

Member Avatar for JamesCherrill
0
374
Member Avatar for ar123

Hi there! I am new to daniweb.com and C++ CLI. I am trying to make a program that will tell the user the text for the ListItem number they type in. The ListItem information is stored in a text file with my custom file formatting, which is: <~ListItem 1> text.... …

Member Avatar for ar123
0
278
Member Avatar for debayanmitra

[CODE] Dim mDocDtT As Date Dim mDtPeriod as Integer = 4 mDocDtT = DateAdd(DateInterval.Month, mDtPeriod, mDocDtT) mDocDtT = Format(mDocDtT, "yyyy-MM-dd") [/CODE] But the codes are not working the date is still in #01/27/2011# format I want it in yyyy-MM-dd format Please help!!!

Member Avatar for debayanmitra
0
185
Member Avatar for rotten69

Hi everyone, When I purchased my hard drive, its size was 1TB. Iformatted it a few times and I don't know why and how it has lost 70GB. Is there a way that I can get it back up to its original size? if yes, Will I be able to …

Member Avatar for technoknol
0
2K
Member Avatar for garyjohnson

I want to know if it possible for a code to automatically format a video once uploaded by a user to my website.

Member Avatar for garyjohnson
0
201
Member Avatar for Lucaci Andrew

This is a program which I made back in the beginnings when I was trying to figure out how to work with strings, and how to work with files. This is suppose to format a C++ code, for example if the syntax of an if statement is if (condition) { …

Member Avatar for Lucaci Andrew
0
363
Member Avatar for Gobble45

Hello all, Ive done some googling around, and cant find anything that explains why my date isnt being formatted to what i tell it. my code: dim date_now as date date_now = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") So for example if the date/time is February 11 2015, 4:44:23pm it would be formatted as: …

Member Avatar for Gobble45
0
210
Member Avatar for scaiferw

Working in Word 2010, I have a long document with many formatting changes to be made. To start with, throughout the document I'd like to replace "Click OK" with "Click [B]OK[/B]", so the OK will be bold but not "Click". I also need it to be case insensitive, as some …

0
113
Member Avatar for freeasker
Member Avatar for doomsday1216

Hi-- I am new to C++ and am having trouble with this program: The objective is to take input from a file and write it to output, using the '|' character as the delimiter, but displaying it using a comma (ex, if line 1 is "1000|6 1 6 5 3 …

Member Avatar for WaltP
0
167

The End.