style

Is it appropriate for software to refer to itself in the first person?

Hi all, Here's a style question for you. Our software has an integrated log window, where status/warning/error messages from all the various processes in the system can be viewed by the user. It's pretty standard stuff, and it looks something like this: 2009/07/08 12:15:39 [email protected] ERROR File foo.bar not found, aborting...

Pythonic way to get some rows of a matrix

I was thinking about a code that I wrote a few years ago in Python, at some point it had to get just some elements, by index, of a list of lists. I remember I did something like this: def getRows(m, row_indices): tmp = [] for i in row_indices: tmp.append(m[i]) return tmp Now that I've learnt a little bit more sinc...

Image exists but does not appear as background

I have this in my CSS file: body {style.css (line 3) background:#CDF8FF url(images/final_bg.jpg) no-repeat scroll center top; clear:both; font-family:Arial,Helvetica,sans-serif; margin:0; padding:0; } That images exists, as I can get to it via the browser, but it is never displayed to me! What is wrong? I use firebug to see if its th...

WPF custom control style problem

Hi. I have a custom control (from MS Toolkit - DatePicker). I've made my own style like this: <Style TargetType="{x:Type local:DatePicker}"> But this style does not apply automatically. I have to add Key: <Style x:Key="DatePickerStyle" TargetType="{x:Type local:DatePicker}"> and reference it in each custom control like <toolkit:...

In what way do you use delegates and/or events other than for the UI?

I am curious as to how other developers use delegates and/or events other than for responding to UI events? I, personally, don't use them for anything other than responding to UI events but I have a strong feeling that I am missing out on the power of delegates and events. So I pose this question to the SO community so that I may get s...

How have your ideas about C programming practices changed in the last ten years?

Object-Oriented programmers seem to have all the fun. Not only are they treated to major framework revisions every two years, and new and Improved languages every five, they also get to deal with design practices tailor-made to their programming style. From test-driven development to design patterns, Object-Oriented programmers have a ...

WPF listview header hover/pressed color

Hi I'm trying to style the header of a listview depending on hover/pressed/etc. events. So far I tried a few things such as a trigger like the following but this does not work on my machine (a Vista Ultimate x64) <Style x:Key="GridViewColumnHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}"> <Style.Triggers> <Trigger...

C#/WPF: Add Window.Style, even if a ResourceDictionary already exists

Hello, I'm trying to add two Datatriggers to my WPF Window. Normally, this would work via adding `<Style TargetType="{x:Type TextBlock}"></Style>` to the Window.Resources. In this case, I already have `<ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Pr...

Can I dynamically switch between styles in WPF?

Let's say I wanted to display a Button and a few RadioButtons. Based on which RadioButton is selected, I want to apply a different style to my Button. Is this possible in WPF? ...

Mac OS X / Good terminal template

Does anyone know of a good terminal template? I prefere the black one but when I connect to a computer over SSH I get ugly bold fonts with strange collors :). THX! ...

Use a parent XML element as a container for reoccurring child elements?

Let's say you want to allow some particular XML element to occur 0+ times. For example, the <record> element can occur multiple times: <repository> <record>Record 1</record> <record>Record 2</record> <record>Record 3</record> </repository> Are there any compelling reasons to include a parent element as a container for these? F...

avoiding long class constants as parameters - PHP

example: class Vendor_ClassName_Helper { CONST FIRST_OPTION = 1; CONST SECOND_OPTION = 2; public function __construct($option, $otherArgument) { } } client code: $obj = new Vendor_ClassName_Helper(Vendor_ClassName_Helper::FIRST_OPTION, $var); Any good ways to avoid the long lines (and this is a rather short examp...

Override GWT Styling

I had a beautiful pure HTML mockup for a webpage that I am now recreating in GWT. I'm attempting to use the same css in my GWT app, but that's not working well for me. GWT styles seem to override mine. I know I can completely disable the GWT styles, however I would prefer to have the styling for the GWT components that I'm adding (tab...

Jquery: set style part of text in input text

Guys, I want to create some text based on user input, and when user enter some text, the first word will automatically set backgroundcolor, but the other words still remain same (no background color), can I do this ? Thanks ...

Match any character (including newlines) in sed

I have a sed command that I want to run on a huge, terrible, ugly html file that was created from a microsoft word document. All it should do is remove any instance of the string style='text-align:center; color:blue; exampleStyle:exampleValue' The sed command that I am trying to modify is sed "s/ style='[^']*'//" fileA > fileB It w...

Using HTML elements inside an XML loaded by Flash

I am trying to use html elements to style text inside an XML file that is loaded and displayed by flash. When I do this the text will not display at all. Here is a chunck of my XML : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Page> <Title>You should be <b>Bold</b> ! </Title> <Page> When I try the code below, it disp...

"inherit" style of theme in wpf

I'm using one of the themes in CodePlex and I want to add some modifications on the style but not to change their code. How can I inherit the theme style? ...

Applying html formating in label control

The html formating is applied great in this case. The Surname is displayed with size 5. lblWelcome.Text = "Welcome:<font size=''5''>" & txtSurname.Text & "</font>" Why the html style is not applied in this example? lblWelcome.Text = "Welcome:<font color=''white''>" & txtSurname.Text & "</font>" ...

WPF- Animate from one style to another

Hi guys Just wondering if anyone know how to animate from one style to another i.e. going from NormalStyle to ActiveStyle when the user focuses on the textbox <Style x:key="NormalStyle" TargetType="{x:Type TextBox}"> <Setter Property="BorderBrush" Value="Gray" /> <Setter Property="BorderThickness" Value="2" /> </Style> <Style...

How closely can a Website be Copied without violating Copyright?

I have a client that is interested in having the homepage of their website look almost exactly like that of website ABC. They love everything about it. However, they either do not want to ask for or would not receive a license from ABC to copy their site. My question is: how closely can a website be copied without violating copyright. ...