style

XML basic style options

So I'm returning xml from a web service and I get this message in the browser (firefox) This XML file does not appear to have any style information associated with it. The document tree is shown below. Is this a simple fix by just passing a CSS style sheet? or is the a preferred way of styling XML? ...

(Usage of Class Variables) Pythonic - or nasty habit learnt from java ?

Hello Pythoneers: the following code is only a mock up of what I'm trying to do, but it should illustrate my question. I would like to know if this is dirty trick I picked up from Java programming, or a valid and Pythonic way of doing things: basically I'm creating a load of instances, but I need to track 'static' data of all the instan...

Modify or 'tweak' an existing TreeViewItem control template?

Ok... this is sort of a two-parter here. (Sort of. May actually just be one. That's what I'm hoping anyway.) First, more generally, is it possible to target, via XAML only, a named item in a control's template? For instance, if a control's template has a ContentPresenter named 'PART_Foo' and we want to specifically set the Horizonta...

Datagridview to Clipboard with formatting

For a VB.Net application needing to output the data to clipboard, with formatting, I am in need of some help. For now, I am exporting data from the clipboard using MainView.ClipboardCopyMode = Windows.Forms.DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText System.Windows.Forms.Clipboard.SetDataObject(MainView.GetClipboardConte...

Tool for automated validation of web-page against formatting/layout rules?

Hi, Im a UI developer on a financial website and been tasked with finding (or creating) a tool to automate testing pages against a bunch of formatting/layout rules Example rules; use of bracket format for numbers: (123) rather than -123 use of ISO codes for financial amounts: USD 123 rather than $123 all numbers should be right justi...

change TLFTextField link style

I've a assets swc file that contains several TLFTextField objects, each one with it's style (font, color, size). I use the following code to set a link: var text_tf : TLFTextField; var url : String = "www.stackoverflow.com"; text_tf.htmlText = "<a href='http://" + url + "' target='_blank'>"+url+"</a>"; This works as expected, but it ...

Android:I need a slide in calculator type soft keypad a la iphone

I'm attempting to replicate on android an iphone app my company had developed externally. My need is simple but it seems hard to achieve under android. I have three numeric edittext inputs. Each should take only decimal numeric values. So numbers 0-9 and "." or ",". On the iphone this was achieved by a slide in calculator style keypad ...

Style facebook 'like' button

I'm struggling with this for a while now and without any success. Setting the style with jquery doesn't work, the same with after the facebook iframe. Is there a way to perform this task ? <iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http%3A%2F%2Fwww.example.com&amp;amp;layout=standard&amp;amp;show_faces=false&amp;am...

Modify or 'tweak' an existing TreeViewItem control template - Take II

Ok, this is sort of a follow-up to my first question http://stackoverflow.com/questions/3827701/modify-or-tweak-an-existing-treeviewitem-control-template but since it is technically a new question, I'm told a good S/O visitor should create a new one, so here it is! Ok... the existing template for a TreeViewItem is based on a grid, a bor...

Assign language via keyboard shortcut in Notepad++

I'm using the VibrantInk dark style in NP++. Love it with one exception: the language style settings don't take effect via the file extension - I have to assign it via the menu dropdown to get it to work. (I know how to associate an extension to a file type - that is NOT the problem) So, can someone tell me how to either: 1- assign a ...

Is using respondsToSelector: good style?

Is it "better style" to send a message and hope the object responds, or to check to see if it responds to a selector and have some sort of fallback if it doesn't. For example: - (NSString *)stringForObjectValue:(id)obj { if ([obj respondsToSelector:@selector(intValue)]) { NSString *roman = [self formatRomanNumber:[obj intVa...

WPF - How to avoid TextBox override of Foreground of inherited TextElement.Foreground

Hey guys, TextBox.ForegroundProperty is inherited from TextElement.ForegroundProperty. Unfortunately TextBoxs DefaultStyle sets this Property again. That means that setting TextElement.Foreground on any parent container of the TextBox does not affect the TextBoxs Foreground Color. Do you know any elegant way to avoid this behavior? I ...

Splitting C++ Strings Onto Multiple Lines (Code Syntax, Not Parsing)

Not to be confused with how to split a string parsing wise, e.g.: http://stackoverflow.com/questions/236129/how-to-split-a-string I am a bit confused as to how to split a string onto multiple lines in c++. This sounds like a simple question, but take the following example: #include <iostream> #include <string> main() { //Gives error...

wordpress blog styling

hi, I am looking for a tutorial on how to style my word press (hosted on word press) blog to look like my businesses home page. I would like the links to work and look the same. The site isn't completely styled in CSS, but can maybe move more of the styling to css from the HTML. Can someone point me in the right direction where I nee...

How to style a tablelayout in android

Can anyone tell me how to add a boarder to a TableLayout in android, like the one below? http://developer.android.com/images/table_layout.png ...

Best getComputedStyle() scripts?

I've heard of a few scripts that can return the computed/rendered style of an HTML element. I've found that simply using currentStyle and computedStyle will often be buggy. In addition, simple scripts that find the total offsetLeft/Width will go awry in many cases. Instead of trying to reinvent the wheel (if one exists at all), what are ...

setting width of div jquery

I'm trying to set the width of a div using jquery. this is how I'm trying to set the size of the div $('#page').css("width",data[0]['imageWidth']); and this is the div I'm trying to set <div id="page"> </div> any help with this would be much appreciated ...

Applying a style to ItemContainerStyle in C#

When I'm applying a Style to a ListBox.ItemContainerStyle in C# it isn't making the change at runtime. I'm using; myListBox.ItemContainerStyle = (Style)(App.Current.Resources["NewItemStyle"]); However all other styles are being supplied, such as Buttons etc where I'm going myButton.Style = (Style)(App.Current.Resources["myMainButtonS...

Tutorials/manuals for writing class and style files in LaTeX?

I've searched the net and stackoverflow and found a number of great LaTeX sources, but I couldn't find any decent manual about writing your own class and style files. Some issues I have is which part of the code should be in a class file and which in a style file, how to finetune macros, how to define and use variables,... I figured so...

How to get dojo.style to appear in firefox

Hey I was testing this code. The alert displays the result in IE but not in Firefox: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Get computed border width</title> <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.2/dojo/dojo.xd.js" djConfig="useXDomain:true">...