Tutorial by Examples: o

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/");
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> ...
After the install of an IoC (Inversion of Control) container, some tweaks are needed to make it work. In this case, I'll use Ninject. In the NinjectWebCommon file, that is located in the App_Start folder, substitute the CreateKernel method with: private static IKernel CreateKernel() { ...
In the concrete class that need the service, use the interface to access the service instead of its implementation like: public class BenefitAppService { private readonly IBenefitService _service; public BenefitAppService(IBenefitService service) { _service = service; ...
By default, a Docker container won't be able to run a GUI application. Before that, the X11 socket must be forwarded first to the container, so it can be used directly. The DISPLAY environment variable must be forwarded as well: docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY &...
In command mode(Esc) enter :gg=G to use Vim's built-in indention engine. Command PartDescriptionggstart of file=indent (when equalprg is empty)Gend of file You can set equalprg in your .vimrc to use a more sophisticated auto-formatting tool. For example, to use clang-format for C/C++ put the foll...
Since Node is single-threaded, there is a need of workaround if it comes to a long-running calculations. Note: this is "ready to run" example. Just, don't forget to get jQuery and install the required modules. Main logic of this example: Client sends request to the server. Server sta...
Arrays in MATLAB are held as continuous blocks in memory, allocated and released automatically by MATLAB. MATLAB hides memory management operations such as resizing of an array behind easy to use syntax: a = 1:4 a = 1 2 3 4 a(5) = 10 % or alternatively a = [a, 10] a = ...
<asp:Literal runat="server" text="<%$ AppSettings:MyAppSettingName %>"/>
<div> The time is now <%= DateTime.Now.ToString() %> </div>
<div> <form id="form1" runat="server"> <% for (int i = 1; i <= 10; j++) { Response.Write(i) + " "; } %> </form> <div>
Docs file (Input File) Mary had a little lamb its fleece was white as snow and everywhere that Mary went the lamb was sure to go. Hive Query CREATE TABLE FILES (line STRING); LOAD DATA INPATH 'docs' OVERWRITE INTO TABLE FILES; CREATE TABLE word_counts AS SELECT word, count(1) AS count F...
The example is taken from threejs website. You may want to download three.js and change the script source below. There are many more advanced examples under this link. HTML: <html> <head> <meta charset=utf-8> <title>My first Three.js app</title> <...
When reading a potentially large file, a while loop has a significant memory advantage over foreach. The following will read the file record by record (by default, "record" means "a line", as specified by $/), assigning each one to $_ as it is read: while(<$fh>) { pri...

Page 667 of 1038