Tutorial by Examples: sin

xdmp:estimate(cts:search(fn:doc(), cts:element-value-query(xs:QName("d"), "fragment-d"))) xdmp:estimate can not be used on XPaths unlike fn:count is used in previous example xdmp:estimate actually gives the number of matching fragments
void DispatchToMainThread(std::function<void()> callback) { // any thread QTimer* timer = new QTimer(); timer->moveToThread(qApp->thread()); timer->setSingleShot(true); QObject::connect(timer, &QTimer::timeout, [=]() { // main thread ...
When using html5Mode([mode]) it is necessary that: You specify the base URL for the application with a <base href=""> in the head of your index.html. It is important that the base tag comes before any tags with url requests. Otherwise, this might result in this error - &quo...
<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...
In the following examples, json contains a JSON object with the following data: [ { "name": "John Doe", "work": { "company": { "name": "ASDF INC", "country": "USA" }, ...
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...
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...
If you have a list in memory already, the straightforward and usually sufficient way to process it is a simple foreach loop: foreach my $item (@items) { ... } This is fine e.g. for the common case of doing some processing on $item and then writing it out to a file without keeping the data ...
Such Example is knowing wide spreading among PWAs (Progressive Web Applications) and in this example we're going to send a simple Backend like notification using NodeJS and ES6 Install Node-GCM Module : npm install node-gcm Install Socket.io : npm install socket.io Create a GCM Enable...
After succesfully setup Spring-Boot application all the configuration is handled in an application.properties file. You will find the file at src/main/resources/. Normally there is a need to have a database behind the application. For development its good to have a setup of dev and a prod environme...
The best way to install and configure a Symfony2 project is described in the official documentation as follows: Mac OS X / Linux $ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony $ sudo chmod a+x /usr/local/bin/symfony Windows c:\> php -r "file_put_contents('sym...
Disable Private Browsing Open your device’s Safari settings and ensure that Private Browsing is turned off. Remote debugging will not work if Private Browsing is enabled. Enable Web Inspector Tap the Advanced tab on your device’s Safari settings and ensure that Web Inspector is turned on....
Installing mvvmcross with nugget: Search for mvvmcross in the "Manage Nugget Packages" window. Installing mvvmcross with Package Manger Console: PM> Install-Package MvvmCross Make sure to install it on both your PCL (Portable Class Library) and you application project. As the...
First off you create the form @using (Html.BeginForm()) { @Html.AntiForgeryToken() } Action Method [HttpPost] [ValidateAntiForgeryToken] public ActionResult Test(FormViewModel formData) { // ... } Script <script src="https://code.jquery.com/jquery-1.12.4.min.js"&g...
page.js var context = { items: [ {id: 1, name: "Foo"}, {id: 2, name: "Bar"}, {id: 3, name: "Joe"} ] } exports.loaded = function(args){ var page = args.object; page.bindingContext = context; } exports.showEntry = functi...
Achieving multitenancy on database server with multiple databases hosted on it. Multitenancy is common requirement of enterprise application nowadays and creating connection pool for each database in database server is not recommended. so, what we can do instead is create connection pool with datab...
The Python function import_csv_to_dynamodb(table_name, csv_file_name, colunm_names, column_types) below imports a CSV file into a DynamoDB table. Column names and column must be specified. It uses boto. Below is the function as well as a demo (main()) and the CSV file used. import boto MY_ACCESS...

Page 106 of 161