Search Results

Search found 8850 results on 354 pages for 'libreoffice base'.

Page 6/354 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • LibreOffice Calc/Writer: How to get the dates for specifc weekdays per month?

    - by Phin
    I'm stuck with a problem in LibreOffice Calc or Writer: I try to get a table of dates for every monday, wednesday and friday per month, something that I can load every new month wich sets the dates automatically so I just have to print the page on paper. :) In Writer the fieldcommand for date can't obviosly do the job (it only can be set to a fix date, the todays date or +offset as far as I can see). In Calc I tried it with the autofill but that obviosly works for the first 3 days only. I might add that I'm lost with Excel/calc formulars... Any help?

    Read the article

  • How can I create a custom OpenOffice / LibreOffice Writer table AutoFormat scheme?

    - by Merlyn Morgan-Graham
    None of the basic table AutoFormat schemes in LibreOffice Writer have both an alternation style defined and no sum column/row style defined. If they have alternation, they always seem to have sums. Because of this I'd like to define my own table scheme. What is the easiest way to accomplish this? A WYSIWYG isn't totally necessary. I am not scared of editing simple XML files as long as I have examples to work from, and if I don't have to edit base install files. If I can place them in a custom area or my user profile directory then that would be best. If there is a way to get the GUI Add functionality to properly recognize an alternation then that would also be helpful.

    Read the article

  • How do I get a chart in LibreOffice Calc to have regular time intervals when the data is not regular?

    - by Dave M G
    I have an area chart in LibreOffice Calc where I would like the X axis to be measured in one month intervals spaced evenly apart. The data going into the graph, however, is not regularly spaced at one month. There can be zero, one, or two entries in any given month. Right now, the chart is keeping the horizontal pacing of the data consistent and adjusting the X axis to accomodate, which is the reverse of what I want. In the example picture below, you can see that there is one data point in March, one in May, and two in June. Along the X axis, April is gone and June is taking up double the space. Instead of this, I'd like the months to stay the same spacing so there is April, May, and June, and for the data area of the chart to compress or extend horiozontally as necessary. I have tried editing the X axis and adjusting the time intervals, but this doesn't seem to do anything. Is what I'm after possible?

    Read the article

  • Custom CSV (.csv) filter for OpenOffice.org or LibreOffice?

    - by anon
    Is it possible to create a some kind of 'custom CSV filter' for OpenOffice.org or LibreOffice spreadsheet program. What I need is to have the program to use predefined CSV settings for loading and saving when I open, let's say file named 'somefile.myext'. Also I would need the loaded data to be placed in a prestyled spreadsheet. In this particular case, I would need the CSV settings to have tab as a field delimiter and no text delimiter at all. Prestyled spreadsheet would contain Blue gray coloring for every odd row (achieved with conditional formatting formula), some font styling and probably some column width definitions.

    Read the article

  • Creating base class for Entities in Entity Framework

    - by Thomas
    I would like to create a base class that is somewhat generic for all of my entities. The class would have methods like Save(), Delete(), GetByID() and some other basic functionality and properties. I have more experience with Linq to SQL and was hoping to get some good examples for something similar in the EF. Thank you.

    Read the article

  • Non-Access or -base QBE tool?

    - by idbin.cath0br0
    Hello. I'm currently looking for a QBE tool that can execute queries on PostgreSQL or MySQL. OS doesn't really matter. Reason is that we've got to do QBE at school but I don't want to use neither Microsoft Access nor OpenOffice.org Base (lack of features). Any help would be appreciated.

    Read the article

  • What is wrong with my gtkrc file?

    - by PP
    I have written following gtkrc file from some other theme gtkrc file. This theme is normal theme with buttons using pixmap theme engine. I have also given background image to GtkEntry. Problem is that, When i use this theme my buttons doesn't show text one them and my entry box does not show cursor. Plus in engine "pixmap" tag I need to specify image name with it's path as I have already mentioned pixmap_path on the top of rc file but why I still need to specify the path in file = "xxx" # gtkrc file. pixmap_path "./backgrounds:./icons:./buttons:./emotions" gtk-button-images = 1 #Icon Sizes and color definitions gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-button=16,16" gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR gtk_color_scheme = "fg_color:#000000\nbg_color:#848484\nbase_color:#000000\ntext_color:#000000\nselected_bg_color:#f39638\nselected_fg_color:#000000\ntooltip_bg_color:#634110\ntooltip_fg_color:#ffffff" style "theme-default" { xthickness = 10 ythickness = 10 GtkEntry::honors-transparent-bg-hint = 0 GtkMenuItem::arrow-spacing = 20 GtkMenuItem::horizontal-padding = 50 GtkMenuItem::toggle-spacing = 30 GtkOptionMenu::indicator-size = {11, 5} GtkOptionMenu::indicator-spacing = {6, 5, 4, 4} GtkTreeView::horizontal_separator = 5 GtkTreeView::odd_row_color = "#efefef" GtkTreeView::even_row_color = "#e3e3e3" GtkWidget::link-color = "#0062dc" # blue GtkWidget::visited-link-color = "#8c00dc" #purple GtkButton::default_border = { 0, 0, 0, 0 } GtkButton::child-displacement-x = 0 GtkButton::child-displacement-y = 1 GtkWidget::focus-padding = 0 GtkRange::trough-border = 0 GtkRange::slider-width = 19 GtkRange::stepper-size = 19 GtkScrollbar::min_slider_length = 36 GtkScrollbar::has-secondary-backward-stepper = 1 GtkPaned::handle_size = 8 GtkMenuBar::internal-padding = 0 GtkTreeView::expander_size = 13 #15 GtkExpander::expander_size = 13 #17 GtkScale::slider-length = 35 GtkScale::slider-width = 17 GtkScale::trough-border = 0 GtkWidget::link-color = "#0062dc" GtkWidget::visited-link-color = "#8c00dc" #purple WnckTasklist::fade-overlay-rect = 0 WnckTasklist::fade-loop-time = 5.0 # 5 seconds WnckTasklist::fade-opacity = 0.5 # final opacity #makes menu only overlap border GtkMenu::horizontal-offset = -1 #removes extra padding at top and bottom of menus. Makes menuitem overlap border GtkMenu::vertical-padding = 0 #set to the same as roundness, used for better hotspot selection of tabs GtkNotebook::tab-curvature = 2 GtkNotebook::tab-overlap = 4 GtkMenuItem::arrow-spacing = 10 GtkOptionMenu ::indicator-size = {11, 5} GtkCheckButton ::indicator-size = 16 GtkCheckButton ::indicator-spacing = 1 GtkRadioButton ::indicator-size = 16 GtkTreeView::horizontal_separator = 2 GtkTreeView::odd_row_color = "#efefef" GtkTreeView::even_row_color = "#e3e3e3" NautilusIconContainer::normal_icon_color = "#ff0000" GtkEntry::inner-border = {0, 0, 0, 0} GtkScrolledWindow::scrollbar-spacing = 0 GtkScrolledWindow::scrollbars-within-bevel = 1 fg[NORMAL] = @fg_color fg[ACTIVE] = @fg_color fg[PRELIGHT] = @fg_color fg[SELECTED] = @selected_fg_color fg[INSENSITIVE] = shade (3.0,@fg_color) bg[NORMAL] = @bg_color bg[ACTIVE] = shade (0.95,@bg_color) bg[PRELIGHT] = mix(0.92, shade (1.1,@bg_color), @selected_bg_color) bg[SELECTED] = @selected_bg_color bg[INSENSITIVE] = shade (1.06,@bg_color) base[NORMAL] = @base_color base[ACTIVE] = shade (0.65,@base_color) base[PRELIGHT] = @base_color base[SELECTED] = @selected_bg_color base[INSENSITIVE] = shade (1.025,@bg_color) text[NORMAL] = @text_color text[ACTIVE] = shade (0.95,@base_color) text[PRELIGHT] = @text_color text[SELECTED] = @selected_fg_color text[INSENSITIVE] = mix (0.675,shade (0.95,@bg_color),@fg_color) } style "theme-entry" { xthickness = 10 ythickness = 10 GtkEntry::inner-border = {10, 10, 10, 10} GtkEntry::progress-border = {10, 10, 10, 10} GtkEntry::icon-prelight = 1 GtkEntry::state-hintt = 1 #GtkEntry::honors-transparent-bg-hint = 1 text[NORMAL] = "#000000" text[ACTIVE] = "#787878" text[INSENSITIVE] = "#787878" text[SELECTED] = "#FFFFFF" engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = FALSE file = "./backgrounds/entry_background.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = FLAT_BOX state = PRELIGHT recolorable = FALSE file = "./backgrounds/entry_background.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = FLAT_BOX state = ACTIVE recolorable = FALSE file = "./backgrounds/entry_background.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } #----------------------------------------------- #Chat Balloon Incoming background. style "theme-event-box-top-in" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_in_top.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-event-box-mid-in" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_in_mid.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-event-box-bot-in" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_in_bot.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } #----------------------------------------------- #Chat Balloon Outgoing background. style "theme-event-box-top-out" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_out_top.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-event-box-mid-out" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_out_mid.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-event-box-bot-out" { xthickness = 1 ythickness = 1 GtkEventBox::inner-border = {0, 0, 0, 0} engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "./backgrounds/chat_out_bot.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-wide" = "theme-default" { xthickness = 2 ythickness = 2 } style "theme-wider" = "theme-default" { xthickness = 3 ythickness = 3 } style "theme-button" { GtkButton::inner-border = {0, 0, 0, 0} GtkWidget::focus-line-width = 0 GtkWidget::focus-padding = 0 bg[NORMAL] = "#414143" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = "#ff0000" bg[INSENSITIVE] = "#434346" fg[NORMAL] = "#ffffff" fg[INSENSITIVE] = "#000000" fg[PRELIGHT] = "#ffffff" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" text[NORMAL] = "#ff0000" text[INSENSITIVE] = "#ff0000" text[PRELIGHT] = "#ff0000" text[SELECTED] = "#ff0000" text[INSENSITIVE] = "#434346" text[ACTIVE] = "#ff0000" base[NORMAL] = "#ff0000" base[INSENSITIVE] = "#ff0000" base[PRELIGHT] = "#ff0000" base[SELECTED] = "#ff0000" base[INSENSITIVE] = "#ff0000" engine "pixmap" { image { function = BOX state = NORMAL recolorable = TRUE file = "./buttons/LightButtonAct.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = BOX state = PRELIGHT recolorable = TRUE file = "./buttons/LightButtonRoll.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = BOX state = ACTIVE recolorable = TRUE file = "./buttons/LightButtonClicked.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = BOX state = INSENSITIVE recolorable = TRUE file = "./buttons/LightButtonInact.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } style "theme-toolbar" { xthickness = 2 ythickness = 2 bg[NORMAL] = shade (1.078,@bg_color) } style "theme-handlebox" { bg[NORMAL] = shade (0.95,@bg_color) } style "theme-scale" { bg[NORMAL] = shade (1.06, @bg_color) bg[PRELIGHT] = mix(0.85, shade (1.1,@bg_color), @selected_bg_color) bg[SELECTED] = "#4d4d55" } style "theme-range" { bg[NORMAL] = shade (1.12,@bg_color) bg[ACTIVE] = @bg_color bg[PRELIGHT] = mix(0.95, shade (1.10,@bg_color), @selected_bg_color) #Arrows text[NORMAL] = shade (0.275,@selected_fg_color) text[PRELIGHT] = @selected_fg_color text[ACTIVE] = shade (0.10,@selected_fg_color) text[INSENSITIVE] = mix (0.80,shade (0.90,@bg_color),@fg_color) } style "theme-notebook" = "theme-wider" { xthickness = 4 ythickness = 4 GtkNotebook::tab-curvature = 5 GtkNotebook::tab-vborder = 1 GtkNotebook::tab-overlap = 1 GtkNotebook::tab-vborder = 1 bg[NORMAL] = "#d2d2d2" bg[ACTIVE] = "#e3e3e3" bg[PRELIGHT] = "#848484" bg[SELECTED] = "#848484" bg[INSENSITIVE] = "#848484" text[PRELIGHT] = @selected_fg_color text[NORMAL] = "#000000" text[ACTIVE] = "#737373" text[SELECTED] = "#000000" text[INSENSITIVE] = "#737373" fg[PRELIGHT] = @selected_fg_color fg[NORMAL] = "#000000" fg[ACTIVE] = "#737373" fg[SELECTED] = "#000000" fg[INSENSITIVE] = "#737373" } style "theme-paned" { bg[PRELIGHT] = shade (1.1,@bg_color) } style "theme-panel" { # Menu fg[PRELIGHT] = @selected_fg_color font_name = "Bold 9" text[PRELIGHT] = @selected_fg_color } style "theme-menu" { xthickness = 0 ythickness = 0 bg[NORMAL] = shade (1.16,@bg_color) bg[SELECTED] = "#ff9a00" text[PRELIGHT] = @selected_fg_color fg[PRELIGHT] = @selected_fg_color } style "theme-menu-item" = "theme-menu" { xthickness = 3 ythickness = 3 base[SELECTED] = "#ff9a00" base[NORMAL] = "#ff9a00" base[PRELIGHT] = "#ff9a00" base[INSENSITIVE] = "#ff9a00" base[ACTIVE] = "#ff9a00" bg[SELECTED] = "#ff9a00" bg[NORMAL] = shade (1.16,@bg_color) } style "theme-menubar" { #TODO } style "theme-menubar-item" = "theme-menu-item" { #TODO bg[SELECTED] = "#ff9a00" } style "theme-tree" { xthickness = 2 ythickness = 1 font_name = "Bold 9" GtkWidget::focus-padding = 0 bg[NORMAL] = "#5a595a" bg[PRELIGHT] = "#5a595a" bg[ACTIVE] = "#5a5a5a" fg[NORMAL] = "#ffffff" fg[ACTIVE] = "#ffffff" fg[SELECTED] = "#ff9a00" fg[PRELIGHT] = "#ffffff" bg[SELECTED] = "#ff9a00" base[SELECTED] = "#ff9a00" base[NORMAL] = "#ff9a00" base[PRELIGHT] = "#ff9a00" base[INSENSITIVE] = "#ff9a00" base[ACTIVE] = "#ff9a00" text[NORMAL] = "#000000" text[PRELIGHT] = "#ff9a00" text[ACTIVE] = "#ff9a00" text[SELECTED] = "#ff9a00" text[INSENSITIVE] = "#434346" } style "theme-tree-arrow" { bg[NORMAL] = mix(0.70, shade (0.60,@bg_color), shade (0.80,@selected_bg_color)) bg[PRELIGHT] = mix(0.80, @bg_color, @selected_bg_color) } style "theme-progressbar" { font_name = "Bold" bg[SELECTED] = @selected_bg_color fg[PRELIGHT] = @selected_fg_color bg[ACTIVE] = "#fe7e00" bg[NORMAL] = "#ffba00" } style "theme-tooltips" = "theme-wider" { font_name = "Liberation sans 10" bg[NORMAL] = @tooltip_bg_color fg[NORMAL] = @tooltip_fg_color text[NORMAL] = @tooltip_fg_color } style "theme-combo" = "theme-button" { xthickness = 4 ythickness = 4 text[NORMAL] = "#fd7d00" text[INSENSITIVE] = "#8a8a8a" base[NORMAL] = "#e0e0e0" base[INSENSITIVE] = "#aeaeae" } style "theme-combo-box" = "theme-button" { xthickness = 3 ythickness = 2 bg[NORMAL] = "#343539" bg[PRELIGHT] = "#343539" bg[ACTIVE] = "#26272b" bg[INSENSITIVE] = "#404145" } style "theme-entry-combo-box" { xthickness = 6 ythickness = 3 text[NORMAL] = "#000000" text[INSENSITIVE] = "#8a8a8a" base[NORMAL] = "#ffffff" base[INSENSITIVE] = "#aeaeae" } style "theme-combo-arrow" = "theme-button" { xthickness = 1 ythickness = 1 } style "theme-view" { xthickness = 0 ythickness = 0 } style "theme-check-radio-buttons" { GtkWidget::interior-focus = 0 GtkWidget::focus-padding = 1 text[NORMAL] = "#ff0000" base[NORMAL] = "#ff0000" text[SELECTED] = "#ffffff" text[INSENSITIVE] = shade (0.625,@bg_color) base[PRELIGHT] = mix(0.80, @base_color, @selected_bg_color) bg[NORMAL] = "#438FC6" bg[INSENSITIVE] = "#aeaeae" bg[SELECTED] = "#ff8a01" } style "theme-radio-buttons" = "theme-button" { GtkWidget::interior-focus = 0 GtkWidget::focus-padding = 1 text[SELECTED] = @selected_fg_color text[INSENSITIVE] = shade (0.625,@bg_color) base[PRELIGHT] = mix(0.80, @base_color, @selected_bg_color) bg[NORMAL] = "#ffffff" bg[INSENSITIVE] = "#dcdcdc" bg[SELECTED] = @selected_bg_color } style "theme-spin-button" { bg[NORMAL] = "#d2d2d2" bg[ACTIVE] = "#868686" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = shade(1.10,@selected_bg_color) bg[INSENSITIVE] = "#dcdcdc" base[NORMAL] = "#ffffff" base[INSENSITIVE] = "#dcdcdc" text[NORMAL] = "#000000" text[INSENSITIVE] = "#aeaeae" } style "theme-calendar" { xthickness = 0 ythickness = 0 bg[NORMAL] = "#676767" bg[PRELIGHT] = shade(0.92,@bg_color) bg[ACTIVE] = "#ff0000" bg[INSENSITIVE] = "#ff0000" bg[SELECTED] = "#ff0000" text[PRELIGHT] = "#000000" text[NORMAL] = "#000000" text[INSENSITIVE]= "#000000" text[SELECTED] = "#ffffff" text[ACTIVE] = "#000000" fg[NORMAL] = "#ffffff" fg[PRELIGHT] = "#ffffff" fg[INSENSITIVE] = "#ffffff" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" base[NORMAL] = "#ff0000" base[NORMAL] = "#aeaeae" base[INSENSITIVE] = "#00ff00" base[SELECTED] = "#f3720d" base[ACTIVE] = "#f3720d" } style "theme-separator-menu-item" { xthickness = 1 ythickness = 0 GtkSeparatorMenuItem::horizontal-padding = 2 # We are setting the desired height by using wide-separators # There is no other way to get the odd height ... GtkWidget::wide-separators = 1 GtkWidget::separator-width = 1 GtkWidget::separator-height = 5 } style "theme-frame" { xthickness = 10 ythickness = 0 GtkWidget::LABEL-SIDE-PAD = 14 GtkWidget::LABEL-PAD = 23 fg[NORMAL] = "#000000" fg[ACTIVE] = "#000000" fg[PRELIGHT] = "#000000" fg[SELECTED] = "#000000" fg[INSENSITIVE] = "#000000" bg[NORMAL] = "#e2e2e2" bg[ACTIVE] = "#000000" bg[PRELIGHT] = "#000000" bg[SELECTED] = "#000000" bg[INSENSITIVE] = "#000000" base[NORMAL] = "#000000" base[ACTIVE] = "#000000" base[PRELIGHT] = "#000000" base[SELECTED] = "#000000" base[INSENSITIVE]= "#000000" text[NORMAL] = "#000000" text[ACTIVE] = "#000000" text[PRELIGHT] = "#000000" text[SELECTED] = "#000000" text[INSENSITIVE]= "#000000" } style "theme-textview" { text[NORMAL] = "#000000" text[ACTIVE] = "#000000" text[PRELIGHT] = "#000000" text[SELECTED] = "#000000" text[INSENSITIVE] = "#434648" bg[NORMAL] = "#ffffff" bg[ACTIVE] = "#ffffff" bg[PRELIGHT] = "#ffffff" bg[SELECTED] = "#ffffff" bg[INSENSITIVE] = "#ffffff" fg[NORMAL] = "#ffffff" fg[ACTIVE] = "#ffffff" fg[PRELIGHT] = "#ffffff" fg[SELECTED] = "#ffffff" fg[INSENSITIVE] = "#ffffff" base[NORMAL] = "#ffffff" base[ACTIVE] = "#ffffff" base[PRELIGHT] = "#ffffff" base[SELECTED] = "#ff9a00" base[INSENSITIVE] = "#ffffff" } style "theme-clist" { text[NORMAL] = "#000000" text[ACTIVE] = "#000000" text[PRELIGHT] = "#000000" text[SELECTED] = "#000000" text[INSENSITIVE] = "#434648" bg[NORMAL] = "#353438" bg[ACTIVE] = "#ff9a00" bg[PRELIGHT] = "#ff9a00" bg[SELECTED] = "#ff9a00" bg[INSENSITIVE] = "#ffffff" fg[NORMAL] = "#000000" fg[ACTIVE] = "#ff9a00" fg[PRELIGHT] = "#ff9a00" fg[SELECTED] = "#fdff00" fg[INSENSITIVE] = "#757575" base[NORMAL] = "#ffffff" base[ACTIVE] = "#fdff00" base[PRELIGHT] = "#000000" base[SELECTED] = "#fdff00" base[INSENSITIVE] = "#757575" } style "theme-label" { bg[NORMAL] = "#414143" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = "#000000" bg[INSENSITIVE] = "#434346" fg[NORMAL] = "#000000" fg[INSENSITIVE] = "#434346" fg[PRELIGHT] = "#000000" fg[SELECTED] = "#000000" fg[ACTIVE] = "#000000" text[NORMAL] = "#ffffff" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#ffffff" text[SELECTED] = "#ffffff" text[ACTIVE] = "#ffffff" base[NORMAL] = "#000000" base[INSENSITIVE] = "#00ff00" base[PRELIGHT] = "#0000ff" base[ACTIVE] = "#f39638" } style "theme-button-label" { bg[NORMAL] = "#414143" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = "#000000" bg[INSENSITIVE] = "#434346" fg[NORMAL] = "#ffffff" fg[INSENSITIVE] = "#434346" fg[PRELIGHT] = "#ffffff" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" text[NORMAL] = "#000000" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#000000" text[SELECTED] = "#000000" text[ACTIVE] = "#000000" base[NORMAL] = "#000000" base[INSENSITIVE] = "#00ff00" base[PRELIGHT] = "#0000ff" base[SELECTED] = "#ff00ff" base[ACTIVE] = "#ffff00" } style "theme-button-check-radio-label" { bg[NORMAL] = "#414143" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = "#000000" bg[INSENSITIVE] = "#434346" fg[NORMAL] = "#000000" fg[INSENSITIVE] = "#434346" fg[PRELIGHT] = "#000000" fg[SELECTED] = "#000000" fg[ACTIVE] = "#000000" text[NORMAL] = "#ffffff" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#ffffff" text[SELECTED] = "#000000" text[ACTIVE] = "#ffffff" base[NORMAL] = "#000000" base[INSENSITIVE] = "#00ff00" base[PRELIGHT] = "#0000ff" base[SELECTED] = "#ff00ff" base[ACTIVE] = "#ffff00" } style "theme-table" { bg[NORMAL] = "#848484" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#7f4426" bg[SELECTED] = "#000000" bg[INSENSITIVE] = "#434346" } style "theme-iconview" { GtkWidget::focus-line-width=1 bg[NORMAL] = "#000000" bg[ACTIVE] = "#c19676" bg[PRELIGHT] = "#c19676" bg[SELECTED] = "#c19676" bg[INSENSITIVE] = "#969696" fg[NORMAL] = "#ffffff" fg[INSENSITIVE] = "#ffffff" fg[PRELIGHT] = "#ffffff" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" text[NORMAL] = "#000000" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#000000" text[SELECTED] = "#000000" text[ACTIVE] = "#000000" base[NORMAL] = "#ffffff" base[INSENSITIVE] = "#434346" base[PRELIGHT] = "#FAD184" base[SELECTED] = "#FAD184" base[ACTIVE] = "#FAD184" } # Set Widget styles class "GtkWidget" style "theme-default" class "GtkScale" style "theme-scale" class "GtkRange" style "theme-range" class "GtkPaned" style "theme-paned" class "GtkFrame" style "theme-frame" class "GtkMenu" style "theme-menu" class "GtkMenuBar" style "theme-menubar" class "GtkEntry" style "theme-entry" class "GtkProgressBar" style "theme-progressbar" class "GtkToolbar" style "theme-toolbar" class "GtkSeparator" style "theme-wide" class "GtkCalendar" style "theme-calendar" class "GtkTable" style "theme-table" widget_class "*<GtkMenuItem>*" style "theme-menu-item" widget_class "*<GtkMenuBar>.<GtkMenuItem>*" style "theme-menubar-item" widget_class "*<GtkSeparatorMenuItem>*" style "theme-separator-menu-item" widget_class "*<GtkLabel>" style "theme-label" widget_class "*<GtkButton>" style "theme-button" widget_class "*<GtkButton>*<GtkLabel>*" style "theme-button-label" widget_class "*<GtkCheckButton>" style "theme-check-radio-buttons" widget_class "*<GtkToggleButton>.<GtkLabel>*" style "theme-button" widget_class "*<GtkCheckButton>.<GtkLabel>*" style "theme-button-check-radio-label" widget_class "*<GtkRadioButton>.<GtkLabel>*" style "theme-button-check-radio-label" widget_class "*<GtkTextView>" style "theme-textview" widget_class "*<GtkList>" style "theme-textview" widget_class "*<GtkCList>" style "theme-clist" widget_class "*<GtkIconView>" style "theme-iconview" widget_class "*<GtkHandleBox>" style "theme-handlebox" widget_class "*<GtkNotebook>" style "theme-notebook" widget_class "*<GtkNotebook>*<GtkEventBox>" style "theme-notebook" widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "theme-notebook" widget_class "*<GtkNotebook>*<GtkLayout>" style "theme-notebook" widget_class "*<GtkNotebook>*<GtkViewport>" style "theme-notebook" widget_class "*<GtkNotebook>.<GtkLabel>*" style "theme-notebook" #for tabs # Combo Box Stuff widget_class "*<GtkCombo>*" style "theme-combo" widget_class "*<GtkComboBox>*<GtkButton>" style "theme-combo-box" widget_class "*<GtkComboBoxEntry>*" style "theme-entry-combo-box" widget_class "*<GtkSpinButton>*" style "theme-spin-button" widget_class "*<GtkSpinButton>*<GtkArrow>*" style:highest "theme-tree-arrow" # Tool Tips Stuff widget "gtk-tooltip*" style "theme-tooltips" # Tree View Stuff widget_class "*<GtkTreeView>.<GtkButton>*" style "theme-tree" widget_class "*<GtkCTree>.<GtkButton>*" style "theme-tree" widget_class "*<GtkList>.<GtkButton>*" style "theme-tree" widget_class "*<GtkCList>.<GtkButton>*" style "theme-tree" # For arrow bg widget_class "*<GtkTreeView>.<GtkButton>*<GtkArrow>" style "theme-tree-arrow" widget_class "*<GtkCTree>.<GtkButton>*<GtkArrow>" style "theme-tree-arrow" widget_class "*<GtkList>.<GtkButton>*<GtkArrow>" style "theme-tree-arrow" ####################################################### ## GNOME specific ####################################################### widget_class "*.ETree.ECanvas" style "theme-tree" widget_class "*.ETable.ECanvas" style "theme-tree" style "panelbuttons" = "theme-button" { # As buttons are draw lower this helps center text xthickness = 3 ythickness = 3 } widget_class "*Panel*<GtkButton>*" style "panelbuttons" style "murrine-fg-is-text-color-workaround" { text[NORMAL] = "#000000" text[ACTIVE] = "#fdff00" text[SELECTED] = "#fdff00" text[INSENSITIVE] = "#757575" bg[SELECTED] = "#b85e03" bg[ACTIVE] = "#b85e03" bg[SELECTED] = "#b85e03" fg[SELECTED] = "#ffffff" fg[NORMAL] = "#ffffff" fg[ACTIVE] = "#ffffff" fg[INSENSITIVE] = "#434348" fg[PRELIGHT] = "#ffffff" base[SELECTED] = "#ff9a00" base[NORMAL] = "#ffffff" base[ACTIVE] = "#ff9a00" base[INSENSITIVE] = "#434348" base[PRELIGHT] = "#ffffff" } widget_class "*.<GtkTreeView>*" style "murrine-fg-is-text-color-workaround" style "murrine-combobox-text-color-workaround" { text[NORMAL] = "#FFFFF" text[PRELIGHT] = "#FFFFF" text[SELECTED] = "#FFFFF" text[ACTIVE] = "#FFFFF" text[INSENSITIVE] = "#FFFFF" } widget_class "*.<GtkComboBox>.<GtkCellView>" style "murrine-combobox-text-color-workaround" style "murrine-menuitem-text-is-fg-color-workaround" { bg[NORMAL] = "#0000ff" text[NORMAL] = "#ffffff" text[PRELIGHT] = "#ffffff"#"#FD7D00" text[SELECTED] = "#ffffff"#"#ff0000"# @selected_fg_color text[ACTIVE] = "#ffffff"#"#ff0000"# "#FD7D00" text[INSENSITIVE] = "#ffffff"#ff0000"# "#414143" } widget "*.gtk-combobox-popup-menu.*" style "murrine-menuitem-text-is-fg-color-workaround"

    Read the article

  • How can I insert auto-numbered sentences in LibreOffice Writer?

    - by Felix Dombek
    I want to achieve a formatting like this: Some text which references (1), for example because (1) might be an example sentence for some grammatical structure which is explained here. This is auto-numbered text object 1.                                                                                      (1) The number on the right is assigned automatically. If another auto-numbered object is inserted before this, it will change to (2), as will all references in the surrounding text. Some more surrounding text. How can I insert such numbered sentences and references to them in LibreOffice 3.5.1?

    Read the article

  • Hyphen encoding (minus) in Google Base RSS feed

    - by pmells
    I am trying to create an automatic feed generation for data to be sent to Google Base using utf-8 encoding. However I am getting errors whenever hyphens are found telling me that there is an encoding error in the relevant attribute (title, description, product_type). I am currently using: &amp;minus; but I have also tried: &amp;#8722; neither of which have worked. I am using the following declaration at the top of the document: <?xml version="1.0" encoding="utf-8"?> Any help appreciated and let me know if I need to give more information!

    Read the article

  • Invalid character in a Base-64 string

    - by swetha
    I am getting this error when I am validating the user with sql membership provider this.provider.ValidateUser(userName, password); the password i have used is "freetrial". I tried trimming the spaces but still no luck!!! and the call stack is as follows: [FormatException: Invalid character in a Base-64 string.] System.Convert.FromBase64String(String s) +0 System.Web.Security.MembershipProvider.EncodePassword(String pass, Int32 passwordFormat, String salt) +54 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +169 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +78

    Read the article

  • Cast MyEntity To LinqEntity throw a base controller class

    - by Mohammad Kani
    hi there i design a multilayer we appliction andusing LINQ a my data provider i need to user my own Entites instead o LINQ etities. so i created Entities Project and create my entities in it. when i get data from contex and cast them to my entities , everything is ok. but when i want to cast on of my entities to linq entity , an exception thrown. in my linq entity i add CTYPE operator from and to my entities Exp : Public Class BaseController(Of LinqEntity As {BaseEntity, New}, MyEntity As ModuleEntities.BaseEntityInfo) Implements Interfaces.Base(Of ServiceEntity) 'This methd work fine and cast LinqEntity to MyEntity Public Function GetAll() As List(Of MyEntity ) Dim q = (From x In Context.GetTable(Of LinqEntity)() _ Select x).Cast(Of MyEntityBase) End Function Public Sub Update(ByVal entity As MyEntity) 'here is problem 'cast , direct cast , or anything not work Dim x as LinqEntity = entity Me.Context.GetTable(Of LinqEntity).InsertOnSubmit(entity) Me.Context.SubmiChanges() End Sub

    Read the article

  • Combine 3D objects in XNA 4

    - by Christoph
    Currently I am writing on my thesis for university, the theme I am working on is 3D Visualization of hierarchical structures using cone trees. I want to do is to draw a cone and arrange a number of spheres at the bottom of the cone. The spheres should be arranged according to the radius and the number of spheres correctly. As you can imagine I need a lot of these cone/sphere combinations. First Attempt I was able to find some tutorials that helped with drawing cones and spheres. Cone public Cone(GraphicsDevice device, float height, int tessellation, string name, List<Sphere> children) { //prepare children and calculate the children spacing and radius of the cone if (children == null || children.Count == 0) { throw new ArgumentNullException("children"); } this.Height = height; this.Name = name; this.Children = children; //create the cone if (tessellation < 3) { throw new ArgumentOutOfRangeException("tessellation"); } //Create a ring of triangels around the outside of the cones bottom for (int i = 0; i < tessellation; i++) { Vector3 normal = this.GetCircleVector(i, tessellation); // add the vertices for the top of the cone base.AddVertex(Vector3.Up * height, normal); //add the bottom circle base.AddVertex(normal * this.radius + Vector3.Down * height, normal); //Add indices base.AddIndex(i * 2); base.AddIndex(i * 2 + 1); base.AddIndex((i * 2 + 2) % (tessellation * 2)); base.AddIndex(i * 2 + 1); base.AddIndex((i * 2 + 3) % (tessellation * 2)); base.AddIndex((i * 2 + 2) % (tessellation * 2)); } //create flate triangle to seal the bottom this.CreateCap(tessellation, height, this.Radius, Vector3.Down); base.InitializePrimitive(device); } Sphere public void Initialize(GraphicsDevice device, Vector3 qi) { int verticalSegments = this.Tesselation; int horizontalSegments = this.Tesselation * 2; //single vertex on the bottom base.AddVertex((qi * this.Radius) + this.lowering, Vector3.Down); for (int i = 0; i < verticalSegments; i++) { float latitude = ((i + 1) * MathHelper.Pi / verticalSegments) - MathHelper.PiOver2; float dy = (float)Math.Sin(latitude); float dxz = (float)Math.Cos(latitude); //Create a singe ring of latitudes for (int j = 0; j < horizontalSegments; j++) { float longitude = j * MathHelper.TwoPi / horizontalSegments; float dx = (float)Math.Cos(longitude) * dxz; float dz = (float)Math.Sin(longitude) * dxz; Vector3 normal = new Vector3(dx, dy, dz); base.AddVertex(normal * this.Radius, normal); } } // Finish with a single vertex at the top of the sphere. AddVertex((qi * this.Radius) + this.lowering, Vector3.Up); // Create a fan connecting the bottom vertex to the bottom latitude ring. for (int i = 0; i < horizontalSegments; i++) { AddIndex(0); AddIndex(1 + (i + 1) % horizontalSegments); AddIndex(1 + i); } // Fill the sphere body with triangles joining each pair of latitude rings. for (int i = 0; i < verticalSegments - 2; i++) { for (int j = 0; j < horizontalSegments; j++) { int nextI = i + 1; int nextJ = (j + 1) % horizontalSegments; base.AddIndex(1 + i * horizontalSegments + j); base.AddIndex(1 + i * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + j); base.AddIndex(1 + i * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + j); } } // Create a fan connecting the top vertex to the top latitude ring. for (int i = 0; i < horizontalSegments; i++) { base.AddIndex(CurrentVertex - 1); base.AddIndex(CurrentVertex - 2 - (i + 1) % horizontalSegments); base.AddIndex(CurrentVertex - 2 - i); } base.InitializePrimitive(device); } The tricky part now is to arrange the spheres at the bottom of the cone. I tried is to draw just the cone and then draw the spheres. I need a lot of these cones, so it would be pretty hard to calculate all the positions correctly. Second Attempt So the second try was to generate a object that builds all vertices of the cone and all of the spheres at once. So I was hoping to render a cone with all its spheres arranged correctly. After a short debug I found out that the cone is created and the first sphere, when it turn of the second sphere I am running into an OutOfBoundsException of ushort.MaxValue. Cone and Spheres public ConeWithSpheres(GraphicsDevice device, float height, float coneDiameter, float sphereDiameter, int coneTessellation, int sphereTessellation, int numberOfSpheres) { if (coneTessellation < 3) { throw new ArgumentException(string.Format("{0} is to small for the tessellation of the cone. The number must be greater or equal to 3", coneTessellation)); } if (sphereTessellation < 3) { throw new ArgumentException(string.Format("{0} is to small for the tessellation of the sphere. The number must be greater or equal to 3", sphereTessellation)); } //set properties this.Height = height; this.ConeDiameter = coneDiameter; this.SphereDiameter = sphereDiameter; this.NumberOfChildren = numberOfSpheres; //end set properties //generate the cone this.GenerateCone(device, coneTessellation); //generate the spheres //vector that defines the Y position of the sphere on the cones bottom Vector3 lowering = new Vector3(0, 0.888f, 0); this.GenerateSpheres(device, sphereTessellation, numberOfSpheres, lowering); } // ------ GENERATE CONE ------ private void GenerateCone(GraphicsDevice device, int coneTessellation) { int doubleTessellation = coneTessellation * 2; //Create a ring of triangels around the outside of the cones bottom for (int index = 0; index < coneTessellation; index++) { Vector3 normal = this.GetCircleVector(index, coneTessellation); //add the vertices for the top of the cone base.AddVertex(Vector3.Up * this.Height, normal); //add the bottom of the cone base.AddVertex(normal * this.ConeRadius + Vector3.Down * this.Height, normal); //add indices base.AddIndex(index * 2); base.AddIndex(index * 2 + 1); base.AddIndex((index * 2 + 2) % doubleTessellation); base.AddIndex(index * 2 + 1); base.AddIndex((index * 2 + 3) % doubleTessellation); base.AddIndex((index * 2 + 2) % doubleTessellation); } //create flate triangle to seal the bottom this.CreateCap(coneTessellation, this.Height, this.ConeRadius, Vector3.Down); base.InitializePrimitive(device); } // ------ GENERATE SPHERES ------ private void GenerateSpheres(GraphicsDevice device, int sphereTessellation, int numberOfSpheres, Vector3 lowering) { int verticalSegments = sphereTessellation; int horizontalSegments = sphereTessellation * 2; for (int childCount = 1; childCount < numberOfSpheres; childCount++) { //single vertex at the bottom of the sphere base.AddVertex((this.GetCircleVector(childCount, this.NumberOfChildren) * this.SphereRadius) + lowering, Vector3.Down); for (int verticalSegmentsCount = 0; verticalSegmentsCount < verticalSegments; verticalSegmentsCount++) { float latitude = ((verticalSegmentsCount + 1) * MathHelper.Pi / verticalSegments) - MathHelper.PiOver2; float dy = (float)Math.Sin(latitude); float dxz = (float)Math.Cos(latitude); //create a single ring of latitudes for (int horizontalSegmentsCount = 0; horizontalSegmentsCount < horizontalSegments; horizontalSegmentsCount++) { float longitude = horizontalSegmentsCount * MathHelper.TwoPi / horizontalSegments; float dx = (float)Math.Cos(longitude) * dxz; float dz = (float)Math.Sin(longitude) * dxz; Vector3 normal = new Vector3(dx, dy, dz); base.AddVertex((normal * this.SphereRadius) + lowering, normal); } } //finish with a single vertex at the top of the sphere base.AddVertex((this.GetCircleVector(childCount, this.NumberOfChildren) * this.SphereRadius) + lowering, Vector3.Up); //create a fan connecting the bottom vertex to the bottom latitude ring for (int i = 0; i < horizontalSegments; i++) { base.AddIndex(0); base.AddIndex(1 + (i + 1) % horizontalSegments); base.AddIndex(1 + i); } //Fill the sphere body with triangles joining each pair of latitude rings for (int i = 0; i < verticalSegments - 2; i++) { for (int j = 0; j < horizontalSegments; j++) { int nextI = i + 1; int nextJ = (j + 1) % horizontalSegments; base.AddIndex(1 + i * horizontalSegments + j); base.AddIndex(1 + i * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + j); base.AddIndex(1 + i * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + nextJ); base.AddIndex(1 + nextI * horizontalSegments + j); } } //create a fan connecting the top vertiex to the top latitude for (int i = 0; i < horizontalSegments; i++) { base.AddIndex(this.CurrentVertex - 1); base.AddIndex(this.CurrentVertex - 2 - (i + 1) % horizontalSegments); base.AddIndex(this.CurrentVertex - 2 - i); } base.InitializePrimitive(device); } } Any ideas how I could fix this?

    Read the article

  • Base class -> Derived class and vice-versa conversions in C++

    - by Ivan Nikolaev
    Hi! I have the following example code: #include <iostream> #include <string> using namespace std; class Event { public: string type; string source; }; class KeyEvent : public Event { public: string key; string modifier; }; class MouseEvent : public Event { public: string button; int x; int y; }; void handleEvent(KeyEvent e) { if(e.key == "ENTER") cout << "Hello world! The Enter key was pressed ;)" << endl; } Event generateEvent() { KeyEvent e; e.type = "KEYBOARD_EVENT"; e.source = "Keyboard0"; e.key = "SPACEBAR"; e.modifier = "none"; return e; } int main() { KeyEvent e = generateEvent(); return 0; } I can't compile it, G++ throws an error of kind: main.cpp: In function 'int main()': main.cpp:47:29: error: conversion from 'Event' to non-scalar type 'KeyEvent' requested I know that the error is obvious for C++ guru's, but I can't understand why I can't do the conversion from base class object to derived one. Can someone suggest me the solution of the problem that I have? Thx in advice

    Read the article

  • C# How can I return my base class in a webservice

    - by HenriM
    I have a class Car and a derived SportsCar: Car Something like this: public class Car { public int TopSpeed{ get; set; } } public class SportsCar : Car { public string GirlFriend { get; set; } } I have a webservice with methods returning Cars i.e: [WebMethod] public Car GetCar() { return new Car() { TopSpeed = 100 }; } It returns: <Car> <TopSpeed>100</TopSpeed> </Car> I have another method that also returns cars like this: [WebMethod] public Car GetMyCar() { Car mycar = new SportsCar() { GirlFriend = "JLo", TopSpeed = 300 }; return mycar; } It compiles fine and everything, but when invoking it I get: System.InvalidOperationException: There was an error generating the XML document. --- System.InvalidOperationException: The type wsBaseDerived.SportsCar was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically. I find it strange that it can't serialize this as a straight car, as mycar is a car. Adding XmlInclude on the WebMethod of ourse removes the error: [WebMethod] [XmlInclude(typeof(SportsCar))] public Car GetMyCar() { Car mycar = new SportsCar() { GirlFriend = "JLo", TopSpeed = 300 }; return mycar; } and it now returns: <Car xsi:type="SportsCar"> <TopSpeed>300</TopSpeed> <GirlFriend>JLo</GirlFriend> </Car> But I really want the base class returned, without the extra properties etc from the derived class. Is that at all possible without creating mappers etc? Please say yes ;)

    Read the article

  • What's the strategy to implement a "knowledge base" in my company.

    - by Oscar Reyes
    In my current work we think we can get benefit from having a knowledge base, so the next time someone has a question/problem etc, that base can be consulted and an answer will show up. Also, it will reduce the risk from having people leaving the company with the knowledge and we would have to start all over again. My question is, what strategy can we follow to implement/buy/get/build/etc this knowledge base? Are there software ready for this? Would it be better to have something build by ourselves ( we have some programmers ) This is an small company ( < 30 ) and the base should be accessible from outside the office ( when the employees are with the customer etc.) so I guess a webapp is in order.

    Read the article

  • What's the strategy to implement a "knowledge base" in my company. [closed]

    - by Oscar Reyes
    In my current work we think we can get benefit from having a knowledge base, so the next time someone has a question/problem etc, that base can be consulted and an answer will show up. Also, it will reduce the risk from having people leaving the company with the knowledge and we would have to start all over again. My question is, what strategy can we follow to implement/buy/get/build/etc this knowledge base? Are there software ready for this? Would it be better to have something build by ourselves ( we have some programmers ) This is an small company ( < 30 ) and the base should be accessible from outside the office ( when the employees are with the customer etc.) so I guess a webapp is in order.

    Read the article

  • Thumbnails for certain formats not appearing in Nautilus

    - by Ryan McClure
    The following formats do not have an icon in Nautilus: .odt .odb And, some of my older documents are missing their thumbnails, all of which are either .odt or .odp. I just purged and reinstalled LibreOffice today...could this be the reason why? Edit: Sorry about my vagueness I am on Ubuntu 11.10, using LibreOffice 3.4 340m1(Build:402) that comes by default in the repos. Here's a screenshot of what I see for these formats.

    Read the article

  • Disable updates on certain softwares

    - by tadatma
    When on trying to update an ubuntu distro (or for that matter any linux distribution) I often find a list of updates amounting to more than 150 mb or so. To my displeasure I find that the culprit more often than not has to do with libreoffice. I know I can untick those connected with libreoffice but I wonder if there is an elegant way; may be a small program in between that helps me untick those programs that I wish to stay un-updated.

    Read the article

  • compiler warning at C++ template base class

    - by eike
    I get a compiler warning, that I don't understand in that context, when I compile the "Child.cpp" from the following code. (Don't wonder: I stripped off my class declarations to the bare minuum, so the content will not make much sense, but you will see the problem quicker). I get the warning with VS2003 and VS2008 on the highest warning level. The code AbstractClass.h : #include <iostream> template<typename T> class AbstractClass { public: virtual void Cancel(); // { std::cout << "Abstract Cancel" << std::endl; }; virtual void Process() = 0; }; //outside definition. if I comment out this and take the inline //definition like above (currently commented out), I don't get //a compiler warning template<typename T> void AbstractClass<T>::Cancel() { std::cout << "Abstract Cancel" << std::endl; } Child.h : #include "AbstractClass.h" class Child : public AbstractClass<int> { public: virtual void Process(); }; Child.cpp : #include "Child.h" #include <iostream> void Child::Process() { std::cout << "Process" << std::endl; } The warning The class "Child" is derived from "AbstractClass". In "AbstractClass" there's the public method "AbstractClass::Cancel()". If I define the method outside of the class body (like in the code you see), I get the compiler warning... AbstractClass.h(7) : warning C4505: 'AbstractClass::Cancel' : unreferenced local function has been removed with [T=int] ...when I compile "Child.cpp". I do not understand this, because this is a public function and the compiler can't know if I later reference this method or not. And, in the end, I reference this method, because I call it in main.cpp and despite this compiler warning, this method works if I compile and link all files and execute the program: //main.cpp #include <iostream> #include "Child.h" int main() { Child child; child.Cancel(); //works, despite the warning } If I do define the Cancel() function as inline (you see it as out commented code in AbstractClass.h), then I don't get the compiler warning. Of course my program works, but I want to understand this warning or is this just a compiler mistake? Furthermore, if do not implement AbsctractClass as a template class (just for a test purpose in this case) I also don't get the compiler warning...?

    Read the article

  • Returning new base class when the parent class shared pointer is the return type

    - by Ben Dol
    Can you have a parent class shared pointer return type of a function and then return a new child class without it being a shared pointer? I'm not sure how shared pointers work in these situations, do they act like a regular pointer? Here is my example: BaseEventPtr Actions::getEvent(const std::string& nodeName) { if(asLowerCaseString(nodeName) == "action") return new ActionEvent(&m_interface); return nullptr; } ActionEvent is the subclass of BaseEvent in this situation. Cheers!

    Read the article

  • Creating a dynamic proxy generator with c# – Part 4 – Calling the base method

    - by SeanMcAlinden
    Creating a dynamic proxy generator with c# – Part 1 – Creating the Assembly builder, Module builder and caching mechanism Creating a dynamic proxy generator with c# – Part 2 – Interceptor Design Creating a dynamic proxy generator with c# – Part 3 – Creating the constructors   The plan for calling the base methods from the proxy is to create a private method for each overridden proxy method, this will allow the proxy to use a delegate to simply invoke the private method when required. Quite a few helper classes have been created to make this possible so as usual I would suggest download or viewing the code at http://rapidioc.codeplex.com/. In this post I’m just going to cover the main points for when creating methods. Getting the methods to override The first two notable methods are for getting the methods. private static MethodInfo[] GetMethodsToOverride<TBase>() where TBase : class {     return typeof(TBase).GetMethods().Where(x =>         !methodsToIgnore.Contains(x.Name) &&                              (x.Attributes & MethodAttributes.Final) == 0)         .ToArray(); } private static StringCollection GetMethodsToIgnore() {     return new StringCollection()     {         "ToString",         "GetHashCode",         "Equals",         "GetType"     }; } The GetMethodsToIgnore method string collection contains an array of methods that I don’t want to override. In the GetMethodsToOverride method, you’ll notice a binary AND which is basically saying not to include any methods marked final i.e. not virtual. Creating the MethodInfo for calling the base method This method should hopefully be fairly easy to follow, it’s only function is to create a MethodInfo which points to the correct base method, and with the correct parameters. private static MethodInfo CreateCallBaseMethodInfo<TBase>(MethodInfo method) where TBase : class {     Type[] baseMethodParameterTypes = ParameterHelper.GetParameterTypes(method, method.GetParameters());       return typeof(TBase).GetMethod(        method.Name,        BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,        null,        baseMethodParameterTypes,        null     ); }   /// <summary> /// Get the parameter types. /// </summary> /// <param name="method">The method.</param> /// <param name="parameters">The parameters.</param> public static Type[] GetParameterTypes(MethodInfo method, ParameterInfo[] parameters) {     Type[] parameterTypesList = Type.EmptyTypes;       if (parameters.Length > 0)     {         parameterTypesList = CreateParametersList(parameters);     }     return parameterTypesList; }   Creating the new private methods for calling the base method The following method outline how I’ve created the private methods for calling the base class method. private static MethodBuilder CreateCallBaseMethodBuilder(TypeBuilder typeBuilder, MethodInfo method) {     string callBaseSuffix = "GetBaseMethod";       if (method.IsGenericMethod || method.IsGenericMethodDefinition)     {                         return MethodHelper.SetUpGenericMethod             (                 typeBuilder,                 method,                 method.Name + callBaseSuffix,                 MethodAttributes.Private | MethodAttributes.HideBySig             );     }     else     {         return MethodHelper.SetupNonGenericMethod             (                 typeBuilder,                 method,                 method.Name + callBaseSuffix,                 MethodAttributes.Private | MethodAttributes.HideBySig             );     } } The CreateCallBaseMethodBuilder is the entry point method for creating the call base method. I’ve added a suffix to the base classes method name to keep it unique. Non Generic Methods Creating a non generic method is fairly simple public static MethodBuilder SetupNonGenericMethod(     TypeBuilder typeBuilder,     MethodInfo method,     string methodName,     MethodAttributes methodAttributes) {     ParameterInfo[] parameters = method.GetParameters();       Type[] parameterTypes = ParameterHelper.GetParameterTypes(method, parameters);       Type returnType = method.ReturnType;       MethodBuilder methodBuilder = CreateMethodBuilder         (             typeBuilder,             method,             methodName,             methodAttributes,             parameterTypes,             returnType         );       ParameterHelper.SetUpParameters(parameterTypes, parameters, methodBuilder);       return methodBuilder; }   private static MethodBuilder CreateMethodBuilder (     TypeBuilder typeBuilder,     MethodInfo method,     string methodName,     MethodAttributes methodAttributes,     Type[] parameterTypes,     Type returnType ) { MethodBuilder methodBuilder = typeBuilder.DefineMethod(methodName, methodAttributes, returnType, parameterTypes); return methodBuilder; } As you can see, you simply have to declare a method builder, get the parameter types, and set the method attributes you want.   Generic Methods Creating generic methods takes a little bit more work. /// <summary> /// Sets up generic method. /// </summary> /// <param name="typeBuilder">The type builder.</param> /// <param name="method">The method.</param> /// <param name="methodName">Name of the method.</param> /// <param name="methodAttributes">The method attributes.</param> public static MethodBuilder SetUpGenericMethod     (         TypeBuilder typeBuilder,         MethodInfo method,         string methodName,         MethodAttributes methodAttributes     ) {     ParameterInfo[] parameters = method.GetParameters();       Type[] parameterTypes = ParameterHelper.GetParameterTypes(method, parameters);       MethodBuilder methodBuilder = typeBuilder.DefineMethod(methodName,         methodAttributes);       Type[] genericArguments = method.GetGenericArguments();       GenericTypeParameterBuilder[] genericTypeParameters =         GetGenericTypeParameters(methodBuilder, genericArguments);       ParameterHelper.SetUpParameterConstraints(parameterTypes, genericTypeParameters);       SetUpReturnType(method, methodBuilder, genericTypeParameters);       if (method.IsGenericMethod)     {         methodBuilder.MakeGenericMethod(genericArguments);     }       ParameterHelper.SetUpParameters(parameterTypes, parameters, methodBuilder);       return methodBuilder; }   private static GenericTypeParameterBuilder[] GetGenericTypeParameters     (         MethodBuilder methodBuilder,         Type[] genericArguments     ) {     return methodBuilder.DefineGenericParameters(GenericsHelper.GetArgumentNames(genericArguments)); }   private static void SetUpReturnType(MethodInfo method, MethodBuilder methodBuilder, GenericTypeParameterBuilder[] genericTypeParameters) {     if (method.IsGenericMethodDefinition)     {         SetUpGenericDefinitionReturnType(method, methodBuilder, genericTypeParameters);     }     else     {         methodBuilder.SetReturnType(method.ReturnType);     } }   private static void SetUpGenericDefinitionReturnType(MethodInfo method, MethodBuilder methodBuilder, GenericTypeParameterBuilder[] genericTypeParameters) {     if (method.ReturnType == null)     {         methodBuilder.SetReturnType(typeof(void));     }     else if (method.ReturnType.IsGenericType)     {         methodBuilder.SetReturnType(genericTypeParameters.Where             (x => x.Name == method.ReturnType.Name).First());     }     else     {         methodBuilder.SetReturnType(method.ReturnType);     }             } Ok, there are a few helper methods missing, basically there is way to much code to put in this post, take a look at the code at http://rapidioc.codeplex.com/ to follow it through completely. Basically though, when dealing with generics there is extra work to do in terms of getting the generic argument types setting up any generic parameter constraints setting up the return type setting up the method as a generic All of the information is easy to get via reflection from the MethodInfo.   Emitting the new private method Emitting the new private method is relatively simple as it’s only function is calling the base method and returning a result if the return type is not void. ILGenerator il = privateMethodBuilder.GetILGenerator();   EmitCallBaseMethod(method, callBaseMethod, il);   private static void EmitCallBaseMethod(MethodInfo method, MethodInfo callBaseMethod, ILGenerator il) {     int privateParameterCount = method.GetParameters().Length;       il.Emit(OpCodes.Ldarg_0);       if (privateParameterCount > 0)     {         for (int arg = 0; arg < privateParameterCount; arg++)         {             il.Emit(OpCodes.Ldarg_S, arg + 1);         }     }       il.Emit(OpCodes.Call, callBaseMethod);       il.Emit(OpCodes.Ret); } So in the main method building method, an ILGenerator is created from the method builder. The ILGenerator performs the following actions: Load the class (this) onto the stack using the hidden argument Ldarg_0. Create an argument on the stack for each of the method parameters (starting at 1 because 0 is the hidden argument) Call the base method using the Opcodes.Call code and the MethodInfo we created earlier. Call return on the method   Conclusion Now we have the private methods prepared for calling the base method, we have reached the last of the relatively easy part of the proxy building. Hopefully, it hasn’t been too hard to follow so far, there is a lot of code so I haven’t been able to post it all so please check it out at http://rapidioc.codeplex.com/. The next section should be up fairly soon, it’s going to cover creating the delegates for calling the private methods created in this post.   Kind Regards, Sean.

    Read the article

  • How do I select a subset of the available fonts for a particular application

    - by Aleve Sicofante
    Having all those exotic fonts (for an European), like Chinese, Hindi or Russian fonts, is nice for a web browser. You never get those ugly unicode blocks and get the original glyphs instead. However, having the font menu in LibreOffice or AbiWord populated with all of those fonts is cumbersome and useless for most installations. Having more than a few fonts in note taking applications is also somewhat overkill. Is there a way I can designate a subset of all the available fonts to work with a particular application? I understand the app itself could do it, but I'm asking for a way to make LibreOffice, for instance, not see certain fonts, only my selection of "useful for text processing" subset.

    Read the article

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