Tutorial by Examples: content

IRandomAccessStreamReference bitmap = GetBitmap(); IRandomAccessStreamWithContentType stream = await bitmap.OpenReadAsync(); BitmapDecoder decoder = await BitmapDecoder.CreateAsync(stream); var pixels = await decoder.GetPixelDataAsync(); var outStream = new InMemoryRandomAccessStream(); // Cr...
View content: adb shell ls \$EXTERNAL_STORAGE adb shell ls \$SECONDARY_STORAGE View path: adb shell echo \$EXTERNAL_STORAGE adb shell echo \$SECONDARY_STORAGE
In the above example, if we want to send out HTML content as message in the email, then create a HTML file by going to File -> New -> HTML file Now you can see a HTML file besides your gs file as follows : Now, update the getMessage() method from above example as follows : function getMes...
The FileSystem API of Java 7 allows to read and add entries from or to a Zip file using the Java NIO file API in the same way as operating on any other filesystem. The FileSystem is a resource that should be properly closed after use, therefore the try-with-resources block should be used. Reading ...
The exposition pipe operator, %$%, exposes the column names as R symbols within the left-hand side object to the right-hand side expression. This operator is handy when piping into functions that do not have a data argument (unlike, say, lm) and that don't take a data.frame and column names as arg...
The standard library module urllib.request can be used to download web content: from urllib.request import urlopen response = urlopen('http://stackoverflow.com/questions?sort=votes') data = response.read() # The received bytes should usually be decoded according the response's characte...
The received bytes have to be decoded with the correct character encoding to be interpreted as text: Python 3.x3.0 import urllib.request response = urllib.request.urlopen("http://stackoverflow.com/") data = response.read() encoding = response.info().get_content_charset() html = d...
Apple introduced ATS with iOS 9 as a new security feature to improve privacy and security between apps and web services. ATS by default fails all non HTTPS requests. While this can be really nice for production environments, it can be a nuisance during testing. ATS is configured in the target's Inf...
Similar to enabling all HTTP content, all configuration happens under the App Transport Security Settings. Add the Exception Domains dictionary (NSExceptionDomains) to the top level ATS settings. For every domain, add a dictionary item to the Exception Domains, where the key is the domain in questi...
There are a few ways to inspect the contents of a zipfile. You can use the printdir to just get a variety of information sent to stdout with zipfile.ZipFile(filename) as zip: zip.printdir() # Out: # File Name Modified Size ...
SVG Patterns behave significantly differently than CSS background images when filling equivalent shapes. This can lead to significant surprises for new-comers to SVG. Below are examples of a pattern defined in all possible combinations of patternUnits and patternContentUnits - showing how these sett...
You may need to render some content in view, which is specific to some environment only. To achieve this goal you can use Environment tag helper: <environment names="Development"> <h1>This is heading for development environment</h1> </environment> <envi...
Calling the function string InvoiceHtml = myFunction.RenderPartialViewToString("PartialInvoiceCustomer", ToInvoice); // ToInvoice is a model, you can pass parameters if needed Function to generate HTML public static string RenderPartialViewToString(string viewName, object model) { ...
To print the contents of a file, we can use loadfile to read a file into a local property, and then use echo to print the value of it. <loadfile property="contents" srcFile="example.txt" /> <echo message="${contents}" />
If you were to hide a link by setting display: none in the CSS then screen readers wouldn’t find it. Instead, we position it absolutely, with clipping. CSS .offscreen { position: absolute; clip: rect(1px 1px 1px 1px); /* for Internet Explorer */ clip: rect(1px, 1px, 1px, 1px); padding: 0; b...
Layout.xml <WebView android:id="@+id/WebViewToDisplay" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" ...
A layout manager for templated views. Used within a ControlTemplate to mark where the content to be presented appears.
An element with a single content. ContentView has very little use of its own. Its purpose is to serve as a base class for user-defined compound views. XAML <ContentView> <Label Text="Hi, I'm a simple Label inside of a simple ContentView" HorizontalOptions="Center" ...
To track so called "virtual pageviews", use the ga('send') method right after your asynchronous request: Syntax: ga('send', 'pageview', 'path to your virtual page'); Example (Simple Link): <a href="http://example.com/my.pdf" onClick="ga('send', 'pageview', '/virtu...
<div class="list-group"> <a href="#" class="list-group-item active"> <h4 class="list-group-item-heading">List group item heading</h4> <p class="list-group-item-text">...</p> </a> </div>...

Page 4 of 6