Tutorial by Examples

Using Android Studio 2.2 and higher Native Development Kit (NDK) you can use to compile C and C++ code. You can use NDK by manually downloading NDK and build it or through CMake . Here I will give process flow for manually install NDK and an example code, Based on your System OS you can download ...
<asp:ObjectDataSource ID="ObjectDataSourceEmployees" runat="server" TypeName="MyPackage.MyDataAccessClass" DataObjectTypeName="MyPackage.Employee" SelectMethod="GetEmployees" UpdateMethod="SaveEmplo...
Information about the item workflow is stored in the "Workflow" field. var workflow = Factory.GetDatabase("master").WorkflowProvider.GetWorkflow(workflowId); workflow.Start(item); var workflowId = item.Fields["__Default workflow"].Value; var workflow = Factory.Get...
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.goog...
import play.libs.Json; public JsonNode createJson() { // {"id": 33, "values": [3, 4, 5]} ObjectNode rootNode = Json.newObject(); ArrayNode listNode = Json.newArray(); long values[] = {3, 4, 5}; for (long val: values) { listNode.add(val); ...
import play.libs.Json; // (...) Loading a file from your public folder // Note: "app" is an play.Application instance JsonNode node = Json.parse(app.resourceAsStream("public/myjson.json")); Load from a string String myStr = "{\"name\": \"John Doe\&qu...
In the following examples, json contains a JSON object with the following data: [ { "name": "John Doe", "work": { "company": { "name": "ASDF INC", "country": "USA" }, ...
By default, Jackson (the library Play JSON uses) will try to map every public field to a json field with the same name. If the object has getters/setters, it will infer the name from them. So, if you have a Book class with a private field to store the ISBN and have get/set methods named getISBN/setI...
Large scale applications often need different properties when running on different environments. we can achieve this by passing arguments to NodeJs application and using same argument in node process to load specific environment property file. Suppose we have two property files for different enviro...
Use the tar (tape archive) command to compress your files and folders. It is similar to creating .ZIP files in Windows environment. Syntax: tar -zcvf <output tar file> <source file> Example: tar -zcvf outputfile.tar.gz source file Here’s what those switches actually mean: -c: Cr...
Inbound filter is applied when item is added to the search index and allows to specify whether item is included to the index or not. Examples when inbound filter can be used - do not include standard values and previous versions of the item in the index. Inbound filters are set in configuration: ...
Outbound filter can be used to filter the search results. One of the examples of outbound filter usage is removing items which user doesn't have access to from search results. Outbound filters are set in the configuration: <indexing.filterIndex.outbound> <processor type="Sitecore....
By default Sitecore adds all versions of the item to the sitecore_master_index. The drawback of that is that if users are using workflows and adding lots of versions all of them will be added to the search results in the content editor. Configuration: <event name="item:versionAdded" &...
A modal is a dialog window which can be displayed over the current page. <!-- Clicking the button will open the modal window --> <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target="#theModal">Open The Modal</b...
This code simply navigates WebView to some Uri: this.webView.Navigate(new Uri("http://stackoverflow.com/")); or this.webView.Source = new Uri("http://stackoverflow.com/");
Set custom user agent and navigate to Uri: var userAgent = "my custom user agent"; var uri = new Uri("http://useragentstring.com/"); var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); requestMessage.Headers.Add("User-Agent", userAgent); this.webVie...
Show specified html string in WebView: var htmlString = @"<!DOCTYPE html> <html> <head><title>HTML document</title></head> <body> <p>This is simple HTML content.</p> </body>...
You can easily open a file from your app package, but Uri scheme must be "ms-appx-web" instead of "ms-appx": var uri = new Uri("ms-appx-web:///Assets/Html/html-sample.html"); this.webView.Navigate(uri);
To open a file from local folder or temp folder, target file must not be located in those folders' root. For security reasons, to prevent other content from being exposed by WebView, the file meant for displaying must be located in a subfolder: var uri = new Uri("ms-appdata:///local/html/html-...
In case when NavigateToString can't handle some content, use NavigateToLocalStreamUri method. It will force every locally-referenced URI inside the HTML page to call to the special resolver class, which can provide right content on the fly. Assets/Html/html-sample.html file: <!DOCTYPE html> ...

Page 868 of 1336