I'm looking for the way to collect/scrape tag's arguments in a web page.
One of the tag I want to extract argument is following:
<div style="display:block;height:3px;width:47px;background-position: -5px 0px" class="resource_graph_70px"></div>
in there, I want to collect '47'. the one in 'width:47px'.
I have no idea about collecting those arguments. So I hope anyone can help me with this.
Thank you for your helps in advance!
Have a nice day.
You can do it like:
element = driver.find_element_by_css_selector(".resource_graph_70px")
element.value_of_css_property("width")
The output will be: 47px.
Hope it helps you!
I need your help !
In xamarin.forms, I would like a Label with a fixed Width. When the text is too long, it is on several lines. So, I would like set a maximum height or number of lines.
I think to measure the string lengh but I no found method.
I hope there is a solution to Xamarin.Forms (PCL project). I don't want to do specific code for each platform if it's possible.
Thank you in advance !
I found a solution.
When I set HeightRequest property to Label, it didn't work.
When I wrapped the Label in a StackLayout and set HeightRequest property to the StackLayout, I succeeded.
<StackLayout Orientation="Horizontal" HeightRequest="70">
<Label Text="..." />
</StackLayout>
you can use "MaxLines" to display how many lines you want.
There are a few options available. If you don't want the label to wrap you can set the Label.LineBreakMode to NoWrap. More info here.
You can directly specify a HeightRequest or set VerticalOptions on the Label.
Try posting a code example of what you have tried for more assistance.
Under the geoserver styling, how to set the LineSymbolizer tag to avoid line-overlapping. When I am zooming out, the geoserver is arbitrarily putting one line on top of another if they are too close to each other.
Additionally, the following XML code is allowing me to use "arrow" graphics for LineSymbolizer. But how to allow these arrows to bend at the corners?
<LineSymbolizer>
<Stroke>
<GraphicStroke>
<Graphic>
<Mark>
<WellKnownName>ttf://FreeSerif#0x279f</WellKnownName>
<Fill>
<CssParameter name="fill">#00B22D</CssParameter>
</Fill>
</Mark>
<Size>30</Size>
</Graphic>
</GraphicStroke>
</Stroke>
</LineSymbolizer>
We hide some line objects depending on the zoom level. For example, in small scale we show just big rivers. Try to use Zoom-based lines http://docs.geoserver.org/2.5.x/en/user/styling/sld-cookbook/lines.html#zoom-based-line .
For setting arrows' direction try to use attribute followLine http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html#label-following-line .
I've created a nice chart but there's one thing missing. I'd like to be able to set a text somewhere in it. The optimal solution would be e.g. the current date smacked in huge yellow letters right in the middle of my graph.
I've googled for such a thing but none of the links (proof that I've googled #1, proof that I've googled #2) gave any hints on whether it's possible or not. In fact, the mock-up image in the second link would be something for me if the descriptions and arrows weren't drawn afterwards in an image processor.
NB. It's not a report at all. It's just a chart - a single, lonely chart - that displays values of a couple of series. I get to control the appearance, the legend etc. However, I'd like to put a floating text object (DIV formatable by CSS would be perfect), sprite, overlay, call it whatever you'd like, that will get its value from a given field (e.g. the current date).
And if I can position it freely anywhere over the graph, that'd be even "perfecter" but I'd settle for placement on form "top-right" or such. Alternatively, if there's an option to combine two "views" on top of each other or anything like that (I'm beating around the bushes with this).
Is that achievable and if so how?
Right, I've had a play, a good dig around with the SDK, a bit of a google and this is the best I can come up with.
I know how to place text at arbitary positions on the chart, but only with static text, e.g. I don't know how to bind the text dynamically to anything - I suspect this is more to do with CRM than Charts, I couldnt find much documentation for CRM and Charts.
So I've found that TextAnnotation allow you to bascially place text wherever you like. This is contained within theAnnotations collections.
For example:
<Chart>
...
<Annotations>
<TextAnnotation Text="This is an annotation" Name="TextAnnotation1" X="20" Y="50">
</TextAnnotation>
</Annotations>
...
</Chart>
So important to note that the position of the TextAnnotation is relative, e.g. the annotation will appear 20% of the width of the chart from the left. 0,0 is the top left corner. The MSDN has some more detail on positioning.
So I can create a chart like this:
HELLO WORLD! is the annotation.
Using this xml:
<Chart Palette="None" PaletteCustomColors="55,118,193; 197,56,52; 149,189,66; 117,82,160; 49,171,204; 255,136,35; 97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83">
<Series>
<Series ShadowOffset="0" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PieLabelStyle=Inside, PieDrawingStyle=Default" ChartType="pie">
<SmartLabelStyle Enabled="True" />
</Series>
</Series>
<ChartAreas>
<ChartArea>
<Area3DStyle Enable3D="false" />
</ChartArea>
</ChartAreas>
<Legends>
<Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
</Legends>
<Titles>
<Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="0, 0, 0"></Title>
</Titles>
<Annotations>
<TextAnnotation Text="HELLO WORLD!" Font="Stencil, 15.75pt, style=Bold, Italic, GdiCharSet=0" Name="TextAnnotation1" X="20" Y="50" ForeColor="Orange">
</TextAnnotation>
</Annotations>
</Chart>
If that doesnt achieve your requirements I would suggest having a look at an SSRS report or some other custom piece IFramed into the dashboard.
You might want to check this link where they put descriptive text on a map. I haven't got that to work (didn't try very hard, either) but it's pretty easy to set just some text instead of a graph by the following code.
<visualization>
<primaryentitytypecode>blobb</primaryentitytypecode>
<name>My custom name</name>
<webresourcename>MyCustomHttpFile</webresourcename>
</visualization>
I would be nice indeed to surprise a customer with a flash text sometimes so the idea is worth exploring. Strangely, I haven't found any good guide on how to do that.
I'm trying to define the DisplayPattern of a custom field to do as follow. It's a simple text field used in document libraries, but i want the text entered to be displayed as a link to the document in the list view.
<URL Cmd="Display"> gives me the display form, but I want the link to actually download/open the document...
I can't for the life of me figure this one out...
Thanks for your help!
The answer lied in <LookupColumn Name="FileLeafRef" /> used along with <ListUrlDir />...