Search Results

Search found 2255 results on 91 pages for 'formatting'.

Page 10/91 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Excel 2007 Format Row of Cells containing certain text

    - by paradox
    I am attempting to perform conditional formatting in Excel 2007 by checking if a cell has a specific string in it and therefore highlighting the entire row corresponding to the text. However, Excel 2007's Conditional Formatting only allows me to highlight that specific cell. Is there a workaround to this without having to get my hands dirty with VBA?

    Read the article

  • Using PHP substr() and strip_tags() while retaining formatting and without breaking HTML

    - by Peter
    I have various HTML strings to cut to 100 characters (of the stripped content, not the original) without stripping tags and without breaking HTML. Original HTML string (288 characters): $content = "<div>With a <span class='spanClass'>span over here</span> and a <div class='divClass'>nested div over <div class='nestedDivClass'>there</div> </div> and a lot of other nested <strong><em>texts</em> and tags in the air <span>everywhere</span>, it's a HTML taggy kind of day.</strong></div>"; When trimming to 100 characters HTML breaks and stripped content comes to about 40 characters: $content = substr($content, 0, 100)."..."; /* output: <div>With a <span class='spanClass'>span over here</span> and a <div class='divClass'>nested div ove... */ Stripping HTML gives the correct character count but obviously looses formatting: $content = substr(strip_tags($content)), 0, 100)."..."; /* output: With a span over here and a nested div over there and a lot of other nested texts and tags in the ai... */ Challenge: To output the character count of strip_tags while retaining HTML formatting and on closing the string finish any started tags: /* <div>With a <span class='spanClass'>span over here</span> and a <div class='divClass'>nested div over <div class='nestedDivClass'>there</div> </div> and a lot of other nested <strong><em>texts</em> and tags in the ai</strong></div>..."; Similar question (less strict on solution provided so far)

    Read the article

  • Merge Word Documents (Office Interop & .NET), Keeping Formatting

    - by mbmccormick
    I'm having some difficulty merging multiple word documents together using Microsoft Office Interop Assemblies (Office 2007) and ASP.NET 3.5. I'm able to merge the documents, but some of my formatting is missing (namely the fonts and images). My current merge code is shown below. private void CombineDocuments() { object wdPageBreak = 7; object wdStory = 6; object oMissing = System.Reflection.Missing.Value; object oFalse = false; object oTrue = true; string fileDirectory = @"C:\documents\"; Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word.Document wDoc = WordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing); string[] wordFiles = Directory.GetFiles(fileDirectory, "*.doc"); for (int i = 0; i < wordFiles.Length; i++) { string file = wordFiles[i]; wDoc.Application.Selection.Range.InsertFile(file, ref oMissing, ref oMissing, ref oMissing, ref oFalse); wDoc.Application.Selection.Range.InsertBreak(ref wdPageBreak); wDoc.Application.Selection.EndKey(ref wdStory, ref oMissing); } string combineDocName = Path.Combine(fileDirectory, "Merged Document.doc"); if (File.Exists(combineDocName)) File.Delete(combineDocName); object combineDocNameObj = combineDocName; wDoc.SaveAs(ref combineDocNameObj, ref m_WordDocumentType, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing); } I don't care necessarily how this is accomplished. It could output via PDF if it had to. I just want the formatting to carry over. Any help or hints that you could provide me with would be appreciated! Thanks!

    Read the article

  • Specifying formatting for csv.writer in Python

    - by user248237
    I am using csv.DictWriter to output csv files from a set of dictionaries. I use the following function: def dictlist2file(dictrows, filename, fieldnames, delimiter='\t', lineterminator='\n'): out_f = open(filename, 'w') # Write out header header = delimiter.join(fieldnames) + lineterminator out_f.write(header) # Write out dictionary data = csv.DictWriter(out_f, fieldnames, delimiter=delimiter, lineterminator=lineterminator) data.writerows(dictrows) out_f.close() where dictrows is a list of dictionaries, and fieldnames provides the headers that should be serialized to file. Some of the values in my dictionary list (dictrows) are numeric -- e.g. floats, and I'd like to specify the formatting of these. For example, I might want floats to be serialized with "%.2f" rather than full precision. Ideally, I'd like to specify some kind of mapping that says how to format each type, e.g. {float: "%.2f"} that says that if you see a float, format it with %.2f. Is there an easy way to do this? I don't want to subclass DictWriter or anything complicated like that -- this seems like very generic functionality. How can this be done? The only other solution I can think of is: instead of messing with the formatting of DictWriter, just use the decimal package to specify the decimal precision of floats to be %.2 which will cause to be serialized as such. Don't know if this is a better solution? thanks very much for your help.

    Read the article

  • Formatting and pretty printing dates with jquery

    - by Tauren
    I need to display dates in a couple different ways in an app built with jquery. In some situations, I need the typical "yyyy-mm-dd hh:mma" type of formatting, with all of it's different permutations. In other cases, I need to show dates "pretty printed" similar to how StackOverflow does them: 5 seconds ago 12 minutes ago 3 hours ago yesterday 2 days ago My application already uses JQuery UI DatePicker which includes a formatDate() function, but as far as I can tell, there is no way to use it outside of the datepicker. I want to format dates that aren't associated with a datepicker. Is it possible to do this using DatePicker? The DateJS library can parse dates like "12 minutes ago", but as far as I can tell, it cannot take a Date object and format strings like this. It can format the typical "yyyy-mm-dd" types of formats. This library seems pretty heavy as well. John Resig's Pretty Dates looks like it can provide the pretty printing ("2 hours ago"), but it doesn't do the standard formatting. Is there not a single plugin that can do all of this? Is there a way to leverage the DatePicker code so I don't have to load multiple codebases that do the same things?

    Read the article

  • Version Control and Coding Formatting

    - by Martin Giffy D'Souza
    Hi, I'm currently part of the team implementing a new version control system (Subversion) within my organization. There's been a bit of a debate on how to handle code formatting and I'd like to get other peoples opinions and experiences on this topic. We currently have ~10 developers each using different tools (due to licensing and preference). Some of these tools have automatic code formatters and others don't. If we allow "blind" checkins the code will look drastically different each time someone does a check in. This will make things such as diffs and merges complicated. I've talked to several people and they've mentioned the following solutions: Use the same developer program with the same code formatter (not really an option due to licensing) Have a hook (either client or server side) which will automatically format the code before going into the repository Manually format the code. Regarding the 3rd point, the concept is to never auto-format the code and have some standards. Right now that seems to be what we're leaning towards. I'm a bit hesitant on that approach as it could lead to developers spending a lot of time manually formatting code. If anyone can please provide some their thoughts and experience on this that would be great. Thank you, Martin

    Read the article

  • Merge Word Documents (Office Interop & .NET), Keeping Formatting

    - by mbmccormick
    I'm having some difficulty merging multiple word documents together using Microsoft Office Interop Assemblies (Office 2007) and ASP.NET 3.5. I'm able to merge the documents, but some of my formatting is missing (namely the fonts and images). My current merge code is shown below. private void CombineDocuments() { object wdPageBreak = 7; object wdStory = 6; object oMissing = System.Reflection.Missing.Value; object oFalse = false; object oTrue = true; string fileDirectory = @"C:\documents\"; Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word.Document wDoc = WordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing); string[] wordFiles = Directory.GetFiles(fileDirectory, "*.doc"); for (int i = 0; i < wordFiles.Length; i++) { string file = wordFiles[i]; wDoc.Application.Selection.Range.InsertFile(file, ref oMissing, ref oMissing, ref oMissing, ref oFalse); wDoc.Application.Selection.Range.InsertBreak(ref wdPageBreak); wDoc.Application.Selection.EndKey(ref wdStory, ref oMissing); } string combineDocName = Path.Combine(fileDirectory, "Merged Document.doc"); if (File.Exists(combineDocName)) File.Delete(combineDocName); object combineDocNameObj = combineDocName; wDoc.SaveAs(ref combineDocNameObj, ref m_WordDocumentType, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing); } I don't care necessarily how this is accomplished. It could output via PDF if it had to. I just want the formatting to carry over. Any help or hints that you could provide me with would be appreciated! Thanks!

    Read the article

  • Technique for selectively formatting data in a PowerShell pipeline and output as HTML

    - by halr9000
    Say that you want to do some fancy formatting of some tabular output from powershell, and the destination is to be html (either for a webserver, or to be sent in an email). Let's say for example that you want certain numeric values to have a different background color. Whatever. I can think of two solid programmatic ways to accomplish this: output XML and transform with XSLT, or output HTML and decorate with CSS. XSLT is probably the harder of the two (I say that because I don't know it), but from what little I recall, it has the benefit of bring able to embed the selection criteria (xpath?) for aforementioned fancy formatting. CSS on the other hand needs a helping hand. If you wanted a certain cell to be treated specially, then you would need to distinguish it from its siblings with a class, id, or something along those lines. PowerShell doesn't really have a way to do that natively, so that would mean parsing the HTML as it leaves convertto-html and adding, for example, a "emphasis" class: <td class="emphasis">32MB</td> I don't like the idea of the required text parsing, especially given that I would rather be able to somehow emphasize what needs emphasizing in Powershell before it hits HTML. Is XSLT the best way? Have suggestions for how to markup the HTML after it leaves convertto-html or ideas of a different way?

    Read the article

  • Comparing strings that contain formatting in C#

    - by Finglas
    I'm working on a function that given some settings - such as line spacing, the output (in string form) is modified. In order to test such scenarios, I'm using string literals, as shown below for the expected result. The method, using a string builder, (AppendLine) generates the said output. One issue I have run into is that of comparing such strings. In the example below, both are equal in terms of what they represent. The result is the area which I care about, however when comparing two strings, one literal, one not, equality naturally fails. This is because one of the strings emits line spacing, while the other only demonstrates the formatting it contains. What would be the best way of solving this equality problem? I do care about formatting such as new lines from the result of the method, this is crucially important. Code: string expected = @"Test\n\n\nEnd Test."; string result = "Test\n\n\nEnd Test"; Console.WriteLine(expected); Console.WriteLine(result); Output: Test\n\n\nEnd Test. Test End Test

    Read the article

  • Formatting data from management database

    - by bVector
    I've got some data that goes like this: Config_Name Question Answer Cisco WAN Sensitivity: High Cisco WAN Authorized Users: Brent, Charles Cisco WAN Last Audited: n/a Cisco WAN Next Audit: 3/30/2012 Cisco WAN Audit Signature: Cisco WAN Username: MYCOMPANY Cisco WAN Password: Cisco WAN Encrypted-A ENCRYPTED DATA Cisco WAN Encrypted-B Cisco WAN Encrypted-C vCenter server Sensitivity: High vCenter server Authorized Users: Brent, Charles vCenter server Last Audited: vCenter server Next Audit: 3/30/2012 vCenter server Audit Signature: ENCRYPTED DATA vCenter server Username: administrator vCenter server Password: vCenter server Encrypted-A ENCRYPTED DATA vCenter server Encrypted-B vCenter server Encrypted-C AKSC-NE01 IPMI Sensitivity: High AKSC-NE01 IPMI Authorized Users: Brent, Charles AKSC-NE01 IPMI Last Audited: AKSC-NE01 IPMI Next Audit: 3/30/2012 AKSC-NE01 IPMI Audit Signature: ENCRYPTED DATA AKSC-NE01 IPMI Username: MYCOMPANY AKSC-NE01 IPMI Password: AKSC-NE01 IPMI Encrypted-A ENCRYPTED DATA AKSC-NE01 IPMI Encrypted-B AKSC-NE01 IPMI Encrypted-C and I need it to be in this format: Config_Name Sensitivity: Authorized Users: Last Audited: Next Audit: Audit Signature: Username: Password: Encrypted-A Encrypted-B Encrypted-C AKSC-NE01 IPMI High Brent, Charles 3/30/2012 ENCRYPTED DATA MYCOMPANY ENCRYPTED DATA Cisco ASA5505 WAN High Brent, Charles n/a 3/30/2012 ENCRYPTED DATA MYCOMPANY ENCRYPTED DATA vCenter server High Brent, Charles 3/30/2012 ENCRYPTED DATA administrator ENCRYPTED DATA the tabs get messed up on here but hopefully you get my drift. does anyone know an easy way to do this? I haven't found one with excel just yet.

    Read the article

  • Protect Section in Word without limiting formatting in unprotected sections

    - by grom
    Steps to create protected section (in Word 2003): Insert - Break... Choose Section break, Continuous Tools - Protect Document... Enable 'Allow only this type of editing in the document' in editing restrictions In the drop down select 'Filling in forms' Click on 'Select sections...' and uncheck the unprotected sections (eg. Section 2) Click 'Yes, Start Enforcing Protection' and optionally set a password. Now go to the unprotected section and in the Format menu options like 'Bullets and Numbering...' and 'Borders and Shading...' are greyed out. How can you protect a section without limiting the features that can be used in the unprotected section?

    Read the article

  • Formatting an HP ProLiant dl380 G4

    - by i.h4d35
    I have an old HP ProLiant dl380 G4 server whose hard disk needs to be formatted. Unfortunately, I cannot seem to do so. For one, it doesn't seem to be detecting any Hard Drives attached to the Server. The Hard Disks show up in the Ctrl+A option (SCSI Configuration Utility). Also, while inserting the SmartStart CD (7.01 or 7.04), it shows a message that no logical drives are found and there aren't any options to create one. Alternately I've tried slipstreaming the SCSI Driver into the OS but that doesn't seem to be helping. Also, I have a USB Floppy drive (for the SCSI driver) but that doesn't seem to be detected. Also, directly installing the OS (MS Server 2003 Standard Edition) obviously doesn't work (shows no hard disk found) Could anyone please advise as to what other needs to be done to format my server? Also please tell me what are the possible errors/mistakes which've been made so that I can learn from them. I went through some questions here on ServerFault and the HP guides here but they weren't of much help to a n00b like me. Thanks in Advance.

    Read the article

  • Displaying what `history` line is current in bash prompt

    - by warren
    What formatting character needs to be added to a bash prompt to indicate the most recent history item run (or the current command number if 1 could be added to the last history entry)? My prompt string is this: \[\033[33m\][\u@\[\033[1;31m\]\h]\]\033[0m {\W}\n\033[1;34m\]\w\]\033[0m > Gives me the following display: [user@host] {~} ~ > User is in yellow, and the host is in red. The entry in brackets is the current directory, and the entry before the greater-than sign is the full pwd. Can I append to the first line the current command number so I would have something like the following: [user@host] {~} (nnn) ~ > where (nnn) is the current (or just processed) command number, as shown when running history?

    Read the article

  • exFAT to NTFS formatting troubles

    - by user1083734
    I recently ran a chkdsk on 2.5" 230GB SATA HDD but the plug was pulled before the end of the chkdsk and since then it wouldn't boot up. Deciding to scrap all data on the HDD (no longer needed it), I then fitted it into an external HDD caddy and (in diskpart) cleaned the disk, created new partition and volume and tried to format it to NTFS. It couldn't do this on long or short formats and so I went with the less-appreciated alternative - exFAT (I run Win7). It quick formats to exFAT fine but encounters errors during long format. At the moment it is exFAT. Of course I would really like it to be NTFS as I will probably need to use it on Win XP too. Could anyone suggest a method of trying to reformat to NTFS? Do you think that, when chkdsk was interrupted first time, the disk was corrupted and is irretrievable? I find this situation slightly odd, as it HAS formatted to exFAT and DOES seem to work when I copy files across! Also, I CAN use disk management console to create several partitions: e.g. a 50GB partition and then a large 180GB partition. The 50GB and WILL long-format to NTFS but the 180GB will not! I'm thinking hardware fault, but then I notice that it WILL format to exfAT! Much confusion!

    Read the article

  • "Windows was unable to complete the format" - Can't format flashdrive!!!

    - by Jake
    I have a 8GB Sandisk Cruzer USB flash drive that I had ruined a while back trying to make it bootable. Anyway now when I click on it I get a message that it needs to be reformatted to be used. So when I try to do that, the formatting starts and suddenly ends with the message "Windows was unable to complete the format". This happens no matter which file system I choose (NTFS, FAT32, exFat) and also which computer I try this on. I am now on a Windows 7 32 bit OS and before tries it on a Vista Home Basic machine. Anyone know any way around this issue? Many thanks.

    Read the article

  • Formatting an external HDD stuck at 70%

    - by mahmood
    My external HDD which is a 250GB WD (powered by USB) seems to have problem! Whenever i try to copy some files, it stuck while copying. I decided to format it. So I used windows tool and performed the format (not quickly) however at nearly 70% it stuck. Then I decided to perform a low level format with lowlevel. Again it stuck at 70%. I endup that the HDD has bad sector. So is there any tool that mark the bad sectors and bypass them? It is not very reasonable to through 250GB because of some bad sectors! P.S: I saw a similar topic but there were no conclusion there either. The smart data is Attribute, raw value, value, threshold, status Read Error Rate, 50, 200, 51, OK Spin-Up Time, 3275, 154, 21, OK Start/Stop Count, 2729, 98, 0, OK Reallocated Sectors Count,0, 200, 140, OK Seek Error Rate, 0, 100, 51, OK Power-On Hours (POH), 1057, 99, 0, OK Spin Retry Count, 0, 100, 51, OK Recalibration Retries ,0, 100, 51 , OK Power Cycle Count, 1385, 99, 0, OK Power-off Retract Count, 425, 200, 0, OK Load /Unload Cycle Count,12974, 196, 0, OK Temperature, 43, 43, 0, OK Reallocation Event Count,0, 200, 0, OK Current Pending Sector Count,23,200, 0, Degradation Uncorrectable Sector Count, 0, 100, 0, OK UltraDMA CRC Error Count,6, 200, 0, OK Write Error Rate/Multi-Zone Error Rate,0,100,51, OK It seems that the most important thing is this line Current Pending Sector Count,23,200, 0, Degradation Any idea on that?

    Read the article

  • Partition error being reported by only some programs

    - by Mahmoud20070
    I am getting an error about the partitions on one of my drives. I checked my hard disk with Acronis Disk Director 11 Home, HDTunePro, MiniTool Partition Wizard, Hddscan, HDD Regenerator 2011, WD Data Lifeguard Diagnostics, GParted, and Parted Magic, but none of them found any problems with the drive. However, when I perform a check with PartitionGuru, DiskGenius, and an old version of Partition Magic (8.0), I get the following error (seen below) about the partition being bad and needing to reformat to fix it: Error - The number of sectors record in DBR overflow - Reformat Should I reforamt or not? I checked two other hard drives, one of them like my 500 WD Blue, and neither has any errors with any progras. Are there any other programs that can check partitions for errors? Finally, how should a large SATA hard disk be formatted? I currently use programs like GParted, Acronis Disk Director, or MiniTool Partition Wizard. Are these programs good for formatting a new hard disk? Could the choice of format tool be the cause of the error?

    Read the article

  • Switching from Windows Virtual PC to VirtualBox without formatting

    - by djechelon
    I have a Win7 virtual machine running on Windows Virtual PC where I'm currently developing. I found that I dislike WVPC, and installed VirtualBox, hoping for better performance. However, importing the existing VHD into a new VM seems to not work, because even if I see the Windows boot screen, the OS will crash on a BSOD and requires the restore tool to run. That tool finds no problem, reboots but the BSOD is still present. I wouldn't like to format a new VM if possible. Is it possible to do such switching?

    Read the article

  • Word 2007, Adding Page Numbers to Landscape, 5.5 by 8.5 Booklet Style Document

    - by nicorellius
    I am publishing a 5.5 by 8.5 booklet. I created this document in Word 2007 and will be converting it to PDF. It looks good as is, but I can't seem to figure out how to add page numbers automatically to this document. In general, I know how to add page numbers using footers, etc, but this application is a bit different: I have two pages (5.5 by 8.5) on one landscape 8.5 by 11 page. See picture below: I guess I could manually add page numbers, but then getting the formatting perfect will be tough. Any ideas?

    Read the article

  • Create Virtual Image of Laptop before Formatting

    - by Simon Mark Smith
    I have a 3 year old laptop running Windows XP that I used for business. Although I have not used the laptop in over a year, I now want to re-commission it with Windows 7 and a fresh install. Before I do the fresh install I want to create a Virtual Image of the laptop that I can keep and potentially run on my desktop machine should I ever need to access any of the old files/projects that it contains currently. I know that most people will say just copy the files over to your desktop, but my concern is the configuration of the laptop. I used to use it for development and it has older versions of Visual Studio, SQL Server, Active X controls etc, etc than I currently use so I really want to preserve the environment not just the files. So really I am asking what is the best tool-set/method to achieve this? I understand there are free VM tools available but I have never done this before and would appreciate any help.

    Read the article

  • Windows XP Setup Fails to Recognize USB Floppy after formatting AHCI disk

    - by Strahn
    I am attempting to install Windows XP Professional x64 onto a HP EliteBook 8540w. I have downloaded both the latest Intel Rapid Storage Technology drivers and the Intel Storage Matrix drivers that are listed on HPs website and copied the drivers over to a floppy disk (two separate floppies, one for each version of the drivers.) Booting to my WinXP Pro x64 install CD, I go through the F6 process, load the driver and am able to see my HDD, delete, create and format partitions on it. When I go to continue the install, after checking the disk, the system asks me to enter the disk labeled "Intel Rapid Storage Technology" and press enter to continue. Nothing happens at this point when I press enter. This happens if I use the latest drivers or the older drivers. We have created a slipstreamed install CD using nLite that has the AHCI drivers integrated, which installs fine. However, we have identified a number of issues with the system that I believe are side-effects of using nLite for the slipstreaming and I am attempting to verify that. I have researched this issue and found a few examples of others having the same problem, but no solution. The USB floppy is a Lacie branded floppy, connecting it to a working XP workstation shows it to be the Y-E Data USB floppy drive that is supposedly 100% compatible with XP per MS KB 916196.

    Read the article

  • Create Virtual Image of Laptop before Formatting

    - by Simon Mark Smith
    I have a 3 year old laptop running Windows XP that I used for business. Although I have not used the laptop in over a year, I now want to re-commission it with Windows 7 and a fresh install. Before I do the fresh install I want to create a Virtual Image of the laptop that I can keep and potentially run on my desktop machine should I ever need to access any of the old files/projects that it contains currently. I know that most people will say just copy the files over to your desktop, but my concern is the configuration of the laptop. I used to use it for development and it has older versions of Visual Studio, SQL Server, Active X controls etc, etc than I currently use so I really want to preserve the environment not just the files. So really I am asking what is the best tool-set/method to achieve this? I understand there are free VM tools available but I have never done this before and would appreciate any help.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >