Search Results

Search found 3266 results on 131 pages for 'conditional formatting'.

Page 8/131 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Auto-formatting tool for VBscript

    - by katmoon
    I'm looking for a light, free tool to format my Vbscript code. The only way I've found so far is to auto-format it in VisualStudio. Although, it's too much to launch VisualStudio for this purpose. Is there any web app or a free light tool for this purpose? Maybe a plugin for Notepad++?

    Read the article

  • Java: Writing a DOM to an XML file (formatting issues)

    - by Vhaerun
    I'm using org.w3c XML API to open an existing XML file. I'm removing some nodes , and I'm adding others instead . The problem is that the new nodes that are added are written one after another , with no newline and no indentation what so ever. While it's true that the XML file is valid , it is very hard for a human to examnine it. Is there anyway to add indentation , or at least a newline after each node ?

    Read the article

  • Using the Script Component as a Conditional Split

    This is a quick walk through on how you can use the Script Component to perform Conditional Split like behaviour, splitting your data across multiple outputs. We will use C# code to decide what does flows to which output, rather than the expression syntax of the Conditional Split transformation. Start by setting up the source. For my example the source is a list of SQL objects from sys.objects, just a quick way to get some data: SELECT type, name FROM sys.objects type name S syssoftobjrefs F FK_Message_Page U Conference IT queue_messages_23007163 Shown above is a small sample of the data you could expect to see. Once you have setup your source, add the Script Component, selecting Transformation when prompted for the type, and connect it up to the source. Now open the component, but don’t dive into the script just yet. First we need to select some columns. Select the Input Columns page and then select the columns we want to uses as part of our filter logic. You don’t need to choose columns that you may want later, this is just the columns used in the script itself. Next we need to add our outputs. Select the Inputs and Outputs page.You get one by default, but we need to add some more, it wouldn’t be much of a split otherwise. For this example we’ll add just one more. Click the Add Output button, and you’ll see a new output is added. Now we need to set some properties, so make sure our new Output 1 is selected. In the properties grid change the SynchronousInputID property to be our input Input 0, and  change the ExclusionGroup property to 1. Now select Ouput 0 and change the ExclusionGroup property to 2. This value itself isn’t important, provided each output has a different value other than zero. By setting this property on both outputs it allows us to split the data down one or the other, making each exclusive. If we left it to 0, that output would get all the rows. It can be a useful feature allowing you to copy selected rows to one output whilst retraining the full set of data in the other. Now we can go back to the Script page and start writing some code. For the example we will do a very simple test, if the value of the type column is U, for user table, then it goes down the first output, otherwise it ends up in the other. This mimics the exclusive behaviour of the conditional split transformation. public override void Input0_ProcessInputRow(Input0Buffer Row) { // Filter all user tables to the first output, // the remaining objects down the other if (Row.type.Trim() == "U") { Row.DirectRowToOutput0(); } else { Row.DirectRowToOutput1(); } } The code itself is very simple, a basic if clause that determines which of the DirectRowToOutput methods we call, there is one for each output. Of course you could write a lot more code to implement some very complex logic, but the final direction is still just a method call. If we now close the script component, we can hook up the outputs and test the package. Your numbers will vary depending on the sample database but as you can see we have clearly split out input data into two outputs. As a final tip, when adding the outputs I would normally rename them, changing the Name in the Properties grid. This means the generated methods follow the pattern as do the path label shown on the design surface, making everything that much easier to recognise.

    Read the article

  • Formatting made easy - Silverlight 4

    - by PeterTweed
    One of the simplest tasks in business apps is displaying different types of data to be read in the format that the user expects them.  In Silverlight versions until Silverlight 4 this has meant using a Converter to format data during binding.  This involves writing code for the formatting of the data to bind, instead of simply defining the formatting to use for the data in question where you bind the data to the control.   In Silverlight 4 we find the addition of the StringFormat markup extension that allows us to do exactly this.  Of course the nice thing is the ability to use the common formatting conventions available in C# through the String.Format function.   This post will show you how to use three of the common formatting conventions - currency, a defined number of decimal places for a number and a date format.   Steps:   1. Create a new Silverlight 4 application   2. In the body of the MainPage.xaml.cs file replace the MainPage class with the following code:       public partial class MainPage : UserControl     {         public MainPage()         {             InitializeComponent();             this.Loaded += new RoutedEventHandler(MainPage_Loaded);         }           void MainPage_Loaded(object sender, RoutedEventArgs e)         {             info i = new info() { PriceValue = new Decimal(9.2567), DoubleValue = 1.2345678, DateValue = DateTime.Now };             this.DataContext = i;         }     }         public class info     {         public decimal PriceValue { get; set; }         public double DoubleValue { get; set; }         public DateTime DateValue { get; set; }     }   This code defines a class called info with different data types for the three properties.  A new instance of the class is created and bound to the DataContext of the page.   3.  In the MainPage.xaml file copy the following XAML into the LayoutRoot grid:           <Grid.RowDefinitions>             <RowDefinition Height="60*" />             <RowDefinition Height="28*" />             <RowDefinition Height="28*" />             <RowDefinition Height="30*" />             <RowDefinition Height="154*" />         </Grid.RowDefinitions>         <Grid.ColumnDefinitions>             <ColumnDefinition Width="86*" />             <ColumnDefinition Width="314*" />         </Grid.ColumnDefinitions>         <TextBlock Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="32,0,0,0" Name="textBlock1" Text="Price Value:" VerticalAlignment="Top" />         <TextBlock Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="32,0,0,0" Name="textBlock2" Text="Decimal Value:" VerticalAlignment="Top" />         <TextBlock Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="32,0,0,0" Name="textBlock3" Text="Date Value:" VerticalAlignment="Top" />         <TextBlock Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Name="textBlock4" Text="{Binding PriceValue, StringFormat='C'}" VerticalAlignment="Top" Margin="6,0,0,0" />         <TextBlock Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="6,0,0,0" Name="textBlock5" Text="{Binding DoubleValue, StringFormat='N3'}" VerticalAlignment="Top" />         <TextBlock Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="6,0,0,0" Name="textBlock6" Text="{Binding DateValue, StringFormat='yyyy MMM dd'}" VerticalAlignment="Top" />   This XAML defines three textblocks that use the StringFormat markup extension.  The three examples use the C for currency, N3 for a number with 3 decimal places and yyy MM dd for a date that displays year 3 letter month and 2 number date.   4. Run the application and see the data displayed with the correct formatting. It's that easy!

    Read the article

  • Conditional Operator Example

    - by mbcrump
    If you haven’t taken the time to learn conditional operators, then now is the time. I’ve added a quick and dirty example for those on the forums.   Code Snippet using System; using System.Net.Mail; using System.Net; using System.Globalization; using System.Windows.Forms;   class Demo {     //Please use conditional statements in your code. See example below.       public static void Main()     {         int dollars = 10;           //Bad Coder Bad !!! Don't do this         if (dollars == 1)         {             Console.WriteLine("Please deposit {0} dollar.", dollars);         }         else         {             Console.WriteLine("Please deposit {0} dollars.", dollars);         }             //Good Coder Good !!! Do this         Console.WriteLine("Please deposit {0} dollar{1}.", dollars, dollars == 1 ? ' ' : 's');         //                                                          expression   ? true : false           Console.ReadLine();          } }

    Read the article

  • Conditional attribute in XML - most concise solution?

    - by Lech Rzedzicki
    I am tasked with setting up conditional profiling - a method of tagging chunks of XML with an attribute, which will then be used as a conditional value to extract subset of that XML. Have a look at another definition/example: DITA profiling The XML is documents that are equivalent to printed books - i.e. documents that are often looked at by a human, even if indirectly. Therefore I am looking at a few requirements here: 1. keeping the value list brief - so it doesn't affect the readability of the document 2. be able to process with standard XML tools - a space-separated list inside an attribute is still probably fine, but I'd rather not use too much regexp for this 3. be obvious for various users, including 3rd parties, which content goes where 4. Be easy to maintain going forward Therefore one easy solution is: The problem with this: 1. As the list grows the value of the attribute can be a bit verbose 2. One needs to explicitly state every value even if it's a scenario of this vs everything else Therefore I am also looking at other approaches such as: 1. Using + and - modifiers, Apache htaccess style to override the default cascading of profiling - by default all content goes everywhere and if we want to exclude a bit we just say "-kindle". It does require parsing the whole tree, is not supported by editing tools and one needs to regexp the attribute value a bit deeper... 2. Using an intermediate file to define groups of values such as "other" or "non-print", example of this in DITA. It allows concise XML as well as different grouping and values for each document but it does create a certain level of abstraction which may make it a little less obvious for a 3rd party? Altogether, if you received such XML and were tasked to process it, which option you'd rather receive? If you have any experiences like that, even in an unrelated areas such a builds, don't hesitate to comment!

    Read the article

  • LaTeX lstlisting not highlighting keywords when basic style is ttfamily

    - by Lex
    Hello, I'm working on a LaTeX document and using lstlisting to display my Java source code. My setup looks like this: \lstset{ basicstyle=\ttfamily, keywordstyle=\bfseries, language=Java, frame=single, aboveskip=11pt, belowskip=11pt, breaklines=true, breakatwhitespace=false, showspaces=false, showstringspaces=false } The keywords are not highlighted bold when using ttfamily, but if I use small or don't specify the basic style, they're highlighted fine. What am I missing?

    Read the article

  • Why would LaTeX ignore the font size in the documentclass

    - by Rory
    I have a LaTeX file. I'm experimenting with trying to reduce the font size (this is related to my other question here http://stackoverflow.com/questions/2636647/latex-changing-the-font-size-for-a-document-but-in-the-preamble-not-the-docum ). The LaTeX file is generated from another programme. I have edited it to start with \documentclass[4pt,a4paper,english]{report} i.e. I am trying to make the text really small. However it doesn't work. I change that 4pt to anything and the font size is the same. When running pdflatex on it, I get this message printed out. LaTeX Warning: Unused global option(s): [4pt]. That might explain why the error message is What could be going on here? How do I make it use the font size in the documentclass definition?

    Read the article

  • Is There A Way To Apply CODE Formatting To A VB.Net TextBox?

    - by Jeff
    I'm playing with a simple string replacement editor for editing VB.Net functions outside of VB. Is there a way to apply VB.Net code formatting to a string? For example. The txtboxCodeEntry looks like this: If strVar="dummy" then 1 else 0 Endif I would like it to "autoformat" to: If strVar = "dummy" Then 1 Else 0 End If The formatting would match whatever formatting VB.Net does when you're editing code in the Visual Studio IDE. Thanks.

    Read the article

  • Can code formatting lead to change in object file content?

    - by kumar
    I have run though a code formatting tool to my c++ files. It is supposed to make only formatting changes. Now when I built my code, I see that size of object file for some source files have changed. Since my files are very big and tool has changed almost every line, I dont know whether it has done something disastrous. Now i am worried to check in this code to repo as it might lead to runtime error due to formatting tool. My question is , will the size of object file be changed , if code formatting is changed.?

    Read the article

  • How can I use Databound variables in conditional statements within Custom Databound controls?

    - by William Calleja
    I'm developing my custom DataBound Controls that make use of an '<ItemTemplate>' tag and '<%# %>' server tags to generate some data however I need to make a conditional statement within one of my Databound controls as shown below. <custom:DataboundControl runat="server"> <ItemTemplate> <% if(((Dictionary<string, string>)Container.DataItem)["MyVariable"]=="" { %> <!-- Conditional Code Happens Here --> <% } %> </ItemTemplate> </custom:DataboundControl> Right now my code isn't working because the compiler cannot recognize my Container.DataItem variable within a <% %> tag and a <%# %> tag doesn't support conditional statements. What can I use?

    Read the article

  • How do I keep Conditional Formatting formulas and ranges from automatically changing?

    - by Iszi
    I've found that Conditional Formatting formulas and ranges will automatically adjust when you copy, delete, or move data around in a spreadsheet. While this is a nice idea, it tends to break things for me in some rather weird ways. To avoid this, I tried writing rules that applied to the entire spreadsheet and keyed off of column headers to highlight the data I wanted to check. Example: =AND(A$1="Check This Column For Blanks),ISBLANK(A1)) applied to =$1:$1048576 However, even with the rule explicitly applied to the entire sheet, it was still automatically adjusting (and breaking in weird ways by doing so) as I worked in the sheet. How can I avoid this?

    Read the article

  • Conditional Gridview Text - Checkboxes

    This code sample shows how to either show or make invisible, a checkbox in each row of the Gridview, along with making text conditional, based on certain criteria. In this case, if the Postal code starts with a non-numeric character, we change it to "Alt Text", and we set the Visible property of the checkbox in that row to "False"

    Read the article

  • Server 2012 R2 DNS Conditional forwarding not working reliably, possible caching issue?

    - by Matt
    I have a bit of a home lab setup with a domain controller that is acting as the DNS server for my network. For everything, it's working fine and forwards external DNS requests to my ISP. The household recently wanted to get Netflix going and it seemed a DNS option was better than a VPN to get around the region locking, so I signed up for unblock-us.com Since I have a Windows DNS server I thought I'd be clever and make use of conditional forwarders and added the Netflix domain to the list. Initially this worked well and all devices on the network could now access Netflix, however after about an hour going to the Netflix site would result in a page cannot be found. Doing an nslookup of Netflix.com from my PC resulted in it not returning any IP addresses. As a test, I deleted the Netflix domain from the DNS servers cache and things started working again - devices could get to the site again however the same thing happens again after around half an hour to an hour. Have I missed something here that's causing it to stop working?

    Read the article

  • BizTalk: Conditional looping incorporating the Greater Than

    how to achieve conditional looping in a BizTalk map using the Looping functoid and the Greater Than functoid.  read moreBy BiZTech KnowDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • conditional formatting in excel 2010

    - by bigMir
    I have some strange problem, after I've made switch from excel 2007 to excel 2010 I've started to receive duplicates of conditional formatting rules in excel. For example: I have conditional formatting which colors the cell when it detects that cell contains a word "hello". When I copy this cell to other cells (which also contains the same rule) sometimes I receive duplicates. Those duplicates really slows down excel. So my question is: is there any possiblity to disable copy/paste of conditional formatting (I want to copy/paste all content excep conditional formatting, all formulas values and other stuff). P.S. Just to make it clear, I don't know how to reporduce that problem, it occurs sometimes and I work with excel a lot

    Read the article

  • Does the order of arguments in a conditional statement affect execution time in php?

    - by dd0x
    Hi, As far as I know when writing a conditional statement in C such as the following: if ( some_function() == 100 && my_var == 5 ) { //do something } is slower to execute than if ( my_var == 5 && some_function() == 100 ) { //do something } because it's faster to execute the my_var == 5 rather than all of the code in the function ( because if my_var != 5, then the rest of the if statement would not even be executed )...so I am wondering if the same is true for conditional statements in PHP?

    Read the article

  • Table Formatting in Excel 2007: How do I remove it?

    - by Mike
    I've used the new Table Formatting option in Excel 2007. Now I can't remove it. I've dragged the little blue square up to the last cell on the top left, but it just won't go any further. In fact it just won't go at all. Clear all doesn't remove it. What does? I want my table back! Thanks Mike

    Read the article

  • Does frequently formatting and reinstalling an operating system damage a hard drive?

    - by Closure Cowboy
    I tend to format and reinstall my operating system fairly frequently (about once a month). I apologize for my lack of technical terms, but I do not perform a "full format" (the type of formatting that zeros-out the existing data). Regardless, I know that most modern operating systems consume several GBs of data. Is doing this particular damaging to my hard drives? Would it matter whether I'm using a solid state drive (I'm not)?

    Read the article

  • Excel: conditionally format a cell using the format of another, content-matching cell

    - by Eric A. Meyer
    I have an Excel spreadsheet where I’d like to be able to create a “key” of formatted cells with unique values, and then in another sheet format cells using the key formatting. So for example, my key is as follows, with one value per cell and the visual formatting indicated in parentheses: A (red background) B (green background) C (blue background) So that’s on one sheet (or in a remote corner of the current sheet—whichever is better). Then, in an area that I mark for conditional formatting, I can type one of those three letters and have the cell where I typed it visually formatted according to the key. So if I type a “B” into one of the conditionally formatted cells, it gets a green background. (Note that I’m using backgrounds here solely for ease of explanation: ideally I want to have all visual formatting copied over, whether it’s foreground color, background color, font weight, borders, or whatever. But I’ll take what I can get, obviously.) And—just to make it extra-tricky—if I change the formatting in the key, that change should be reflected in cells that reference the key. Thus, if I change the “B” formatting in the key from a green background to a purple background, any “B” in the main sheet should switch to the new color. Similarly, it should be possible to add or remove values from the key and have those changes applied to the main data set. I’m okay with the formatting-update-on-key-change being triggered by clicking a button or something. I suspect that if any of this is possible it will require VBA, but I’ve never used it so I’ve no idea where to start if that’s the case. I’m hoping it’s possible without VBA. I know it’s possible to just use multiple conditional formats, but my use case here is that I’m trying to create the above-described capability for someone who isn’t conversant with conditional formatting. I’d like to let them be able to define a key, update it if necessary, and keep on truckin’ without me having to rewrite the spreadsheet’s formatting rules for them. --- UPDATE --- So I think I was a bit unclear about my original request. Let me try again with an image. The image shows the “key” on the left, where values and styles are defined using keyboard and mouse input. On the right, you see the data that should be formatted to match the key. Thus if I type a “C” into a cell in the Data area, it should be blue-backed. Furthermore, if I change the formatting of “C” in the Key to have a purple background, all the “C” cells should switch from blue to purple. For further craziness, if I add more to the Key (say, “D” with a yellow background) then any “D” cells will be styled to match; if I remove a Key entry, then matching values in the Data area should revert to default styling. So. Is that more clear? Is it possible, in whole or in part? I don’t have to use conditional formatting for this; in fact, at this point I suspect I probably shouldn’t. But I’m open to any approach!

    Read the article

  • Conditional AddHandler Directive

    - by Itai
    Is it possible to conditionally call AddHandler in the .htaccess under Apache (2.x)? My present situation requires that a certain AddHandler is needed by one production server but that one breaks the development server. This requires to have 2 versions of .htaccess which is pain. So, instead I would like to wrap one AddHandler within a conditional. Something of this sort: IF IP=='1.2.3.4' THEN AddHandler type/foo .ext ENDIF The problem is new but out of my control for now. I know this is far from ideal and the servers used to match 100% as they should but temporarily they cannot.

    Read the article

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