Tutorial by Examples: sin

To get this example working, you'll need to create an IIS 7/8 app on your IIS host and add the directory containing the Node.js Web App as the Physical Directory. Ensure that your Application/Application Pool Identity can access the Node.js install. This example uses the Node.js 64-bit installation....
Using a Virtual Directory or Nested Application in IIS is a common scenario and most likely one that you'll want to take advantage of when using IISNode. IISNode doesn't provide direct support for Virtual Directories or Nested Applications via configuration so to achieve this we'll need to take adv...
To get Socket.io working with IISNode, the only changes necessary when not using a Virtual Directory/Nested Application are within the Web.config. Since Socket.io sends requests starting with /socket.io, IISNode needs to communicate to IIS that these should also be handled IISNode and aren't just s...
angular.module("app") .service("counterService", ["fooService", "barService", function(anotherService, barService){ var service = { number: 0, foo: function () { return fooService.bazMethod(); // Use of 'fooService' ...
Symfony REST Edition is a fully-functional Symfony2 application that you can use as the skeleton for your new applications. Available on Github It comes pre-configured with the following bundles: BundleDescriptionFrameworkBundleThe core Symfony framework bundle.SensioFrameworkExtraBundleAdds seve...
Create a Laravel application: $ composer create-project laravel/laravel hello-world Navigate to the project folder, e.g. $ cd C:\xampp\htdocs\hello-world Create a controller: $ php artisan make:controller HelloController --resource This will create the file app/Http/Con...
from string import Template data = dict(item = "candy", price = 8, qty = 2) # define the template t = Template("Simon bought $qty $item for $price dollar") print(t.substitute(data)) Output: Simon bought 2 candy for 8 dollar Templates support $-based substitution...
/** * @author piotrek1543 * * This example provides a specific UI testing problem and how it is already solved * with Google's Espresso. Notice that I used also Spoon framework, as Espresso * lacks of taking screenshots functionality. */ @RunWith(AndroidJUnit4.class) public class M...
Suppose you have the table T1 and it has relation with many tables and its primary key constraint name is "pk_t1" you want to disable these foreign keys you can use: Begin For I in (select table_name, constraint_name from user_constraint t where r_constraint_name='pk_t1') loop E...
Out line for details find a theme you like in the gallery install theme activate theme *need to add screen shots.
MongoDB supports secondary indexes. In Mongoose, we define these indexes within our schema. Defining indexes at schema level is necessary when we need to create compound indexes. Mongoose Connection var strConnection = 'mongodb://localhost:27017/dbName'; var db = mongoose.createConnection(strConn...
using CLI: $ opennlp SentenceDetector ./en-sent.bin < ./input.txt > output.txt using API: import static java.nio.file.Files.readAllBytes; import static java.nio.file.Paths.get; import java.io.IOException; import java.util.Objects; public class FileUtils { /** * Get file data as...
Install the required dependencies: 'org.apache.solr:solr-solrj:5.5.1' 'org.apache.httpcomponents:httpclient:4.3.6' 'com.ibm.watson.developer_cloud:java-sdk:3.2.0' The code below assumes you have a Solr collection with documents and you have trained a ranker, otherwise follow this tutorial pub...
To find a file in the Hadoop Distributed file system: hdfs dfs -ls -R / | grep [search_term] In the above command, -ls is for listing files -R is for recursive(iterate through sub directories) / means from the root directory | to pipe the output of first command to the second grep command t...
Thread Pools are used mostly calling methods in ExecutorService. The following methods can be used to submit work for execution: MethodDescriptionsubmitExecutes a the submitted work and return a future which can be used to get the resultexecuteExecute the task sometime in the future without gettin...
#include <omp.h> #include <stdio.h> int main (int argc, char *argv[]) { #pragma omp parallel { printf ("Hello world! I'm thread %d out of %d threads.\n", omp_get_thread_num(), omp_get_num_threads()); } return 0; } This code simply ...
The per-directory context is a part of the static configuration file between <Directory> and </Directory> tags. The entire content of dynamic configuration files is within the per-directory context of the folder in which the .htaccess resides. RewriteRule's in per-directory context matc...
The virtual host context is a part of the static configuration file between <VirtualHost> and </VirtualHost> tags. RewriteRule's in virtual host context match against the part of an url after the protocol, hostname and port, and before the query string. When the following rule is used ...
QRCodeReaderView implements an Android view which show camera and notify when there's a QR code inside the preview. It uses the zxing open-source, multi-format 1D/2D barcode image processing library. Adding the library to your project Add QRCodeReaderView dependency to your build.gradle dependen...
This example describes passing an event using the Otto Event Bus. To use the Otto Event Bus in Android Studio you have to insert the following statement in your modules gradle file: dependencies { compile 'com.squareup:otto:1.3.8' } The event we'd like to pass is a simple Java object: pu...

Page 101 of 161