51 Topics
| |
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 … | |
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 … | |
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, … | |
| 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 … |
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 … | |
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 … | |
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. | |
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) == … | |
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 … | |
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 … | |
| 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") |
I want to format today's date like this dd/mm/yyyy Please help me | |
| 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? |
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 - … | |
Please i need a sm1 to tel me how to correctly format my codes if i want to post them on daniweb | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.... … | |
[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!!! | |
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 … | |
I want to know if it possible for a code to automatically format a video once uploaded by a user to my website. | |
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) { … | |
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: … | |
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 … | |
How can I formate my storage device using XP SP3. | |
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 … |
The End.