Tutorial by Examples: st

<form asp-action="create" asp-controller="Home" asp-route-returnurl="dashboard" asp-route-from="google"> <!--Your form elements goes here--> </form> This will generate the below markup <form action=&qu...
Extension methods enable you to simplify your interface definitions by only including core required functionality in the interface itself and allowing you to define convenience methods and overloads as extension methods. Interfaces with fewer methods are easier to implement in new classes. Keeping o...
Shiny can run as a standalone application on your local computer, on a server that can provide shiny apps to multiple users (using shiny server), or on shinyapps.io. Installing Shiny on a local computer: in R/RStudio, run install.packages("shiny") if installing from CRAN, or devtools::i...
// Converts the string representation of a date and time to its DateTime equivalent var dateTime = DateTime.Parse("14:23 22 Jul 2016"); Console.WriteLine(dateTime.ToString());
// Converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded string[] dateTimeStrings = new []{ "14:23 22 Jul 2016", "99:23 2x Jul 2016", "22/7/2016 14:23:0...
Data from a POST request is stored in the superglobal $_POST in the form of an associative array. Note that accessing a non-existent array item generates a notice, so existence should always be checked with the isset() or empty() functions, or the null coalesce operator. Example: $from = isset($_...
Quickstart for Jekyll $ gem install jekyll $ jekyll new my-awesome-site $ cd my-awesome-site ~/my-awesome-site $ jekyll serve Now browse to http://localhost:4000 Quickstart for Jekyll with Bundler $ gem install jekyll bundler $ jekyll new my-awesome-site $ cd my-awesome-site ~/my...
First, we'll need to do some setup to get HStoreField working. make sure django.contrib.postgres is in your `INSTALLED_APPS Add HStoreExtension to your migrations. Remember to put HStoreExtension before any CreateModel or AddField migrations. from django.contrib.postgres.operations import HSt...
-> Note: make sure you set up HStoreField first before going on with this example. (above) No parameters are required for initializing a HStoreField. from django.contrib.postgres.fields import HStoreField from django.db import models class Catalog(models.model): name = models.C...
Pass a native python dictionary mapping strings to strings to create(). Catalog.objects.create(name='Library of Congress', titles_to_authors={ 'Using HStoreField with Django': 'CrazyPython and la communidad', 'Flabbergeists and thingamajigs': 'La Artista Fooista', 'Pro Git': 'Scott C...
# Fetch and install package to setup access to the official APT repository wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb sudo dpkg -i erlang-solutions_1.0_all.deb # Update package index sudo apt-get update # Install Erlang and Elixir sudo apt-get install esl-erlan...
Run command below to install nginx. sudo apt-get install nginx By default, Nginx automatically starts when it is installed. You can access the default Nginx landing page to confirm that the software is running properly by visiting your server's domain name or public IP address in your web browse...
Here is a program that calls malloc but not free: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { char *s; s = malloc(26); // the culprint return 0; } With no extra arguments, valgrind will not look for this error. But if we turn on...
You can test if a string matches several regular expressions using a switch statement. Example case "Ruby is #1!" when /\APython/ puts "Boooo." when /\ARuby/ puts "You are right." else puts "Sorry, I didn't understand that." end This w...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load(collList); clientContext.ExecuteQuery(); foreach (List oList in collList) { Console.WriteLine("Title: {0} Created: {1}",...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load( collList, lists => lists.Include( list => list.Title, list => list.Id)); clientContext.ExecuteQuery(...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<List> resultCollection = clientContext.LoadQuery( collList.Include( list=>list.Title, list=>list.Id)); clientCo...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<SP.List> listInfo = clientContext.LoadQuery( collList.Include( list => list.Title, list => list.Fields.Include( ...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCreationInformation listCreationInfo = new ListCreationInformation(); listCreationInfo.Title = "My Announcements List"; listCreationInfo.TemplateType = (int)ListTemplateType.Announcements;...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); SP.Field oField = oList.Fields.AddFieldAsXml("<Field DisplayName='MyField' Type='Number' />", true, AddFieldOptions.DefaultValue); ...

Page 91 of 369