Tutorial by Examples: ti

<stock> <add> <item> <name>Milk</name> <quantity>2</quantity> </item> </add> </stock> Putting this body to an resource like /stocks/123 violates the idea behind REST. While this bod...
Sample property file : nexus.properties Sample property file content: nexus.user=admin nexus.pass=admin nexus.rest.uri=http://xxx.xxx.xxx.xxx:xxxx/nexus/service/local/artifact/maven/content Sample Context File xml configuration <context:property-placeholder location="classpath:Releas...
$color-purple-bg: #AF6EC4; $color-purple-border: #5D0C66; $color-yellow-bg: #E8CB48; $color-yellow-border: #757526; .tooltip { position: relative; &--arrow-down { @include pointer('bottom', 30px, ($color-purple-border, $color-purple-bg), 15px); } ...
(ns so-doc.events) (enable-console-print!) (defn click-event [] (println "Button clicked")) (defn load-event [] (println "Page loaded!") (.addEventListener (.getElementById js/document "btn") "click" click-event false)) (.addEventListener ...
$collection = Mage::getModel('catalog/product') ->getCollection() ->setPageSize(20) ->setCurPage(1);
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...
function positive() { return 0 } function negative() { return 1 }
using Android.App; using Android.OS; using Android.Content; using Android.Database; using Xamarin.Forms; namespace contact_picker.Droid { [Activity (Label = "ChooseContactActivity")] public class ChooseContactActivity : Activity { public string type_num...
using System; using Android.App; using Android.Content; using Android.Content.PM; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; using Xamarin.Forms; namespace contact_picker.Droid { [Activity (Label = "contact_picker.Droid", Icon = &...
If the input HTML DOM is <html> <body> <a>link</a> <div class='container' id='divone'> <p class='common' id='enclosedone'>Element One</p> <p class='common' id='enclosedtwo'>Element Two</p> ...
Interceptors require the IInterceptor interface. Any public method within the intercepted class will be intercepted (including getters and setters) public class MyInterceptor : IInterceptor { public void Intercept(IInvocation invocation) { //Calls the next method in the chain - T...
Installations Download and install: Java 8 - download the relevant installation from Oracle site. Activator - download zip from www.playframework.com/download and extract files to the target Play folder, for example to: c:\Play-2.4.2\activator-dist-1.3.5 sbt - download from www.sc...
Okay it took me about a day to figure it out so here I am posting the steps I followed to get my Database First working in a Class Project (.NET Core), with a .NET Core Web App. Step 1 - Install .NET Core Make Sure you are using .NET Core not DNX (Hint: You should be able to see the .NET Core opti...
A daemon process executes a program in the background, usually without user interaction. The example below shows how to create a daemon and register a listener, which monitors all open applications. The main part is the function call NSRunLoop.mainRunLoop().run(), which starts the daemon. class MyO...
This serializer has some nice features that the default .net json serializer doesn't have, like Null value handling, you just need to create the JsonSerializerSettings : public static string Serialize(T obj) { string result = JsonConvert.SerializeObject(obj, new JsonSerializerSettings { NullVa...
You can make a URI parameter optional by adding a question mark to the route parameter. You can also specify a default value by using the form parameter=value. public class BooksController : Controller { // eg: /books // eg: /books/1430210079 [Route(“books/{isbn?}”)] public Act...
Pretext This is an introduction to the Hello World program example on the Raspberry Pi written in C. The following example makes use of the command line interface and is set up as a step-by-step guide. Along with creating a Hello World program, the reader will be introduced to simple linux comman...
Provides the ratio of the current rows value to all the values within the window. --Data CREATE TABLE Employees (Name Varchar2(30), Salary Number(10)); INSERT INTO Employees Values ('Bob',2500); INSERT INTO Employees Values ('Alice',3500); INSERT INTO Employees Values ('Tom',2700); INSERT INTO...
Another way of doing aggregations is by using the Mongo.Collection#rawCollection() This can only be run on the Server. Here is an example you can use in Meteor 1.3 and higher: Meteor.methods({ 'aggregateUsers'(someId) { const collection = MyCollection.rawCollection() const aggre...
Example: Customers who can create a post. Each customer can create multiple posts. As soon as customer creates the post, post will be under administrators review. Now we have to fetch the customers list who have all active posts by using sub-query. Note: If a customer has 5 post, among 5 posts if h...

Page 338 of 505