Tutorial by Examples: al

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); ...
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...
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> ...
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 &...
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>
Amazon Linux is a RHEL variant, so the Red Hat instructions should work for the most part. There is, however, at least one discrepancy. There was an instance where the python27-devel package, as opposed to python-devel, was explicitly necessary. Here, we will install from source. sudo yum -y upd...
[Test] public void Calculator_Add_ReturnsSumOfTwoNumbers() { Calculator calculatorUnderTest = new Calculator(); double result = calculatorUnderTest.Add(2, 3); Assert.AreEqual(5, result); }
iptables -I INPUT -i docker0 -m addrtype --dst-type LOCAL -j DROP Blocks Access to host running docker daemon Does not block Container to container traffic Local LAN Internet Custom docker networks that doesn't use docker0
docker network create --subnet=192.168.0.0/24 --gateway=192.168.0.1 --ip-range=192.168.0.0/25 local-host-restricted iptables -I INPUT -s 192.168.0.0/24 -m addrtype --dst-type LOCAL -j DROP Creates a network called local-host-restricted which which: Blocks Access to host running docker daem...
If you are using Sublime Text 3 then the simplest way to install Package Control is to select Install Package Control in the Tools menu or in the Command Palette and Sublime Text will install it automatically. Manually Installing: For Sublime Text 2, older versions of Sublime Text 3, or if you hav...
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...
Example of how ReplaceAll only applies a rule at most once, while ReplaceRepeated will do so in a loop but always restart application from the first rule. x + a /. { a_ + z :> (Print[0]; DoneA), a_ + x :> (Print[1]; y + z), a_ + y :> (Print[2]; DoneB)} (* Prints "1&quot...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. So, be sure if you have Java in your system. If not, then follow the procedure: # Install wget with yum yum -y install w...
How to implement Firebase Real-Time database in Android applications. Setup/Installation: First, install the Firebase SDK (guide) Register your project using the Firebase console After successfuly completing the two steps above, add the following dependency in your application level ...
Assuming , you have a grasp of how to install gulp, let us dive right down to requiring all the gulp- dependencies from package.json under your projects root folder. In case you do not have a gulpfile yet , please create an empty file with the name gulpfile.js First , we require gulp. like so: v...
Our goal , is to Make your Images conform to widths and scale appropriately, by generating a battery of images of varied widths, and to minify them Lint your Javascript Minimize your assets - JS/CSS/HTML , thus enabling you to host a lighter than lightest code Watch the css/js/image files for ...

Page 171 of 269