Tutorial by Examples: content

Swift webview.reload() Objective-C [webview reload];
Simple Example (centering a single element) HTML <div class="aligner"> <div class="aligner-item">…</div> </div> CSS .aligner { display: flex; align-items: center; justify-content: center; } .aligner-item { max-width: 50%; /*for d...
1) Create a Contract Class A contract class defines constants that help applications work with the content URIs, column names, intent actions, and other features of a content provider. Contract classes are not included automatically with a provider; the provider's developer has to define them and t...
Send a 304 Not Modified response status from the server send in response to a client request that contains headers If-Modified-Since and If-None-Match, if the request resource hasn’t changed. For example if a client request for a web page includes the header If-Modified-Since: Fri, 22 Jul 2016 14:3...
If you want have a long text to display in the context, you need to set a custom content. For example, you have this: But you wish your text will be fully shown: All you need to do, is to add a style to your content like below: private void generateNotification(Context context) { ...
In many cases, for instance when using web views in table view cells, it's important to determine the content size of the rendered HTML page. After loading the page, this can be calculated in the UIWebViewDelegate delegate method: - (void) webViewDidFinishLoad:(UIWebView *) aWebView { CGRect f...
$sce ("Strict Contextual Escaping") is a built-in angular service that automatically sanitize content and internal sources in templates. injecting external sources and raw HTML into the template requires manual wrapping of$sce. In this example we'll create a simple $sce sanitation f...
This project is a self-contained example done completely in the Interface Builder. You should be able to work through it in 10 minutes or less. Then you can apply the concepts you learned to your own project. Here I just use UIViews but they can represent whatever view you like (ie, button, label...
Early on a Flash developer uses frames, as they are natively available in Flash player, to host various screens of their application (most often it's a game). Eventually they might stumble upon an issue that something goes wrong exactly because they have used frames, and overlooked the difficulties ...
str.contains() method can be used to check if a pattern occurs in each string of a Series. str.startswith() and str.endswith() methods can also be used as more specialized versions. In [1]: animals = pd.Series(['cat', 'dog', 'bear', 'cow', 'bird', 'owl', 'rabbit', 'snake']) Check if strings con...
When you have a zoomed Image (or other content) you may want to drag around the Image to show all of its content in the zoomed in state. This can be achieved by implementing the PanGestureRecognizer. From code this looks like so: var panGesture = new PanGestureRecognizer(); panGesture.PanUpdated...
Let's say you have this line of code: printf("Hello, world!\n"); Now say you want to change the text to "Program exiting." CommandBufferMnemonicci"printf("¦");change in the ".Program exiting.\n<esc>printf("Program exiting.\n");
Swift UIApplication.sharedApplication().preferredContentSizeCategory Objective-C [UIApplication sharedApplication].preferredContentSizeCategory; This returns a content size category constant, or an accessibility content size category constant.
Activity class takes care of creating a window for you in which you can place your UI with setContentView. There are three setContentView methods: setContentView(int layoutResID) - Set the activity content from a layout resource. setContentView(View view) - Set the activity content to an explic...
A common and task of someone using the Linux Command Line (shell) is to search for files/directories with a certain name or containing certain text. There are 2 commands you should familiarise yourself with in order to accomplish this: Find files by name find /var/www -name '*.css' This will...
Using git show we can view a single commit git show 48c83b3 git show 48c83b3690dfc7b0e622fd220f8f37c26a77c934 Example commit 48c83b3690dfc7b0e622fd220f8f37c26a77c934 Author: Matt Clark <[email protected]> Date: Wed May 4 18:26:40 2016 -0400 The commit message will be show...
When creating a UIView subclass, intrinsic content size helps to avoid setting hardcoded height and width constraints a basic glimpse into how a class can utilize this class ImageView: UIView { var image: UIImage { didSet { invalidateIntrinsicContentSize() } ...
If a type t is Traversable then values of t a can be split into two pieces: their "shape" and their "contents": data Traversed t a = Traversed { shape :: t (), contents :: [a] } where the "contents" are the same as what you'd "visit" using a Foldable insta...
There is an example of listing content : tar -tvf archive.tar The option -t is used for the listing. For listing the content of a tar.gz archive, you have to use the -z option anymore : tar -tzvf archive.tar.gz
filePath = "file.csv" data = np.genfromtxt(filePath) Many options are supported, see official documentation for full list: data = np.genfromtxt(filePath, dtype='float', delimiter=';', skip_header=1, usecols=(0,1,3) )

Page 3 of 6