Search Results

Search found 71 results on 3 pages for 'linebreak'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Interpretation of Greek characters by FOP

    - by Geek
    Hi, Can you please help me interpret the Greek Characters with HTML display as HTML= & #8062; and Hex value 01F7E Details of these characters can be found on the below URL http://www.isthisthingon.org/unicode/index.php?page=01&subpage=F&hilite=01F7E When I run this character in Apache FOP, they give me an ArrayIndexOut of Bounds Exception Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 at org.apache.fop.text.linebreak.LineBreakUtils.getLineBreakPairProperty(LineBreakUtils.java:668) at org.apache.fop.text.linebreak.LineBreakStatus.nextChar(LineBreakStatus.java:117) When I looked into the FOP Code, I was unable to understand the need for lineBreakProperties[][] Array in LineBreakUtils.java. I also noticed that FOP fails for all the Greek characters mentioned on the above page which are non-displayable with the similar error. What are these special characters ? Why is their no display for these characters are these Line Breaks or TAB’s ? Has anyone solved a similar issue with FOP ?

    Read the article

  • Hyperlink and targetname in wpf

    - by Geetha
    Hi All, I want to display the pages in the frame by using the hyperlink control. but it is not working. Code: <Window x:Class="WPFNavigation.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="400" Width="500"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <StackPanel Grid.Column="0"> <TextBlock> <Hyperlink NavigateUri="ImagePage.xaml">Image</Hyperlink> <LineBreak></LineBreak> <Hyperlink NavigateUri="Layouts.xaml" TargetName="targetFrame">Layouts</Hyperlink> </TextBlock> </StackPanel> <Frame Name="targetFrame" Source="MainPage.xaml" Grid.Column="1"></Frame> </Grid> </Window>

    Read the article

  • WPF Repeater (like) control for collection source??

    - by Sonic Soul
    I have a WPF DataGrid bound to ObservableCollection. Each item in my collection has Property which is a List. In my row details pane, i would like to write out formatted textblocks for each item in this collection. The end result would be something equivalent to: <TextBlock Style="{StaticResource NBBOTextBlockStyle}" HorizontalAlignment="Right"> <TextBlock.Inlines> <Run FontWeight="Bold" Text="{Binding Path=Exchanges[0].Name}" /> <Run FontWeight="Bold" Text="{Binding Path=Exchanges[0].Price}" /> <LineBreak /> <Run Foreground="LightGray" Text="{Binding Path=Exchanges[0].Quantity}" /> </TextBlock.Inlines> </TextBlock> <TextBlock Style="{StaticResource NBBOTextBlockStyle}"> <TextBlock.Inlines> <Run FontWeight="Bold" Text="{Binding Path=Exchanges[1].Name}" /> <Run FontWeight="Bold" Text="{Binding Path=Exchanges[1].Price}" /> <LineBreak /> <Run Foreground="LightGray" Text="{Binding Path=Exchanges[1].Quantity}" /> </TextBlock.Inlines> </TextBlock> and so on 0-n times. I've tried using ItemsControl for this: <ItemsControl ItemsSource="{Binding Path=Exchanges}"> <DataTemplate> <Label>test</Label> </DataTemplate> </ItemsControl> however, this appears to be only meant for more static sources, as it throws the following exception (collection is not altered after creation): ItemsControl Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead Is there another way to achieve this?

    Read the article

  • java regex: capture multiline sequence between tokens

    - by Guillaume
    I'm struggling with regex for splitting logs files into log sequence in order to match pattern inside these sequences. log format is: timestamp fieldA fieldB fieldn log message1 timestamp fieldA fieldB fieldn log message2 log message2bis timestamp fieldA fieldB fieldn log message3 The timestamp regex is known. I want to extract every log sequence (potentialy multiline) between timestamps. And I want to keep the timestamp. I want in the same time to keep the exact count of lines. What I need is how to decorate timestamp pattern to make it split my log file in log sequence. I can not split the whole file as a String, since the file content is provided in a CharBuffer Here is sample method that will be using this log sequence matcher: private void matches(File f, CharBuffer cb) { Matcher sequenceBreak = sequencePattern.matcher(cb); // sequence matcher int lines = 1; int sequences = 0; while (sequenceBreak.find()) { sequences++; String sequence = sequenceBreak.group(); if (filter.accept(sequence)) { System.out.println(f + ":" + lines + ":" + sequence); } //count lines Matcher lineBreak = LINE_PATTERN.matcher(sequence); while (lineBreak.find()) { lines++; } if (sequenceBreak.end() == cb.limit()) { break; } } }

    Read the article

  • Is quoted-printable enough to make a mail compliant with the line-length-restriction posed in RFC 2822?

    - by Mnementh
    In RFC 2822 (defining E-Mail) is defined, that no line SHOULD be longer than 78 chars (excluding CRLF) and MUST not longer than 998 characters. With quoted-printable longer lines will be broken into more lines, ending each with a '=' until the real linebreak is reached. Conforms a mail to the standard, if it contains lines longer than 78 (or 998) characters but is encoded with quoted-printable? There are arguments, that this isn't compliant, because the receiving mail-client has longer lines after decoding the quoted-printable message.

    Read the article

  • jQuery regex over multiple lines

    - by Fuxi
    I have the following string: <img alt="over 40 world famous brandedWATCHES BRANDs to choose from " src="http://www.fastblings.com/images/logo.jpg"></strong></a><br> I want to define a regex pattern like <img alt="(.+?)" src="http://(.+?).(jpg|gif)">, but as you can see the target string has a linebreak in the alt attribute - so how can i incorporate this? the rule should be like "anything in the alt-attribute including linebreaks".

    Read the article

  • Markdown heading regex

    - by Jorm
    I like markdowns clean "tags", put i dont want to use their huge class they got. I just want some simple tags like the heading regex but i cant find it in the file. Ive been playing around with http://gskinner.com/RegExr/ but its damn hard So I'm looking for a regex that will match '# text' and close it after a linebreak (instead of </blabla> in bbcode) Hi How you doing? Anyone got this?

    Read the article

  • jQuery question

    - by Fuxi
    hi all, i'm having the following string <img alt="over 40 world famous brandedWATCHES BRANDs to choose from " src="http://www.fastblings.com/images/logo.jpg"></strong></a><br> i want to define a regex pattern like <img alt="(.+?)" src="http://(.+?).(jpg|gif)"> but as u can see the target strings has a linebreak in the alt attribute - so how can i incorporate this? the rule should be like "anything in the alt-attribute including linebreaks" thx

    Read the article

  • Netbeans weird quote behaviors

    - by Dmitriy Likhten
    I've been having trouble with the latest netbeans ruby ide. Here is the weird behavior: "|" = my cursor some text |here I try to add a single quote. Expected: some text '|here However I get some text h'|ere It's worse when there is a linebreak: some text here | some other text here turns into some text here '| some other text here Am I hitting some weird behavior of netbeans that can be turned off for this? I mean it is insanely annoying.

    Read the article

  • Print problems in GVIM

    - by remio
    I have set linebreak and wrap. The document looks great on my screen but when I print it the words are broken p.e. this is the text of my printed docume nt How can I resolve this problem? ps: I don't want to reformat the text, I would like to keep the text as it is on the screen. I would like to have also a bit more right margin space. Is this possible?

    Read the article

  • memory size exceeded?

    - by asdas
    i have a form that submits data to a database, i have a function that looks like this: //connect foreach ($_POST as $key => $value) { $_POST[$key] = mysql_real_escape_string($value); } now when i post, SOMETIMES i get an error that says this: Allowed memory size of 268435456 bytes exhausted i figured out that when i do a linebreak, or press enter in the message field, then that is when it causes the error, otherwise it works normal. any ideas?

    Read the article

  • Have macro 'return' a value

    - by bobobobo
    I'm using a macro and I think it works fine - #define CStrNullLastNL(str) {char* nl=strrchr(str,'\n'); if(nl){*nl=0;}} So it works to zero out the last newline in a string, really its used to chop off the linebreak when it gets left on by fgets. So, I'm wondering if I can "return" a value from the macro, so it can be called like func( CStrNullLastNL( cstr ) ) ; Or will I have to write a function

    Read the article

  • Wrapping text in an opened file in vim

    - by TK
    I want to soft wrap text in Vim to 90 columns per line. I want soft wrap so that it doesn't affect actual text by adding line break characters. Here's is what I tried: // Opened a file with lots of text and ran the following: set wrap set tw=90 set linebreak Running the commands doesn't change anything about the view at all. It soft wraps at the end of the window. I have used "Soft Wrap" in TextMate by Command-Option-W to get the same effect, and want to know how to get it work on Vim.

    Read the article

  • how can I use vim as a wordprocess with soft wordwrap and columns only 40?

    - by Angela
    I have been trying to use vim as a wordprocessor to do most of my initial drafting and then open in abiword or open office to do my final printing. Problem has been, even with :set linebreak and :set wrap, when I open it, there's a ton of line breaks. I have to go and manually remove them. What I want is to be able to write at 40 columns wrap around softly so that when I open it up in Open Office, it gets restored to whatever that column width is, preserving things like carriage return but without all those linebreaks.

    Read the article

  • Eclipse (STS), Maven and maven-minify-plugin, can they work together?

    - by CodeReaper
    Hi, I am working on a project where I am in charge of html, css and javascript. I found this maven-minify-plugin that seemed to just what I wanted. Everything is good when I deploy using maven on the server, but when I am using Eclipse (STS, www.springsource.com/products/sts) to run the project on localhost no css nor js file is generated by the plugin. Does anyone have experience with this Maven plugin, so they can tell me if it should be possible or not run on localhost? Does anyone have knowledge of another plugin I can use to (combine and) minify javascript and css files when running on localhost in Eclipse and also when deploying using Maven? Any help appreciated... ----extra information---- I basicly just copied in what it said on the plugin webpage, so I have these bits in my pom.xml: .... <build> <plugins> .... <plugin> <groupId>com.samaxes.maven</groupId> <artifactId>maven-minify-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>default-minify</id> <phase>process-resources</phase> <configuration> <cssFiles> .... <param>forms.css</param> <param>jquery.droppy.css</param> <param>jquery.jgrowl.css</param> </cssFiles> <jsFiles> .... <param>jquery.droppy.js</param> <param>jquery.jgrowl.js</param> </jsFiles> <jsFinalFile>script.js</jsFinalFile> <linebreak>-1</linebreak> <nomunge>false</nomunge> <verbose>false</verbose> <preserveAllSemiColons>false</preserveAllSemiColons> <disableOptimizations>false</disableOptimizations> <bufferSize>4096</bufferSize> </configuration> <goals> <goal>minify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> .... Should/Can I bind the plugin to a difference phase? I just use mvn clean package and move the snapshot into tomcat to deploy on the server. I am unsure on how to explain how I run the webapp on localhost, but here goes. I have a vanilia tomcat, that I defined as a server in Eclipse and then defined that the webapp should always build in that "server".

    Read the article

  • strange sqares like hints in Silverlight application?

    - by lina
    Good day! Strange square appears on mouse hover on text boxes, buttons, etc (something like hint) in a silverlight navigation application - how can I remove it? a scrin shot an example .xaml page: <Code:BasePage x:Class="CAP.Views.Main" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:Code="clr-namespace:CAP.Code" d:DesignWidth="640" d:DesignHeight="480" Title="?????? ??????? ???????? ??? ?????"> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="103*" /> <RowDefinition Height="377*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="120*" /> <ColumnDefinition Width="520*" /> </Grid.ColumnDefinitions> <Image Height="85" HorizontalAlignment="Left" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="84" Margin="12,0,0,0" ImageFailed="image1_ImageFailed" Source="/CAP;component/Images/My-Computer.png" /> <TextBlock Grid.Column="1" Height="Auto" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="0,12,0,0" Name="textBlock1" Text="Good day!" VerticalAlignment="Top" FontFamily="Verdana" FontSize="16" Width="345" FontWeight="Bold" /> <TextBlock Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Height="299" HorizontalAlignment="Left" Name="textBlock2" VerticalAlignment="Top" FontFamily="Verdana" FontSize="14" Width="441" > <Run Text="Some text "/><LineBreak/><LineBreak/><Run Text="and so on"/> <LineBreak/> </TextBlock> </Grid> xaml.cs: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Windows.Navigation; using CAP.Code; namespace CAP.Views { public partial class Main : BasePage { public Main() : base() { InitializeComponent(); MapBuilder.AddToMap(new SiteMapUnit() { Caption = "???????", RelativeUrl = "Main" },true); ((App)Application.Current).Mainpage.tvMainMenu.SelectedItems.Clear(); } // Executes when the user navigates to this page. protected override void OnNavigatedTo(NavigationEventArgs e) { } private void image1_ImageFailed(object sender, ExceptionRoutedEventArgs e) { } protected override string[] NeededPermission() { return new string[0]; } } } MainPage.xaml <UserControl x:Class="CAP.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Code="clr-namespace:CAP.Code" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" mc:Ignorable="d" Margin="0,0,0,0" Width="auto" Height="auto" xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"> <ScrollViewer Width="auto" Height="auto" BorderBrush="White" BorderThickness="0" Margin="0,0,0,0" x:Name="sV" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" > <ScrollViewer.Content> <Grid Width="auto" Height="auto" x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}" Margin="0,0,0,0"> <StackPanel Width="auto" Height="auto" Orientation="Vertical" Margin="250,0,0,50"> <Border x:Name="ContentBorder2" Margin="0,0,0,0" > <!--<navigation:Frame Margin="0,0,0,0" Width="auto" Height="auto" x:Name="AnotherFrame" VerticalAlignment="Top" Style="{StaticResource ContentFrameStyle}" Source="/Views/Menu.xaml" NavigationFailed="ContentFrame_NavigationFailed" JournalOwnership="OwnsJournal" Loaded="AnotherFrame_Loaded"> </navigation:Frame>--> <StackPanel Orientation="Vertical" Height="82" Width="Auto" HorizontalAlignment="Right" Margin="0,0,0,0" DataContext="{Binding}"> <TextBlock HorizontalAlignment="Right" Foreground="White" x:Name="ApplicationNameTextBlock4" Style="{StaticResource ApplicationNameStyle}" FontSize="20" Text="?????? ???????" Margin="20,16,20,0"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Image x:Name="imDoor" Visibility="Collapsed" MouseEnter="imDoor_MouseEnter" MouseLeave="imDoor_MouseLeave" Height="24" Stretch="Fill" Width="25" Margin="10,0,10,0" Source="/CAP;component/Images/sm_white_doors.png" MouseLeftButtonDown="bTest_Click" /> <TextBlock x:Name="bLogout" MouseEnter="bLogout_MouseEnter" MouseLeave="bLogout_MouseLeave" TextDecorations="Underline" Margin="0,6,20,4" Height="23" Text="?????" HorizontalAlignment="Right" Visibility="Collapsed" MouseLeftButtonDown="bTest_Click" FontFamily="Verdana" FontSize="13" FontWeight="Normal" Foreground="#FF1C1C92" /> </StackPanel> </StackPanel> </Border> <Border x:Name="bSiteMap" Margin="0,0,0,0" > <StackPanel x:Name="spSiteMap" Orientation="Horizontal" Height="20" Width="Auto" HorizontalAlignment="Left" Margin="0,0,0,0" DataContext="{Binding}"> <!-- <TextBlock Visibility="Visible" TextDecorations="Underline" Height="23" HorizontalAlignment="Left" x:Name="ar" Text="1" VerticalAlignment="Top" Foreground="Blue" FontFamily="Verdana" FontSize="13" /> <TextBlock Visibility="Visible" Height="23" HorizontalAlignment="Left" x:Name="Map" Text="->" VerticalAlignment="Top" Foreground="Blue" FontFamily="Verdana" FontSize="13" /> <TextBlock Visibility="Visible" TextDecorations="Underline" Height="23" HorizontalAlignment="Left" x:Name="ar1" Text="2" VerticalAlignment="Top" Foreground="Blue" FontFamily="Verdana" FontSize="13" /> <TextBlock Visibility="Visible" Height="23" HorizontalAlignment="Left" x:Name="Map1" Text="->" VerticalAlignment="Top" Foreground="Blue" FontFamily="Verdana" FontSize="13" /> <TextBlock Visibility="Visible" TextDecorations="Underline" Height="23" HorizontalAlignment="Left" x:Name="ar2" Text="3" VerticalAlignment="Top" Foreground="Blue" FontFamily="Verdana" FontSize="13" />--> </StackPanel> </Border> <Border Width="auto" Height="auto" x:Name="ContentBorder" Margin="0,0,0,0" > <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" Source="Main" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed" ToolTipService.ToolTip=" " Margin="0,0,0,0"> <navigation:Frame.UriMapper> <uriMapper:UriMapper> <!--Client--> <uriMapper:UriMapping Uri="RegistrateClient" MappedUri="/Views/Client/RegistrateClient.xaml"/> <!--So on--> </uriMapper:UriMapper> </navigation:Frame.UriMapper> </navigation:Frame> </Border> </StackPanel> <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}" Margin="0,0,0,0" Background="{x:Null}" > <StackPanel Orientation="Vertical" Height="Auto" Width="250" HorizontalAlignment="Center" Margin="0,0,0,50" DataContext="{Binding}"> <Image Width="150" Height="90" HorizontalAlignment="Center" VerticalAlignment="Top" Source="/CAP;component/Images/logo__au.png" Margin="0,20,0,70"/> <Border x:Name="BrandingBorder" MinHeight="222" Width="250" Style="{StaticResource BrandingBorderStyle3}" HorizontalAlignment="Center" Opacity="60" Margin="0,0,0,0"> <Border.Background> <ImageBrush ImageSource="/CAP;component/Images/papka.png"/> </Border.Background> <Grid Width="250" x:Name="LichniyCabinet" Margin="0,10,0,0" HorizontalAlignment="Center" Height="211"> <Grid.ColumnDefinitions> <ColumnDefinition Width="19*" /> <ColumnDefinition Width="62*" /> <ColumnDefinition Width="151*" /> <ColumnDefinition Width="18*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="13" /> <RowDefinition Height="24" /> <RowDefinition Height="35" /> <RowDefinition Height="35" /> <RowDefinition Height="43" /> <RowDefinition Height="28" /> <RowDefinition Height="32*" /> </Grid.RowDefinitions> <TextBlock Visibility="Visible" Grid.Row="2" Height="23" HorizontalAlignment="Left" x:Name="tLogin" Text="?????" VerticalAlignment="Top" FontFamily="Verdana" FontSize="13" Foreground="White" Margin="1,0,0,0" Grid.Column="1" /> <TextBlock Visibility="Visible" FontFamily="Verdana" FontSize="13" Foreground="White" Height="23" HorizontalAlignment="Left" x:Name="tPassw" Text="??????" VerticalAlignment="Top" Grid.Row="3" Grid.Column="1" /> <TextBox Visibility="Visible" Grid.Column="2" Grid.Row="2" Height="24" HorizontalAlignment="Left" x:Name="logLogin" VerticalAlignment="Top" Width="150" /> <PasswordBox Visibility="Visible" Code:DefaultButtonService.DefaultButton="{Binding ElementName=bLogin}" PasswordChar="*" Height="24" HorizontalAlignment="Left" x:Name="logPassword" VerticalAlignment="Top" Width="150" Grid.Column="2" Grid.Row="3" /> <Button x:Name="bLogin" MouseEnter="bLogin_MouseEnter" MouseLeave="bLogin_MouseLeave" Visibility="Visible" Content="?????" Grid.Column="2" Grid.Row="4" Click="Button_Click" Height="23" HorizontalAlignment="Left" Margin="81,0,0,0" VerticalAlignment="Top" Width="70" /> <TextBlock MouseLeftButtonDown="ForgotPassword_MouseLeftButtonDown" MouseEnter="ForgotPassword_MouseEnter" MouseLeave="ForgotPassword_MouseLeave" Visibility="Visible" TextDecorations="Underline" Grid.ColumnSpan="2" Grid.Row="4" Height="23" HorizontalAlignment="Left" x:Name="ForgotPassword" Text="?????? ???????" VerticalAlignment="Top" Foreground="White" FontFamily="Verdana" FontSize="13" Grid.Column="1" /> <TextBlock MouseEnter="tbRegistration_MouseEnter" MouseLeave="tbRegistration_MouseLeave" MouseLeftButtonDown="tbRegistration_MouseLeftButtonDown" Grid.Column="2" Grid.Row="6" Height="23" x:Name="tbRegistration" TextDecorations="Underline" Text="???????????" VerticalAlignment="Top" FontFamily="Verdana" FontSize="13" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF1C1C92" FontWeight="Normal" Margin="0,0,57,0" /> <TextBlock Cursor="Arrow" Height="23" HorizontalAlignment="Left" Margin="11,-3,0,0" Text="?????? ???????" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="2" FontFamily="Verdana" FontSize="13" FontWeight="Bold" Foreground="White" /> <Image Visibility="Collapsed" Height="70" x:Name="imUser" Stretch="Fill" Width="70" Grid.ColumnSpan="2" Margin="11,0,0,0" Grid.Row="2" Grid.RowSpan="2" Source="/CAP;component/Images/user2.png" /> <TextBlock x:Name="tbHello" Grid.Column="2" Visibility="Collapsed" Grid.Row="2" Height="auto" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="6,0,0,0" Text="" VerticalAlignment="Top" FontFamily="Verdana" FontSize="13" Foreground="White" Width="145" /> </Grid> </Border> <Border x:Name="MenuBorder" Margin="0,0,0,50" Width="250" Visibility="Collapsed"> <StackPanel x:Name="spMenu" Width="240" HorizontalAlignment="Left"> <telerikNavigation:RadTreeView x:Name="tvMainMenu" Width="240" Selected="TreeView1_Selected" SelectedValuePath="Text" telerik:Theming.Theme="Windows7" FontFamily="Verdana" FontSize="12"/> </StackPanel> </Border> </StackPanel> </Grid> <Border x:Name="FooterBorder" VerticalAlignment="Bottom" Width="auto" Height="76"> <Border.Background> <ImageBrush ImageSource="/CAP;component/Images/footer2.png" /> </Border.Background> <TextBlock x:Name="tbFooter" Height="24" Width="auto" Margin="0,20,0,0" TextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Center" Foreground="White" FontFamily="Verdana" FontSize="11"> </TextBlock> </Border> </Grid> </ScrollViewer.Content> </ScrollViewer> </UserControl> MainPage.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Navigation; using CAP.Code; using CAP.Registrator; using System.Windows.Input; using System.ComponentModel.DataAnnotations; using System.Windows.Browser; using Telerik.Windows.Controls; using System.Net; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Navigation; using System.Windows.Shapes; namespace CAP { public partial class MainPage { public App Appvars = Application.Current as App; private readonly RegistratorClient registrator; public SiteMapBuilder builder; public MainPage() { InitializeComponent(); sV.SetIsMouseWheelScrollingEnabled(true); builder = new SiteMapBuilder(spSiteMap); try { //working with service } catch { this.ContentFrame.Navigate(new Uri(String.Format("ErrorPage"), UriKind.RelativeOrAbsolute)); } } /// Recursive method to update the correct scrollviewer (if exists) private ScrollViewer CheckParent(FrameworkElement element) { ScrollViewer _result = element as ScrollViewer; if (element != null && _result == null) { FrameworkElement _temp = element.Parent as FrameworkElement; _result = CheckParent(_temp); } return _result; } // If an error occurs during navigation, show an error window private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) { e.Handled = true; ChildWindow errorWin = new ErrorWindow(e.Uri); errorWin.Show(); } } }

    Read the article

  • Proper way to set class variables

    - by ensnare
    I'm writing a class to insert users into a database, and before I get too far in, I just want to make sure that my OO approach is clean: class User(object): def setName(self,name): #Do sanity checks on name self._name = name def setPassword(self,password): #Check password length > 6 characters #Encrypt to md5 self._password = password def commit(self): #Commit to database >>u = User() >>u.setName('Jason Martinez') >>u.setPassword('linebreak') >>u.commit() Is this the right approach? Should I declare class variables up top? Should I use a _ in front of all the class variables to make them private? Thanks for helping out.

    Read the article

  • Create a Python User() class that both creates new users and modifies existing users

    - by ensnare
    I'm trying to figure out the best way to create a class that can modify and create new users all in one. This is what I'm thinking: class User(object): def __init__(self,user_id): if user_id == -1 self.new_user = True else: self.new_user = False #fetch all records from db about user_id self._populateUser() def commit(self): if self.new_user: #Do INSERTs else: #Do UPDATEs def delete(self): if self.new_user == False: return False #Delete user code here def _populate(self): #Query self.user_id from database and #set all instance variables, e.g. #self.name = row['name'] def getFullName(self): return self.name #Create a new user >>u = User() >>u.name = 'Jason Martinez' >>u.password = 'linebreak' >>u.commit() >>print u.getFullName() >>Jason Martinez #Update existing user >>u = User(43) >>u.name = 'New Name Here' >>u.commit() >>print u.getFullName() >>New Name Here Is this a logical and clean way to do this? Is there a better way? Thanks.

    Read the article

  • Is there any JavaScript Library to intelligently truncate strings?

    - by j0ker
    I need to truncate strings in a side menu to make the fit into a div without a linebreak. The divs have a fixed width. I'm looking for a library to do that for me. If a string is too long to fit into the div, it should be truncated like: <div>This string is too long</div> == <div>This string is...ong</div> As you can see, the string is not only truncated by an ellipsis but the last three letters are also visible. This is meant to increase readability. The truncation should not care about spaces. Does anyone know of a library that includes such functionality? We're mainly using jQuery throughout the project. Thanks in advance!

    Read the article

  • Proper way to set object instance variables

    - by ensnare
    I'm writing a class to insert users into a database, and before I get too far in, I just want to make sure that my OO approach is clean: class User(object): def setName(self,name): #Do sanity checks on name self._name = name def setPassword(self,password): #Check password length > 6 characters #Encrypt to md5 self._password = password def commit(self): #Commit to database >>u = User() >>u.setName('Jason Martinez') >>u.setPassword('linebreak') >>u.commit() Is this the right approach? Should I declare class variables up top? Should I use a _ in front of all the class variables to make them private? Thanks for helping out.

    Read the article

  • Multline Text in a WPF Button

    - by Paul
    How do I get multi-line text on a WPF Button using only C#? I have seen examples of using <LineBreak/> in XAML, but my buttons are created completely programmatically in C#. The number and labels on the buttons correspond to values in the domain model, so I don't think I can use XAML to specify this. I have tried the naive approach below, but it does not work. Button b = new Button(); b.Content = "Two\nLines"; or b.Content = "Two\r\nLines"; In either case, all i see is the first line ("Two") of the text.

    Read the article

  • Multline Text in a WPF Button through C#

    - by Paul
    How do I get multi-line text on a WPF Button using only C#? I have seen examples of using <LineBreak/> in XAML, but my buttons are created completely programmatically in C#. The number and labels on the buttons correspond to values in the domain model, so I don't think I can use XAML to specify this. I have tried the naive approach below, but it does not work. Button b = new Button(); b.Content = "Two\nLines"; or b.Content = "Two\r\nLines"; In either case, all i see is the first line ("Two") of the text.

    Read the article

  • Removing whitespace between HTML elements when using line breaks

    - by Skilldrick
    I have a page with a row of about 10 imgs. For readability of the HTML, I want to put a linebreak in between each img tag, but doing so renders whitespace between the images, which I do not want. Is there anything I can do other than break in the middle of the tags rather than between them? Edit: Here is a screenshot of what I have so far. I would like the book spine images to display in random combinations, using PHP. This is why I need separate img tags.

    Read the article

  • Resharper code format linebreaks

    - by mizipzor
    Im trying to setup the code formatting in ReSharper. Limiting each line to a maximum count of characters, it seems to want to place casts on a separate line. Like so: string mystring = (string) MyStringConverter.convert(toconvert, typeof(string), null, null); I cant seem to be able to find the correct combination of settings to not have this on three lines. Im looking for something like this: string mystring = (string) MyStringConverter.convert( toconvert, typeof(string), null, null); Where the linebreak occurs is not that important, I guess I cant be to picky when I want to limit the line length. But three lines is a bit much. Does anyone know the/any correct combination of settings to make it only cut the line once?

    Read the article

  • [Java] Cut <br/>-Tags from String end

    - by Robert M.
    Hello everybody, I am currently developing a Web-Application using Java EE where I'm using a Rich-Javascript-Editor (http://www.primefaces.org/showcase/ui/editor.jsf). As the user can easily add too many linebreaks that will be convertet to linebreak-tags, I need to remove all these Tags from the end of a String. Is there an elegant way of using Regex to accomplish this? An example String would be: "This is a test <b>bold</b><br/><br/>" Where obviously the last two tags have to be removed. Thank you in advance for any help Best Regards, Robert

    Read the article

< Previous Page | 1 2 3  | Next Page >